1 '\" te
2 .\" Copyright 1989 AT&T
3 .\" Copyright (C) 2009, Sun Microsystems, Inc. All Rights Reserved
4 .\" 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. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
5 .\" See the License for the specific language governing permissions and limitations under the License. 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
6 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH RPC_CLNT_CREATE 3NSL "Jul 23, 2009"
8 .SH NAME
9 rpc_clnt_create, clnt_control, clnt_create, clnt_create_timed,
10 clnt_create_vers, clnt_create_vers_timed, clnt_destroy, clnt_dg_create,
11 clnt_pcreateerror, clnt_raw_create, clnt_spcreateerror, clnt_tli_create,
12 clnt_tp_create, clnt_tp_create_timed, clnt_vc_create, rpc_createerr,
13 clnt_door_create \- library routines for dealing with creation and manipulation
14 of CLIENT handles
15 .SH SYNOPSIS
16 .LP
17 .nf
18 #include <rpc/rpc.h>
19
20 \fBbool_t\fR \fBclnt_control\fR(\fBCLIENT *\fR\fIclnt\fR, \fBconst uint_t\fR \fIreq\fR, \fBchar *\fR\fIinfo\fR);
21 .fi
22
23 .LP
24 .nf
25 \fBCLIENT *\fR\fBclnt_create\fR(\fBconst char *\fR\fIhost\fR, \fBconst rpcprog_t\fR \fIprognum\fR,
26 \fBconst rpcvers_t\fR \fIversnum\fR, \fBconst char *\fR\fInettype\fR);
27 .fi
93 \fBconst struct netconfig *\fR\fInetconf\fR);
94 .fi
95
96 .LP
97 .nf
98 \fBCLIENT *\fR\fBclnt_tp_create_timed\fR(\fBconst char *\fR\fIhost\fR,
99 \fBconst rpcprog_t\fR \fIprognum\fR, \fBconst rpcvers_t\fR \fIversnum\fR,
100 \fBconst struct netconfig *\fR\fInetconf\fR, \fBconst struct timeval *\fR\fItimeout\fR);
101 .fi
102
103 .LP
104 .nf
105 \fBCLIENT *\fR\fBclnt_vc_create\fR(\fBconst int\fR \fIfildes\fR,
106 \fBconst struct netbuf *\fR\fIsvcaddr\fR, \fBconst rpcprog_t\fR \fIprognum\fR,
107 \fBconst rpcvers_t\fR \fIversnum\fR, \fBconst uint_t\fR \fIsendsz\fR,
108 \fBconst uint_t\fR \fIrecsz\fR);
109 .fi
110
111 .LP
112 .nf
113 \fBstruct rpc_createerr\fR \fBrpc_createerr\fR
114 .fi
115
116 .LP
117 .nf
118 \fBCLIENT *\fR\fBclnt_door_create\fR(\fBconst rpcprog_t\fR \fIprognum\fR,
119 \fBconst rpcvers_t\fR \fIversnum\fR, \fBconst uint_t\fR \fIsendsz\fR);
120 .fi
121
122 .SH DESCRIPTION
123 .sp
124 .LP
125 \fBRPC\fR library routines allow \fBC\fR language programs to make procedure
126 calls on other machines across the network. First a \fBCLIENT\fR handle is
127 created and then the client calls a procedure to send a request to the server.
128 On receipt of the request, the server calls a dispatch routine to perform the
129 requested service, and then sends a reply.
130 .sp
131 .LP
132 These routines are MT-Safe. In the case of multithreaded applications, the
133 \fB-mt\fR option must be specified on the command line at compilation time.
134 When the \fB-mt\fR option is specified, \fBrpc_createerr()\fR becomes a macro
135 that enables each thread to have its own \fBrpc_createerr()\fR. See
136 \fBthreads\fR(5).
137 .SS "Routines"
138 .sp
139 .LP
140 See \fBrpc\fR(3NSL) for the definition of the \fBCLIENT\fR data structure.
141 .sp
142 .ne 2
143 .na
144 \fB\fBclnt_control()\fR\fR
145 .ad
146 .sp .6
147 .RS 4n
148 A function macro to change or retrieve various information about a client
149 object. \fIreq\fR indicates the type of operation, and \fIinfo\fR is a pointer
150 to the information. For both connectionless and connection-oriented transports,
151 the supported values of \fIreq\fR and their argument types and what they do
152 are:
153 .sp
154 .in +2
155 .nf
501 \fB\fBclnt_vc_create()\fR\fR
502 .ad
503 .sp .6
504 .RS 4n
505 This routine creates an \fBRPC\fR client for the remote program \fIprognum\fR
506 and version \fIversnum\fR; the client uses a connection-oriented transport. The
507 remote program is located at address \fIsvcaddr\fR. The parameter \fIfildes\fR
508 is an open and bound file descriptor. The user may specify the size of the send
509 and receive buffers with the parameters \fIsendsz\fR and \fIrecvsz\fR; values
510 of \fB0\fR choose suitable defaults. This routine returns \fINULL\fR if it
511 fails.
512 .sp
513 The address \fIsvcaddr\fR should not be \fINULL\fR and should point to the
514 actual address of the remote program. \fBclnt_vc_create()\fR does not consult
515 the remote \fBrpcbind\fR service for this information.
516 .RE
517
518 .sp
519 .ne 2
520 .na
521 \fB\fBrpc_createerr()\fR\fR
522 .ad
523 .sp .6
524 .RS 4n
525 A global variable whose value is set by any \fBRPC\fR client handle creation
526 routine that fails. It is used by the routine \fBclnt_pcreateerror()\fR to
527 print the reason for the failure.
528 .sp
529 In multithreaded applications, \fBrpc_createerr\fR becomes a macro which
530 enables each thread to have its own \fBrpc_createerr\fR.
531 .RE
532
533 .sp
534 .ne 2
535 .na
536 \fB\fBclnt_door_create()\fR\fR
537 .ad
538 .sp .6
539 .RS 4n
540 This routine creates an RPC client handle over doors for the given program
541 \fIprognum\fR and version \fIversnum\fR. Doors is a transport mechanism that
|
1 '\" te
2 .\" Copyright 1989 AT&T
3 .\" Copyright (C) 2009, Sun Microsystems, Inc. All Rights Reserved
4 .\" 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. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
5 .\" See the License for the specific language governing permissions and limitations under the License. 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
6 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH RPC_CLNT_CREATE 3NSL "Dec 16, 2013"
8 .SH NAME
9 rpc_clnt_create, clnt_control, clnt_create, clnt_create_timed,
10 clnt_create_vers, clnt_create_vers_timed, clnt_destroy, clnt_dg_create,
11 clnt_pcreateerror, clnt_raw_create, clnt_spcreateerror, clnt_tli_create,
12 clnt_tp_create, clnt_tp_create_timed, clnt_vc_create, rpc_createerr,
13 clnt_door_create \- library routines for dealing with creation and manipulation
14 of CLIENT handles
15 .SH SYNOPSIS
16 .LP
17 .nf
18 #include <rpc/rpc.h>
19
20 \fBbool_t\fR \fBclnt_control\fR(\fBCLIENT *\fR\fIclnt\fR, \fBconst uint_t\fR \fIreq\fR, \fBchar *\fR\fIinfo\fR);
21 .fi
22
23 .LP
24 .nf
25 \fBCLIENT *\fR\fBclnt_create\fR(\fBconst char *\fR\fIhost\fR, \fBconst rpcprog_t\fR \fIprognum\fR,
26 \fBconst rpcvers_t\fR \fIversnum\fR, \fBconst char *\fR\fInettype\fR);
27 .fi
93 \fBconst struct netconfig *\fR\fInetconf\fR);
94 .fi
95
96 .LP
97 .nf
98 \fBCLIENT *\fR\fBclnt_tp_create_timed\fR(\fBconst char *\fR\fIhost\fR,
99 \fBconst rpcprog_t\fR \fIprognum\fR, \fBconst rpcvers_t\fR \fIversnum\fR,
100 \fBconst struct netconfig *\fR\fInetconf\fR, \fBconst struct timeval *\fR\fItimeout\fR);
101 .fi
102
103 .LP
104 .nf
105 \fBCLIENT *\fR\fBclnt_vc_create\fR(\fBconst int\fR \fIfildes\fR,
106 \fBconst struct netbuf *\fR\fIsvcaddr\fR, \fBconst rpcprog_t\fR \fIprognum\fR,
107 \fBconst rpcvers_t\fR \fIversnum\fR, \fBconst uint_t\fR \fIsendsz\fR,
108 \fBconst uint_t\fR \fIrecsz\fR);
109 .fi
110
111 .LP
112 .nf
113 \fBstruct rpc_createerr\fR \fBrpc_createerr\fR;
114 .fi
115
116 .LP
117 .nf
118 \fBCLIENT *\fR\fBclnt_door_create\fR(\fBconst rpcprog_t\fR \fIprognum\fR,
119 \fBconst rpcvers_t\fR \fIversnum\fR, \fBconst uint_t\fR \fIsendsz\fR);
120 .fi
121
122 .SH DESCRIPTION
123 .sp
124 .LP
125 \fBRPC\fR library routines allow \fBC\fR language programs to make procedure
126 calls on other machines across the network. First a \fBCLIENT\fR handle is
127 created and then the client calls a procedure to send a request to the server.
128 On receipt of the request, the server calls a dispatch routine to perform the
129 requested service, and then sends a reply.
130 .sp
131 .LP
132 These routines are MT-Safe. In the case of multithreaded applications, the
133 \fB-mt\fR option must be specified on the command line at compilation time.
134 When the \fB-mt\fR option is specified, \fBrpc_createerr\fR becomes a macro
135 that enables each thread to have its own \fBrpc_createerr\fR. See
136 \fBthreads\fR(5).
137 .SS "Routines"
138 .sp
139 .LP
140 See \fBrpc\fR(3NSL) for the definition of the \fBCLIENT\fR data structure.
141 .sp
142 .ne 2
143 .na
144 \fB\fBclnt_control()\fR\fR
145 .ad
146 .sp .6
147 .RS 4n
148 A function macro to change or retrieve various information about a client
149 object. \fIreq\fR indicates the type of operation, and \fIinfo\fR is a pointer
150 to the information. For both connectionless and connection-oriented transports,
151 the supported values of \fIreq\fR and their argument types and what they do
152 are:
153 .sp
154 .in +2
155 .nf
501 \fB\fBclnt_vc_create()\fR\fR
502 .ad
503 .sp .6
504 .RS 4n
505 This routine creates an \fBRPC\fR client for the remote program \fIprognum\fR
506 and version \fIversnum\fR; the client uses a connection-oriented transport. The
507 remote program is located at address \fIsvcaddr\fR. The parameter \fIfildes\fR
508 is an open and bound file descriptor. The user may specify the size of the send
509 and receive buffers with the parameters \fIsendsz\fR and \fIrecvsz\fR; values
510 of \fB0\fR choose suitable defaults. This routine returns \fINULL\fR if it
511 fails.
512 .sp
513 The address \fIsvcaddr\fR should not be \fINULL\fR and should point to the
514 actual address of the remote program. \fBclnt_vc_create()\fR does not consult
515 the remote \fBrpcbind\fR service for this information.
516 .RE
517
518 .sp
519 .ne 2
520 .na
521 \fB\fBrpc_createerr\fR\fR
522 .ad
523 .sp .6
524 .RS 4n
525 A global variable whose value is set by any \fBRPC\fR client handle creation
526 routine that fails. It is used by the routine \fBclnt_pcreateerror()\fR to
527 print the reason for the failure.
528 .sp
529 In multithreaded applications, \fBrpc_createerr\fR becomes a macro which
530 enables each thread to have its own \fBrpc_createerr\fR.
531 .RE
532
533 .sp
534 .ne 2
535 .na
536 \fB\fBclnt_door_create()\fR\fR
537 .ad
538 .sp .6
539 .RS 4n
540 This routine creates an RPC client handle over doors for the given program
541 \fIprognum\fR and version \fIversnum\fR. Doors is a transport mechanism that
|