next next up down toc toc Src mail

all, section 8.1.

8.1.  Inetd

On UNIX systems, a program called Inetd maintains passive sockets on a variety of these well-known ports. When a new connection is created, inetd starts a program to handle the connection, based upon a configuration table inetd.conf.

% cat /etc/inetd.conf
#
#ident  "@(#)inetd.conf  1.27  96/09/24 SMI"  /* SVr4.0 1.5  */
#
#
# Configuration file for inetd(1M).  See inetd.conf(4).
#
# To re-configure the running inetd process, edit this file, then
# send the inetd process a SIGHUP.
#
# Syntax for socket-based Internet services:
#  <service_name> <socket_type>
#     <proto> <flags> <user> <server_pathname> <args>
#
# Syntax for TLI-based Internet services:
#
#  <service_name> tli <proto> <flags> <user> <server_pathname> <args>
#
# Ftp and telnet are standard Internet services.
#
ftp     stream  tcp  nowait  root /usr/sbin/in.ftpd    in.ftpd
telnet  stream  tcp  nowait  root /usr/sbin/in.telnetd in.telnetd
#
# Tnamed serves the obsolete IEN-116 name server protocol.
#
name  dgram  udp  wait  root  /usr/sbin/in.tnamed  in.tnamed
#
# Shell, login, exec, comsat and talk are BSD protocols.
#
shell   stream  tcp  nowait  root  /usr/sbin/in.rshd  in.rshd
login   stream  tcp  nowait  root  /usr/sbin/in.rlogind  in.rlogind
exec    stream  tcp  nowait  root  /usr/sbin/in.rexecd  in.rexecd
comsat  dgram   udp  wait    root  /usr/sbin/in.comsat  in.comsat
talk    dgram   udp  wait    root  /usr/sbin/in.talkd  in.talkd
...

This way, one program can handle incoming connections for a variety of services. inetd only runs server programs as they are needed, and will spawn multiple server programs to service multiple network connections. inetd works best for network services with fairly long duration, so the extra startup overhead becomes negligible.


back next up down toc toc Src mail


Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1998).

Last modified: 08/May/98 (11:53)