]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/listen
/sys/man/*/*: fix perms (sorry)
[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 \- 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 tcp23
162 .B telnet
163 terminal connection.
164 .TP
165 .B tcp25
166 mail delivery.
167 .TP
168 .B tcp53
169 TCP port for DNS.
170 .TP
171 .B tcp110
172 POP3 port.
173 .TP
174 .B tcp113
175 .B Ident
176 port (always reports
177 .BR none ).
178 .TP
179 .B tcp143
180 IMAP4rev1 port.
181 .TP
182 .B tcp445
183 CIFS/SMB file sharing.
184 .TP
185 .B tcp513
186 .B rlogin
187 terminal connection.
188 .TP
189 .B tcp515
190 LP daemon; see
191 .IR lp (8).
192 .TP
193 .B tcp565
194 report the address of the incoming call.
195 .TP
196 .B tcp993
197 Secure IMAP4rev1 port.
198 .TP
199 .B tcp995
200 Secure POP3 port.
201 .TP
202 .B tcp1723
203 PPTP (point-to-point tunnelling protocol) service.
204 .PD
205 .PP
206 At least the following services are available in
207 .BR /bin/service.auth ,
208 the usual
209 .IR trustsrvdir .
210 .TF \ tcp0000
211 .TP
212 .B tcp566
213 validate a SecureNet box.
214 .TP
215 .B tcp567
216 Plan 9 authentication-ticket service.
217 .PD
218 .PP
219 .I Listen1
220 is a lightweight listener intended for personal use,
221 modeled from Inferno's
222 .\" write out this way so automatic programs
223 .\" don't try to make it into a real man page reference.
224 \fIlisten\fR(1).
225 announces on
226 .IR address ,
227 running
228 .I cmd
229 .I args...
230 for each incoming connection;
231 the network directory is passed in the environment
232 as 
233 .BR $net .
234 Option
235 .B -t
236 causes
237 .I listen1
238 to run as the invoking user; the default
239 is to become
240 .B none
241 before listening.
242 Option
243 .B -v
244 causes verbose logging on standard output.
245 See
246 .B /rc/bin/tlssrvtunnel
247 for an example.
248 .SH FILES
249 .TF /env/sysname
250 .TP
251 .B /net/tcp
252 by convention, TCP device bind point
253 .SH SOURCE
254 .B /sys/src/cmd/aux/listen*.c
255 .br
256 .B /rc/bin/service*
257 .SH "SEE ALSO"
258 .IR authsrv (6),
259 .IR dial (2)
260 .SH BUGS
261 .IR Srvdir ,
262 .IR trustsrvdir
263 and
264 .I namespace
265 must all be absolute path names.