]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/listen
truetypefs(4): document truetypefs
[plan9front.git] / sys / man / 8 / listen
1 .TH LISTEN 8
2 .SH NAME
3 listen, listen1, tcp7, tcp9, tcp19, tcp21, tcp23, tcp25, tcp53, tcp110, tcp113, tcp143, tcp445, tcp513, tcp515, tcp564, tcp565, tcp566, tcp567, tcp993, tcp995, tcp1723, tcp17007, tcp17008, tcp17009, tcp17010, tcp17013, tcp17019, tcp17020 \- listen for calls on a network device
4 .SH SYNOPSIS
5 .B aux/listen
6 .RB [ -iq ]
7 .RB [ -d
8 .IR srvdir ]
9 .RB [ -t
10 .IR trustsrvdir ]
11 .RB [ -n
12 .IR namespace ]
13 .RB [ -p
14 .IR maxprocs ]
15 .RB [ -a
16 .IR addr ]
17 .RI [ proto ]
18 .PP
19 .B aux/listen1
20 [
21 .B -tv
22 ]
23 .RB [ -p
24 .IR maxprocs ]
25 .RB [ -n
26 .IR namespace ]
27 .I addr
28 .I cmd
29 [
30 .I args...
31 ]
32 .SH DESCRIPTION
33 .I Listen
34 listens on a network for inbound calls to local services.
35 .I Proto
36 is the network protocol on which to listen, by default
37 .BR tcp .
38 Incoming calls to any address
39 .B *
40 are accepted unless
41 .I addr
42 is specified with the
43 .B -a
44 option. 
45 The services available are executable, non-empty files in
46 .I srvdir
47 or
48 .IR trustsrvdir .
49 If neither
50 .I srvdir
51 nor
52 .I trustsrvdir
53 is given,
54 .I listen
55 looks for executable files in
56 .BR /bin/service .
57 Services found in
58 .I srvdir
59 are executed as user
60 .BR none ;
61 services found in
62 .I trustsrvdir
63 are executed as the user who started
64 .IR listen .
65 When changing user to
66 .BR none ,
67 a new namespace is created,
68 usually by executing
69 .BR /lib/namespace ,
70 but
71 .B -n
72 selects an alternate
73 .IR namespace .
74 The
75 .B -p
76 option limits the number of processes that
77 .I listen
78 spawns to service the connections. If the
79 .I maxprocs
80 limit is reached,
81 .I listen
82 will log the event and delay servicing until the number
83 of connection processes drops below the limit again. A
84 .I maxprocs
85 smaller or equal zero means no limit (default).
86 Option
87 .B -q
88 suppresses affirmative log information.
89 Option
90 .B -i
91 suppresses the periodic scan of the service directories for changes.
92 .PP
93 Service names are made by concatenating the name of
94 the network with the name of the service or port.
95 For example,
96 an inbound call on the TCP network for port 565 executes service
97 .BR tcp565 .
98 .PP
99 At least the following services are available in
100 .BR /bin/service .
101 .TF \ tcp0000
102 .TP
103 .B tcp564
104 serve a piece of the name space using the Plan 9 file system protocol,
105 with authentication via
106 .I Tauth
107 (in
108 .IR attach (5)),
109 no encryption,
110 and multiplex multiple users on a single connection
111 (used by
112 .IR srv (4),
113 and also by Unix systems to see Plan 9 files).
114 .TP
115 .B tcp17007
116 serve a piece of the name space using the Plan 9 file system protocol,
117 with authentication at the start,
118 optional SSL encryption,
119 and no multiplexing of users
120 (typically used by
121 .IR cpu (1)
122 and
123 .IR import (4)).
124 Not usable by user
125 .IR none .
126 .TP
127 .B tcp17008
128 like
129 .BR tcp17007 ,
130 but serves the root of the tree,
131 forgoing the negotiation for which subtree to serve.
132 .TP
133 .B tcp17009
134 .I rx
135 remote execution.
136 .TP
137 .B tcp17010
138 server for
139 .IR cpu (1)
140 command.
141 .TP
142 .B tcp17013
143 server for old
144 .IR cpu (1)
145 command for compatibility with old clients.
146 .TP
147 .B tcp17019
148 server for
149 .IR rcpu (1),
150 replaces
151 .IR rx ,
152 .IR import (4)
153 and
154 .IR cpu (1)
155 using TLS for encryption. 
156 .TP
157 .B tcp17020
158 TLS encrypted 9P fileserver (t9fs) for
159 .I srvtls
160 (see
161 .IR srv (4)).
162 .TP
163 .B tcp7
164 echo any bytes received (bit mirror)
165 .TP
166 .B tcp9
167 consume any bytes received (bit bucket)
168 .TP
169 .B tcp19
170 .B chargen
171 service.
172 .TP
173 .B tcp21
174 FTP daemon
175 .TP
176 .B tcp23
177 .B telnet
178 terminal connection.
179 .TP
180 .B tcp25
181 mail delivery.
182 .TP
183 .B tcp53
184 TCP port for DNS.
185 .TP
186 .B tcp110
187 POP3 port.
188 .TP
189 .B tcp113
190 .B Ident
191 port (always reports
192 .BR none ).
193 .TP
194 .B tcp143
195 IMAP4rev1 port.
196 .TP
197 .B tcp445
198 CIFS/SMB file sharing.
199 .TP
200 .B tcp513
201 .B rlogin
202 terminal connection.
203 .TP
204 .B tcp515
205 LP daemon; see
206 .IR lp (8).
207 .TP
208 .B tcp565
209 report the address of the incoming call.
210 .TP
211 .B tcp993
212 Secure IMAP4rev1 port.
213 .TP
214 .B tcp995
215 Secure POP3 port.
216 .TP
217 .B tcp1723
218 PPTP (point-to-point tunnelling protocol) service.
219 .PD
220 .PP
221 At least the following services are available in
222 .BR /bin/service.auth ,
223 the usual
224 .IR trustsrvdir .
225 .TF \ tcp0000
226 .TP
227 .B tcp566
228 validate a SecureNet box.
229 .TP
230 .B tcp567
231 Plan 9 authentication-ticket service.
232 .PD
233 .PP
234 .I Listen1
235 is a lightweight listener intended for personal use,
236 modeled from Inferno's
237 .\" write out this way so automatic programs
238 .\" don't try to make it into a real man page reference.
239 \fIlisten\fR(1).
240 announces on
241 .IR address ,
242 running
243 .I cmd
244 .I args...
245 for each incoming connection;
246 the network directory is passed in the environment
247 as 
248 .BR $net .
249 Option
250 .B -t
251 causes
252 .I listen1
253 to run as the invoking user; the default
254 is to become
255 .B none
256 before listening.
257 Option
258 .B -v
259 causes verbose logging on standard output.
260 See
261 .B /rc/bin/tlssrvtunnel
262 for an example.
263 .SH FILES
264 .TF /env/sysname
265 .TP
266 .B /net/tcp
267 by convention, TCP device bind point
268 .SH SOURCE
269 .B /sys/src/cmd/aux/listen*.c
270 .br
271 .B /rc/bin/service*
272 .SH "SEE ALSO"
273 .IR authsrv (6),
274 .IR dial (2)
275 .SH BUGS
276 .IR Srvdir ,
277 .IR trustsrvdir
278 and
279 .I namespace
280 must all be absolute path names.