1nlsadmin(1M) System Administration Commands nlsadmin(1M)
2
3
4
6 nlsadmin - network listener service administration
7
9 /usr/sbin/nlsadmin -x
10
11
12 /usr/sbin/nlsadmin [options] net_spec
13
14
15 /usr/sbin/nlsadmin [options] -N port_monitor_tag
16
17
18 /usr/sbin/nlsadmin -V
19
20
21 /usr/sbin/nlsadmin -c cmd | -o streamname [-p modules]
22 [-A address | -D] [-R prognum : versnum]
23
24
26 nlsadmin is the administrative command for the network listener
27 process(es) on a machine. Each network has at least one instance of the
28 network listener process associated with it; each instance (and thus,
29 each network) is configured separately. The listener process ``lis‐
30 tens'' to the network for service requests, accepts requests when they
31 arrive, and invokes servers in response to those service requests. The
32 network listener process may be used with any network (more precisely,
33 with any connection-oriented transport provider) that conforms to the
34 transport provider specification.
35
36
37 nlsadmin can establish a listener process for a given network, config‐
38 ure the specific attributes of that listener, and start and kill the
39 listener process for that network. nlsadmin can also report on the lis‐
40 tener processes on a machine, either individually (per network) or col‐
41 lectively.
42
43
44 net_spec represents a particular listener process. Specifically,
45 net_spec is the relative path name of the entry under /dev for a given
46 network (that is, a transport provider). address is a transport address
47 on which to listen and is interpreted using a syntax that allows for a
48 variety of address formats. By default, address is interpreted as the
49 symbolic ASCII representation of the transport address. An address pre‐
50 ceded by \x will let you enter an address in hexadecimal notation. Note
51 that address must appear as a single word to the shell, thus it must be
52 quoted if it contains any blanks.
53
54
55 Changes to the list of services provided by the listener or the
56 addresses of those services are put into effect immediately.
57
59 nlsadmin may be used with the following combinations of options and
60 arguments:
61
62 -x
63
64 Report the status of all of the listener processes installed on
65 this machine.
66
67
68 net_spec
69
70 Print the status of the listener process for net_spec .
71
72
73 -q net_spec
74
75 Query the status of the listener process for the specified network,
76 and reflects the result of that query in its exit code. If a lis‐
77 tener process is active, nlsadmin will exit with a status of 0; if
78 no process is active, the exit code will be 1; the exit code will
79 be greater than 1 in case of error.
80
81
82 -v net_spec
83
84 Print a verbose report on the servers associated with net_spec,
85 giving the service code, status, command, and comment for each. It
86 also specifies the uid the server will run as and the list of mod‐
87 ules to be pushed, if any, before the server is started.
88
89
90 -z service_code net_spec
91
92 Print a report on the server associated with net_spec that has ser‐
93 vice code service_code, giving the same information as in the -v
94 option.
95
96
97 -q -z service_code net_spec
98
99 Query the status of the service with service code service_code on
100 network net_spec, and exits with a status of 0 if that service is
101 enabled, 1 if that service is disabled, and greater than 1 in case
102 of error.
103
104
105 -l address net_spec
106
107 Change or set the transport address on which the listener listens
108 (the general listener service). This address can be used by remote
109 processes to access the servers available through this listener
110 (see the -a option, below).
111
112 If address is just a dash (" − "), nlsadmin reports the address
113 currently configured, instead of changing it.
114
115 A change of address takes effect immediately.
116
117
118 -t address net_spec
119
120 Change or set the address on which the listener listens for
121 requests for terminal service but is otherwise similar to the -l
122 option above. A terminal service address should not be defined
123 unless the appropriate remote login software is available; if such
124 software is available, it must be configured as service code 1 (see
125 the -a option, below).
126
127
128 -i net_spec
129
130 Initialize an instance of the listener for the network specified by
131 net_spec; that is, create and initialize the files required by the
132 listener as well as starting that instance of the listener. Note
133 that a particular instance of the listener should be initialized
134 only once. The listener must be initialized before assigning
135 addresses or services.
136
137
138 -a service_code
139
140 [ -p modules ] [ -w name ] -c cmd -y comment net_spec
141
142 Add a new service to the list of services available through the
143 indicated listener. service_code is the code for the service, cmd
144 is the command to be invoked in response to that service code, com‐
145 prised of the full path name of the server and its arguments, and
146 comment is a brief (free-form) description of the service for use
147 in various reports. Note that cmd must appear as a single word to
148 the shell; if arguments are required, the cmd and its arguments
149 must be enclosed in quotation marks. The comment must also appear
150 as a single word to the shell. When a service is added, it is ini‐
151 tially enabled (see the -e and -d options, below).
152
153 Service codes are alphanumeric strings, and are administered by
154 AT&T. The numeric service codes 0 through 100 are reserved for
155 internal use by the listener. Service code 0 is assigned to the
156 nlps server, which is the service invoked on the general listening
157 address. In particular, code 1 is assigned to the remote login ser‐
158 vice, which is the service automatically invoked for connections to
159 the terminal login address.
160
161 If the -p option is specified, then modules will be interpreted as
162 a list of STREAMS modules for the listener to push before starting
163 the service being added. The modules are pushed in the order they
164 are specified. modules should be a comma-separated list of modules,
165 with no white space included.
166
167 If the -w option is specified, then name is interpreted as the user
168 name from /etc/passwd that the listener should look up. From the
169 user name, the listener obtains the user ID, the group ID(s), and
170 the home directory for use by the server. If -w is not specified,
171 the default is to use the user name listen.
172
173 A service must explicitly be added to the listener for each network
174 on which that service is to be available. This operation will nor‐
175 mally be performed only when the service is installed on a machine,
176 or when populating the list of services for a new network.
177
178
179 -r service_code net_spec
180
181 Remove the entry for the service_code from that listener's list of
182 services. This is normally done only in conjunction with the de-
183 installation of a service from a machine.
184
185
186 -e service_code net_spec
187 -d service_code net_spec
188
189 Enable or disable (respectively) the service indicated by ser‐
190 vice_code for the specified network. The service must previously
191 have been added to the listener for that network (see the -a
192 option, above). Disabling a service will cause subsequent service
193 requests for that service to be denied, but the processes from any
194 prior service requests that are still running will continue unaf‐
195 fected.
196
197
198 -s net_spec
199 -k net_spec
200
201 Start and kill (respectively) the listener process for the indi‐
202 cated network. These operations are normally performed as part of
203 the system startup and shutdown procedures. Before a listener can
204 be started for a particular network, it must first have been ini‐
205 tialized (see the -i option, above). When a listener is killed,
206 processes that are still running as a result of prior service
207 requests will continue unaffected.
208
209
210
211 Under the Service Access Facility, it is possible to have multiple
212 instances of the listener on a single net_spec. In any of the above
213 commands, the option -N port_monitor_tag may be used in place of the
214 net_spec argument. This argument specifies the tag by which an
215 instance of the listener is identified by the Service Access Facility.
216 If the -N option is not specified (that is, the net_spec is specified
217 in the invocation), then it will be assumed that the last component of
218 the net_spec represents the tag of the listener for which the operation
219 is destined. In other words, it is assumed that there is at least one
220 listener on a designated net_spec, and that its tag is identical to the
221 last component of the net_spec. This listener may be thought of as the
222 primary, or default, listener for a particular net_spec.
223
224
225 nlsadmin is also used in conjunction with the Service Access Facility
226 commands. In that capacity, the following combinations of options can
227 be used:
228
229 -V
230
231 Write the current version number of the listener's administrative
232 file to the standard output. It is used as part of the sacadm com‐
233 mand line when sacadm adds a port monitor to the system.
234
235
236 -c cmd | -o streamname [ -p modules ] [ -A address | -D ] [ -R prognum
237 : versnum ]
238
239 Format the port monitor-specific information to be used as an argu‐
240 ment to pmadm(1M)
241
242 The -c option specifies the full path name of the server and its
243 arguments. cmd must appear as a single word to the shell, and its
244 arguments must therefore be surrounded by quotes.
245
246 The -o option specifies the full path name of a FIFO or named
247 stream through which a standing server is actually receiving the
248 connection.
249
250 If the -p option is specified, then modules will be interpreted as
251 a list of STREAMS modules for the listener to push before starting
252 the service being added. The modules are pushed in the order in
253 which they are specified. modules must be a comma-separated list,
254 with no white space included.
255
256 If the -A option is specified, then address will be interpreted as
257 the server's private address. The listener will monitor this
258 address on behalf of the service and will dispatch all calls arriv‐
259 ing on this address directly to the designated service. This option
260 may not be used in conjunction with the -D option.
261
262 If the -D option is specified, then the service is assigned a pri‐
263 vate address dynamically, that is, the listener will have the
264 transport provider select the address each time the listener begins
265 listening on behalf of this service. For RPC services, this option
266 will be often be used in conjunction with the -R option to register
267 the dynamically assigned address with the rpcbinder. This option
268 may not be used in conjunction with the -A option.
269
270 When the -R option is specified, the service is an RPC service
271 whose address, program number, and version number should be regis‐
272 tered with the rpcbinder for this transport provider. This regis‐
273 tration is performed each time the listener begins listening on
274 behalf of the service. prognum and versnum are the program number
275 and version number, respectively, of the RPC service.
276
277
278
279 nlsadmin may be invoked by any user to generate reports; all operations
280 that affect a listener's status or configuration may only be run by a
281 super-user.
282
283
284 The options specific to the Service Access Facility may not be used
285 together with any other options.
286
288 If successful, nlsadmin exits with a status of 0. If nlsadmin fails
289 for any reason, it exits with a status greater than or equal to 2. See
290 -q option for a return status of 1.
291
293 See attributes(5) for descriptions of the following attributes:
294
295
296
297
298 ┌─────────────────────────────┬─────────────────────────────┐
299 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
300 ├─────────────────────────────┼─────────────────────────────┤
301 │Availability │SUNWcsu │
302 └─────────────────────────────┴─────────────────────────────┘
303
305 listen(1M), pmadm(1M), rpcbind(1M), sacadm(1M), attributes(5)
306
307
308
309
311 Dynamically assigned addresses are not displayed in reports as stati‐
312 cally assigned addresses are.
313
314
315
316SunOS 5.11 3 Apr 1997 nlsadmin(1M)