inetd(1M) inetd(1M)NAME inetd - Internet services daemon SYNOPSIS /etc/inetd [-d] DESCRIPTION inetd is the Internet super-server which invokes all Inter- net server processes as needed. Connection-oriented ser- vices are invoked each time a connection is made, by creat- ing a process. This process is passed the connection as file descriptor 0 and an argument of the form sourcehost.sourceport where sourcehost is hex and sourceport is decimal. Datagram oriented services are invoked when a datagram ar- rives; a process is created and passed the connection as file descriptor 0. inetd will look at the socket where da- tagrams arrive again only after this process completes. The paradigms for such processes are either to read off the in- coming datagram and then fork and exit, or to process the arriving datagram and then time out. inetd consults servers(4) when it is invoked, and supports whatever services are in that file. An rpc server can be started from inetd. The only differ- ences from the usual code are that svcudp_create should be called as transp = scvudp_create(0) since inet passes a socket file as descriptor 0, and svc_register should be called as: svc_register(PROGNUM, VERSNUM, service, transp, 0) with the final flag as 0, since the program will already have been registered by inetd. If you want to exit from the server process and return control to inet, you must expli- citly exit since scv_run never returns. The format of entries in /etc/servers for rpc services is: rpc udp server-program program-number version-number where server-program is the C code implementing the server, and program-number and version-number are the program and version numbers, respectively, of the service. The keyword udp can be replaced by tcp for tcp-based services. April, 1990 1
inetd(1M) inetd(1M)If the same program handles multiple versions, the version number can be specified as a range: rpc udp /usr/etc/rstatd 100001 1-2 FLAG OPTIONS The following flag option is interpreted by inetd: -d Specifies that debugging traces are to be turned on for connection-oriented (TCP) services. FILES /etc/servers list of Internet server processes SEE ALSO ftpd(1M), rexecd(1M), rlogind(1M), remshd(1M), talkd(1M), telnetd(1M), tftpd(1M), servers(4). BUGS There is no provision for selectively invoking TCP debugging packet tracing per-service. You should reread the /etc/servers file on receipt of a SIGHUP signal. The /etc/servers file can have no more than 26 lines. 2 April, 1990