2 .\" Copyright 1989 AT&T Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH NLSREQUEST 3NSL "Nov 14, 2002"
8 nlsrequest \- format and send listener service request message
13 \fBint\fR \fBnlsrequest\fR(\fBint\fR \fIfildes\fR, \fBchar \fR*\fIservice_code\fR);
14 \fBextern int\fR \fI_nlslogt_errno\fR;
15 \fBextern char\fR *\fI_nlsrmsg\fR;
21 Given a virtual circuit to a listener process (\fIfildes\fR) and a service
22 code of a server process, \fBnlsrequest()\fR formats and sends a \fIservice
23 request message\fR to the remote listener process requesting that it start the
24 given service. \fBnlsrequest()\fR waits for the remote listener process to
25 return a \fIservice request response message\fR, which is made available to
26 the caller in the static, null-terminated data buffer pointed to by
27 \fB_nlsrmsg\fR. The \fIservice request response message\fR includes a success
28 or failure code and a text message. The entire message is printable.
32 The success or failure code is the integer return code from \fBnlsrequest()\fR.
33 Zero indicates success, other negative values indicate \fBnlsrequest()\fR
41 Error encountered by \fBnlsrequest()\fR, see \fBt_errno\fR.
46 Positive values are error return codes from the \fIlistener\fR process.
47 Mnemonics for these codes are defined in \fB<listen.h>\fR\&.
54 Request message not interpretable.
63 Request service code unknown.
72 Service code known, but currently disabled.
77 If non-null, \fB_nlsrmsg\fR contains a pointer to a static, null-terminated
78 character buffer containing the \fIservice request response message\fR. Note
79 that both \fB_nlsrmsg\fR and the data buffer are overwritten by each call to
83 If \fB_nlslog\fR is non-zero, \fBnlsrequest()\fR prints error messages on
84 stderr. Initially, \fB_nlslog\fR is zero.
89 \fB\fB/usr/lib/libnls.so.1\fR\fR
98 See \fBattributes\fR(5) for descriptions of the following attributes:
106 ATTRIBUTE TYPE ATTRIBUTE VALUE
114 \fBnlsadmin\fR(1M), \fBt_error\fR(3NSL), \fBt_snd\fR(3NSL), \fBt_rcv\fR(3NSL),
119 \fBnlsrequest()\fR cannot always be certain that the remote server process has
120 been successfully started. In this case, \fBnlsrequest()\fR returns with no
121 indication of an error and the caller will receive notification of a disconnect
122 event by way of a \fBT_LOOK\fR error before or during the first \fBt_snd()\fR
123 or \fBt_rcv()\fR call.
127 These interfaces are unsafe in multithreaded applications. Unsafe interfaces
128 should be called only from the main thread.