1rpc(3) Library Functions Manual rpc(3)
2
3
4
6 rpc - library routines for remote procedure calls
7
9 Standard C library (libc, -lc)
10
12 These routines allow C programs to make procedure calls on other ma‐
13 chines across the network. First, the client calls a procedure to send
14 a data packet to the server. Upon receipt of the packet, the server
15 calls a dispatch routine to perform the requested service, and then
16 sends back a reply. Finally, the procedure call returns to the client.
17
18 To take use of these routines, include the header file <rpc/rpc.h>.
19
20 The prototypes below make use of the following types:
21
22 typedef int bool_t;
23
24 typedef bool_t (*xdrproc_t)(XDR *, void *, ...);
25
26 typedef bool_t (*resultproc_t)(caddr_t resp,
27 struct sockaddr_in *raddr);
28
29 See the header files for the declarations of the AUTH, CLIENT, SVCXPRT,
30 and XDR types.
31
32 void auth_destroy(AUTH *auth);
33
34 A macro that destroys the authentication information associated
35 with auth. Destruction usually involves deallocation of private
36 data structures. The use of auth is undefined after calling
37 auth_destroy().
38
39 AUTH *authnone_create(void);
40
41 Create and return an RPC authentication handle that passes
42 nonusable authentication information with each remote procedure
43 call. This is the default authentication used by RPC.
44
45 AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
46 int len, gid_t aup_gids[.len]);
47
48 Create and return an RPC authentication handle that contains au‐
49 thentication information. The parameter host is the name of the
50 machine on which the information was created; uid is the user's
51 user ID; gid is the user's current group ID; len and aup_gids
52 refer to a counted array of groups to which the user belongs.
53 It is easy to impersonate a user.
54
55 AUTH *authunix_create_default(void);
56
57 Calls authunix_create() with the appropriate parameters.
58
59 int callrpc(char *host, unsigned long prognum,
60 unsigned long versnum, unsigned long procnum,
61 xdrproc_t inproc, const char *in,
62 xdrproc_t outproc, char *out);
63
64 Call the remote procedure associated with prognum, versnum, and
65 procnum on the machine, host. The parameter in is the address
66 of the procedure's argument(s), and out is the address of where
67 to place the result(s); inproc is used to encode the procedure's
68 parameters, and outproc is used to decode the procedure's re‐
69 sults. This routine returns zero if it succeeds, or the value
70 of enum clnt_stat cast to an integer if it fails. The routine
71 clnt_perrno() is handy for translating failure statuses into
72 messages.
73
74 Warning: calling remote procedures with this routine uses UDP/IP
75 as a transport; see clntudp_create() for restrictions. You do
76 not have control of timeouts or authentication using this rou‐
77 tine.
78
79 enum clnt_stat clnt_broadcast(unsigned long prognum,
80 unsigned long versnum, unsigned long procnum,
81 xdrproc_t inproc, char *in,
82 xdrproc_t outproc, char *out,
83 resultproc_t eachresult);
84
85 Like callrpc(), except the call message is broadcast to all lo‐
86 cally connected broadcast nets. Each time it receives a re‐
87 sponse, this routine calls eachresult(), whose form is:
88
89 eachresult(char *out, struct sockaddr_in *addr);
90
91 where out is the same as out passed to clnt_broadcast(), except
92 that the remote procedure's output is decoded there; addr points
93 to the address of the machine that sent the results. If eachre‐
94 sult() returns zero, clnt_broadcast() waits for more replies;
95 otherwise it returns with appropriate status.
96
97 Warning: broadcast sockets are limited in size to the maximum
98 transfer unit of the data link. For ethernet, this value is
99 1500 bytes.
100
101 enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
102 xdrproc_t inproc, char *in,
103 xdrproc_t outproc, char *out,
104 struct timeval tout);
105
106 A macro that calls the remote procedure procnum associated with
107 the client handle, clnt, which is obtained with an RPC client
108 creation routine such as clnt_create(). The parameter in is the
109 address of the procedure's argument(s), and out is the address
110 of where to place the result(s); inproc is used to encode the
111 procedure's parameters, and outproc is used to decode the proce‐
112 dure's results; tout is the time allowed for results to come
113 back.
114
115 clnt_destroy(CLIENT *clnt);
116
117 A macro that destroys the client's RPC handle. Destruction usu‐
118 ally involves deallocation of private data structures, including
119 clnt itself. Use of clnt is undefined after calling clnt_de‐
120 stroy(). If the RPC library opened the associated socket, it
121 will close it also. Otherwise, the socket remains open.
122
123 CLIENT *clnt_create(const char *host, unsigned long prog,
124 unsigned long vers, const char *proto);
125
126 Generic client creation routine. host identifies the name of
127 the remote host where the server is located. proto indicates
128 which kind of transport protocol to use. The currently sup‐
129 ported values for this field are “udp” and “tcp”. Default time‐
130 outs are set, but can be modified using clnt_control().
131
132 Warning: using UDP has its shortcomings. Since UDP-based RPC
133 messages can hold only up to 8 Kbytes of encoded data, this
134 transport cannot be used for procedures that take large argu‐
135 ments or return huge results.
136
137 bool_t clnt_control(CLIENT *cl, int req, char *info);
138
139 A macro used to change or retrieve various information about a
140 client object. req indicates the type of operation, and info is
141 a pointer to the information. For both UDP and TCP, the sup‐
142 ported values of req and their argument types and what they do
143 are:
144
145 CLSET_TIMEOUT struct timeval // set total timeout
146 CLGET_TIMEOUT struct timeval // get total timeout
147
148 Note: if you set the timeout using clnt_control(), the timeout
149 parameter passed to clnt_call() will be ignored in all future
150 calls.
151
152 CLGET_SERVER_ADDR struct sockaddr_in
153 // get server's address
154
155 The following operations are valid for UDP only:
156
157 CLSET_RETRY_TIMEOUT struct timeval // set the retry timeout
158 CLGET_RETRY_TIMEOUT struct timeval // get the retry timeout
159
160 The retry timeout is the time that "UDP RPC" waits for the
161 server to reply before retransmitting the request.
162
163 clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);
164
165 A macro that frees any data allocated by the RPC/XDR system when
166 it decoded the results of an RPC call. The parameter out is the
167 address of the results, and outproc is the XDR routine describ‐
168 ing the results. This routine returns one if the results were
169 successfully freed, and zero otherwise.
170
171 void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);
172
173 A macro that copies the error structure out of the client handle
174 to the structure at address errp.
175
176 void clnt_pcreateerror(const char *s);
177
178 Print a message to standard error indicating why a client RPC
179 handle could not be created. The message is prepended with
180 string s and a colon. Used when a clnt_create(), clntraw_cre‐
181 ate(), clnttcp_create(), or clntudp_create() call fails.
182
183 void clnt_perrno(enum clnt_stat stat);
184
185 Print a message to standard error corresponding to the condition
186 indicated by stat. Used after callrpc().
187
188 clnt_perror(CLIENT *clnt, const char *s);
189
190 Print a message to standard error indicating why an RPC call
191 failed; clnt is the handle used to do the call. The message is
192 prepended with string s and a colon. Used after clnt_call().
193
194 char *clnt_spcreateerror(const char *s);
195
196 Like clnt_pcreateerror(), except that it returns a string in‐
197 stead of printing to the standard error.
198
199 Bugs: returns pointer to static data that is overwritten on each
200 call.
201
202 char *clnt_sperrno(enum clnt_stat stat);
203
204 Take the same arguments as clnt_perrno(), but instead of sending
205 a message to the standard error indicating why an RPC call
206 failed, return a pointer to a string which contains the message.
207 The string ends with a NEWLINE.
208
209 clnt_sperrno() is used instead of clnt_perrno() if the program
210 does not have a standard error (as a program running as a server
211 quite likely does not), or if the programmer does not want the
212 message to be output with printf(3), or if a message format dif‐
213 ferent than that supported by clnt_perrno() is to be used.
214 Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sper‐
215 rno() returns pointer to static data, but the result will not
216 get overwritten on each call.
217
218 char *clnt_sperror(CLIENT *rpch, const char *s);
219
220 Like clnt_perror(), except that (like clnt_sperrno()) it returns
221 a string instead of printing to standard error.
222
223 Bugs: returns pointer to static data that is overwritten on each
224 call.
225
226 CLIENT *clntraw_create(unsigned long prognum, unsigned long versnum);
227
228 This routine creates a toy RPC client for the remote program
229 prognum, version versnum. The transport used to pass messages
230 to the service is actually a buffer within the process's address
231 space, so the corresponding RPC server should live in the same
232 address space; see svcraw_create(). This allows simulation of
233 RPC and acquisition of RPC overheads, such as round trip times,
234 without any kernel interference. This routine returns NULL if
235 it fails.
236
237 CLIENT *clnttcp_create(struct sockaddr_in *addr,
238 unsigned long prognum, unsigned long versnum,
239 int *sockp, unsigned int sendsz, unsigned int recvsz);
240
241 This routine creates an RPC client for the remote program
242 prognum, version versnum; the client uses TCP/IP as a transport.
243 The remote program is located at Internet address *addr. If
244 addr->sin_port is zero, then it is set to the actual port that
245 the remote program is listening on (the remote portmap service
246 is consulted for this information). The parameter sockp is a
247 socket; if it is RPC_ANYSOCK, then this routine opens a new one
248 and sets sockp. Since TCP-based RPC uses buffered I/O, the user
249 may specify the size of the send and receive buffers with the
250 parameters sendsz and recvsz; values of zero choose suitable de‐
251 faults. This routine returns NULL if it fails.
252
253 CLIENT *clntudp_create(struct sockaddr_in *addr,
254 unsigned long prognum, unsigned long versnum,
255 struct timeval wait, int *sockp);
256
257 This routine creates an RPC client for the remote program
258 prognum, version versnum; the client uses use UDP/IP as a trans‐
259 port. The remote program is located at Internet address addr.
260 If addr->sin_port is zero, then it is set to actual port that
261 the remote program is listening on (the remote portmap service
262 is consulted for this information). The parameter sockp is a
263 socket; if it is RPC_ANYSOCK, then this routine opens a new one
264 and sets sockp. The UDP transport resends the call message in
265 intervals of wait time until a response is received or until the
266 call times out. The total time for the call to time out is
267 specified by clnt_call().
268
269 Warning: since UDP-based RPC messages can hold only up to 8
270 Kbytes of encoded data, this transport cannot be used for proce‐
271 dures that take large arguments or return huge results.
272
273 CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
274 unsigned long prognum, unsigned long versnum,
275 struct timeval wait, int *sockp,
276 unsigned int sendsize, unsigned int recosize);
277
278 This routine creates an RPC client for the remote program
279 prognum, on versnum; the client uses use UDP/IP as a transport.
280 The remote program is located at Internet address addr. If
281 addr->sin_port is zero, then it is set to actual port that the
282 remote program is listening on (the remote portmap service is
283 consulted for this information). The parameter sockp is a
284 socket; if it is RPC_ANYSOCK, then this routine opens a new one
285 and sets sockp. The UDP transport resends the call message in
286 intervals of wait time until a response is received or until the
287 call times out. The total time for the call to time out is
288 specified by clnt_call().
289
290 This allows the user to specify the maximum packet size for
291 sending and receiving UDP-based RPC messages.
292
293 void get_myaddress(struct sockaddr_in *addr);
294
295 Stuff the machine's IP address into *addr, without consulting
296 the library routines that deal with /etc/hosts. The port number
297 is always set to htons(PMAPPORT).
298
299 struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);
300
301 A user interface to the portmap service, which returns a list of
302 the current RPC program-to-port mappings on the host located at
303 IP address *addr. This routine can return NULL. The command
304 rpcinfo -p uses this routine.
305
306 unsigned short pmap_getport(struct sockaddr_in *addr,
307 unsigned long prognum, unsigned long versnum,
308 unsigned int protocol);
309
310 A user interface to the portmap service, which returns the port
311 number on which waits a service that supports program number
312 prognum, version versnum, and speaks the transport protocol as‐
313 sociated with protocol. The value of protocol is most likely
314 IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that
315 the mapping does not exist or that the RPC system failed to con‐
316 tact the remote portmap service. In the latter case, the global
317 variable rpc_createerr contains the RPC status.
318
319 enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
320 unsigned long prognum, unsigned long versnum,
321 unsigned long procnum,
322 xdrproc_t inproc, char *in,
323 xdrproc_t outproc, char *out,
324 struct timeval tout, unsigned long *portp);
325
326 A user interface to the portmap service, which instructs portmap
327 on the host at IP address *addr to make an RPC call on your be‐
328 half to a procedure on that host. The parameter *portp will be
329 modified to the program's port number if the procedure succeeds.
330 The definitions of other parameters are discussed in callrpc()
331 and clnt_call(). This procedure should be used for a “ping” and
332 nothing else. See also clnt_broadcast().
333
334 bool_t pmap_set(unsigned long prognum, unsigned long versnum,
335 int protocol, unsigned short port);
336
337 A user interface to the portmap service, which establishes a
338 mapping between the triple [prognum,versnum,protocol] and port
339 on the machine's portmap service. The value of protocol is most
340 likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if
341 it succeeds, zero otherwise. Automatically done by svc_regis‐
342 ter().
343
344 bool_t pmap_unset(unsigned long prognum, unsigned long versnum);
345
346 A user interface to the portmap service, which destroys all map‐
347 ping between the triple [prognum,versnum,*] and ports on the ma‐
348 chine's portmap service. This routine returns one if it suc‐
349 ceeds, zero otherwise.
350
351 int registerrpc(unsigned long prognum, unsigned long versnum,
352 unsigned long procnum, char *(*procname)(char *),
353 xdrproc_t inproc, xdrproc_t outproc);
354
355 Register procedure procname with the RPC service package. If a
356 request arrives for program prognum, version versnum, and proce‐
357 dure procnum, procname is called with a pointer to its parame‐
358 ter(s); procname should return a pointer to its static re‐
359 sult(s); inproc is used to decode the parameters while outproc
360 is used to encode the results. This routine returns zero if the
361 registration succeeded, -1 otherwise.
362
363 Warning: remote procedures registered in this form are accessed
364 using the UDP/IP transport; see svcudp_create() for restric‐
365 tions.
366
367 struct rpc_createerr rpc_createerr;
368
369 A global variable whose value is set by any RPC client creation
370 routine that does not succeed. Use the routine clnt_pcreateer‐
371 ror() to print the reason why.
372
373 void svc_destroy(SVCXPRT *xprt);
374
375 A macro that destroys the RPC service transport handle, xprt.
376 Destruction usually involves deallocation of private data struc‐
377 tures, including xprt itself. Use of xprt is undefined after
378 calling this routine.
379
380 fd_set svc_fdset;
381
382 A global variable reflecting the RPC service side's read file
383 descriptor bit mask; it is suitable as a parameter to the se‐
384 lect(2) system call. This is of interest only if a service im‐
385 plementor does their own asynchronous event processing, instead
386 of calling svc_run(). This variable is read-only (do not pass
387 its address to select(2)!), yet it may change after calls to
388 svc_getreqset() or any creation routines.
389
390 int svc_fds;
391
392 Similar to svc_fdset, but limited to 32 file descriptors. This
393 interface is obsoleted by svc_fdset.
394
395 svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);
396
397 A macro that frees any data allocated by the RPC/XDR system when
398 it decoded the arguments to a service procedure using
399 svc_getargs(). This routine returns 1 if the results were suc‐
400 cessfully freed, and zero otherwise.
401
402 svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);
403
404 A macro that decodes the arguments of an RPC request associated
405 with the RPC service transport handle, xprt. The parameter in
406 is the address where the arguments will be placed; inproc is the
407 XDR routine used to decode the arguments. This routine returns
408 one if decoding succeeds, and zero otherwise.
409
410 struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);
411
412 The approved way of getting the network address of the caller of
413 a procedure associated with the RPC service transport handle,
414 xprt.
415
416 void svc_getreqset(fd_set *rdfds);
417
418 This routine is of interest only if a service implementor does
419 not call svc_run(), but instead implements custom asynchronous
420 event processing. It is called when the select(2) system call
421 has determined that an RPC request has arrived on some RPC
422 socket(s); rdfds is the resultant read file descriptor bit mask.
423 The routine returns when all sockets associated with the value
424 of rdfds have been serviced.
425
426 void svc_getreq(int rdfds);
427
428 Similar to svc_getreqset(), but limited to 32 file descriptors.
429 This interface is obsoleted by svc_getreqset().
430
431 bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
432 unsigned long versnum,
433 void (*dispatch)(struct svc_req *, SVCXPRT *),
434 unsigned long protocol);
435
436 Associates prognum and versnum with the service dispatch proce‐
437 dure, dispatch. If protocol is zero, the service is not regis‐
438 tered with the portmap service. If protocol is nonzero, then a
439 mapping of the triple [prognum,versnum,protocol] to
440 xprt->xp_port is established with the local portmap service
441 (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The
442 procedure dispatch has the following form:
443
444 dispatch(struct svc_req *request, SVCXPRT *xprt);
445
446 The svc_register() routine returns one if it succeeds, and zero
447 otherwise.
448
449 void svc_run(void);
450
451 This routine never returns. It waits for RPC requests to ar‐
452 rive, and calls the appropriate service procedure using svc_ge‐
453 treq() when one arrives. This procedure is usually waiting for
454 a select(2) system call to return.
455
456 bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc, char *out);
457
458 Called by an RPC service's dispatch routine to send the results
459 of a remote procedure call. The parameter xprt is the request's
460 associated transport handle; outproc is the XDR routine which is
461 used to encode the results; and out is the address of the re‐
462 sults. This routine returns one if it succeeds, zero otherwise.
463
464 void svc_unregister(unsigned long prognum, unsigned long versnum);
465
466 Remove all mapping of the double [prognum,versnum] to dispatch
467 routines, and of the triple [prognum,versnum,*] to port number.
468
469 void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);
470
471 Called by a service dispatch routine that refuses to perform a
472 remote procedure call due to an authentication error.
473
474 void svcerr_decode(SVCXPRT *xprt);
475
476 Called by a service dispatch routine that cannot successfully
477 decode its parameters. See also svc_getargs().
478
479 void svcerr_noproc(SVCXPRT *xprt);
480
481 Called by a service dispatch routine that does not implement the
482 procedure number that the caller requests.
483
484 void svcerr_noprog(SVCXPRT *xprt);
485
486 Called when the desired program is not registered with the RPC
487 package. Service implementors usually do not need this routine.
488
489 void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
490 unsigned long high_vers);
491
492 Called when the desired version of a program is not registered
493 with the RPC package. Service implementors usually do not need
494 this routine.
495
496 void svcerr_systemerr(SVCXPRT *xprt);
497
498 Called by a service dispatch routine when it detects a system
499 error not covered by any particular protocol. For example, if a
500 service can no longer allocate storage, it may call this rou‐
501 tine.
502
503 void svcerr_weakauth(SVCXPRT *xprt);
504
505 Called by a service dispatch routine that refuses to perform a
506 remote procedure call due to insufficient authentication parame‐
507 ters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).
508
509 SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
510 unsigned int recvsize);
511
512 Create a service on top of any open file descriptor. Typically,
513 this file descriptor is a connected socket for a stream protocol
514 such as TCP. sendsize and recvsize indicate sizes for the send
515 and receive buffers. If they are zero, a reasonable default is
516 chosen.
517
518 SVCXPRT *svcraw_create(void);
519
520 This routine creates a toy RPC service transport, to which it
521 returns a pointer. The transport is really a buffer within the
522 process's address space, so the corresponding RPC client should
523 live in the same address space; see clntraw_create(). This rou‐
524 tine allows simulation of RPC and acquisition of RPC overheads
525 (such as round trip times), without any kernel interference.
526 This routine returns NULL if it fails.
527
528 SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
529 unsigned int recv_buf_size);
530
531 This routine creates a TCP/IP-based RPC service transport, to
532 which it returns a pointer. The transport is associated with
533 the socket sock, which may be RPC_ANYSOCK, in which case a new
534 socket is created. If the socket is not bound to a local TCP
535 port, then this routine binds it to an arbitrary port. Upon
536 completion, xprt->xp_sock is the transport's socket descriptor,
537 and xprt->xp_port is the transport's port number. This routine
538 returns NULL if it fails. Since TCP-based RPC uses buffered
539 I/O, users may specify the size of buffers; values of zero
540 choose suitable defaults.
541
542 SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
543 unsigned int recosize);
544
545 This routine creates a UDP/IP-based RPC service transport, to
546 which it returns a pointer. The transport is associated with
547 the socket sock, which may be RPC_ANYSOCK, in which case a new
548 socket is created. If the socket is not bound to a local UDP
549 port, then this routine binds it to an arbitrary port. Upon
550 completion, xprt->xp_sock is the transport's socket descriptor,
551 and xprt->xp_port is the transport's port number. This routine
552 returns NULL if it fails.
553
554 This allows the user to specify the maximum packet size for
555 sending and receiving UDP-based RPC messages.
556
557 SVCXPRT *svcudp_create(int sock);
558
559 This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some
560 default size SZ.
561
562 bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);
563
564 Used for encoding RPC reply messages. This routine is useful
565 for users who wish to generate RPC-style messages without using
566 the RPC package.
567
568 bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);
569
570 Used for describing UNIX credentials. This routine is useful
571 for users who wish to generate these credentials without using
572 the RPC authentication package.
573
574 void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);
575
576 Used for describing RPC call header messages. This routine is
577 useful for users who wish to generate RPC-style messages without
578 using the RPC package.
579
580 bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);
581
582 Used for describing RPC call messages. This routine is useful
583 for users who wish to generate RPC-style messages without using
584 the RPC package.
585
586 bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);
587
588 Used for describing RPC authentication information messages.
589 This routine is useful for users who wish to generate RPC-style
590 messages without using the RPC package.
591
592 bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);
593
594 Used for describing parameters to various portmap procedures,
595 externally. This routine is useful for users who wish to gener‐
596 ate these parameters without using the pmap interface.
597
598 bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);
599
600 Used for describing a list of port mappings, externally. This
601 routine is useful for users who wish to generate these parame‐
602 ters without using the pmap interface.
603
604 bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);
605
606 Used for describing RPC reply messages. This routine is useful
607 for users who wish to generate RPC-style messages without using
608 the RPC package.
609
610 bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);
611
612 Used for describing RPC reply messages. This routine is useful
613 for users who wish to generate RPC style messages without using
614 the RPC package.
615
616 void xprt_register(SVCXPRT *xprt);
617
618 After RPC service transport handles are created, they should
619 register themselves with the RPC service package. This routine
620 modifies the global variable svc_fds. Service implementors usu‐
621 ally do not need this routine.
622
623 void xprt_unregister(SVCXPRT *xprt);
624
625 Before an RPC service transport handle is destroyed, it should
626 unregister itself with the RPC service package. This routine
627 modifies the global variable svc_fds. Service implementors usu‐
628 ally do not need this routine.
629
631 For an explanation of the terms used in this section, see at‐
632 tributes(7).
633
634 ┌────────────────────────────────────────────┬───────────────┬─────────┐
635 │Interface │ Attribute │ Value │
636 ├────────────────────────────────────────────┼───────────────┼─────────┤
637 │auth_destroy(), authnone_create(), │ Thread safety │ MT-Safe │
638 │authunix_create(), │ │ │
639 │authunix_create_default(), callrpc(), │ │ │
640 │clnt_broadcast(), clnt_call(), │ │ │
641 │clnt_destroy(), clnt_create(), │ │ │
642 │clnt_control(), clnt_freeres(), │ │ │
643 │clnt_geterr(), clnt_pcreateerror(), │ │ │
644 │clnt_perrno(), clnt_perror(), │ │ │
645 │clnt_spcreateerror(), clnt_sperrno(), │ │ │
646 │clnt_sperror(), clntraw_create(), │ │ │
647 │clnttcp_create(), clntudp_create(), │ │ │
648 │clntudp_bufcreate(), get_myaddress(), │ │ │
649 │pmap_getmaps(), pmap_getport(), │ │ │
650 │pmap_rmtcall(), pmap_set(), pmap_unset(), │ │ │
651 │registerrpc(), svc_destroy(), │ │ │
652 │svc_freeargs(), svc_getargs(), │ │ │
653 │svc_getcaller(), svc_getreqset(), │ │ │
654 │svc_getreq(), svc_register(), svc_run(), │ │ │
655 │svc_sendreply(), svc_unregister(), │ │ │
656 │svcerr_auth(), svcerr_decode(), │ │ │
657 │svcerr_noproc(), svcerr_noprog(), │ │ │
658 │svcerr_progvers(), svcerr_systemerr(), │ │ │
659 │svcerr_weakauth(), svcfd_create(), │ │ │
660 │svcraw_create(), svctcp_create(), │ │ │
661 │svcudp_bufcreate(), svcudp_create(), │ │ │
662 │xdr_accepted_reply(), xdr_authunix_parms(), │ │ │
663 │xdr_callhdr(), xdr_callmsg(), │ │ │
664 │xdr_opaque_auth(), xdr_pmap(), │ │ │
665 │xdr_pmaplist(), xdr_rejected_reply(), │ │ │
666 │xdr_replymsg(), xprt_register(), │ │ │
667 │xprt_unregister() │ │ │
668 └────────────────────────────────────────────┴───────────────┴─────────┘
669
671 xdr(3)
672
673 The following manuals:
674 Remote Procedure Calls: Protocol Specification
675 Remote Procedure Call Programming Guide
676 rpcgen Programming Guide
677
678 RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun
679 Microsystems, Inc., USC-ISI.
680
681
682
683Linux man-pages 6.05 2023-07-20 rpc(3)