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