move call to udbsender so that full name can potentially be extracted
[unix-history] / usr / src / usr.sbin / inetd / inetd.8
CommitLineData
b42074ab 1.\" Copyright (c) 1985, 1991 The Regents of the University of California.
fd869580 2.\" All rights reserved.
55270cae 3.\"
dcebbf27 4.\" %sccs.include.redist.man%
fd869580 5.\"
b42074ab 6.\" @(#)inetd.8 6.7 (Berkeley) %G%
55270cae 7.\"
b42074ab
CL
8.Dd
9.Dt INETD 8
10.Os BSD 4.3
11.Sh NAME
12.Nm inetd
13.Nd internet
14.Dq super-server
15.Sh SYNOPSIS
16.Nm inetd
17.Op Fl d
18.Op Ar configuration file
19.Sh DESCRIPTION
20.Nm Inetd
55270cae 21should be run at boot time by
b42074ab
CL
22.Pa /etc/rc.local
23(see
24.Xr rc 8 ) .
55270cae
KM
25It then listens for connections on certain
26internet sockets. When a connection is found on one
27of its sockets, it decides what service the socket
28corresponds to, and invokes a program to service the request.
29After the program is
30finished, it continues to listen on the socket (except in some cases which
31will be described below). Essentially,
b42074ab 32.Nm inetd
55270cae
KM
33allows running one daemon to invoke several others,
34reducing load on the system.
b42074ab
CL
35.Pp
36The option available for
37.Nm inetd:
38.Bl -tag -width Ds
39.It Fl d
40Turns on debugging.
41.El
42.Pp
55270cae 43Upon execution,
b42074ab 44.Nm inetd
55270cae
KM
45reads its configuration information from a configuration
46file which, by default, is
b42074ab 47.Pa /etc/inetd.conf .
55270cae
KM
48There must be an entry for each field of the configuration
49file, with entries for each field separated by a tab or
50a space. Comments are denoted by a ``#'' at the beginning
51of a line. There must be an entry for each field. The
52fields of the configuration file are as follows:
b42074ab
CL
53.Pp
54.Bd -unfilled -offset indent -compact
55service name
56socket type
57protocol
58wait/nowait
59user
60server program
61server program arguments
62.Ed
63.Pp
55270cae 64The
b42074ab 65.Em service-name
55270cae
KM
66entry is the name of a valid service in
67the file
b42074ab
CL
68.Pa /etc/services .
69For
70.Dq internal
71services (discussed below), the service
55270cae 72name
b42074ab 73.Em must
63c183b7 74be the official name of the service (that is, the first entry in
b42074ab
CL
75.Pa /etc/services ) .
76.Pp
55270cae 77The
b42074ab
CL
78.Em socket-type
79should be one of
80.Dq stream ,
81.Dq dgram ,
82.Dq raw ,
83.Dq rdm ,
84or
85.Dq seqpacket ,
55270cae
KM
86depending on whether the socket is a stream, datagram, raw,
87reliably delivered message, or sequenced packet socket.
b42074ab 88.Pp
55270cae 89The
b42074ab 90.Em protocol
55270cae 91must be a valid protocol as given in
b42074ab
CL
92.Pa /etc/protocols .
93Examples might be
94.Dq tcp
95or
96.Dq udp .
97.Pp
55270cae 98The
b42074ab 99.Em wait/nowait
55270cae 100entry is applicable to datagram sockets only (other sockets should
b42074ab
CL
101have a
102.Dq nowait
103entry in this space). If a datagram server connects
55270cae 104to its peer, freeing the socket so
b42074ab 105.Nm inetd
55270cae 106can received further messages on the socket, it is said to be
b42074ab
CL
107a
108.Dq multi-threaded
109server, and should use the
110.Dq nowait
55270cae
KM
111entry. For datagram servers which process all incoming datagrams
112on a socket and eventually time out, the server is said to be
b42074ab
CL
113.Dq single-threaded
114and should use a
115.Dq wait
116entry.
117.Xr Comsat 8
118.Pq Xr biff 1
119and
120.Xr talkd 8
121are both examples of the latter type of
55270cae 122datagram server.
b42074ab 123.Xr Tftpd 8
63c183b7 124is an exception; it is a datagram server that establishes pseudo-connections.
b42074ab
CL
125It must be listed as
126.Dq wait
127in order to avoid a race;
63c183b7
MK
128the server reads the first packet, creates a new socket,
129and then forks and exits to allow
b42074ab 130.Nm inetd
63c183b7 131to check for new service requests to spawn new servers.
b42074ab 132.Pp
55270cae 133The
b42074ab 134.Em user
55270cae
KM
135entry should contain the user name of the user as whom the server
136should run. This allows for servers to be given less permission
137than root.
b42074ab 138.Pp
55270cae 139The
b42074ab 140.Em server-program
55270cae
KM
141entry should contain the pathname of the program which is to be
142executed by
b42074ab 143.Nm inetd
55270cae 144when a request is found on its socket. If
b42074ab 145.Nm inetd
55270cae 146provides this service internally, this entry should
b42074ab
CL
147be
148.Dq internal .
149.Pp
150The
151.Em server program arguments
152should be just as arguments
55270cae
KM
153normally are, starting with argv[0], which is the name of
154the program. If the service is provided internally, the
b42074ab
CL
155word
156.Dq internal
157should take the place of this entry.
158.Pp
159.Nm Inetd
160provides several
161.Dq trivial
162services internally by use of
163routines within itself. These services are
164.Dq echo ,
165.Dq discard ,
166.Dq chargen
167(character generator),
168.Dq daytime
169(human readable time), and
170.Dq time
171(machine readable time,
55270cae
KM
172in the form of the number of seconds since midnight, January
1731, 1900). All of these services are tcp based. For
b42074ab
CL
174details of these services, consult the appropriate
175.Tn RFC
55270cae 176from the Network Information Center.
b42074ab
CL
177.Pp
178.Nm Inetd
179rereads its configuration file when it receives a hangup signal,
180.Dv SIGHUP .
f8cbfd03
MK
181Services may be added, deleted or modified when the configuration file
182is reread.
b42074ab
CL
183.Sh SEE ALSO
184.Xr comsat 8 ,
185.Xr fingerd 8 ,
186.Xr ftpd 8 ,
187.Xr rexecd 8 ,
188.Xr rlogind 8 ,
189.Xr rshd 8 ,
190.Xr telnetd 8 ,
191.Xr tftpd 8
192.Sh HISTORY
193The
194.Nm
195command appeared in
196.Bx 4.3 .