.H A "Synopsis of RPC Routines" .SH auth_destroy() .LP .LS void auth_destroy(auth) AUTH *auth; .LE A macro that destroys the authentication information associated with .L auth . Destruction usually involves deallocation of private data structures. The use of .L auth is undefined after calling .L auth_destroy() . .SH authnone_create() .LP .LS AUTH * authnone_create() .LE Creates and returns an RPC authentication handle that passes no usable authentication information with each remote procedure call. .SH authunix_create() .LP .LS AUTH * authunix_create(host, uid, gid, len, aup_gids) char *host; int uid, gid, len, *aup_gids; .LE Creates and returns an RPC authentication handle that contains .UX authentication information. The parameter .L host is the name of the machine on which the information was created; .L uid is the user's user ID; .L gid is the user's current group ID; .L len and .L aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user. .SH authunix_create_default() .LP .LS AUTH * authunix_create_default() .LE Calls .L authunix_create() with the appropriate parameters. .SH callrpc() .LP .LS callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out) char *host; u_long prognum, versnum, procnum; char *in, *out; xdrproc_t inproc, outproc; .LE Calls the remote procedure associated with .L prognum , .L versnum , and .L procnum on the machine, .L host . The parameter .L in is the address of the procedure's argument(s), and .L out is the address of where to place the result(s); .L inproc is used to encode the procedure's parameters, and .L outproc is used to decode the procedure's results. This routine returns zero if it succeeds, or the value of .L "enum clnt_stat" cast to an integer if it fails. The routine .L clnt_perrno() is handy for translating failure statuses into messages. Warning: calling remote procedures with this routine uses UDP/IP as a transport; see .L clntudp_create() for restrictions. .SH clnt_broadcast() .LP .LS enum clnt_stat clnt_broadcast(prognum, versnum, procnum, inproc, in, outproc, out, eachresult) u_long prognum, versnum, procnum; char *in, *out; xdrproc_t inproc, outproc; resultproc_t eachresult; .LE Like .L callrpc() , except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls .L eachresult , whose form is .LS eachresult(out, addr) char *out; struct sockaddr_in *addr; .LE where .L out is the same as .L out passed to .L clnt_broadcast() , except that the remote procedure's output is decoded there; .L addr points to the address of the machine that sent the results. If .L eachresult() returns zero, .L clnt_broadcast() waits for more replies; otherwise it returns with appropriate status. .SH clnt_call() .LP .LS enum clnt_stat clnt_call(clnt, procnum, inproc, in, outproc, out, tout) CLIENT *clnt; long procnum; xdrproc_t inproc, outproc; char *in, *out; struct timeval tout; .LE A macro that calls the remote procedure .L procnum associated with the client handle, .L clnt , which is obtained with an RPC client creation routine such as .L clntudp_create . The parameter .L in is the address of the procedure's argument(s), and .L out is the address of where to place the result(s); .L inproc is used to encode the procedure's parameters, and .L outproc is used to decode the procedure's results; .L tout is the time allowed for results to come back. .SH clnt_destroy() .LP .LS clnt_destroy(clnt) CLIENT *clnt; .LE A macro that destroys the client's RPC handle. Destruction usually involves deallocation of private data structures, including .L clnt itself. Use of .L clnt is undefined after calling .L clnt_destroy() . Warning: client destruction routines do not close sockets associated with .L clnt ; this is the responsibility of the user. .SH clnt_freeres() .LP .LS clnt_freeres(clnt, outproc, out) CLIENT *clnt; xdrproc_t outproc; char *out; .LE A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter .L out is the address of the results, and .L outproc is the XDR routine describing the results in simple primitives. This routine returns one if the results were successfully freed, and zero otherwise. .SH clnt_geterr() .LP .LS void clnt_geterr(clnt, errp) CLIENT *clnt; struct rpc_err *errp; .LE A macro that copies the error structure out of the client handle to the structure at address .L errp . .SH clnt_pcreateerror() .LP .LS void clnt_pcreateerror(s) char *s; .LE Prints a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string .L s and a colon. .SH clnt_perrno() .LP .LS void clnt_perrno(stat) enum clnt_stat; .LE Prints a message to standard error corresponding to the condition indicated by .L stat . .SH clnt_perror() .LP .LS clnt_perror(clnt, s) CLIENT *clnt; char *s; .LE Prints a message to standard error indicating why an RPC call failed; .L clnt is the handle used to do the call. The message is prepended with string .L s and a colon. .SH clntraw_create() .LP .LS CLIENT * clntraw_create(prognum, versnum) u_long prognum, versnum; .LE This routine creates a toy RPC client for the remote program .L prognum , version .L versnum . The transport used to pass messages to the service is actually a buffer within the process's address space, so the corresponding RPC server should live in the same address space; see .L svcraw_create() . This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails. .SH clnttcp_create() .LP .LS CLIENT * clnttcp_create(addr, prognum, versnum, sockp, sendsz, recvsz) struct sockaddr_in *addr; u_long prognum, versnum; int *sockp; u_int sendsz, recvsz; .LE This routine creates an RPC client for the remote program .L prognum , version .L versnum ; the client uses TCP/IP as a transport. The remote program is located at Internet address .L *addr . If .L addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote .I portmap service is consulted for this information). The parameter .L *sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets .L *sockp . Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters .L sendsz and .L recvsz ; values of zero choose suitable defaults. This routine returns NULL if it fails. .SH clntudp_create() .LP .LS CLIENT * clntudp_create(addr, prognum, versnum, wait, sockp) struct sockaddr_in *addr; u_long prognum, versnum; struct timeval wait; int *sockp; .LE This routine creates an RPC client for the remote program .L prognum , version .L versnum ; the client uses use UDP/IP as a transport. The remote program is located at Internet address .L *addr . If .L addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote .I portmap service is consulted for this information). The parameter .L *sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets .L *sockp . The UDP transport resends the call message in intervals of .L wait time until a response is received or until the call times out. Warning: since UDP-based RPC messages can only hold up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results. .SH get_myaddress() .LP .LS void get_myaddress(addr) struct sockaddr_in *addr; .LE Stuffs the machine's IP address into .L *addr , without consulting the library routines that deal with .I /etc/hosts . The port number is always set to .L htons(PMAPPORT) . .SH pmap_getmaps() .LP .LS struct pmaplist * pmap_getmaps(addr) struct sockaddr_in *addr; .LE A user interface to the .I portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address .L *addr . This routine can return NULL. The command .L "rpcinfo -p" uses this routine. .SH pmap_getport() .LP .LS u_short pmap_getport(addr, prognum, versnum, protocol) struct sockaddr_in *addr; u_long prognum, versnum, protocol; .LE A user interface to the .I portmap service, which returns the port number on which waits a service that supports program number .L prognum , version .L versnum , and speaks the transport protocol associated with protocol. A return value of zero means that the mapping does not exist or that the RPC system failured to contact the remote .I portmap service. In the latter case, the global variable .L rpc_createerr contains the RPC status. .SH pmap_rmtcall() .LP .LS enum clnt_stat pmap_rmtcall(addr, prognum, versnum, procnum, inproc, in, outproc, out, tout, portp) struct sockaddr_in *addr; u_long prognum, versnum, procnum; char *in, *out; xdrproc_t inproc, outproc; struct timeval tout; u_long *portp; .LE A user interface to the .I portmap service, which instructs .I portmap on the host at IP address .L *addr to make an RPC call on your behalf to a procedure on that host. The parameter .L *portp will be modified to the program's port number if the procedure succeeds. The definitions of other parameters are discussed in .L callrpc() and .L clnt_call() ; see also .L clnt_broadcast() . .SH pmap_set() .LP .LS pmap_set(prognum, versnum, protocol, port) u_long prognum, versnum, protocol; u_short port; .LE A user interface to the .I portmap service, which establishes a mapping between the triple .L [prognum,versnum,protocol] and .L port on the machine's .I portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. .SH pmap_unset() .LP .LS pmap_unset(prognum, versnum) u_long prognum, versnum; .LE A user interface to the .I portmap service, which destroys all mappings between the triple .L [prognum,versnum,*] and .L ports on the machine's .I portmap service. This routine returns one if it succeeds, zero otherwise. .SH registerrpc() .LP .LS registerrpc(prognum, versnum, procnum, procname, inproc, outproc) u_long prognum, versnum, procnum; char *(*procname)(); xdrproc_t inproc, outproc; .LE Registers procedure .L procname with the RPC service package. If a request arrives for program .L prognum , version .L versnum , and procedure .L procnum , .L procname is called with a pointer to its parameter(s); .L progname should return a pointer to its static result(s); .L inproc is used to decode the parameters while .L outproc is used to encode the results. This routine returns zero if the registration succeeded, \-1 otherwise. Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see .L svcudp_create() for restrictions. .SH rpc_createerr .LP .LS struct rpc_createerr rpc_createerr; .LE A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine .L clnt_pcreateerror() to print the reason why. .SH svc_destroy() .LP .LS svc_destroy(xprt) SVCXPRT *xprt; .LE A macro that destroys the RPC service transport handle, .L xprt . Destruction usually involves deallocation of private data structures, including .L xprt itself. Use of .L xprt is undefined after calling this routine. .SH svc_fds .LP .LS int svc_fds; .LE A global variable reflecting the RPC service side's read file descriptor bit mask; it is suitable as a parameter to the .L select system call. This is only of interest if a service implementor does not call .L svc_run() , but rather does his own asynchronous event processing. This variable is read-only (do not pass its address to .L select !), yet it may change after calls to .L svc_getreq() or any creation routines. .SH svc_freeargs() .LP .LS svc_freeargs(xprt, inproc, in) SVCXPRT *xprt; xdrproc_t inproc; char *in; .LE A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using .L svc_getargs(). This routine returns one if the results were successfully freed, and zero otherwise. .SH svc_getargs() .LP .LS svc_getargs(xprt, inproc, in) SVCXPRT *xprt; xdrproc_t inproc; char *in; .LE A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, .L xprt . The parameter .L in is the address where the arguments will be placed; .L inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise. .SH svc_getcaller() .LP .LS struct sockaddr_in svc_getcaller(xprt) SVCXPRT *xprt; .LE The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, .L xprt . .SH svc_getreq() .LP .LS svc_getreq(rdfds) int rdfds; .LE This routine is only of interest if a service implementor does not call .L svc_run() , but instead implements custom asynchronous event processing. It is called when the .L select system call has determined that an RPC request has arrived on some RPC socket(s); .L rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of .L rdfds have been serviced. .SH svc_register() .LP .LS svc_register(xprt, prognum, versnum, dispatch, protocol) SVCXPRT *xprt; u_long prognum, versnum; void (*dispatch)(); u_long protocol; .LE Associates .L prognum and .L versnum with the service dispatch procedure, .L dispatch . If .L protocol is non-zero, then a mapping of the triple .L [prognum,versnum,protocol] to .L xprt->xp_port is also established with the local .I portmap service (generally .L protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure .L dispatch() has the following form: .LS dispatch(request, xprt) struct svc_req *request; SVCXPRT *xprt; .LE The .L svc_register routine returns one if it succeeds, and zero otherwise. .SH svc_run() .LP .LS svc_run() .LE This routine never returns. It waits for RPC requests to arrive and calls the appropriate service procedure (using .L svc_getreq ) when one arrives. This procedure is usually waiting for a .L select system call to return. .SH svc_sendreply() .LP .LS svc_sendreply(xprt, outproc, out) SVCXPRT *xprt; xdrproc_t outproc; char *out; .LE Called by an RPC service's dispatch routine to send the results of a remote procedure call. The parameter .L xprt is the caller's associated transport handle; .L outproc is the XDR routine which is used to encode the results; and .L out is the address of the results. This routine returns one if it succeeds, zero otherwise. .SH svc_unregister() .LP .LS void svc_unregister(prognum, versnum) u_long prognum, versnum; .LE Removes all mapping of the double .L [prognum,versnum] to dispatch routines, and of the triple .L [prognum,versnum,*] to port number. .SH svcerr_auth() .LP .LS void svcerr_auth(xprt, why) SVCXPRT *xprt; enum auth_stat why; .LE Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error. .SH svcerr_decode() .LP .LS void svcerr_decode(xprt) SVCXPRT *xprt; .LE Called by a service dispatch routine that can't successfully decode its parameters. See also .L svc_getargs() . .SH svcerr_noproc() .LP .LS void svcerr_noproc(xprt) SVCXPRT *xprt; .LE Called by a service dispatch routine that doesn't implement the desired procedure number the caller request. .SH svcerr_noprog() .LP .LS void svcerr_noprog(xprt) SVCXPRT *xprt; .LE Called when the desired program is not registered with the RPC package. Service implementors usually don't need this routine. .SH svcerr_progvers() .LP .LS void svcerr_progvers(xprt) SVCXPRT *xprt; .LE Called when the desired version of a program is not registered with the RPC package. Service implementors usually don't need this routine. .SH svcerr_systemerr() .LP .LS void svcerr_systemerr(xprt) SVCXPRT *xprt; .LE Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine. .SH svcerr_weakauth() .LP .LS void svcerr_weakauth(xprt) SVCXPRT *xprt; .LE Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient (but correct) authentication parameters. The routine calls .L svcerr_auth(xprt,AUTH_TOOWEAK) . .SH svcraw_create() .LP .LS SVCXPRT * svcraw_create() .LE This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process's address space, so the corresponding RPC client should live in the same address space; see .L clntraw_create() . This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails. .SH svctcp_create() .LP .LS SVCXPRT * svctcp_create(sock, send_buf_size, recv_buf_size) int sock; u_int send_buf_size, recv_buf_size; .LE This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket .L sock , which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, .L xprt->xp_sock is the transport's socket number, and .L xprt->xp_port is the transport's port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of the .L send and .L receive buffers; values of zero choose suitable defaults. .SH svcudp_create() .LP .LS SVCXPRT * svcudp_create(sock) int sock; .LE This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket .L sock , which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, .L xprt->xp_sock is the transport's socket number, and .L xprt->xp_port is the transport's port number. This routine returns NULL if it fails. Warning: since UDP-based RPC messages can only hold up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results. .SH xdr_accepted_reply() .LP .LS xdr_accepted_reply(xdrs, ar) XDR *xdrs; struct accepted_reply *ar; .LE Used for describing RPC messages, externally. This routine is useful for users who wish to generate RPC-style messages without using the RPC package. .SH xdr_array() .LP .LS xdr_array(xdrs, arrp, sizep, maxsize, elsize, elproc) XDR *xdrs; char **arrp; u_int *sizep, maxsize, elsize; xdrproc_t elproc; .LE A filter primitive that translates between arrays and their corresponding external representations. The parameter .L arrp is the address of the pointer to the array, while .L sizep is the address of the element count of the array; this element count cannot exceed .L maxsize . The parameter .L elsize is the .L sizeof() each of the array's elements, and .L elproc is an XDR filter that translates between the array elements' C form, and their external representation. This routine returns one if it succeeds, zero otherwise. .SH xdr_authunix_parms() .LP .LS xdr_authunix_parms(xdrs, aupp) XDR *xdrs; struct authunix_parms *aupp; .LE Used for describing UNIX credentials, externally. This routine is useful for users who wish to generate these credentials without using the RPC authentication package. .SH xdr_bool() .LP .LS xdr_bool(xdrs, bp) XDR *xdrs; bool_t *bp; .LE A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise. .SH xdr_bytes() .LP .LS xdr_bytes(xdrs, sp, sizep, maxsize) XDR *xdrs; char **sp; u_int *sizep, maxsize; .LE A filter primitive that translates between counted byte strings and their external representations. The parameter .L sp is the address of the string pointer. The length of the string is located at address .L sizep ; strings cannot be longer than .L maxsize . This routine returns one if it succeeds, zero otherwise. .SH xdr_callhdr() .LP .LS void xdr_callhdr(xdrs, chdr) XDR *xdrs; struct rpc_msg *chdr; .LE Used for describing RPC messages, externally. This routine is useful for users who wish to generate RPC-style messages without using the RPC package. .SH xdr_callmsg() .LP .LS xdr_callmsg(xdrs, cmsg) XDR *xdrs; struct rpc_msg *cmsg; .LE Used for describing RPC messages, externally. This routine is useful for users who wish to generate RPC-style messages without using the RPC package. .SH xdr_double() .LP .LS xdr_double(xdrs, dp) XDR *xdrs; double *dp; .LE A filter primitive that translates between C .L double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise. .SH xdr_enum() .LP .LS xdr_enum(xdrs, ep) XDR *xdrs; enum_t *ep; .LE A filter primitive that translates between C .L enum s (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise. .SH xdr_float() .LP .LS xdr_float(xdrs, fp) XDR *xdrs; float *fp; .LE A filter primitive that translates between C .L float s and their external representations. This routine returns one if it succeeds, zero otherwise. .SH xdr_inline() .LP .LS long * xdr_inline(xdrs, len) XDR *xdrs; int len; .LE A macro that invokes the in-line routine associated with the XDR stream, .L xdrs . The routine returns a pointer to a contiguous piece of the stream's buffer; .L len is the byte length of the desired buffer. Note that pointer is cast to .L "long *" . Warning: .L xdr_inline() may return 0 (NULL) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency. .SH xdr_int() .LP .LS xdr_int(xdrs, ip) XDR *xdrs; int *ip; .LE A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise. .SH xdr_long() .LP .LS xdr_long(xdrs, lp) XDR *xdrs; long *lp; .LE A filter primitive that translates between C .L long integers and their external representations. This routine returns one if it succeeds, zero otherwise. .SH xdr_opaque() .LP .LS xdr_opaque(xdrs, cp, cnt) XDR *xdrs; char *cp; u_int cnt; .LE A filter primitive that translates between fixed size opaque data and its external representation. The parameter .L cp is the address of the opaque object, and .L cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise. .SH xdr_opaque_auth() .LP .LS xdr_opaque_auth(xdrs, ap) XDR *xdrs; struct opaque_auth *ap; .LE Used for describing RPC messages, externally. This routine is useful for users who wish to generate RPC-style messages without using the RPC package. .SH xdr_pmap() .LP .LS xdr_pmap(xdrs, regs) XDR *xdrs; struct pmap *regs; .LE Used for describing parameters to various .I portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the .L pmap interface. .SH xdr_pmaplist() .LP .LS xdr_pmaplist(xdrs, rp) XDR *xdrs; struct pmaplist **rp; .LE Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the .L pmap interface. .SH xdr_reference() .LP .LS xdr_reference(xdrs, pp, size, proc) XDR *xdrs; char **pp; u_int size; xdrproc_t proc; .LE A primitive that provides pointer chasing within structures. The parameter .L pp is the address of the pointer; .L size is the .L sizeof() the structure that .L *pp points to; and .L proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise. .SH xdr_rejected_reply() .LP .LS xdr_rejected_reply(xdrs, rr) XDR *xdrs; struct rejected_reply *rr; .LE Used for describing RPC messages, externally. This routine is useful for users who wish to generate RPC-style messages without using the RPC package. .SH xdr_replymsg() .LP .LS xdr_replymsg(xdrs, rmsg) XDR *xdrs; struct rpc_msg *rmsg; .LE Used for describing RPC messages, externally. This routine is useful for users who wish to generate RPC style messages without using the RPC package. .SH xdr_short() .LP .LS xdr_short(xdrs, sp) XDR *xdrs; short *sp; .LE A filter primitive that translates between C .L short integers and their external representations. This routine returns one if it succeeds, zero otherwise. .SH xdr_string() .LP .LS xdr_string(xdrs, sp, maxsize) XDR *xdrs; char **sp; u_int maxsize; .LE A filter primitive that translates between C strings and their corresponding external representations. Strings cannot cannot be longer than .L maxsize . Note that .L sp is the address of the string's pointer. This routine returns one if it succeeds, zero otherwise. .SH xdr_u_int() .LP .LS xdr_u_int(xdrs, up) XDR *xdrs; unsigned *up; .LE A filter primitive that translates between C .L unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise. .SH xdr_u_long() .LP .LS xdr_u_long(xdrs, ulp) XDR *xdrs; unsigned long *ulp; .LE A filter primitive that translates between C .L "unsigned long" integers and their external representations. This routine returns one if it succeeds, zero otherwise. .SH xdr_u_short() .LP .LS xdr_u_short(xdrs, usp) XDR *xdrs; unsigned short *usp; .LE A filter primitive that translates between C .L "unsigned short" integers and their external representations. This routine returns one if it succeeds, zero otherwise. .SH xdr_union() .LP .LS xdr_union(xdrs, dscmp, unp, choices, dfault) XDR *xdrs; int *dscmp; char *unp; struct xdr_discrim *choices; xdrproc_t dfault; .LE A filter primitive that translates between a discriminated C .L union and its corresponding external representation. The parameter .L dscmp is the address of the union's discriminant, while .L unp in the address of the union. This routine returns one if it succeeds, zero otherwise. .SH xdr_void() .LP .LS xdr_void() .LE This routine always returns one. .SH xdr_wrapstring() .LP .LS xdr_wrapstring(xdrs, sp) XDR *xdrs; char **sp; .LE A primitive that calls .L xdr_string(xdrs,sp,MAXUNSIGNED); where MAXUNSIGNED is the maximum value of an unsigned integer. This is handy because the RPC package passes only two parameters XDR routines, whereas .L xdr_string() , one of the most frequently used primitives, requires three parameters. This routine returns one if it succeeds, zero otherwise. .SH xprt_register() .LP .LS void xprt_register(xprt) SVCXPRT *xprt; .LE After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable .L svc_fds . Service implementors usually don't need this routine. .SH xprt_unregister() .LP .LS void xprt_unregister(xprt) SVCXPRT *xprt; .LE Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable .L svc_fds . Service implementors usually don't need this routine.