NAME
|
listen, listen1, tcp7, tcp9, tcp19, tcp21, tcp22, tcp23, tcp25,
tcp53, tcp110, tcp113, tcp143, tcp513, tcp515, tcp564, tcp565,
tcp566, tcp567, tcp993, tcp995, tcp1723, tcp17007, tcp17008, tcp17009,
tcp17010, tcp17013 – listen for calls on a network device |
SYNOPSIS
|
aux/listen [–q] [–d srvdir] [–t trustsrvdir] [–n namespace] [net]
aux/listen1 [ –tv ] addr cmd [ args... ] |
DESCRIPTION
|
listen listens on a network for inbound calls to local services.
Net is the network protocol on which to listen, by default /net/tcp.
The services available are executable, non–empty files in srvdir
or trustsrvdir. If neither srvdir nor trustsrvdir is given, listen
looks for executable files in /bin/service. Services
found in srvdir are executed as user none; services found in trustsrvdir
are executed as the user who started listen. When changing user
to none, a new namespace is created, usually by executing /lib/namespace,
but –n selects an alternate namespace. Option –q suppresses affirmative
log information. Service names are made by concatenating the name of the network with the name of the service or port. For example, an inbound call on the TCP network for port 565 executes service tcp565.
At least the following services are available in /bin/service.
At least the following services are available in /bin/service.auth.
Listen1 is a lightweight listener intended for personal use, modeled
from Inferno's listen(1). announces on address, running cmd args...
for each incoming connection; the network directory is passed
in the environment as $net. Option –t causes listen1 to run as
the invoking user; the default is to become none
before listening. Option –v causes verbose logging on standard
output. See /rc/bin/tlssrvtunnel for an example. |
FILES
|
/net/tcp by convention, TCP device bind point |
SOURCE
|
The sources to listen and listen1 are /sys/src/cmd/aux/listen.c
and /sys/src/cmd/aux/listen1.c. The other commands are rc(1) scripts
in /rc/bin/service. |
SEE ALSO
|
authsrv(6), dial(2) |