date and time created 88/12/16 11:12:32 by bostic
[unix-history] / usr / src / usr.sbin / inetd / inetd.8
CommitLineData
fd869580
KB
1.\" Copyright (c) 1985 The Regents of the University of California.
2.\" All rights reserved.
55270cae 3.\"
fd869580
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
16.\" @(#)inetd.8 6.5 (Berkeley) %G%
55270cae
KM
17.\"
18.TH INETD 8 ""
19.UC 6
20.SH NAME
21inetd \- internet ``super\-server''
22.SH SYNOPSIS
23.B /etc/inetd
24[
25.B \-d
26] [ configuration file ]
27.SH DESCRIPTION
28.I Inetd
29should be run at boot time by
30.IR /etc/rc.local .
31It then listens for connections on certain
32internet sockets. When a connection is found on one
33of its sockets, it decides what service the socket
34corresponds to, and invokes a program to service the request.
35After the program is
36finished, it continues to listen on the socket (except in some cases which
37will be described below). Essentially,
38.I inetd
39allows running one daemon to invoke several others,
40reducing load on the system.
41.PP
42Upon execution,
43.I inetd
44reads its configuration information from a configuration
45file which, by default, is
46.IR /etc/inetd.conf .
47There must be an entry for each field of the configuration
48file, with entries for each field separated by a tab or
49a space. Comments are denoted by a ``#'' at the beginning
50of a line. There must be an entry for each field. The
51fields of the configuration file are as follows:
52.br
53 service name
54.br
55 socket type
56.br
57 protocol
58.br
59 wait/nowait
60.br
61 user
62.br
63 server program
64.br
65 server program arguments
66.PP
67The
68.I service name
69entry is the name of a valid service in
70the file
71.IR /etc/services/ .
72For ``internal'' services (discussed below), the service
73name
74.I must
63c183b7 75be the official name of the service (that is, the first entry in
55270cae
KM
76.IR /etc/services ).
77.PP
78The
79.I socket type
80should be one of ``stream'', ``dgram'', ``raw'', ``rdm'', or ``seqpacket'',
81depending on whether the socket is a stream, datagram, raw,
82reliably delivered message, or sequenced packet socket.
83.PP
84The
85.I protocol
86must be a valid protocol as given in
87.IR /etc/protocols .
88Examples might be ``tcp'' or ``udp''.
89.PP
90The
91.I wait/nowait
92entry is applicable to datagram sockets only (other sockets should
93have a ``nowait'' entry in this space). If a datagram server connects
94to its peer, freeing the socket so
95.I inetd
96can received further messages on the socket, it is said to be
97a ``multi-threaded'' server, and should use the ``nowait''
98entry. For datagram servers which process all incoming datagrams
99on a socket and eventually time out, the server is said to be
63c183b7 100``single-threaded'' and should use a ``wait'' entry. ``Comsat'' (``biff'')
55270cae
KM
101and ``talk'' are both examples of the latter type of
102datagram server.
63c183b7
MK
103.I Tftpd
104is an exception; it is a datagram server that establishes pseudo-connections.
105It must be listed as ``wait'' in order to avoid a race;
106the server reads the first packet, creates a new socket,
107and then forks and exits to allow
108.I inetd
109to check for new service requests to spawn new servers.
55270cae
KM
110.PP
111The
112.I user
113entry should contain the user name of the user as whom the server
114should run. This allows for servers to be given less permission
115than root.
116The
117.I server program
118entry should contain the pathname of the program which is to be
119executed by
120.I inetd
121when a request is found on its socket. If
122.I inetd
123provides this service internally, this entry should
124be ``internal''.
125.PP
126The arguments to the server program should be just as they
127normally are, starting with argv[0], which is the name of
128the program. If the service is provided internally, the
129word ``internal'' should take the place of this entry.
130.PP
131.I Inetd
132provides several ``trivial'' services internally by use of
133routines within itself. These services are ``echo'',
134``discard'', ``chargen'' (character generator), ``daytime''
135(human readable time), and ``time'' (machine readable time,
136in the form of the number of seconds since midnight, January
1371, 1900). All of these services are tcp based. For
138details of these services, consult the appropriate RFC
139from the Network Information Center.
f8cbfd03
MK
140.PP
141.I Inetd
142rereads its configuration file when it receives a hangup signal, SIGHUP.
143Services may be added, deleted or modified when the configuration file
144is reread.
55270cae 145.SH "SEE ALSO"
fd869580
KB
146comsat(8), fingerd(8), ftpd(8), rexecd(8), rlogind(8), rshd(8),
147telnetd(8), tftpd(8)