DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

inetd(ADMN)


inetd -- Internet ``super server''

Syntax

/etc/inetd [ -d ] [ -l backlog_queue_length ] [ configuration_file ]

Description

inetd listens on multiple ports for incoming connection requests. When it receives a request, it spawns the appropriate server. The use of a ``super server'' allows other servers to be spawned only when needed and to terminate when they have satisfied a particular request.

The mechanism is as follows: inetd is started by root (usually during init 2, if /etc/tcp is linked to /etc/rc2.d/Snn/tcp.) To obtain information about the servers it needs to spawn, inetd reads its configuration file (by default, this is /etc/inetd.conf) and issues a call to getservbyname (see getservent(SLIB)). (Note that /etc/services and /etc/protocols must be properly configured.) inetd then creates a socket for each server and binds each socket to the port for that server. It does a listen(SSC) on all connection-based sockets (that is, stream rather than datagram), and waits, using select(S), for a connection or datagram.


The following servers are normally started by inetd: fingerd, ftpd, rexecd, rlogind, rshd, talkd, telnetd, and tftpd. inetd can also start several internal services: these are described in inetd.conf(SFF). Do not arrange for inetd to start named, routed, rwhod, sendmail, pppd, listen (RFS listening server), or any NFS server.

TCPMUX

inetd implements the TCPMUX protocol as described in RFC 1078: ``A TCP client connects to a foreign host on TCP port 1. It sends the service name followed by a carriage-return line-feed <CRLF>. The service name is never case sensitive. The server replies with a single character indicating positive (+) or negative (-) acknowledgment, immediately followed by an optional message of explanation, terminated with a <CRLF>. If the reply was positive, the selected protocol begins; otherwise the connection is closed.'' The program is passed the TCP connection as file descriptors 0 and 1.

If the TCPMUX service name begins with a ``+'', inetd returns the positive reply for the program. This allows you to invoke programs that use stdin/stdout without putting any special server code in them.

The special service name ``help'' causes inetd to list the TCPMUX services currently configured in /etc/inetd.conf.

Configuration

inetd rereads its configuration file when it receives a hangup signal, SIGHUP. Services may be added, deleted or modified when the configuration file is reread.

inetd records its process id in the file /etc/inetd.pid so that its process id may be quickly determined.

Options


-d
Turns on socket-level debugging and prints debugging information to the standard output (stdout).

-l backlog_queue_length
Sets the backlog queue length for listen(SSC). The default queue length is 10.

Diagnostics

   date user inetd[n]: smp_check_user: user: not found
inetd outputs this error to the system log if an /etc/inetd.conf entry requests that a service be run under an unknown user ID.

Files


/etc/inetd.conf
the inetd configuration file

/etc/inetd.pid
the inetd process id file

/etc/protocols
the protocols database

/etc/services
the services database

See also

fingerd(ADMN), ftpd(ADMN), inetd.conf(SFF), protocols(SFF), rexecd(ADMN), rlogind(ADMN), rshd(ADMN), services(SFF), talkd(ADMN), telnetd(ADMN), tftpd(ADMN)

Standards conformance

inetd is conformant with:

RFC 862 (STD 20), RFC 863 (STD 21), RFC 864 (STD 22), RFC 867 (STD 25), RFC 868 (STD 26), RFC 1078


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003