1listen(1M) System Administration Commands listen(1M)
2
3
4
6 listen - network listener daemon
7
9 /usr/lib/saf/listen [-m devstem] net_spec
10
11
13 The listen process ``listens'' to a network for service requests,
14 accepts requests when they arrive, and invokes servers in response to
15 those service requests. The network listener process may be used with
16 any connection-oriented network (more precisely, with any connection-
17 oriented transport provider) that conforms to the Transport Layer
18 Interface (TLI) Specification.
19
20
21 The listener internally generates a pathname for the minor device for
22 each connection; it is this pathname that is used in the utmpx entry
23 for a service, if one is created. By default, this pathname is the con‐
24 catenation of the prefix /dev/netspec with the decimal representation
25 of the minor device number. In either case, the representation of the
26 minor device number will be at least two digits (for example, 05 or
27 27), or longer when it is necessary to accommodate minor device numbers
28 larger than 99.
29
31 When a connection indication is received, the listener creates a new
32 transport endpoint and accepts the connection on that endpoint. Before
33 giving the file descriptor for this new connection to the server, any
34 designated STREAMS modules are pushed and the configuration script is
35 executed, (if one exists). This file descriptor is appropriate for use
36 with either TLI (see t_sync(3NSL) ) or the sockets interface library.
37
38
39 By default, a new instance of the server is invoked for each connec‐
40 tion. When the server is invoked, file descriptor 0 refers to the
41 transport endpoint, and is open for reading and writing. File descrip‐
42 tors 1 and 2 are copies of file descriptor 0; no other file descriptors
43 are open. The service is invoked with the user and group IDs of the
44 user name under which the service was registered with the listener, and
45 with the current directory set to the HOME directory of that user.
46
47
48 Alternatively, a service may be registered so that the listener will
49 pass connections to a standing server process through a FIFO or a named
50 stream, instead of invoking the server anew for each connection. In
51 this case, the connection is passed in the form of a file descriptor
52 that refers to the new transport endpoint. Before the file descriptor
53 is sent to the server, the listener interprets any configuration script
54 registered for that service using doconfig(3NSL), although doconfig is
55 invoked with both the NORUN and NOASSIGN flags. The server receives the
56 file descriptor for the connection in a strrecvfd structure using an
57 I_RECVFD ioctl(2).
58
59
60 For more details about the listener and its administration, see nlsad‐
61 min(1M).
62
64 -mdevstem The listener will use devstem as the prefix for the path‐
65 name.
66
67
69 /etc/saf/pmtag/*
70
72 See attributes(5) for descriptions of the following attributes:
73
74
75
76
77 ┌─────────────────────────────┬─────────────────────────────┐
78 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
79 ├─────────────────────────────┼─────────────────────────────┤
80 │Availability │SUNWcsu │
81 └─────────────────────────────┴─────────────────────────────┘
82
84 nlsadmin(1M), pmadm(1M), sac(1M), sacadm(1M), ioctl(2), doconfig(3NSL),
85 nlsgetcall(3NSL), nlsprovider(3NSL), t_sync(3NSL), attributes(5),
86 streamio(7I)
87
88
89
90
92 When passing a connection to a standing server, the user and group IDs
93 contained in the strrecvfd structure will be those for the listener
94 (that is, they will both be 0); the user name under which the service
95 was registered with the listener is not reflected in these IDs.
96
97
98 When operating multiple instances of the listener on a single transport
99 provider, there is a potential race condition in the binding of
100 addresses during initialization of the listeners, if any of their ser‐
101 vices have dynamically assigned addresses. This condition would appear
102 as an inability of the listener to bind a static-address service to its
103 otherwise valid address, and would result from a dynamic-address ser‐
104 vice having been bound to that address by a different instance of the
105 listener.
106
107
108
109SunOS 5.11 3 Apr 1997 listen(1M)