Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ inetd(ADMN) — OpenDesktop 1.1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fingerd(ADMN)

ftpd(ADMN)

rexecd(ADMN)

rlogind(ADMN)

rshd(ADMN)

telnetd(ADMN)

tftpd(ADMN)

inetd.conf(SFF)

protocols(SFF)

services(SFF)

INETD(ADMN)


     INETD(ADMN)                                UNIX System V



     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  superserver  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
          superuser  (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 configuration
          file (by default, /etc/inetd.conf(SFF)) 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(SSC),  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 continues 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 arguments; 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 (which corresponds to
               an entry in inetd's configuration  file),  the  invoked
               server  must process the message 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  (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, telnetd, and tftpd.  inet must
          also start several internal services:  these  are  described
          in  inetd.conf(SFF).   Do  not  arrange  for  inetd to start
          rwhod, 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 configuration file is reread.

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


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


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


     (printed 8/17/89)                                  INETD(ADMN)

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