Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ inetd(ADMN) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fingerd(ADMN)

ftpd(ADMN)

rexecd(ADMN)

rlogind(ADMN)

rshd(ADMN)

talkd(ADMN)

telnetd(ADMN)

tftpd(ADMN)

inetd.conf(SFF)

protocols(SFF)

services(SFF)


 inetd(ADMN)                   06 January 1993                    inetd(ADMN)


 Name

    inetd - internet ``super-server''

 Syntax

    /etc/inetd [ -d ] [ 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 the super-user (usually
    during init 2, if /etc/tcp is linked to /etc/rc2.d/Snntcp.)  To obtain
    information about the servers it needs to spawn, inetd reads its configu-
    ration 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.

    +  When a connection request is received on a listening (stream) socket,
       inetd does an accept(SSC), thereby creating a new socket.  (inetd con-
       tinues to listen on the original socket for new requests).  inetd
       forks, dups, and execs the appropriate server, passing it any server
       program arguments specified in inetd's configuration file. The invoked
       server has I/O to stdin, stdout, and stderr done to the new socket;
       this connects the server to the client process. (Some ``built-in'',
       internal services are performed via function calls rather than child
       processes.)

    +  When there is data waiting on a datagram socket, inetd forks, dups,
       and execs the appropriate server, passing it any server program argu-
       ments; unlike a connection-based server, a datagram server has I/O to
       stdin, stdout, and stderr done to the original socket.  If the
       datagram socket is marked as ``wait'' (this corresponds to an entry in
       inetd's configuration file), the invoked server must process the mes-
       sage before inetd considers the socket available for new connections.
       If the datagram socket is marked as ``nowait'', inetd continues to
       process incoming messages on that port. tftpd is an exceptional case:
       although its entry in inetd's configuration file must be ``wait''
       (this is to avoid contention for the port), inetd is able to continue
       processing new messages on the port.

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

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

    The -d option turns on socket-level debugging and prints debugging infor-
    mation to stdout.

 Files

    /etc/inetd.conf
    /etc/protocols
    /etc/services

 See also

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


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026