1nlsrequest(3NSL) Networking Services Library Functions nlsrequest(3NSL)
2
3
4
6 nlsrequest - format and send listener service request message
7
9 #include <listen.h>
10 int nlsrequest(int fildes, char *service_code);
11 extern int _nlslogt_errno;
12 extern char *_nlsrmsg;
13
14
16 Given a virtual circuit to a listener process (fildes) and a service
17 code of a server process, nlsrequest() formats and sends a service
18 request message to the remote listener process requesting that it
19 start the given service. nlsrequest() waits for the remote listener
20 process to return a service request response message, which is made
21 available to the caller in the static, null-terminated data buffer
22 pointed to by _nlsrmsg. The service request response message includes a
23 success or failure code and a text message. The entire message is
24 printable.
25
27 The success or failure code is the integer return code from nlsre‐
28 quest(). Zero indicates success, other negative values indicate nlsre‐
29 quest() failures as follows:
30
31 −1 Error encountered by nlsrequest(), see t_errno.
32
33
34
35 Positive values are error return codes from the listener process.
36 Mnemonics for these codes are defined in <listen.h>.
37
38 2 Request message not interpretable.
39
40
41 3 Request service code unknown.
42
43
44 4 Service code known, but currently disabled.
45
46
47
48 If non-null, _nlsrmsg contains a pointer to a static, null-terminated
49 character buffer containing the service request response message. Note
50 that both _nlsrmsg and the data buffer are overwritten by each call to
51 nlsrequest().
52
53
54 If _nlslog is non-zero, nlsrequest() prints error messages on stderr.
55 Initially, _nlslog is zero.
56
58 /usr/lib/libnls.so.1 shared object
59
60
62 See attributes(5) for descriptions of the following attributes:
63
64
65
66
67 ┌─────────────────────────────┬─────────────────────────────┐
68 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
69 ├─────────────────────────────┼─────────────────────────────┤
70 │MT-Level │Unsafe │
71 └─────────────────────────────┴─────────────────────────────┘
72
74 nlsadmin(1M), t_error(3NSL), t_snd(3NSL), t_rcv(3NSL), attributes(5)
75
77 nlsrequest() cannot always be certain that the remote server process
78 has been successfully started. In this case, nlsrequest() returns with
79 no indication of an error and the caller will receive notification of a
80 disconnect event by way of a T_LOOK error before or during the first
81 t_snd() or t_rcv() call.
82
84 These interfaces are unsafe in multithreaded applications. Unsafe
85 interfaces should be called only from the main thread.
86
87
88
89SunOS 5.11 14 Nov 2002 nlsrequest(3NSL)