Print this page
4340 rpc_clnt_create(3nsl): rpc_createerr is a variable, not a function
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3nsl/rpc_clnt_create.3nsl
+++ new/usr/src/man/man3nsl/rpc_clnt_create.3nsl
1 1 '\" te
2 2 .\" Copyright 1989 AT&T
3 3 .\" Copyright (C) 2009, Sun Microsystems, Inc. All Rights Reserved
4 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 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 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"
7 +.TH RPC_CLNT_CREATE 3NSL "Dec 16, 2013"
8 8 .SH NAME
9 9 rpc_clnt_create, clnt_control, clnt_create, clnt_create_timed,
10 10 clnt_create_vers, clnt_create_vers_timed, clnt_destroy, clnt_dg_create,
11 11 clnt_pcreateerror, clnt_raw_create, clnt_spcreateerror, clnt_tli_create,
12 12 clnt_tp_create, clnt_tp_create_timed, clnt_vc_create, rpc_createerr,
13 13 clnt_door_create \- library routines for dealing with creation and manipulation
14 14 of CLIENT handles
15 15 .SH SYNOPSIS
16 16 .LP
17 17 .nf
18 18 #include <rpc/rpc.h>
19 19
20 20 \fBbool_t\fR \fBclnt_control\fR(\fBCLIENT *\fR\fIclnt\fR, \fBconst uint_t\fR \fIreq\fR, \fBchar *\fR\fIinfo\fR);
21 21 .fi
22 22
23 23 .LP
24 24 .nf
25 25 \fBCLIENT *\fR\fBclnt_create\fR(\fBconst char *\fR\fIhost\fR, \fBconst rpcprog_t\fR \fIprognum\fR,
26 26 \fBconst rpcvers_t\fR \fIversnum\fR, \fBconst char *\fR\fInettype\fR);
27 27 .fi
28 28
29 29 .LP
30 30 .nf
31 31 \fBCLIENT *\fR\fBclnt_create_timed\fR(\fBconst char *\fR\fIhost\fR, \fBconst rpcprog_t\fR \fIprognum\fR,
32 32 \fBconst rpcvers_t\fR \fIversnum\fR, \fBconst\fR \fInettype\fR,
33 33 \fBconst struct timeval *\fR\fItimetout\fR);
34 34 .fi
35 35
36 36 .LP
37 37 .nf
38 38 \fBCLIENT *\fR\fBclnt_create_vers\fR (\fBconst char *\fR\fIhost\fR,
39 39 \fBconst rpcprog_t\fR \fIprognum\fR, \fBrpcvers_t *\fR\fIvers_outp\fR,
40 40 \fBconst rpcvers_t\fR \fIvers_low\fR, \fBconst rpcvers_t\fR \fIvers_high\fR,
41 41 \fBconst char *\fR\fInettype\fR);
42 42 .fi
43 43
44 44 .LP
45 45 .nf
46 46 \fBCLIENT *\fR\fBclnt_create_vers_timed\fR(\fBconst char *\fR\fIhost\fR,
47 47 \fBconst rpcprog_t\fR \fIprognum\fR, \fBrpcvers_t *\fR\fIvers_outp\fR,
48 48 \fBconst rpcvers_t\fR \fIvers_low\fR, \fBconst rpcvers_t\fR \fIvers_high\fR,
49 49 \fBchar *\fR\fInettype\fR, \fBconst struct timeval *\fR\fItimeout\fR);
50 50 .fi
51 51
52 52 .LP
53 53 .nf
54 54 \fBvoid\fR \fBclnt_destroy\fR(\fBCLIENT *\fR\fIclnt\fR);
55 55 .fi
56 56
57 57 .LP
58 58 .nf
59 59 \fBCLIENT *\fR\fBclnt_dg_create\fR(\fBconst int\fR \fIfildes\fR,
60 60 \fBconst struct netbuf *\fR\fIsvcaddr\fR, \fBconst rpcprog_t\fR \fIprognum\fR,
61 61 \fBconst rpcvers_t\fR \fIversnum\fR, \fBconst uint_t\fR \fIsendsz\fR,
62 62 \fBconst uint_t\fR \fIrecsz\fR);
63 63 .fi
64 64
65 65 .LP
66 66 .nf
67 67 \fBvoid\fR \fBclnt_pcreateerror\fR(\fBconst char *\fR\fIs\fR);
68 68 .fi
69 69
70 70 .LP
71 71 .nf
72 72 \fBCLIENT *\fR\fBclnt_raw_create\fR(\fBconst rpcprog_t\fR \fIprognum\fR,
73 73 \fBconst rpcvers_t\fR \fIversnum\fR);
74 74 .fi
75 75
76 76 .LP
77 77 .nf
78 78 \fBchar *\fR\fBclnt_spcreateerror\fR(\fBconst char *\fR\fIs\fR);
79 79 .fi
80 80
81 81 .LP
82 82 .nf
83 83 \fBCLIENT *\fR\fBclnt_tli_create\fR(\fBconst int\fR \fIfildes\fR,
84 84 \fBconst struct netconfig *\fR\fInetconf\fR, \fBconst struct netbuf *\fR\fIsvcaddr\fR,
85 85 \fBconst rpcprog_t\fR \fIprognum\fR, \fBconst rpcvers_t\fR \fIversnum\fR,
86 86 \fBconst uint_t\fR \fIsendsz\fR, \fBconst uint_t\fR \fIrecsz\fR);
87 87 .fi
88 88
89 89 .LP
90 90 .nf
91 91 \fBCLIENT *\fR\fBclnt_tp_create\fR(\fBconst char *\fR\fIhost\fR,
92 92 \fBconst rpcprog_t\fR \fIprognum\fR, \fBconst rpcvers_t\fR \fIversnum\fR,
93 93 \fBconst struct netconfig *\fR\fInetconf\fR);
94 94 .fi
95 95
96 96 .LP
97 97 .nf
98 98 \fBCLIENT *\fR\fBclnt_tp_create_timed\fR(\fBconst char *\fR\fIhost\fR,
99 99 \fBconst rpcprog_t\fR \fIprognum\fR, \fBconst rpcvers_t\fR \fIversnum\fR,
100 100 \fBconst struct netconfig *\fR\fInetconf\fR, \fBconst struct timeval *\fR\fItimeout\fR);
101 101 .fi
102 102
↓ open down ↓ |
85 lines elided |
↑ open up ↑ |
103 103 .LP
104 104 .nf
105 105 \fBCLIENT *\fR\fBclnt_vc_create\fR(\fBconst int\fR \fIfildes\fR,
106 106 \fBconst struct netbuf *\fR\fIsvcaddr\fR, \fBconst rpcprog_t\fR \fIprognum\fR,
107 107 \fBconst rpcvers_t\fR \fIversnum\fR, \fBconst uint_t\fR \fIsendsz\fR,
108 108 \fBconst uint_t\fR \fIrecsz\fR);
109 109 .fi
110 110
111 111 .LP
112 112 .nf
113 -\fBstruct rpc_createerr\fR \fBrpc_createerr\fR
113 +\fBstruct rpc_createerr\fR \fBrpc_createerr\fR;
114 114 .fi
115 115
116 116 .LP
117 117 .nf
118 118 \fBCLIENT *\fR\fBclnt_door_create\fR(\fBconst rpcprog_t\fR \fIprognum\fR,
119 119 \fBconst rpcvers_t\fR \fIversnum\fR, \fBconst uint_t\fR \fIsendsz\fR);
120 120 .fi
121 121
122 122 .SH DESCRIPTION
123 123 .sp
124 124 .LP
125 125 \fBRPC\fR library routines allow \fBC\fR language programs to make procedure
126 126 calls on other machines across the network. First a \fBCLIENT\fR handle is
127 127 created and then the client calls a procedure to send a request to the server.
128 128 On receipt of the request, the server calls a dispatch routine to perform the
129 129 requested service, and then sends a reply.
130 130 .sp
131 131 .LP
132 132 These routines are MT-Safe. In the case of multithreaded applications, the
133 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
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 136 \fBthreads\fR(5).
137 137 .SS "Routines"
138 138 .sp
139 139 .LP
140 140 See \fBrpc\fR(3NSL) for the definition of the \fBCLIENT\fR data structure.
141 141 .sp
142 142 .ne 2
143 143 .na
144 144 \fB\fBclnt_control()\fR\fR
145 145 .ad
146 146 .sp .6
147 147 .RS 4n
148 148 A function macro to change or retrieve various information about a client
149 149 object. \fIreq\fR indicates the type of operation, and \fIinfo\fR is a pointer
150 150 to the information. For both connectionless and connection-oriented transports,
151 151 the supported values of \fIreq\fR and their argument types and what they do
152 152 are:
153 153 .sp
154 154 .in +2
155 155 .nf
156 156 CLSET_TIMEOUT struct timeval * set total timeout
157 157 CLGET_TIMEOUT struct timeval * get total timeout
158 158 .fi
159 159 .in -2
160 160
161 161 If the timeout is set using \fBclnt_control()\fR, the timeout argument passed
162 162 by \fBclnt_call()\fR is ignored in all subsequent calls. If the timeout value
163 163 is set to \fB0\fR, \fBclnt_control()\fR immediately returns
164 164 \fBRPC_TIMEDOUT\fR. Set the timeout parameter to \fB0\fR for batching calls.
165 165 .sp
166 166 .in +2
167 167 .nf
168 168 CLGET_SERVER_ADDR struct netbuf * get server's address
169 169 CLGET_SVC_ADDR struct netbuf * get server's address
170 170 CLGET_FD int * get associated file descriptor
171 171 CLSET_FD_CLOSE void close the file descriptor when
172 172 destroying the client handle
173 173 (see \fBclnt_destroy()\fR)
174 174 CLSET_FD_NCLOSE void do not close the file
175 175 descriptor when destroying the client handle
176 176 CLGET_VERS rpcvers_t get the RPC program's version
177 177 number associated with the
178 178 client handle
179 179 CLSET_VERS rpcvers_t set the RPC program's version
180 180 number associated with the
181 181 client handle. This assumes
182 182 that the RPC server for this
183 183 new version is still listening
184 184 at the address of the previous
185 185 version.
186 186 CLGET_XID uint32_t get the XID of the previous
187 187 remote procedure call
188 188 CLSET_XID uint32_t set the XID of the next
189 189 remote procedure call
190 190 CLGET_PROG rpcprog_t get program number
191 191 CLSET_PROG rpcprog_t set program number
192 192 .fi
193 193 .in -2
194 194
195 195 The following operations are valid for connection-oriented transports only:
196 196 .sp
197 197 .in +2
198 198 .nf
199 199 CLSET_IO_MODE rpciomode_t* set the IO mode used
200 200 to send one-way requests. The argument for this operation
201 201 can be either:
202 202 - RPC_CL_BLOCKING all sending operations block
203 203 until the underlying transport protocol has
204 204 accepted requests. If you specify this argument
205 205 you cannot use flush and getting and setting buffer
206 206 size is meaningless.
207 207 - RPC_CL_NONBLOCKING sending operations do not
208 208 block and return as soon as requests enter the buffer.
209 209 You can now use non-blocking I/O. The requests in the
210 210 buffer are pending. The requests are sent to
211 211 the server as soon as a two-way request is sent
212 212 or a flush is done. You are responsible for flushing
213 213 the buffer. When you choose RPC_CL_NONBLOCKING argument
214 214 you have a choice of flush modes as specified by
215 215 CLSET_FLUSH_MODE.
216 216 CLGET_IO_MODE rpciomode_t* get the current IO mode
217 217 CLSET_FLUSH_MODE rpcflushmode_t* set the flush mode.
218 218 The flush mode can only be used in non-blocking I/O mode.
219 219 The argument can be either of the following:
220 220 - RPC_CL_BESTEFFORT_FLUSH: All flushes send requests
221 221 in the buffer until the transport end-point blocks.
222 222 If the transport connection is congested, the call
223 223 returns directly.
224 224 - RPC_CL_BLOCKING_FLUSH: Flush blocks until the
225 225 underlying transport protocol accepts all pending
226 226 requests into the queue.
227 227 CLGET_FLUSH_MODE rpcflushmode_t* get the current flush mode.
228 228 CLFLUSH rpcflushmode_t flush the pending requests.
229 229 This command can only be used in non-blocking I/O mode.
230 230 The flush policy depends on which of the following
231 231 parameters is specified:
232 232 - RPC_CL_DEFAULT_FLUSH, or NULL: The flush is done
233 233 according to the current flush mode policy
234 234 (see CLSET_FLUSH_MODE option).
235 235 - RPC_CL_BESTEFFORT_FLUSH: The flush tries
236 236 to send pending requests without blocking; the call
237 237 returns directly. If the transport connection is
238 238 congested, this call could return without the request
239 239 being sent.
240 240 - RPC_CL_BLOCKING_FLUSH: The flush sends all pending
241 241 requests. This call will block until all the requests
242 242 have been accepted by the transport layer.
243 243 CLSET_CONNMAXREC_SIZE int* set the buffer size.
244 244 It is not possible to dynamically
245 245 resize the buffer if it contains data.
246 246 The default size of the buffer is 16 kilobytes.
247 247 CLGET_CONNMAXREC_SIZE int* get the current size of the
248 248 buffer
249 249 CLGET_CURRENT_REC_SIZE int* get the size of
250 250 the pending requests stored in the buffer. Use of this
251 251 command is only recommended when you are in non-blocking
252 252 I/O mode. The current size of the buffer is always zero
253 253 when the handle is in blocking mode as the buffer is not
254 254 used in this mode.
255 255 .fi
256 256 .in -2
257 257
258 258 The following operations are valid for connectionless transports only:
259 259 .sp
260 260 .in +2
261 261 .nf
262 262 CLSET_RETRY_TIMEOUT struct timeval * set the retry timeout
263 263 CLGET_RETRY_TIMEOUT struct timeval * get the retry timeout
264 264 .fi
265 265 .in -2
266 266
267 267 The retry timeout is the time that \fBRPC\fR waits for the server to reply
268 268 before retransmitting the request.
269 269 .sp
270 270 \fBclnt_control()\fR returns \fBTRUE\fR on success and \fBFALSE\fR on failure.
271 271 .RE
272 272
273 273 .sp
274 274 .ne 2
275 275 .na
276 276 \fB\fBclnt_create()\fR\fR
277 277 .ad
278 278 .sp .6
279 279 .RS 4n
280 280 Generic client creation routine for program \fIprognum\fR and version
281 281 \fIversnum\fR. \fIhost\fR identifies the name of the remote host where the
282 282 server is located. \fInettype\fR indicates the class of transport protocol to
283 283 use. The transports are tried in left to right order in \fBNETPATH\fR variable
284 284 or in top to bottom order in the netconfig database.
285 285 .sp
286 286 \fBclnt_create()\fR tries all the transports of the \fInettype\fR class
287 287 available from the \fBNETPATH\fR environment variable and the netconfig
288 288 database, and chooses the first successful one. A default timeout is set and
289 289 can be modified using \fBclnt_control()\fR. This routine returns \fINULL\fR if
290 290 it fails. The \fBclnt_pcreateerror()\fR routine can be used to print the reason
291 291 for failure.
292 292 .sp
293 293 Note that \fBclnt_create()\fR returns a valid client handle even if the
294 294 particular version number supplied to \fBclnt_create()\fR is not registered
295 295 with the \fBrpcbind\fR service. This mismatch will be discovered by a
296 296 \fBclnt_call\fR later (see \fBrpc_clnt_calls\fR(3NSL)).
297 297 .RE
298 298
299 299 .sp
300 300 .ne 2
301 301 .na
302 302 \fB\fBclnt_create_timed()\fR\fR
303 303 .ad
304 304 .sp .6
305 305 .RS 4n
306 306 Generic client creation routine which is similar to \fBclnt_create()\fR but
307 307 which also has the additional parameter \fItimeout\fR that specifies the
308 308 maximum amount of time allowed for each transport class tried. In all other
309 309 respects, the \fBclnt_create_timed()\fR call behaves exactly like the
310 310 \fBclnt_create()\fR call.
311 311 .RE
312 312
313 313 .sp
314 314 .ne 2
315 315 .na
316 316 \fB\fBclnt_create_vers()\fR\fR
317 317 .ad
318 318 .sp .6
319 319 .RS 4n
320 320 Generic client creation routine which is similar to \fBclnt_create()\fR but
321 321 which also checks for the version availability. \fIhost\fR identifies the name
322 322 of the remote host where the server is located. \fInettype\fR indicates the
323 323 class transport protocols to be used. If the routine is successful it returns a
324 324 client handle created for the highest version between \fIvers_low\fR and
325 325 \fIvers_high\fR that is supported by the server. \fIvers_outp\fR is set to this
326 326 value. That is, after a successful return \fIvers_low\fR <= \fI*vers_outp\fR <=
327 327 \fIvers_high\fR. If no version between \fIvers_low\fR and \fIvers_high\fR is
328 328 supported by the server then the routine fails and returns \fBNULL.\fR A
329 329 default timeout is set and can be modified using \fBclnt_control()\fR. This
330 330 routine returns \fINULL\fR if it fails. The \fBclnt_pcreateerror()\fR routine
331 331 can be used to print the reason for failure.
332 332 .sp
333 333 Note: \fBclnt_create()\fR returns a valid client handle even if the particular
334 334 version number supplied to \fBclnt_create()\fR is not registered with the
335 335 \fBrpcbind\fR service. This mismatch will be discovered by a \fBclnt_call\fR
336 336 later (see \fBrpc_clnt_calls\fR(3NSL)). However, \fBclnt_create_vers()\fR does
337 337 this for you and returns a valid handle only if a version within the range
338 338 supplied is supported by the server.
339 339 .RE
340 340
341 341 .sp
342 342 .ne 2
343 343 .na
344 344 \fB\fBclnt_create_vers_timed()\fR\fR
345 345 .ad
346 346 .sp .6
347 347 .RS 4n
348 348 Generic client creation routine similar to \fBclnt_create_vers()\fR but with
349 349 the additional parameter \fItimeout\fR, which specifies the maximum amount of
350 350 time allowed for each transport class tried. In all other respects, the
351 351 \fBclnt_create_vers_timed()\fR call behaves exactly like the
352 352 \fBclnt_create_vers()\fR call.
353 353 .RE
354 354
355 355 .sp
356 356 .ne 2
357 357 .na
358 358 \fB\fBclnt_destroy()\fR\fR
359 359 .ad
360 360 .sp .6
361 361 .RS 4n
362 362 A function macro that destroys the client's \fBRPC\fR handle. Destruction
363 363 usually involves deallocation of private data structures, including \fIclnt\fR
364 364 itself. Use of \fIclnt\fR is undefined after calling \fBclnt_destroy()\fR. If
365 365 the \fBRPC\fR library opened the associated file descriptor, or
366 366 \fBCLSET_FD_CLOSE\fR was set using \fBclnt_control()\fR, the file descriptor
367 367 will be closed.
368 368 .sp
369 369 The caller should call \fBauth_destroy(\fR\fIclnt\fR->\fBcl_auth)\fR (before
370 370 calling \fBclnt_destroy()\fR) to destroy the associated \fBAUTH\fR structure
371 371 (see \fBrpc_clnt_auth\fR(3NSL)).
372 372 .RE
373 373
374 374 .sp
375 375 .ne 2
376 376 .na
377 377 \fB\fBclnt_dg_create()\fR\fR
378 378 .ad
379 379 .sp .6
380 380 .RS 4n
381 381 This routine creates an \fBRPC\fR client for the remote program \fIprognum\fR
382 382 and version \fIversnum\fR; the client uses a connectionless transport. The
383 383 remote program is located at address \fIsvcaddr\fR. The parameter \fIfildes\fR
384 384 is an open and bound file descriptor. This routine will resend the call message
385 385 in intervals of 15 seconds until a response is received or until the call times
386 386 out. The total time for the call to time out is specified by \fBclnt_call()\fR
387 387 (see \fBclnt_call()\fR in \fBrpc_clnt_calls\fR(3NSL)). The retry time out and
388 388 the total time out periods can be changed using \fBclnt_control()\fR. The user
389 389 may set the size of the send and receive buffers with the parameters
390 390 \fIsendsz\fR and \fIrecvsz\fR; values of \fB0\fR choose suitable defaults. This
391 391 routine returns \fINULL\fR if it fails.
392 392 .RE
393 393
394 394 .sp
395 395 .ne 2
396 396 .na
397 397 \fB\fBclnt_pcreateerror()\fR\fR
398 398 .ad
399 399 .sp .6
400 400 .RS 4n
401 401 Print a message to standard error indicating why a client \fBRPC\fR handle
402 402 could not be created. The message is prepended with the string \fIs\fR and a
403 403 colon, and appended with a newline.
404 404 .RE
405 405
406 406 .sp
407 407 .ne 2
408 408 .na
409 409 \fB\fBclnt_raw_create()\fR\fR
410 410 .ad
411 411 .sp .6
412 412 .RS 4n
413 413 This routine creates an \fBRPC\fR client handle for the remote program
414 414 \fIprognum\fR and version \fIversnum\fR. The transport used to pass messages to
415 415 the service is a buffer within the process's address space, so the
416 416 corresponding \fBRPC\fR server should live in the same address space; (see
417 417 \fBsvc_raw_create()\fR in \fBrpc_svc_create\fR(3NSL)). This allows simulation
418 418 of \fBRPC\fR and measurement of \fBRPC\fR overheads, such as round trip times,
419 419 without any kernel or networking interference. This routine returns \fINULL\fR
420 420 if it fails. \fBclnt_raw_create()\fR should be called after
421 421 \fBsvc_raw_create()\fR.
422 422 .RE
423 423
424 424 .sp
425 425 .ne 2
426 426 .na
427 427 \fB\fBclnt_spcreateerror()\fR\fR
428 428 .ad
429 429 .sp .6
430 430 .RS 4n
431 431 Like \fBclnt_pcreateerror()\fR, except that it returns a string instead of
432 432 printing to the standard error. A newline is not appended to the message in
433 433 this case.
434 434 .sp
435 435 Warning: returns a pointer to a buffer that is overwritten on each call. In
436 436 multithread applications, this buffer is implemented as thread-specific data.
437 437 .RE
438 438
439 439 .sp
440 440 .ne 2
441 441 .na
442 442 \fB\fBclnt_tli_create()\fR\fR
443 443 .ad
444 444 .sp .6
445 445 .RS 4n
446 446 This routine creates an \fBRPC\fR client handle for the remote program
447 447 \fIprognum\fR and version \fIversnum\fR. The remote program is located at
448 448 address \fIsvcaddr\fR. If \fIsvcaddr\fR is \fINULL\fR and it is
449 449 connection-oriented, it is assumed that the file descriptor is connected. For
450 450 connectionless transports, if \fIsvcaddr\fR is \fINULL\fR,
451 451 \fBRPC_UNKNOWNADDR\fR error is set. \fIfildes\fR is a file descriptor which may
452 452 be open, bound and connected. If it is \fBRPC_ANYFD\fR, it opens a file
453 453 descriptor on the transport specified by \fInetconf\fR. If \fIfildes\fR is
454 454 \fBRPC_ANYFD\fR and \fInetconf\fR is \fINULL\fR, a \fBRPC_UNKNOWNPROTO\fR error
455 455 is set. If \fIfildes\fR is unbound, then it will attempt to bind the
456 456 descriptor. The user may specify the size of the buffers with the parameters
457 457 \fIsendsz\fR and \fIrecvsz\fR; values of \fB0\fR choose suitable defaults.
458 458 Depending upon the type of the transport (connection-oriented or
459 459 connectionless), \fBclnt_tli_create()\fR calls appropriate client creation
460 460 routines. This routine returns \fINULL\fR if it fails. The
461 461 \fBclnt_pcreateerror()\fR routine can be used to print the reason for failure.
462 462 The remote \fBrpcbind\fR service (see \fBrpcbind\fR(1M)) is not consulted for
463 463 the address of the remote service.
464 464 .RE
465 465
466 466 .sp
467 467 .ne 2
468 468 .na
469 469 \fB\fBclnt_tp_create()\fR\fR
470 470 .ad
471 471 .sp .6
472 472 .RS 4n
473 473 Like \fBclnt_create()\fR except \fBclnt_tp_create()\fR tries only one transport
474 474 specified through \fInetconf\fR.
475 475 .sp
476 476 \fBclnt_tp_create()\fR creates a client handle for the program \fIprognum\fR,
477 477 the version \fIversnum\fR, and for the transport specified by \fInetconf\fR.
478 478 Default options are set, which can be changed using \fBclnt_control()\fR calls.
479 479 The remote \fBrpcbind\fR service on the host \fIhost\fR is consulted for the
480 480 address of the remote service. This routine returns \fINULL\fR if it fails. The
481 481 \fBclnt_pcreateerror()\fR routine can be used to print the reason for failure.
482 482 .RE
483 483
484 484 .sp
485 485 .ne 2
486 486 .na
487 487 \fB\fBclnt_tp_create_timed()\fR\fR
488 488 .ad
489 489 .sp .6
490 490 .RS 4n
491 491 Like \fBclnt_tp_create()\fR except \fBclnt_tp_create_timed()\fR has the extra
492 492 parameter \fItimeout\fR which specifies the maximum time allowed for the
493 493 creation attempt to succeed. In all other respects, the
494 494 \fBclnt_tp_create_timed()\fR call behaves exactly like the
495 495 \fBclnt_tp_create()\fR call.
496 496 .RE
497 497
498 498 .sp
499 499 .ne 2
500 500 .na
501 501 \fB\fBclnt_vc_create()\fR\fR
502 502 .ad
503 503 .sp .6
504 504 .RS 4n
505 505 This routine creates an \fBRPC\fR client for the remote program \fIprognum\fR
506 506 and version \fIversnum\fR; the client uses a connection-oriented transport. The
507 507 remote program is located at address \fIsvcaddr\fR. The parameter \fIfildes\fR
508 508 is an open and bound file descriptor. The user may specify the size of the send
509 509 and receive buffers with the parameters \fIsendsz\fR and \fIrecvsz\fR; values
510 510 of \fB0\fR choose suitable defaults. This routine returns \fINULL\fR if it
↓ open down ↓ |
365 lines elided |
↑ open up ↑ |
511 511 fails.
512 512 .sp
513 513 The address \fIsvcaddr\fR should not be \fINULL\fR and should point to the
514 514 actual address of the remote program. \fBclnt_vc_create()\fR does not consult
515 515 the remote \fBrpcbind\fR service for this information.
516 516 .RE
517 517
518 518 .sp
519 519 .ne 2
520 520 .na
521 -\fB\fBrpc_createerr()\fR\fR
521 +\fB\fBrpc_createerr\fR\fR
522 522 .ad
523 523 .sp .6
524 524 .RS 4n
525 525 A global variable whose value is set by any \fBRPC\fR client handle creation
526 526 routine that fails. It is used by the routine \fBclnt_pcreateerror()\fR to
527 527 print the reason for the failure.
528 528 .sp
529 529 In multithreaded applications, \fBrpc_createerr\fR becomes a macro which
530 530 enables each thread to have its own \fBrpc_createerr\fR.
531 531 .RE
532 532
533 533 .sp
534 534 .ne 2
535 535 .na
536 536 \fB\fBclnt_door_create()\fR\fR
537 537 .ad
538 538 .sp .6
539 539 .RS 4n
540 540 This routine creates an RPC client handle over doors for the given program
541 541 \fIprognum\fR and version \fIversnum\fR. Doors is a transport mechanism that
542 542 facilitates fast data transfer between processes on the same machine. The user
543 543 may set the size of the send buffer with the parameter \fIsendsz\fR. If
544 544 \fIsendsz\fR is 0, the corresponding default buffer size is 16 Kbyte. The
545 545 \fBclnt_door_create()\fR routine returns \fINULL\fR if it fails and sets a
546 546 value for \fBrpc_createerr\fR.
547 547 .RE
548 548
549 549 .SH ATTRIBUTES
550 550 .sp
551 551 .LP
552 552 See \fBattributes\fR(5) for descriptions of the following attributes:
553 553 .sp
554 554
555 555 .sp
556 556 .TS
557 557 box;
558 558 c | c
559 559 l | l .
560 560 ATTRIBUTE TYPE ATTRIBUTE VALUE
561 561 _
562 562 Architecture All
563 563 _
564 564 Interface Stability Committed
565 565 _
566 566 MT-Level MT-Safe
567 567 .TE
568 568
569 569 .SH SEE ALSO
570 570 .sp
571 571 .LP
572 572 \fBrpcbind\fR(1M), \fBrpc\fR(3NSL), \fBrpc_clnt_auth\fR(3NSL),
573 573 \fBrpc_clnt_calls\fR(3NSL), \fBrpc_svc_create\fR(3NSL),
574 574 \fBsvc_raw_create\fR(3NSL), \fBthreads\fR(5), \fBattributes\fR(5)
↓ open down ↓ |
43 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX