18360efbdSAlfred Perlstein.\" @(#)rpc.3n 2.4 88/08/08 4.0 RPCSRC; from 1.19 88/06/24 SMI 28360efbdSAlfred Perlstein.\" $NetBSD: rpc_soc.3,v 1.2 2000/06/07 13:39:43 simonb Exp $ 38360efbdSAlfred Perlstein.\" $FreeBSD$ 48360efbdSAlfred Perlstein.\" 523601548SRuslan Ermilov.Dd February 16, 1988 623601548SRuslan Ermilov.Dt RPC_SOC 3 723601548SRuslan Ermilov.Os 823601548SRuslan Ermilov.Sh NAME 923601548SRuslan Ermilov.Nm rpc_soc , 1023601548SRuslan Ermilov.Nm auth_destroy , 1123601548SRuslan Ermilov.Nm authnone_create , 1223601548SRuslan Ermilov.Nm authunix_create , 1323601548SRuslan Ermilov.Nm authunix_create_default , 1423601548SRuslan Ermilov.Nm callrpc , 1523601548SRuslan Ermilov.Nm clnt_broadcast , 1623601548SRuslan Ermilov.Nm clnt_call , 1723601548SRuslan Ermilov.Nm clnt_control , 1823601548SRuslan Ermilov.Nm clnt_create , 1923601548SRuslan Ermilov.Nm clnt_destroy , 2023601548SRuslan Ermilov.Nm clnt_freeres , 2123601548SRuslan Ermilov.Nm clnt_geterr , 2223601548SRuslan Ermilov.Nm clnt_pcreateerror , 2323601548SRuslan Ermilov.Nm clnt_perrno , 2423601548SRuslan Ermilov.Nm clnt_perror , 2523601548SRuslan Ermilov.Nm clnt_spcreateerror , 2623601548SRuslan Ermilov.Nm clnt_sperrno , 2723601548SRuslan Ermilov.Nm clnt_sperror , 2823601548SRuslan Ermilov.Nm clntraw_create , 2923601548SRuslan Ermilov.Nm clnttcp_create , 3023601548SRuslan Ermilov.Nm clntudp_bufcreate , 3123601548SRuslan Ermilov.Nm clntudp_create , 32e6f9ad07SBill Paul.Nm clntunix_create , 3323601548SRuslan Ermilov.Nm get_myaddress , 3423601548SRuslan Ermilov.Nm pmap_getmaps , 3523601548SRuslan Ermilov.Nm pmap_getport , 3623601548SRuslan Ermilov.Nm pmap_rmtcall , 3723601548SRuslan Ermilov.Nm pmap_set , 3823601548SRuslan Ermilov.Nm pmap_unset , 3923601548SRuslan Ermilov.Nm registerrpc , 4023601548SRuslan Ermilov.Nm rpc_createerr , 4123601548SRuslan Ermilov.Nm svc_destroy , 4223601548SRuslan Ermilov.Nm svc_fds , 4323601548SRuslan Ermilov.Nm svc_fdset , 4423601548SRuslan Ermilov.Nm svc_getargs , 4523601548SRuslan Ermilov.Nm svc_getcaller , 4623601548SRuslan Ermilov.Nm svc_getreq , 4723601548SRuslan Ermilov.Nm svc_getreqset , 4823601548SRuslan Ermilov.Nm svc_register , 4923601548SRuslan Ermilov.Nm svc_run , 5023601548SRuslan Ermilov.Nm svc_sendreply , 5123601548SRuslan Ermilov.Nm svc_unregister , 5223601548SRuslan Ermilov.Nm svcerr_auth , 5323601548SRuslan Ermilov.Nm svcerr_decode , 5423601548SRuslan Ermilov.Nm svcerr_noproc , 5523601548SRuslan Ermilov.Nm svcerr_noprog , 5623601548SRuslan Ermilov.Nm svcerr_progvers , 5723601548SRuslan Ermilov.Nm svcerr_systemerr , 5823601548SRuslan Ermilov.Nm svcerr_weakauth , 5923601548SRuslan Ermilov.Nm svcfd_create , 60e6f9ad07SBill Paul.Nm svcunixfd_create , 6123601548SRuslan Ermilov.Nm svcraw_create , 62e6f9ad07SBill Paul.Nm svcunix_create , 6323601548SRuslan Ermilov.Nm xdr_accepted_reply , 6423601548SRuslan Ermilov.Nm xdr_authunix_parms , 6523601548SRuslan Ermilov.Nm xdr_callhdr , 6623601548SRuslan Ermilov.Nm xdr_callmsg , 6723601548SRuslan Ermilov.Nm xdr_opaque_auth , 6823601548SRuslan Ermilov.Nm xdr_pmap , 6923601548SRuslan Ermilov.Nm xdr_pmaplist , 7023601548SRuslan Ermilov.Nm xdr_rejected_reply , 7123601548SRuslan Ermilov.Nm xdr_replymsg , 7223601548SRuslan Ermilov.Nm xprt_register , 7323601548SRuslan Ermilov.Nm xprt_unregister 7423601548SRuslan Ermilov.Nd "library routines for remote procedure calls" 7523601548SRuslan Ermilov.Sh LIBRARY 7623601548SRuslan Ermilov.Lb libc 7723601548SRuslan Ermilov.Sh SYNOPSIS 7832eef9aeSRuslan Ermilov.In rpc/rpc.h 7923601548SRuslan Ermilov.Pp 8023601548SRuslan ErmilovSee 8123601548SRuslan Ermilov.Sx DESCRIPTION 8223601548SRuslan Ermilovfor function declarations. 8323601548SRuslan Ermilov.Sh DESCRIPTION 8423601548SRuslan Ermilov.Bf -symbolic 8523601548SRuslan ErmilovThe 8623601548SRuslan Ermilov.Fn svc_* 8723601548SRuslan Ermilovand 8823601548SRuslan Ermilov.Fn clnt_* 8923601548SRuslan Ermilovfunctions described in this page are the old, TS-RPC 9023601548SRuslan Ermilovinterface to the XDR and RPC library, and exist for backward compatibility. 9123601548SRuslan ErmilovThe new interface is described in the pages 9223601548SRuslan Ermilovreferenced from 9323601548SRuslan Ermilov.Xr rpc 3 . 9423601548SRuslan Ermilov.Ef 9523601548SRuslan Ermilov.Pp 968360efbdSAlfred PerlsteinThese routines allow C programs to make procedure 978360efbdSAlfred Perlsteincalls on other machines across the network. 988360efbdSAlfred PerlsteinFirst, the client calls a procedure to send a 998360efbdSAlfred Perlsteindata packet to the server. 1008360efbdSAlfred PerlsteinUpon receipt of the packet, the server calls a dispatch routine 1018360efbdSAlfred Perlsteinto perform the requested service, and then sends back a 1028360efbdSAlfred Perlsteinreply. 1038360efbdSAlfred PerlsteinFinally, the procedure call returns to the client. 10423601548SRuslan Ermilov.Pp 10523601548SRuslan ErmilovRoutines that are used for Secure 10623601548SRuslan Ermilov.Tn RPC ( DES 10723601548SRuslan Ermilovauthentication) are described in 10823601548SRuslan Ermilov.Xr rpc_secure 3 . 10923601548SRuslan ErmilovSecure 11023601548SRuslan Ermilov.Tn RPC 11123601548SRuslan Ermilovcan be used only if 11223601548SRuslan Ermilov.Tn DES 11323601548SRuslan Ermilovencryption is available. 11423601548SRuslan Ermilov.Bl -tag -width indent -compact 11523601548SRuslan Ermilov.Pp 11623601548SRuslan Ermilov.It Xo 11723601548SRuslan Ermilov.Ft void 11823601548SRuslan Ermilov.Xc 11923601548SRuslan Ermilov.It Xo 12023601548SRuslan Ermilov.Fn auth_destroy "AUTH *auth" 12123601548SRuslan Ermilov.Xc 12223601548SRuslan Ermilov.Pp 1238360efbdSAlfred PerlsteinA macro that destroys the authentication information associated with 12423601548SRuslan Ermilov.Fa auth . 1258360efbdSAlfred PerlsteinDestruction usually involves deallocation of private data 12623601548SRuslan Ermilovstructures. 12723601548SRuslan ErmilovThe use of 12823601548SRuslan Ermilov.Fa auth 1298360efbdSAlfred Perlsteinis undefined after calling 13023601548SRuslan Ermilov.Fn auth_destroy . 13123601548SRuslan Ermilov.Pp 13223601548SRuslan Ermilov.It Xo 13323601548SRuslan Ermilov.Ft "AUTH *" 13423601548SRuslan Ermilov.Xc 13523601548SRuslan Ermilov.It Xo 13623601548SRuslan Ermilov.Fn authnone_create 13723601548SRuslan Ermilov.Xc 13823601548SRuslan Ermilov.Pp 1398360efbdSAlfred PerlsteinCreate and return an 14023601548SRuslan Ermilov.Tn RPC 14123601548SRuslan Ermilovauthentication handle that passes nonusable authentication 14223601548SRuslan Ermilovinformation with each remote procedure call. 14323601548SRuslan ErmilovThis is the 14423601548SRuslan Ermilovdefault authentication used by 14523601548SRuslan Ermilov.Tn RPC . 14623601548SRuslan Ermilov.Pp 14723601548SRuslan Ermilov.It Xo 14823601548SRuslan Ermilov.Ft "AUTH *" 14923601548SRuslan Ermilov.Xc 15023601548SRuslan Ermilov.It Xo 15123601548SRuslan Ermilov.Fn authunix_create "char *host" "int uid" "int gid" "int len" "int *aup_gids" 15223601548SRuslan Ermilov.Xc 15323601548SRuslan Ermilov.Pp 15423601548SRuslan ErmilovCreate and return an 15523601548SRuslan Ermilov.Tn RPC 1568360efbdSAlfred Perlsteinauthentication handle that contains 15723601548SRuslan Ermilov.Ux 1588360efbdSAlfred Perlsteinauthentication information. 1598360efbdSAlfred PerlsteinThe parameter 16023601548SRuslan Ermilov.Fa host 1618360efbdSAlfred Perlsteinis the name of the machine on which the information was 1628360efbdSAlfred Perlsteincreated; 16323601548SRuslan Ermilov.Fa uid 16423601548SRuslan Ermilovis the user's user ID; 16523601548SRuslan Ermilov.Fa gid 16623601548SRuslan Ermilovis the user's current group ID; 16723601548SRuslan Ermilov.Fa len 1688360efbdSAlfred Perlsteinand 16923601548SRuslan Ermilov.Fa aup_gids 1708360efbdSAlfred Perlsteinrefer to a counted array of groups to which the user belongs. 1718360efbdSAlfred PerlsteinIt is easy to impersonate a user. 17223601548SRuslan Ermilov.Pp 17323601548SRuslan Ermilov.It Xo 17423601548SRuslan Ermilov.Ft "AUTH *" 17523601548SRuslan Ermilov.Xc 17623601548SRuslan Ermilov.It Xo 17723601548SRuslan Ermilov.Fn authunix_create_default 17823601548SRuslan Ermilov.Xc 17923601548SRuslan Ermilov.Pp 1808360efbdSAlfred PerlsteinCalls 18123601548SRuslan Ermilov.Fn authunix_create 1828360efbdSAlfred Perlsteinwith the appropriate parameters. 18323601548SRuslan Ermilov.Pp 18423601548SRuslan Ermilov.It Xo 185db7534cfSBruce Evans.Ft int 18623601548SRuslan Ermilov.Fo callrpc 18723601548SRuslan Ermilov.Fa "char *host" 18823601548SRuslan Ermilov.Fa "u_long prognum" 18923601548SRuslan Ermilov.Fa "u_long versnum" 19023601548SRuslan Ermilov.Fa "u_long procnum" 19123601548SRuslan Ermilov.Fa "xdrproc_t inproc" 192cc74aaddSAlfred Perlstein.Fa "void *in" 19323601548SRuslan Ermilov.Fa "xdrproc_t outproc" 194cc74aaddSAlfred Perlstein.Fa "void *out" 19523601548SRuslan Ermilov.Fc 19623601548SRuslan Ermilov.Xc 19723601548SRuslan Ermilov.Pp 1988360efbdSAlfred PerlsteinCall the remote procedure associated with 19923601548SRuslan Ermilov.Fa prognum , 20023601548SRuslan Ermilov.Fa versnum , 2018360efbdSAlfred Perlsteinand 20223601548SRuslan Ermilov.Fa procnum 20323601548SRuslan Ermilovon the machine 20423601548SRuslan Ermilov.Fa host . 2058360efbdSAlfred PerlsteinThe parameter 20623601548SRuslan Ermilov.Fa in 2078360efbdSAlfred Perlsteinis the address of the procedure's argument(s), and 20823601548SRuslan Ermilov.Fa out 2098360efbdSAlfred Perlsteinis the address of where to place the result(s); 21023601548SRuslan Ermilov.Fa inproc 2118360efbdSAlfred Perlsteinis used to encode the procedure's parameters, and 21223601548SRuslan Ermilov.Fa outproc 2138360efbdSAlfred Perlsteinis used to decode the procedure's results. 2148360efbdSAlfred PerlsteinThis routine returns zero if it succeeds, or the value of 21523601548SRuslan Ermilov.Vt "enum clnt_stat" 2168360efbdSAlfred Perlsteincast to an integer if it fails. 2178360efbdSAlfred PerlsteinThe routine 21823601548SRuslan Ermilov.Fn clnt_perrno 2198360efbdSAlfred Perlsteinis handy for translating failure statuses into messages. 22023601548SRuslan Ermilov.Pp 2218360efbdSAlfred PerlsteinWarning: calling remote procedures with this routine 2228360efbdSAlfred Perlsteinuses 22323601548SRuslan Ermilov.Tn UDP/IP 2248360efbdSAlfred Perlsteinas a transport; see 22523601548SRuslan Ermilov.Fn clntudp_create 2268360efbdSAlfred Perlsteinfor restrictions. 2278360efbdSAlfred PerlsteinYou do not have control of timeouts or authentication using 2288360efbdSAlfred Perlsteinthis routine. 22923601548SRuslan Ermilov.Pp 23023601548SRuslan Ermilov.It Xo 23123601548SRuslan Ermilov.Ft "enum clnt_stat" 23223601548SRuslan Ermilov.Xc 23323601548SRuslan Ermilov.It Xo 23423601548SRuslan Ermilov.Fo clnt_broadcast 23523601548SRuslan Ermilov.Fa "u_long prognum" 23623601548SRuslan Ermilov.Fa "u_long versnum" 23723601548SRuslan Ermilov.Fa "u_long procnum" 23823601548SRuslan Ermilov.Fa "xdrproc_t inproc" 23923601548SRuslan Ermilov.Fa "char *in" 24023601548SRuslan Ermilov.Fa "xdrproc_t outproc" 24123601548SRuslan Ermilov.Fa "char *out" 24223601548SRuslan Ermilov.Fa "bool_t (*eachresult)(caddr_t, struct sockaddr_in *)" 24323601548SRuslan Ermilov.Fc 24423601548SRuslan Ermilov.Xc 24523601548SRuslan Ermilov.Pp 2468360efbdSAlfred PerlsteinLike 24723601548SRuslan Ermilov.Fn callrpc , 2488360efbdSAlfred Perlsteinexcept the call message is broadcast to all locally 24923601548SRuslan Ermilovconnected broadcast nets. 25023601548SRuslan ErmilovEach time it receives a 2518360efbdSAlfred Perlsteinresponse, this routine calls 25223601548SRuslan Ermilov.Fn eachresult , 2538360efbdSAlfred Perlsteinwhose form is: 25423601548SRuslan Ermilov.Bd -ragged -offset indent 25523601548SRuslan Ermilov.Ft bool_t 25623601548SRuslan Ermilov.Fn eachresult "caddr_t out" "struct sockaddr_in *addr" 25723601548SRuslan Ermilov.Ed 25823601548SRuslan Ermilov.Pp 2598360efbdSAlfred Perlsteinwhere 26023601548SRuslan Ermilov.Fa out 2618360efbdSAlfred Perlsteinis the same as 26223601548SRuslan Ermilov.Fa out 2638360efbdSAlfred Perlsteinpassed to 26423601548SRuslan Ermilov.Fn clnt_broadcast , 2658360efbdSAlfred Perlsteinexcept that the remote procedure's output is decoded there; 26623601548SRuslan Ermilov.Fa addr 2678360efbdSAlfred Perlsteinpoints to the address of the machine that sent the results. 2688360efbdSAlfred PerlsteinIf 26923601548SRuslan Ermilov.Fn eachresult 2708360efbdSAlfred Perlsteinreturns zero, 27123601548SRuslan Ermilov.Fn clnt_broadcast 2728360efbdSAlfred Perlsteinwaits for more replies; otherwise it returns with appropriate 2738360efbdSAlfred Perlsteinstatus. 27423601548SRuslan Ermilov.Pp 2758360efbdSAlfred PerlsteinWarning: broadcast sockets are limited in size to the 27623601548SRuslan Ermilovmaximum transfer unit of the data link. 27723601548SRuslan ErmilovFor ethernet, 2788360efbdSAlfred Perlsteinthis value is 1500 bytes. 27923601548SRuslan Ermilov.Pp 28023601548SRuslan Ermilov.It Xo 28123601548SRuslan Ermilov.Ft "enum clnt_stat" 28223601548SRuslan Ermilov.Xc 28323601548SRuslan Ermilov.It Xo 28423601548SRuslan Ermilov.Fo clnt_call 28523601548SRuslan Ermilov.Fa "CLIENT *clnt" 28623601548SRuslan Ermilov.Fa "u_long procnum" 28723601548SRuslan Ermilov.Fa "xdrproc_t inproc" 28823601548SRuslan Ermilov.Fa "char *in" 28923601548SRuslan Ermilov.Fa "xdrproc_t outproc" 29023601548SRuslan Ermilov.Fa "char *out" 29123601548SRuslan Ermilov.Fa "struct timeval tout" 29223601548SRuslan Ermilov.Fc 29323601548SRuslan Ermilov.Xc 29423601548SRuslan Ermilov.Pp 2958360efbdSAlfred PerlsteinA macro that calls the remote procedure 29623601548SRuslan Ermilov.Fa procnum 2978360efbdSAlfred Perlsteinassociated with the client handle, 29823601548SRuslan Ermilov.Fa clnt , 2998360efbdSAlfred Perlsteinwhich is obtained with an 30023601548SRuslan Ermilov.Tn RPC 3018360efbdSAlfred Perlsteinclient creation routine such as 30223601548SRuslan Ermilov.Fn clnt_create . 3038360efbdSAlfred PerlsteinThe parameter 30423601548SRuslan Ermilov.Fa in 3058360efbdSAlfred Perlsteinis the address of the procedure's argument(s), and 30623601548SRuslan Ermilov.Fa out 3078360efbdSAlfred Perlsteinis the address of where to place the result(s); 30823601548SRuslan Ermilov.Fa inproc 3098360efbdSAlfred Perlsteinis used to encode the procedure's parameters, and 31023601548SRuslan Ermilov.Fa outproc 3118360efbdSAlfred Perlsteinis used to decode the procedure's results; 31223601548SRuslan Ermilov.Fa tout 3138360efbdSAlfred Perlsteinis the time allowed for results to come back. 31423601548SRuslan Ermilov.Pp 31523601548SRuslan Ermilov.It Xo 31623601548SRuslan Ermilov.Ft void 31723601548SRuslan Ermilov.Fn clnt_destroy "CLIENT *clnt" 31823601548SRuslan Ermilov.Xc 31923601548SRuslan Ermilov.Pp 3208360efbdSAlfred PerlsteinA macro that destroys the client's 32123601548SRuslan Ermilov.Tn RPC 32223601548SRuslan Ermilovhandle. 32323601548SRuslan ErmilovDestruction usually involves deallocation 3248360efbdSAlfred Perlsteinof private data structures, including 32523601548SRuslan Ermilov.Fa clnt 32623601548SRuslan Ermilovitself. 32723601548SRuslan ErmilovUse of 32823601548SRuslan Ermilov.Fa clnt 3298360efbdSAlfred Perlsteinis undefined after calling 33023601548SRuslan Ermilov.Fn clnt_destroy . 3318360efbdSAlfred PerlsteinIf the 33223601548SRuslan Ermilov.Tn RPC 3338360efbdSAlfred Perlsteinlibrary opened the associated socket, it will close it also. 3348360efbdSAlfred PerlsteinOtherwise, the socket remains open. 33523601548SRuslan Ermilov.Pp 33623601548SRuslan Ermilov.It Xo 33723601548SRuslan Ermilov.Ft CLIENT * 33823601548SRuslan Ermilov.Xc 33923601548SRuslan Ermilov.It Xo 34023601548SRuslan Ermilov.Fn clnt_create "char *host" "u_long prog" "u_long vers" "char *proto" 34123601548SRuslan Ermilov.Xc 34223601548SRuslan Ermilov.Pp 3438360efbdSAlfred PerlsteinGeneric client creation routine. 34423601548SRuslan Ermilov.Fa host 3458360efbdSAlfred Perlsteinidentifies the name of the remote host where the server 3468360efbdSAlfred Perlsteinis located. 34723601548SRuslan Ermilov.Fa proto 34823601548SRuslan Ermilovindicates which kind of transport protocol to use. 34923601548SRuslan ErmilovThe 35023601548SRuslan Ermilovcurrently supported values for this field are 35123601548SRuslan Ermilov.Qq Li udp 35223601548SRuslan Ermilovand 35323601548SRuslan Ermilov.Qq Li tcp . 3548360efbdSAlfred PerlsteinDefault timeouts are set, but can be modified using 35523601548SRuslan Ermilov.Fn clnt_control . 35623601548SRuslan Ermilov.Pp 3578360efbdSAlfred PerlsteinWarning: Using 35823601548SRuslan Ermilov.Tn UDP 35923601548SRuslan Ermilovhas its shortcomings. 36023601548SRuslan ErmilovSince 36123601548SRuslan Ermilov.Tn UDP Ns \-based 36223601548SRuslan Ermilov.Tn RPC 3638360efbdSAlfred Perlsteinmessages can only hold up to 8 Kbytes of encoded data, 3648360efbdSAlfred Perlsteinthis transport cannot be used for procedures that take 3658360efbdSAlfred Perlsteinlarge arguments or return huge results. 36623601548SRuslan Ermilov.Pp 36723601548SRuslan Ermilov.It Xo 36823601548SRuslan Ermilov.Ft bool_t 36923601548SRuslan Ermilov.Xc 37023601548SRuslan Ermilov.It Xo 37123601548SRuslan Ermilov.Fn clnt_control "CLIENT *cl" "u_int req" "char *info" 37223601548SRuslan Ermilov.Xc 37323601548SRuslan Ermilov.Pp 3748360efbdSAlfred PerlsteinA macro used to change or retrieve various information 3758360efbdSAlfred Perlsteinabout a client object. 37623601548SRuslan Ermilov.Fa req 3778360efbdSAlfred Perlsteinindicates the type of operation, and 37823601548SRuslan Ermilov.Fa info 37923601548SRuslan Ermilovis a pointer to the information. 38023601548SRuslan ErmilovFor both 38123601548SRuslan Ermilov.Tn UDP 3828360efbdSAlfred Perlsteinand 38323601548SRuslan Ermilov.Tn TCP , 3848360efbdSAlfred Perlsteinthe supported values of 38523601548SRuslan Ermilov.Fa req 3868360efbdSAlfred Perlsteinand their argument types and what they do are: 38723601548SRuslan Ermilov.Bl -column "CLSET_RETRY_TIMEOUT" "struct sockaddr_in" 38823601548SRuslan Ermilov.It Dv CLSET_TIMEOUT Ta Xo 38923601548SRuslan Ermilov.Vt "struct timeval" Ta "set total timeout" 39023601548SRuslan Ermilov.Xc 39123601548SRuslan Ermilov.It Dv CLGET_TIMEOUT Ta Xo 39223601548SRuslan Ermilov.Vt "struct timeval" Ta "get total timeout" 39323601548SRuslan Ermilov.Xc 39423601548SRuslan Ermilov.El 39523601548SRuslan Ermilov.Pp 3968360efbdSAlfred PerlsteinNote: if you set the timeout using 39723601548SRuslan Ermilov.Fn clnt_control , 3988360efbdSAlfred Perlsteinthe timeout parameter passed to 39923601548SRuslan Ermilov.Fn clnt_call 4008360efbdSAlfred Perlsteinwill be ignored in all future calls. 40123601548SRuslan Ermilov.Bl -column "CLSET_RETRY_TIMEOUT" "struct sockaddr_in" 40223601548SRuslan Ermilov.It Dv CLGET_SERVER_ADDR Ta Xo 40323601548SRuslan Ermilov.Vt "struct sockaddr_in" Ta "get server's address" 40423601548SRuslan Ermilov.Xc 40523601548SRuslan Ermilov.El 40623601548SRuslan Ermilov.Pp 4078360efbdSAlfred PerlsteinThe following operations are valid for 40823601548SRuslan Ermilov.Tn UDP 4098360efbdSAlfred Perlsteinonly: 41023601548SRuslan Ermilov.Bl -column "CLSET_RETRY_TIMEOUT" "struct sockaddr_in" 41123601548SRuslan Ermilov.It Dv CLSET_RETRY_TIMEOUT Ta Xo 41223601548SRuslan Ermilov.Vt "struct timeval" Ta "set the retry timeout" 41323601548SRuslan Ermilov.Xc 41423601548SRuslan Ermilov.It Dv CLGET_RETRY_TIMEOUT Ta Xo 41523601548SRuslan Ermilov.Vt "struct timeval" Ta "get the retry timeout" 41623601548SRuslan Ermilov.Xc 41723601548SRuslan Ermilov.El 41823601548SRuslan Ermilov.Pp 4198360efbdSAlfred PerlsteinThe retry timeout is the time that 42023601548SRuslan Ermilov.Tn "UDP RPC" 4218360efbdSAlfred Perlsteinwaits for the server to reply before 4228360efbdSAlfred Perlsteinretransmitting the request. 42323601548SRuslan Ermilov.Pp 42423601548SRuslan Ermilov.It Xo 42523601548SRuslan Ermilov.Ft bool_t 42623601548SRuslan Ermilov.Fn clnt_freeres "CLIENT *clnt" "xdrproc_t outproc" "char *out" 42723601548SRuslan Ermilov.Xc 42823601548SRuslan Ermilov.Pp 4298360efbdSAlfred PerlsteinA macro that frees any data allocated by the 43023601548SRuslan Ermilov.Tn RPC/XDR 4318360efbdSAlfred Perlsteinsystem when it decoded the results of an 43223601548SRuslan Ermilov.Tn RPC 43323601548SRuslan Ermilovcall. 43423601548SRuslan ErmilovThe parameter 43523601548SRuslan Ermilov.Fa out 4368360efbdSAlfred Perlsteinis the address of the results, and 43723601548SRuslan Ermilov.Fa outproc 4388360efbdSAlfred Perlsteinis the 43923601548SRuslan Ermilov.Tn XDR 4408360efbdSAlfred Perlsteinroutine describing the results. 4418360efbdSAlfred PerlsteinThis routine returns one if the results were successfully 4428360efbdSAlfred Perlsteinfreed, 4438360efbdSAlfred Perlsteinand zero otherwise. 44423601548SRuslan Ermilov.Pp 44523601548SRuslan Ermilov.It Xo 44623601548SRuslan Ermilov.Ft void 44723601548SRuslan Ermilov.Xc 44823601548SRuslan Ermilov.It Xo 44923601548SRuslan Ermilov.Fn clnt_geterr "CLIENT *clnt" "struct rpc_err *errp" 45023601548SRuslan Ermilov.Xc 45123601548SRuslan Ermilov.Pp 4528360efbdSAlfred PerlsteinA macro that copies the error structure out of the client 4538360efbdSAlfred Perlsteinhandle 4548360efbdSAlfred Perlsteinto the structure at address 45523601548SRuslan Ermilov.Fa errp . 45623601548SRuslan Ermilov.Pp 45723601548SRuslan Ermilov.It Xo 45823601548SRuslan Ermilov.Ft void 45923601548SRuslan Ermilov.Xc 46023601548SRuslan Ermilov.It Xo 46123601548SRuslan Ermilov.Fn clnt_pcreateerror "char *s" 46223601548SRuslan Ermilov.Xc 46323601548SRuslan Ermilov.Pp 46423601548SRuslan Ermilovprints a message to standard error indicating 4658360efbdSAlfred Perlsteinwhy a client 46623601548SRuslan Ermilov.Tn RPC 4678360efbdSAlfred Perlsteinhandle could not be created. 4688360efbdSAlfred PerlsteinThe message is prepended with string 46923601548SRuslan Ermilov.Fa s 4708360efbdSAlfred Perlsteinand a colon. 47123601548SRuslan ErmilovA newline is appended at the end of the message. 4728360efbdSAlfred PerlsteinUsed when a 47323601548SRuslan Ermilov.Fn clnt_create , 47423601548SRuslan Ermilov.Fn clntraw_create , 47523601548SRuslan Ermilov.Fn clnttcp_create , 4768360efbdSAlfred Perlsteinor 47723601548SRuslan Ermilov.Fn clntudp_create 4788360efbdSAlfred Perlsteincall fails. 47923601548SRuslan Ermilov.Pp 48023601548SRuslan Ermilov.It Xo 48123601548SRuslan Ermilov.Ft void 48223601548SRuslan Ermilov.Xc 48323601548SRuslan Ermilov.It Xo 48423601548SRuslan Ermilov.Fn clnt_perrno "enum clnt_stat stat" 48523601548SRuslan Ermilov.Xc 48623601548SRuslan Ermilov.Pp 4878360efbdSAlfred PerlsteinPrint a message to standard error corresponding 4888360efbdSAlfred Perlsteinto the condition indicated by 48923601548SRuslan Ermilov.Fa stat . 49023601548SRuslan ErmilovA newline is appended at the end of the message. 4918360efbdSAlfred PerlsteinUsed after 49223601548SRuslan Ermilov.Fn callrpc . 49323601548SRuslan Ermilov.Pp 49423601548SRuslan Ermilov.It Xo 49523601548SRuslan Ermilov.Ft void 49623601548SRuslan Ermilov.Fn clnt_perror "CLIENT *clnt" "char *s" 49723601548SRuslan Ermilov.Xc 49823601548SRuslan Ermilov.Pp 4998360efbdSAlfred PerlsteinPrint a message to standard error indicating why an 50023601548SRuslan Ermilov.Tn RPC 5018360efbdSAlfred Perlsteincall failed; 50223601548SRuslan Ermilov.Fa clnt 5038360efbdSAlfred Perlsteinis the handle used to do the call. 5048360efbdSAlfred PerlsteinThe message is prepended with string 50523601548SRuslan Ermilov.Fa s 5068360efbdSAlfred Perlsteinand a colon. 50723601548SRuslan ErmilovA newline is appended at the end of the message. 5088360efbdSAlfred PerlsteinUsed after 50923601548SRuslan Ermilov.Fn clnt_call . 51023601548SRuslan Ermilov.Pp 51123601548SRuslan Ermilov.It Xo 51223601548SRuslan Ermilov.Ft "char *" 51323601548SRuslan Ermilov.Xc 51423601548SRuslan Ermilov.It Xo 51523601548SRuslan Ermilov.Fn clnt_spcreateerror "char *s" 51623601548SRuslan Ermilov.Xc 51723601548SRuslan Ermilov.Pp 5188360efbdSAlfred PerlsteinLike 51923601548SRuslan Ermilov.Fn clnt_pcreateerror , 5208360efbdSAlfred Perlsteinexcept that it returns a string 5218360efbdSAlfred Perlsteininstead of printing to the standard error. 52223601548SRuslan Ermilov.Pp 5238360efbdSAlfred PerlsteinBugs: returns pointer to static data that is overwritten 5248360efbdSAlfred Perlsteinon each call. 52523601548SRuslan Ermilov.Pp 52623601548SRuslan Ermilov.It Xo 52723601548SRuslan Ermilov.Ft "char *" 52823601548SRuslan Ermilov.Xc 52923601548SRuslan Ermilov.It Xo 53023601548SRuslan Ermilov.Fn clnt_sperrno "enum clnt_stat stat" 53123601548SRuslan Ermilov.Xc 53223601548SRuslan Ermilov.Pp 5338360efbdSAlfred PerlsteinTake the same arguments as 53423601548SRuslan Ermilov.Fn clnt_perrno , 5358360efbdSAlfred Perlsteinbut instead of sending a message to the standard error 5368360efbdSAlfred Perlsteinindicating why an 53723601548SRuslan Ermilov.Tn RPC 5388360efbdSAlfred Perlsteincall failed, return a pointer to a string which contains 5398360efbdSAlfred Perlsteinthe message. 54023601548SRuslan Ermilov.Pp 54123601548SRuslan Ermilov.Fn clnt_sperrno 5428360efbdSAlfred Perlsteinis used instead of 54323601548SRuslan Ermilov.Fn clnt_perrno 5448360efbdSAlfred Perlsteinif the program does not have a standard error (as a program 5458360efbdSAlfred Perlsteinrunning as a server quite likely does not), or if the 5468360efbdSAlfred Perlsteinprogrammer 5478360efbdSAlfred Perlsteindoes not want the message to be output with 54823601548SRuslan Ermilov.Fn printf , 54923601548SRuslan Ermilovor if a message format different from that supported by 55023601548SRuslan Ermilov.Fn clnt_perrno 5518360efbdSAlfred Perlsteinis to be used. 55223601548SRuslan Ermilov.Pp 5538360efbdSAlfred PerlsteinNote: unlike 55423601548SRuslan Ermilov.Fn clnt_sperror 5558360efbdSAlfred Perlsteinand 55623601548SRuslan Ermilov.Fn clnt_spcreateerror , 55723601548SRuslan Ermilov.Fn clnt_sperrno 5588360efbdSAlfred Perlsteinreturns pointer to static data, but the 5598360efbdSAlfred Perlsteinresult will not get overwritten on each call. 56023601548SRuslan Ermilov.Pp 56123601548SRuslan Ermilov.It Xo 56223601548SRuslan Ermilov.Ft "char *" 56323601548SRuslan Ermilov.Xc 56423601548SRuslan Ermilov.It Xo 56523601548SRuslan Ermilov.Fn clnt_sperror "CLIENT *rpch" "char *s" 56623601548SRuslan Ermilov.Xc 56723601548SRuslan Ermilov.Pp 5688360efbdSAlfred PerlsteinLike 56923601548SRuslan Ermilov.Fn clnt_perror , 5708360efbdSAlfred Perlsteinexcept that (like 57123601548SRuslan Ermilov.Fn clnt_sperrno ) 5728360efbdSAlfred Perlsteinit returns a string instead of printing to standard error. 57323601548SRuslan Ermilov.Pp 5748360efbdSAlfred PerlsteinBugs: returns pointer to static data that is overwritten 5758360efbdSAlfred Perlsteinon each call. 57623601548SRuslan Ermilov.Pp 57723601548SRuslan Ermilov.It Xo 57823601548SRuslan Ermilov.Ft "CLIENT *" 57923601548SRuslan Ermilov.Xc 58023601548SRuslan Ermilov.It Xo 58123601548SRuslan Ermilov.Fn clntraw_create "u_long prognum" "u_long versnum" 58223601548SRuslan Ermilov.Xc 58323601548SRuslan Ermilov.Pp 5848360efbdSAlfred PerlsteinThis routine creates a toy 58523601548SRuslan Ermilov.Tn RPC 5868360efbdSAlfred Perlsteinclient for the remote program 58723601548SRuslan Ermilov.Fa prognum , 5888360efbdSAlfred Perlsteinversion 58923601548SRuslan Ermilov.Fa versnum . 5908360efbdSAlfred PerlsteinThe transport used to pass messages to the service is 5918360efbdSAlfred Perlsteinactually a buffer within the process's address space, so the 5928360efbdSAlfred Perlsteincorresponding 59323601548SRuslan Ermilov.Tn RPC 5948360efbdSAlfred Perlsteinserver should live in the same address space; see 59523601548SRuslan Ermilov.Fn svcraw_create . 5968360efbdSAlfred PerlsteinThis allows simulation of 59723601548SRuslan Ermilov.Tn RPC 5988360efbdSAlfred Perlsteinand acquisition of 59923601548SRuslan Ermilov.Tn RPC 6008360efbdSAlfred Perlsteinoverheads, such as round trip times, without any 60123601548SRuslan Ermilovkernel interference. 60223601548SRuslan ErmilovThis routine returns 60323601548SRuslan Ermilov.Dv NULL 6048360efbdSAlfred Perlsteinif it fails. 60523601548SRuslan Ermilov.Pp 60623601548SRuslan Ermilov.It Xo 60723601548SRuslan Ermilov.Ft "CLIENT *" 60823601548SRuslan Ermilov.Xc 60923601548SRuslan Ermilov.It Xo 61023601548SRuslan Ermilov.Fo clnttcp_create 61123601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 61223601548SRuslan Ermilov.Fa "u_long prognum" 61323601548SRuslan Ermilov.Fa "u_long versnum" 61423601548SRuslan Ermilov.Fa "int *sockp" 61523601548SRuslan Ermilov.Fa "u_int sendsz" 61623601548SRuslan Ermilov.Fa "u_int recvsz" 61723601548SRuslan Ermilov.Fc 61823601548SRuslan Ermilov.Xc 61923601548SRuslan Ermilov.Pp 6208360efbdSAlfred PerlsteinThis routine creates an 62123601548SRuslan Ermilov.Tn RPC 6228360efbdSAlfred Perlsteinclient for the remote program 62323601548SRuslan Ermilov.Fa prognum , 6248360efbdSAlfred Perlsteinversion 62523601548SRuslan Ermilov.Fa versnum ; 6268360efbdSAlfred Perlsteinthe client uses 62723601548SRuslan Ermilov.Tn TCP/IP 62823601548SRuslan Ermilovas a transport. 62923601548SRuslan ErmilovThe remote program is located at Internet 6308360efbdSAlfred Perlsteinaddress 63123601548SRuslan Ermilov.Fa addr . 6328360efbdSAlfred PerlsteinIf 63323601548SRuslan Ermilov.Fa addr\->sin_port 6348360efbdSAlfred Perlsteinis zero, then it is set to the actual port that the remote 6358360efbdSAlfred Perlsteinprogram is listening on (the remote 6368657581bSMaxim Sobolev.Xr rpcbind 8 63723601548SRuslan Ermilovservice is consulted for this information). 63823601548SRuslan ErmilovThe parameter 63923601548SRuslan Ermilov.Fa sockp 6408360efbdSAlfred Perlsteinis a socket; if it is 64123601548SRuslan Ermilov.Dv RPC_ANYSOCK , 6428360efbdSAlfred Perlsteinthen this routine opens a new one and sets 64323601548SRuslan Ermilov.Fa sockp . 6448360efbdSAlfred PerlsteinSince 64523601548SRuslan Ermilov.Tn TCP Ns \-based 64623601548SRuslan Ermilov.Tn RPC 6478360efbdSAlfred Perlsteinuses buffered 64823601548SRuslan Ermilov.Tn I/O , 6498360efbdSAlfred Perlsteinthe user may specify the size of the send and receive buffers 6508360efbdSAlfred Perlsteinwith the parameters 65123601548SRuslan Ermilov.Fa sendsz 6528360efbdSAlfred Perlsteinand 65323601548SRuslan Ermilov.Fa recvsz ; 6548360efbdSAlfred Perlsteinvalues of zero choose suitable defaults. 6558360efbdSAlfred PerlsteinThis routine returns 65623601548SRuslan Ermilov.Dv NULL 6578360efbdSAlfred Perlsteinif it fails. 65823601548SRuslan Ermilov.Pp 65923601548SRuslan Ermilov.It Xo 66023601548SRuslan Ermilov.Ft "CLIENT *" 66123601548SRuslan Ermilov.Xc 66223601548SRuslan Ermilov.It Xo 66323601548SRuslan Ermilov.Fo clntudp_create 66423601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 66523601548SRuslan Ermilov.Fa "u_long prognum" 66623601548SRuslan Ermilov.Fa "u_long versnum" 66723601548SRuslan Ermilov.Fa "struct timeval wait" 66823601548SRuslan Ermilov.Fa "int *sockp" 66923601548SRuslan Ermilov.Fc 67023601548SRuslan Ermilov.Xc 67123601548SRuslan Ermilov.Pp 6728360efbdSAlfred PerlsteinThis routine creates an 67323601548SRuslan Ermilov.Tn RPC 6748360efbdSAlfred Perlsteinclient for the remote program 67523601548SRuslan Ermilov.Fa prognum , 6768360efbdSAlfred Perlsteinversion 67723601548SRuslan Ermilov.Fa versnum ; 67823601548SRuslan Ermilovthe client uses 67923601548SRuslan Ermilov.Tn UDP/IP 68023601548SRuslan Ermilovas a transport. 68123601548SRuslan ErmilovThe remote program is located at Internet 6828360efbdSAlfred Perlsteinaddress 68323601548SRuslan Ermilov.Fa addr . 6848360efbdSAlfred PerlsteinIf 68523601548SRuslan Ermilov.Fa addr\->sin_port 6868360efbdSAlfred Perlsteinis zero, then it is set to actual port that the remote 6878360efbdSAlfred Perlsteinprogram is listening on (the remote 6888657581bSMaxim Sobolev.Xr rpcbind 8 68923601548SRuslan Ermilovservice is consulted for this information). 69023601548SRuslan ErmilovThe parameter 69123601548SRuslan Ermilov.Fa sockp 6928360efbdSAlfred Perlsteinis a socket; if it is 69323601548SRuslan Ermilov.Dv RPC_ANYSOCK , 6948360efbdSAlfred Perlsteinthen this routine opens a new one and sets 69523601548SRuslan Ermilov.Fa sockp . 6968360efbdSAlfred PerlsteinThe 69723601548SRuslan Ermilov.Tn UDP 6988360efbdSAlfred Perlsteintransport resends the call message in intervals of 69923601548SRuslan Ermilov.Fa wait 7008360efbdSAlfred Perlsteintime until a response is received or until the call times 7018360efbdSAlfred Perlsteinout. 7028360efbdSAlfred PerlsteinThe total time for the call to time out is specified by 70323601548SRuslan Ermilov.Fn clnt_call . 70423601548SRuslan Ermilov.Pp 7058360efbdSAlfred PerlsteinWarning: since 70623601548SRuslan Ermilov.Tn UDP Ns \-based 70723601548SRuslan Ermilov.Tn RPC 7088360efbdSAlfred Perlsteinmessages can only hold up to 8 Kbytes 7098360efbdSAlfred Perlsteinof encoded data, this transport cannot be used for procedures 7108360efbdSAlfred Perlsteinthat take large arguments or return huge results. 71123601548SRuslan Ermilov.Pp 71223601548SRuslan Ermilov.It Xo 71323601548SRuslan Ermilov.Ft "CLIENT *" 71423601548SRuslan Ermilov.Xc 71523601548SRuslan Ermilov.It Xo 71623601548SRuslan Ermilov.Fo clntudp_bufcreate 71723601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 71823601548SRuslan Ermilov.Fa "u_long prognum" 71923601548SRuslan Ermilov.Fa "u_long versnum" 72023601548SRuslan Ermilov.Fa "struct timeval wait" 72123601548SRuslan Ermilov.Fa "int *sockp" 72223601548SRuslan Ermilov.Fa "unsigned int sendsize" 72323601548SRuslan Ermilov.Fa "unsigned int recosize" 72423601548SRuslan Ermilov.Fc 72523601548SRuslan Ermilov.Xc 72623601548SRuslan Ermilov.Pp 7278360efbdSAlfred PerlsteinThis routine creates an 72823601548SRuslan Ermilov.Tn RPC 7298360efbdSAlfred Perlsteinclient for the remote program 73023601548SRuslan Ermilov.Fa prognum , 7318360efbdSAlfred Perlsteinon 73223601548SRuslan Ermilov.Fa versnum ; 73323601548SRuslan Ermilovthe client uses 73423601548SRuslan Ermilov.Tn UDP/IP 73523601548SRuslan Ermilovas a transport. 73623601548SRuslan ErmilovThe remote program is located at Internet 7378360efbdSAlfred Perlsteinaddress 73823601548SRuslan Ermilov.Fa addr . 7398360efbdSAlfred PerlsteinIf 74023601548SRuslan Ermilov.Fa addr\->sin_port 7418360efbdSAlfred Perlsteinis zero, then it is set to actual port that the remote 7428360efbdSAlfred Perlsteinprogram is listening on (the remote 7438657581bSMaxim Sobolev.Xr rpcbind 8 74423601548SRuslan Ermilovservice is consulted for this information). 74523601548SRuslan ErmilovThe parameter 74623601548SRuslan Ermilov.Fa sockp 7478360efbdSAlfred Perlsteinis a socket; if it is 74823601548SRuslan Ermilov.Dv RPC_ANYSOCK , 7498360efbdSAlfred Perlsteinthen this routine opens a new one and sets 75023601548SRuslan Ermilov.Fa sockp . 7518360efbdSAlfred PerlsteinThe 75223601548SRuslan Ermilov.Tn UDP 7538360efbdSAlfred Perlsteintransport resends the call message in intervals of 75423601548SRuslan Ermilov.Fa wait 7558360efbdSAlfred Perlsteintime until a response is received or until the call times 7568360efbdSAlfred Perlsteinout. 7578360efbdSAlfred PerlsteinThe total time for the call to time out is specified by 75823601548SRuslan Ermilov.Fn clnt_call . 75923601548SRuslan Ermilov.Pp 76023601548SRuslan ErmilovThis allows the user to specify the maximum packet size 76123601548SRuslan Ermilovfor sending and receiving 76223601548SRuslan Ermilov.Tn UDP Ns \-based 76323601548SRuslan Ermilov.Tn RPC 7648360efbdSAlfred Perlsteinmessages. 76523601548SRuslan Ermilov.Pp 76623601548SRuslan Ermilov.It Xo 767e6f9ad07SBill Paul.Ft "CLIENT *" 768e6f9ad07SBill Paul.Xc 769e6f9ad07SBill Paul.It Xo 770e6f9ad07SBill Paul.Fo clntunix_create 771e6f9ad07SBill Paul.Fa "struct sockaddr_un *raddr" 772e6f9ad07SBill Paul.Fa "u_long prognum" 773e6f9ad07SBill Paul.Fa "u_long versnum" 774e6f9ad07SBill Paul.Fa "int *sockp" 775e6f9ad07SBill Paul.Fa "u_int sendsz" 776e6f9ad07SBill Paul.Fa "u_int recvsz" 777e6f9ad07SBill Paul.Fc 778e6f9ad07SBill Paul.Xc 779e6f9ad07SBill Paul.Pp 780e6f9ad07SBill PaulThis routine creates an 781e6f9ad07SBill Paul.Tn RPC 782e6f9ad07SBill Paulclient for the local 783e6f9ad07SBill Paulprogram 784e6f9ad07SBill Paul.Fa prognum , 785e6f9ad07SBill Paulversion 786e6f9ad07SBill Paul.Fa versnum ; 787e6f9ad07SBill Paulthe client uses 788e6f9ad07SBill Paul.Tn UNIX Ns -domain 789e6f9ad07SBill Paulsockets as a transport. 790e6f9ad07SBill PaulThe local program is located at the 791e6f9ad07SBill Paul.Fa *raddr . 792e6f9ad07SBill PaulThe parameter 793e6f9ad07SBill Paul.Fa sockp 794e6f9ad07SBill Paulis a socket; if it is 795e6f9ad07SBill Paul.Dv RPC_ANYSOCK , 796e6f9ad07SBill Paulthen this routine opens a new one and sets 797e6f9ad07SBill Paul.Fa sockp . 798e6f9ad07SBill PaulSince 799e6f9ad07SBill Paul.Tn UNIX Ns \-based 800e6f9ad07SBill Paul.Tn RPC 801e6f9ad07SBill Pauluses buffered 802e6f9ad07SBill Paul.Tn I/O , 803e6f9ad07SBill Paulthe user may specify the size of the send and receive buffers 804e6f9ad07SBill Paulwith the parameters 805e6f9ad07SBill Paul.Fa sendsz 806e6f9ad07SBill Pauland 807e6f9ad07SBill Paul.Fa recvsz ; 808e6f9ad07SBill Paulvalues of zero choose suitable defaults. 809e6f9ad07SBill PaulThis routine returns 810e6f9ad07SBill Paul.Dv NULL 811e6f9ad07SBill Paulif it fails. 812e6f9ad07SBill Paul.Pp 813e6f9ad07SBill Paul.It Xo 81423601548SRuslan Ermilov.Ft int 81523601548SRuslan Ermilov.Xc 81623601548SRuslan Ermilov.It Xo 81723601548SRuslan Ermilov.Fn get_myaddress "struct sockaddr_in *addr" 81823601548SRuslan Ermilov.Xc 81923601548SRuslan Ermilov.Pp 8208360efbdSAlfred PerlsteinStuff the machine's 82123601548SRuslan Ermilov.Tn IP 8228360efbdSAlfred Perlsteinaddress into 82323601548SRuslan Ermilov.Fa addr , 8248360efbdSAlfred Perlsteinwithout consulting the library routines that deal with 82523601548SRuslan Ermilov.Pa /etc/hosts . 8268360efbdSAlfred PerlsteinThe port number is always set to 82723601548SRuslan Ermilov.Fn htons PMAPPORT . 8288360efbdSAlfred PerlsteinReturns zero on success, non-zero on failure. 82923601548SRuslan Ermilov.Pp 83023601548SRuslan Ermilov.It Xo 83123601548SRuslan Ermilov.Ft "struct pmaplist *" 83223601548SRuslan Ermilov.Xc 83323601548SRuslan Ermilov.It Xo 83423601548SRuslan Ermilov.Fn pmap_getmaps "struct sockaddr_in *addr" 83523601548SRuslan Ermilov.Xc 83623601548SRuslan Ermilov.Pp 8378360efbdSAlfred PerlsteinA user interface to the 8388657581bSMaxim Sobolev.Xr rpcbind 8 8398360efbdSAlfred Perlsteinservice, which returns a list of the current 84023601548SRuslan Ermilov.Tn RPC 84123601548SRuslan Ermilovprogram\-to\-port mappings 8428360efbdSAlfred Perlsteinon the host located at 84323601548SRuslan Ermilov.Tn IP 8448360efbdSAlfred Perlsteinaddress 84523601548SRuslan Ermilov.Fa addr . 8468360efbdSAlfred PerlsteinThis routine can return 84723601548SRuslan Ermilov.Dv NULL . 8488360efbdSAlfred PerlsteinThe command 84923601548SRuslan Ermilov.Dq Nm rpcinfo Fl p 8508360efbdSAlfred Perlsteinuses this routine. 85123601548SRuslan Ermilov.Pp 85223601548SRuslan Ermilov.It Xo 85323601548SRuslan Ermilov.Ft u_short 85423601548SRuslan Ermilov.Xc 85523601548SRuslan Ermilov.It Xo 85623601548SRuslan Ermilov.Fo pmap_getport 85723601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 85823601548SRuslan Ermilov.Fa "u_long prognum" 85923601548SRuslan Ermilov.Fa "u_long versnum" 86023601548SRuslan Ermilov.Fa "u_long protocol" 86123601548SRuslan Ermilov.Fc 86223601548SRuslan Ermilov.Xc 86323601548SRuslan Ermilov.Pp 8648360efbdSAlfred PerlsteinA user interface to the 8658657581bSMaxim Sobolev.Xr rpcbind 8 8668360efbdSAlfred Perlsteinservice, which returns the port number 8678360efbdSAlfred Perlsteinon which waits a service that supports program number 86823601548SRuslan Ermilov.Fa prognum , 8698360efbdSAlfred Perlsteinversion 87023601548SRuslan Ermilov.Fa versnum , 8718360efbdSAlfred Perlsteinand speaks the transport protocol associated with 87223601548SRuslan Ermilov.Fa protocol . 8738360efbdSAlfred PerlsteinThe value of 87423601548SRuslan Ermilov.Fa protocol 8758360efbdSAlfred Perlsteinis most likely 87623601548SRuslan Ermilov.Dv IPPROTO_UDP 8778360efbdSAlfred Perlsteinor 87823601548SRuslan Ermilov.Dv IPPROTO_TCP . 8798360efbdSAlfred PerlsteinA return value of zero means that the mapping does not exist 8808360efbdSAlfred Perlsteinor that 8818360efbdSAlfred Perlsteinthe 88223601548SRuslan Ermilov.Tn RPC 88323601548SRuslan Ermilovsystem failed to contact the remote 8848657581bSMaxim Sobolev.Xr rpcbind 8 88523601548SRuslan Ermilovservice. 88623601548SRuslan ErmilovIn the latter case, the global variable 88723601548SRuslan Ermilov.Va rpc_createerr 8888360efbdSAlfred Perlsteincontains the 88923601548SRuslan Ermilov.Tn RPC 8908360efbdSAlfred Perlsteinstatus. 89123601548SRuslan Ermilov.Pp 89223601548SRuslan Ermilov.It Xo 89323601548SRuslan Ermilov.Ft "enum clnt_stat" 89423601548SRuslan Ermilov.Xc 89523601548SRuslan Ermilov.It Xo 89623601548SRuslan Ermilov.Fo pmap_rmtcall 89723601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 89823601548SRuslan Ermilov.Fa "u_long prognum" 89923601548SRuslan Ermilov.Fa "u_long versnum" 90023601548SRuslan Ermilov.Fa "u_long procnum" 90123601548SRuslan Ermilov.Fa "xdrproc_t inproc" 90223601548SRuslan Ermilov.Fa "char *in" 90323601548SRuslan Ermilov.Fa "xdrproc_t outproc" 90423601548SRuslan Ermilov.Fa "char *out" 90523601548SRuslan Ermilov.Fa "struct timeval tout" 90623601548SRuslan Ermilov.Fa "u_long *portp" 90723601548SRuslan Ermilov.Fc 90823601548SRuslan Ermilov.Xc 90923601548SRuslan Ermilov.Pp 9108360efbdSAlfred PerlsteinA user interface to the 9118657581bSMaxim Sobolev.Xr rpcbind 8 9128360efbdSAlfred Perlsteinservice, which instructs 9138657581bSMaxim Sobolev.Xr rpcbind 8 9148360efbdSAlfred Perlsteinon the host at 91523601548SRuslan Ermilov.Tn IP 9168360efbdSAlfred Perlsteinaddress 91723601548SRuslan Ermilov.Fa addr 9188360efbdSAlfred Perlsteinto make an 91923601548SRuslan Ermilov.Tn RPC 9208360efbdSAlfred Perlsteincall on your behalf to a procedure on that host. 9218360efbdSAlfred PerlsteinThe parameter 92223601548SRuslan Ermilov.Fa portp 9238360efbdSAlfred Perlsteinwill be modified to the program's port number if the 9248360efbdSAlfred Perlsteinprocedure 92523601548SRuslan Ermilovsucceeds. 92623601548SRuslan ErmilovThe definitions of other parameters are discussed 9278360efbdSAlfred Perlsteinin 92823601548SRuslan Ermilov.Fn callrpc 9298360efbdSAlfred Perlsteinand 93023601548SRuslan Ermilov.Fn clnt_call . 93123601548SRuslan ErmilovThis procedure should be used for a 93223601548SRuslan Ermilov.Dq ping 93323601548SRuslan Ermilovand nothing 9348360efbdSAlfred Perlsteinelse. 9358360efbdSAlfred PerlsteinSee also 93623601548SRuslan Ermilov.Fn clnt_broadcast . 93723601548SRuslan Ermilov.Pp 93823601548SRuslan Ermilov.It Xo 93923601548SRuslan Ermilov.Ft bool_t 94023601548SRuslan Ermilov.Fn pmap_set "u_long prognum" "u_long versnum" "u_long protocol" "u_short port" 94123601548SRuslan Ermilov.Xc 94223601548SRuslan Ermilov.Pp 9438360efbdSAlfred PerlsteinA user interface to the 9448657581bSMaxim Sobolev.Xr rpcbind 8 9458360efbdSAlfred Perlsteinservice, which establishes a mapping between the triple 94623601548SRuslan Ermilov.Pq Fa prognum , versnum , protocol 9478360efbdSAlfred Perlsteinand 94823601548SRuslan Ermilov.Fa port 9498360efbdSAlfred Perlsteinon the machine's 9508657581bSMaxim Sobolev.Xr rpcbind 8 95123601548SRuslan Ermilovservice. 95223601548SRuslan ErmilovThe value of 95323601548SRuslan Ermilov.Fa protocol 9548360efbdSAlfred Perlsteinis most likely 95523601548SRuslan Ermilov.Dv IPPROTO_UDP 9568360efbdSAlfred Perlsteinor 95723601548SRuslan Ermilov.Dv IPPROTO_TCP . 9588360efbdSAlfred PerlsteinThis routine returns one if it succeeds, zero otherwise. 9598360efbdSAlfred PerlsteinAutomatically done by 96023601548SRuslan Ermilov.Fn svc_register . 96123601548SRuslan Ermilov.Pp 96223601548SRuslan Ermilov.It Xo 96323601548SRuslan Ermilov.Ft bool_t 96423601548SRuslan Ermilov.Fn pmap_unset "u_long prognum" "u_long versnum" 96523601548SRuslan Ermilov.Xc 96623601548SRuslan Ermilov.Pp 9678360efbdSAlfred PerlsteinA user interface to the 9688657581bSMaxim Sobolev.Xr rpcbind 8 9698360efbdSAlfred Perlsteinservice, which destroys all mapping between the triple 97023601548SRuslan Ermilov.Pq Fa prognum , versnum , * 9718360efbdSAlfred Perlsteinand 97223601548SRuslan Ermilov.Fa ports 9738360efbdSAlfred Perlsteinon the machine's 9748657581bSMaxim Sobolev.Xr rpcbind 8 97523601548SRuslan Ermilovservice. 97623601548SRuslan ErmilovThis routine returns one if it succeeds, zero 9778360efbdSAlfred Perlsteinotherwise. 97823601548SRuslan Ermilov.Pp 97923601548SRuslan Ermilov.It Xo 98023601548SRuslan Ermilov.Ft bool_t 98123601548SRuslan Ermilov.Fo registerrpc 98223601548SRuslan Ermilov.Fa "u_long prognum" 98323601548SRuslan Ermilov.Fa "u_long versnum" 98423601548SRuslan Ermilov.Fa "u_long procnum" 98523601548SRuslan Ermilov.Fa "char *(*procname)(void)" 98623601548SRuslan Ermilov.Fa "xdrproc_t inproc" 98723601548SRuslan Ermilov.Fa "xdrproc_t outproc" 98823601548SRuslan Ermilov.Fc 98923601548SRuslan Ermilov.Xc 99023601548SRuslan Ermilov.Pp 9918360efbdSAlfred PerlsteinRegister procedure 99223601548SRuslan Ermilov.Fa procname 9938360efbdSAlfred Perlsteinwith the 99423601548SRuslan Ermilov.Tn RPC 99523601548SRuslan Ermilovservice package. 99623601548SRuslan ErmilovIf a request arrives for program 99723601548SRuslan Ermilov.Fa prognum , 9988360efbdSAlfred Perlsteinversion 99923601548SRuslan Ermilov.Fa versnum , 10008360efbdSAlfred Perlsteinand procedure 100123601548SRuslan Ermilov.Fa procnum , 100223601548SRuslan Ermilov.Fa procname 10038360efbdSAlfred Perlsteinis called with a pointer to its parameter(s); 100423601548SRuslan Ermilov.Fa progname 10058360efbdSAlfred Perlsteinshould return a pointer to its static result(s); 100623601548SRuslan Ermilov.Fa inproc 10078360efbdSAlfred Perlsteinis used to decode the parameters while 100823601548SRuslan Ermilov.Fa outproc 10098360efbdSAlfred Perlsteinis used to encode the results. 10108360efbdSAlfred PerlsteinThis routine returns zero if the registration succeeded, \-1 10118360efbdSAlfred Perlsteinotherwise. 101223601548SRuslan Ermilov.Pp 10138360efbdSAlfred PerlsteinWarning: remote procedures registered in this form 10148360efbdSAlfred Perlsteinare accessed using the 101523601548SRuslan Ermilov.Tn UDP/IP 10168360efbdSAlfred Perlsteintransport; see 101723601548SRuslan Ermilov.Fn svcudp_create 10188360efbdSAlfred Perlsteinfor restrictions. 101923601548SRuslan Ermilov.Pp 102023601548SRuslan Ermilov.It Xo 102123601548SRuslan Ermilov.Vt "struct rpc_createerr" rpc_createerr ; 102223601548SRuslan Ermilov.Xc 102323601548SRuslan Ermilov.Pp 10248360efbdSAlfred PerlsteinA global variable whose value is set by any 102523601548SRuslan Ermilov.Tn RPC 10268360efbdSAlfred Perlsteinclient creation routine 102723601548SRuslan Ermilovthat does not succeed. 102823601548SRuslan ErmilovUse the routine 102923601548SRuslan Ermilov.Fn clnt_pcreateerror 10308360efbdSAlfred Perlsteinto print the reason why. 103123601548SRuslan Ermilov.Pp 103223601548SRuslan Ermilov.It Xo 103323601548SRuslan Ermilov.Ft bool_t 103423601548SRuslan Ermilov.Fn svc_destroy "SVCXPRT * xprt" 103523601548SRuslan Ermilov.Xc 103623601548SRuslan Ermilov.Pp 10378360efbdSAlfred PerlsteinA macro that destroys the 103823601548SRuslan Ermilov.Tn RPC 10398360efbdSAlfred Perlsteinservice transport handle, 104023601548SRuslan Ermilov.Fa xprt . 10418360efbdSAlfred PerlsteinDestruction usually involves deallocation 10428360efbdSAlfred Perlsteinof private data structures, including 104323601548SRuslan Ermilov.Fa xprt 104423601548SRuslan Ermilovitself. 104523601548SRuslan ErmilovUse of 104623601548SRuslan Ermilov.Fa xprt 10478360efbdSAlfred Perlsteinis undefined after calling this routine. 104823601548SRuslan Ermilov.Pp 104923601548SRuslan Ermilov.It Xo 105023601548SRuslan Ermilov.Vt fd_set svc_fdset ; 105123601548SRuslan Ermilov.Xc 105223601548SRuslan Ermilov.Pp 10538360efbdSAlfred PerlsteinA global variable reflecting the 105423601548SRuslan Ermilov.Tn RPC 10558360efbdSAlfred Perlsteinservice side's 105623601548SRuslan Ermilovread file descriptor bit mask; it is suitable as a template parameter 10578360efbdSAlfred Perlsteinto the 105823601548SRuslan Ermilov.Xr select 2 105923601548SRuslan Ermilovsystem call. 106023601548SRuslan ErmilovThis is only of interest 10618360efbdSAlfred Perlsteinif a service implementor does not call 106223601548SRuslan Ermilov.Fn svc_run , 10638360efbdSAlfred Perlsteinbut rather does his own asynchronous event processing. 106423601548SRuslan ErmilovThis variable is read\-only (do not pass its address to 106523601548SRuslan Ermilov.Xr select 2 ! ) , 10668360efbdSAlfred Perlsteinyet it may change after calls to 106723601548SRuslan Ermilov.Fn svc_getreqset 10688360efbdSAlfred Perlsteinor any creation routines. 106923601548SRuslan ErmilovAs well, note that if the process has descriptor limits 107023601548SRuslan Ermilovwhich are extended beyond 107123601548SRuslan Ermilov.Dv FD_SETSIZE , 107223601548SRuslan Ermilovthis variable will only be usable for the first 107323601548SRuslan Ermilov.Dv FD_SETSIZE 107423601548SRuslan Ermilovdescriptors. 107523601548SRuslan Ermilov.Pp 107623601548SRuslan Ermilov.It Xo 107723601548SRuslan Ermilov.Vt int svc_fds ; 107823601548SRuslan Ermilov.Xc 107923601548SRuslan Ermilov.Pp 10808360efbdSAlfred PerlsteinSimilar to 108123601548SRuslan Ermilov.Va svc_fdset , 108223601548SRuslan Ermilovbut limited to 32 descriptors. 108323601548SRuslan ErmilovThis 10848360efbdSAlfred Perlsteininterface is obsoleted by 108523601548SRuslan Ermilov.Va svc_fdset . 108623601548SRuslan Ermilov.Pp 108723601548SRuslan Ermilov.It Xo 108823601548SRuslan Ermilov.Ft bool_t 108923601548SRuslan Ermilov.Fn svc_freeargs "SVCXPRT *xprt" "xdrproc_t inproc" "char *in" 109023601548SRuslan Ermilov.Xc 109123601548SRuslan Ermilov.Pp 10928360efbdSAlfred PerlsteinA macro that frees any data allocated by the 109323601548SRuslan Ermilov.Tn RPC/XDR 10948360efbdSAlfred Perlsteinsystem when it decoded the arguments to a service procedure 10958360efbdSAlfred Perlsteinusing 109623601548SRuslan Ermilov.Fn svc_getargs . 10978360efbdSAlfred PerlsteinThis routine returns 1 if the results were successfully 10988360efbdSAlfred Perlsteinfreed, 10998360efbdSAlfred Perlsteinand zero otherwise. 110023601548SRuslan Ermilov.Pp 110123601548SRuslan Ermilov.It Xo 110223601548SRuslan Ermilov.Ft bool_t 110323601548SRuslan Ermilov.Fn svc_getargs "SVCXPRT *xprt" "xdrproc_t inproc" "char *in" 110423601548SRuslan Ermilov.Xc 110523601548SRuslan Ermilov.Pp 11068360efbdSAlfred PerlsteinA macro that decodes the arguments of an 110723601548SRuslan Ermilov.Tn RPC 11088360efbdSAlfred Perlsteinrequest 11098360efbdSAlfred Perlsteinassociated with the 111023601548SRuslan Ermilov.Tn RPC 11118360efbdSAlfred Perlsteinservice transport handle, 111223601548SRuslan Ermilov.Fa xprt . 11138360efbdSAlfred PerlsteinThe parameter 111423601548SRuslan Ermilov.Fa in 11158360efbdSAlfred Perlsteinis the address where the arguments will be placed; 111623601548SRuslan Ermilov.Fa inproc 11178360efbdSAlfred Perlsteinis the 111823601548SRuslan Ermilov.Tn XDR 11198360efbdSAlfred Perlsteinroutine used to decode the arguments. 11208360efbdSAlfred PerlsteinThis routine returns one if decoding succeeds, and zero 11218360efbdSAlfred Perlsteinotherwise. 112223601548SRuslan Ermilov.Pp 112323601548SRuslan Ermilov.It Xo 112423601548SRuslan Ermilov.Ft "struct sockaddr_in *" 112523601548SRuslan Ermilov.Xc 112623601548SRuslan Ermilov.It Xo 112723601548SRuslan Ermilov.Fn svc_getcaller "SVCXPRT *xprt" 112823601548SRuslan Ermilov.Xc 112923601548SRuslan Ermilov.Pp 11308360efbdSAlfred PerlsteinThe approved way of getting the network address of the caller 11318360efbdSAlfred Perlsteinof a procedure associated with the 113223601548SRuslan Ermilov.Tn RPC 11338360efbdSAlfred Perlsteinservice transport handle, 113423601548SRuslan Ermilov.Fa xprt . 113523601548SRuslan Ermilov.Pp 113623601548SRuslan Ermilov.It Xo 113723601548SRuslan Ermilov.Ft void 113823601548SRuslan Ermilov.Fn svc_getreqset "fd_set *rdfds" 113923601548SRuslan Ermilov.Xc 114023601548SRuslan Ermilov.Pp 11418360efbdSAlfred PerlsteinThis routine is only of interest if a service implementor 11428360efbdSAlfred Perlsteindoes not call 114323601548SRuslan Ermilov.Fn svc_run , 11448360efbdSAlfred Perlsteinbut instead implements custom asynchronous event processing. 11458360efbdSAlfred PerlsteinIt is called when the 114623601548SRuslan Ermilov.Xr select 2 11478360efbdSAlfred Perlsteinsystem call has determined that an 114823601548SRuslan Ermilov.Tn RPC 11498360efbdSAlfred Perlsteinrequest has arrived on some 115023601548SRuslan Ermilov.Tn RPC 115123601548SRuslan Ermilovsocket(s); 115223601548SRuslan Ermilov.Fa rdfds 11538360efbdSAlfred Perlsteinis the resultant read file descriptor bit mask. 11548360efbdSAlfred PerlsteinThe routine returns when all sockets associated with the 11558360efbdSAlfred Perlsteinvalue of 115623601548SRuslan Ermilov.Fa rdfds 11578360efbdSAlfred Perlsteinhave been serviced. 115823601548SRuslan Ermilov.Pp 115923601548SRuslan Ermilov.It Xo 116023601548SRuslan Ermilov.Ft void 116123601548SRuslan Ermilov.Fn svc_getreq "int rdfds" 116223601548SRuslan Ermilov.Xc 116323601548SRuslan Ermilov.Pp 11648360efbdSAlfred PerlsteinSimilar to 116523601548SRuslan Ermilov.Fn svc_getreqset , 116623601548SRuslan Ermilovbut limited to 32 descriptors. 116723601548SRuslan ErmilovThis interface is obsoleted by 116823601548SRuslan Ermilov.Fn svc_getreqset . 116923601548SRuslan Ermilov.Pp 117023601548SRuslan Ermilov.It Xo 117123601548SRuslan Ermilov.Ft bool_t 117223601548SRuslan Ermilov.Fo svc_register 117323601548SRuslan Ermilov.Fa "SVCXPRT *xprt" 117423601548SRuslan Ermilov.Fa "u_long prognum" 117523601548SRuslan Ermilov.Fa "u_long versnum" 117623601548SRuslan Ermilov.Fa "void (*dispatch)(struct svc_req *, SVCXPRT *)" 117723601548SRuslan Ermilov.Fa "int protocol" 117823601548SRuslan Ermilov.Fc 117923601548SRuslan Ermilov.Xc 118023601548SRuslan Ermilov.Pp 11818360efbdSAlfred PerlsteinAssociates 118223601548SRuslan Ermilov.Fa prognum 11838360efbdSAlfred Perlsteinand 118423601548SRuslan Ermilov.Fa versnum 11858360efbdSAlfred Perlsteinwith the service dispatch procedure, 118623601548SRuslan Ermilov.Fn dispatch . 11878360efbdSAlfred PerlsteinIf 118823601548SRuslan Ermilov.Fa protocol 11898360efbdSAlfred Perlsteinis zero, the service is not registered with the 11908657581bSMaxim Sobolev.Xr rpcbind 8 119123601548SRuslan Ermilovservice. 119223601548SRuslan ErmilovIf 119323601548SRuslan Ermilov.Fa protocol 11948360efbdSAlfred Perlsteinis non-zero, then a mapping of the triple 119523601548SRuslan Ermilov.Pq Fa prognum , versnum , protocol 11968360efbdSAlfred Perlsteinto 119723601548SRuslan Ermilov.Fa xprt\->xp_port 11988360efbdSAlfred Perlsteinis established with the local 11998657581bSMaxim Sobolev.Xr rpcbind 8 12008360efbdSAlfred Perlsteinservice (generally 120123601548SRuslan Ermilov.Fa protocol 12028360efbdSAlfred Perlsteinis zero, 120323601548SRuslan Ermilov.Dv IPPROTO_UDP 12048360efbdSAlfred Perlsteinor 120523601548SRuslan Ermilov.Dv IPPROTO_TCP ) . 12068360efbdSAlfred PerlsteinThe procedure 120723601548SRuslan Ermilov.Fn dispatch 12088360efbdSAlfred Perlsteinhas the following form: 120923601548SRuslan Ermilov.Bd -ragged -offset indent 121023601548SRuslan Ermilov.Ft bool_t 121123601548SRuslan Ermilov.Fn dispatch "struct svc_req *request" "SVCXPRT *xprt" 121223601548SRuslan Ermilov.Ed 121323601548SRuslan Ermilov.Pp 12148360efbdSAlfred PerlsteinThe 121523601548SRuslan Ermilov.Fn svc_register 12168360efbdSAlfred Perlsteinroutine returns one if it succeeds, and zero otherwise. 121723601548SRuslan Ermilov.Pp 121823601548SRuslan Ermilov.It Xo 121923601548SRuslan Ermilov.Fn svc_run 122023601548SRuslan Ermilov.Xc 122123601548SRuslan Ermilov.Pp 122223601548SRuslan ErmilovThis routine never returns. 122323601548SRuslan ErmilovIt waits for 122423601548SRuslan Ermilov.Tn RPC 12258360efbdSAlfred Perlsteinrequests to arrive, and calls the appropriate service 12268360efbdSAlfred Perlsteinprocedure using 122723601548SRuslan Ermilov.Fn svc_getreq 122823601548SRuslan Ermilovwhen one arrives. 122923601548SRuslan ErmilovThis procedure is usually waiting for a 123023601548SRuslan Ermilov.Xr select 2 12318360efbdSAlfred Perlsteinsystem call to return. 123223601548SRuslan Ermilov.Pp 123323601548SRuslan Ermilov.It Xo 123423601548SRuslan Ermilov.Ft bool_t 123523601548SRuslan Ermilov.Fn svc_sendreply "SVCXPRT *xprt" "xdrproc_t outproc" "char *out" 123623601548SRuslan Ermilov.Xc 123723601548SRuslan Ermilov.Pp 12388360efbdSAlfred PerlsteinCalled by an 123923601548SRuslan Ermilov.Tn RPC 12408360efbdSAlfred Perlsteinservice's dispatch routine to send the results of a 124123601548SRuslan Ermilovremote procedure call. 124223601548SRuslan ErmilovThe parameter 124323601548SRuslan Ermilov.Fa xprt 12448360efbdSAlfred Perlsteinis the request's associated transport handle; 124523601548SRuslan Ermilov.Fa outproc 12468360efbdSAlfred Perlsteinis the 124723601548SRuslan Ermilov.Tn XDR 12488360efbdSAlfred Perlsteinroutine which is used to encode the results; and 124923601548SRuslan Ermilov.Fa out 12508360efbdSAlfred Perlsteinis the address of the results. 12518360efbdSAlfred PerlsteinThis routine returns one if it succeeds, zero otherwise. 125223601548SRuslan Ermilov.Pp 125323601548SRuslan Ermilov.It Xo 125423601548SRuslan Ermilov.Ft void 125523601548SRuslan Ermilov.Xc 125623601548SRuslan Ermilov.It Xo 125723601548SRuslan Ermilov.Fn svc_unregister "u_long prognum" "u_long versnum" 125823601548SRuslan Ermilov.Xc 125923601548SRuslan Ermilov.Pp 12608360efbdSAlfred PerlsteinRemove all mapping of the double 126123601548SRuslan Ermilov.Pq Fa prognum , versnum 12628360efbdSAlfred Perlsteinto dispatch routines, and of the triple 126323601548SRuslan Ermilov.Pq Fa prognum , versnum , * 12648360efbdSAlfred Perlsteinto port number. 126523601548SRuslan Ermilov.Pp 126623601548SRuslan Ermilov.It Xo 126723601548SRuslan Ermilov.Ft void 126823601548SRuslan Ermilov.Xc 126923601548SRuslan Ermilov.It Xo 127023601548SRuslan Ermilov.Fn svcerr_auth "SVCXPRT *xprt" "enum auth_stat why" 127123601548SRuslan Ermilov.Xc 127223601548SRuslan Ermilov.Pp 12738360efbdSAlfred PerlsteinCalled by a service dispatch routine that refuses to perform 12748360efbdSAlfred Perlsteina remote procedure call due to an authentication error. 127523601548SRuslan Ermilov.Pp 127623601548SRuslan Ermilov.It Xo 127723601548SRuslan Ermilov.Ft void 127823601548SRuslan Ermilov.Xc 127923601548SRuslan Ermilov.It Xo 128023601548SRuslan Ermilov.Fn svcerr_decode "SVCXPRT *xprt" 128123601548SRuslan Ermilov.Xc 128223601548SRuslan Ermilov.Pp 12838360efbdSAlfred PerlsteinCalled by a service dispatch routine that cannot successfully 128423601548SRuslan Ermilovdecode its parameters. 128523601548SRuslan ErmilovSee also 128623601548SRuslan Ermilov.Fn svc_getargs . 128723601548SRuslan Ermilov.Pp 128823601548SRuslan Ermilov.It Xo 128923601548SRuslan Ermilov.Ft void 129023601548SRuslan Ermilov.Xc 129123601548SRuslan Ermilov.It Xo 129223601548SRuslan Ermilov.Fn svcerr_noproc "SVCXPRT *xprt" 129323601548SRuslan Ermilov.Xc 129423601548SRuslan Ermilov.Pp 12958360efbdSAlfred PerlsteinCalled by a service dispatch routine that does not implement 12968360efbdSAlfred Perlsteinthe procedure number that the caller requests. 129723601548SRuslan Ermilov.Pp 129823601548SRuslan Ermilov.It Xo 129923601548SRuslan Ermilov.Ft void 130023601548SRuslan Ermilov.Xc 130123601548SRuslan Ermilov.It Xo 130223601548SRuslan Ermilov.Fn svcerr_noprog "SVCXPRT *xprt" 130323601548SRuslan Ermilov.Xc 130423601548SRuslan Ermilov.Pp 13058360efbdSAlfred PerlsteinCalled when the desired program is not registered with the 130623601548SRuslan Ermilov.Tn RPC 130723601548SRuslan Ermilovpackage. 130823601548SRuslan ErmilovService implementors usually do not need this routine. 130923601548SRuslan Ermilov.Pp 131023601548SRuslan Ermilov.It Xo 131123601548SRuslan Ermilov.Ft void 131223601548SRuslan Ermilov.Xc 131323601548SRuslan Ermilov.It Xo 131423601548SRuslan Ermilov.Fn svcerr_progvers "SVCXPRT *xprt" "u_long low_vers" "u_long high_vers" 131523601548SRuslan Ermilov.Xc 131623601548SRuslan Ermilov.Pp 13178360efbdSAlfred PerlsteinCalled when the desired version of a program is not registered 13188360efbdSAlfred Perlsteinwith the 131923601548SRuslan Ermilov.Tn RPC 132023601548SRuslan Ermilovpackage. 132123601548SRuslan ErmilovService implementors usually do not need this routine. 132223601548SRuslan Ermilov.Pp 132323601548SRuslan Ermilov.It Xo 132423601548SRuslan Ermilov.Ft void 132523601548SRuslan Ermilov.Xc 132623601548SRuslan Ermilov.It Xo 132723601548SRuslan Ermilov.Fn svcerr_systemerr "SVCXPRT *xprt" 132823601548SRuslan Ermilov.Xc 132923601548SRuslan Ermilov.Pp 13308360efbdSAlfred PerlsteinCalled by a service dispatch routine when it detects a system 13318360efbdSAlfred Perlsteinerror 13328360efbdSAlfred Perlsteinnot covered by any particular protocol. 13338360efbdSAlfred PerlsteinFor example, if a service can no longer allocate storage, 13348360efbdSAlfred Perlsteinit may call this routine. 133523601548SRuslan Ermilov.Pp 133623601548SRuslan Ermilov.It Xo 133723601548SRuslan Ermilov.Ft void 133823601548SRuslan Ermilov.Xc 133923601548SRuslan Ermilov.It Xo 134023601548SRuslan Ermilov.Fn svcerr_weakauth "SVCXPRT *xprt" 134123601548SRuslan Ermilov.Xc 134223601548SRuslan Ermilov.Pp 13438360efbdSAlfred PerlsteinCalled by a service dispatch routine that refuses to perform 13448360efbdSAlfred Perlsteina remote procedure call due to insufficient 134523601548SRuslan Ermilovauthentication parameters. 134623601548SRuslan ErmilovThe routine calls 134723601548SRuslan Ermilov.Fn svcerr_auth xprt AUTH_TOOWEAK . 134823601548SRuslan Ermilov.Pp 134923601548SRuslan Ermilov.It Xo 135023601548SRuslan Ermilov.Ft "SVCXPRT *" 135123601548SRuslan Ermilov.Xc 135223601548SRuslan Ermilov.It Xo 135323601548SRuslan Ermilov.Fn svcraw_create void 135423601548SRuslan Ermilov.Xc 135523601548SRuslan Ermilov.Pp 13568360efbdSAlfred PerlsteinThis routine creates a toy 135723601548SRuslan Ermilov.Tn RPC 135823601548SRuslan Ermilovservice transport, to which it returns a pointer. 135923601548SRuslan ErmilovThe transport 13608360efbdSAlfred Perlsteinis really a buffer within the process's address space, 13618360efbdSAlfred Perlsteinso the corresponding 136223601548SRuslan Ermilov.Tn RPC 13638360efbdSAlfred Perlsteinclient should live in the same 13648360efbdSAlfred Perlsteinaddress space; 13658360efbdSAlfred Perlsteinsee 136623601548SRuslan Ermilov.Fn clntraw_create . 13678360efbdSAlfred PerlsteinThis routine allows simulation of 136823601548SRuslan Ermilov.Tn RPC 13698360efbdSAlfred Perlsteinand acquisition of 137023601548SRuslan Ermilov.Tn RPC 13718360efbdSAlfred Perlsteinoverheads (such as round trip times), without any kernel 13728360efbdSAlfred Perlsteininterference. 13738360efbdSAlfred PerlsteinThis routine returns 137423601548SRuslan Ermilov.Dv NULL 13758360efbdSAlfred Perlsteinif it fails. 137623601548SRuslan Ermilov.Pp 137723601548SRuslan Ermilov.It Xo 137823601548SRuslan Ermilov.Ft "SVCXPRT *" 137923601548SRuslan Ermilov.Xc 138023601548SRuslan Ermilov.It Xo 138123601548SRuslan Ermilov.Fn svctcp_create "int sock" "u_int send_buf_size" "u_int recv_buf_size" 138223601548SRuslan Ermilov.Xc 138323601548SRuslan Ermilov.Pp 13848360efbdSAlfred PerlsteinThis routine creates a 138523601548SRuslan Ermilov.Tn TCP/IP Ns \-based 138623601548SRuslan Ermilov.Tn RPC 13878360efbdSAlfred Perlsteinservice transport, to which it returns a pointer. 13888360efbdSAlfred PerlsteinThe transport is associated with the socket 138923601548SRuslan Ermilov.Fa sock , 13908360efbdSAlfred Perlsteinwhich may be 139123601548SRuslan Ermilov.Dv RPC_ANYSOCK , 13928360efbdSAlfred Perlsteinin which case a new socket is created. 13938360efbdSAlfred PerlsteinIf the socket is not bound to a local 139423601548SRuslan Ermilov.Tn TCP 139523601548SRuslan Ermilovport, then this routine binds it to an arbitrary port. 139623601548SRuslan ErmilovUpon completion, 139723601548SRuslan Ermilov.Fa xprt\->xp_fd 13988360efbdSAlfred Perlsteinis the transport's socket descriptor, and 139923601548SRuslan Ermilov.Fa xprt\->xp_port 14008360efbdSAlfred Perlsteinis the transport's port number. 14018360efbdSAlfred PerlsteinThis routine returns 140223601548SRuslan Ermilov.Dv NULL 140323601548SRuslan Ermilovif it fails. 140423601548SRuslan ErmilovSince 140523601548SRuslan Ermilov.Tn TCP Ns \-based 140623601548SRuslan Ermilov.Tn RPC 14078360efbdSAlfred Perlsteinuses buffered 140823601548SRuslan Ermilov.Tn I/O , 14098360efbdSAlfred Perlsteinusers may specify the size of buffers; values of zero 14108360efbdSAlfred Perlsteinchoose suitable defaults. 141123601548SRuslan Ermilov.Pp 141223601548SRuslan Ermilov.It Xo 141323601548SRuslan Ermilov.Ft "SVCXPRT *" 141423601548SRuslan Ermilov.Xc 141523601548SRuslan Ermilov.It Xo 1416e6f9ad07SBill Paul.Fn svcunix_create "int sock" "u_int send_buf_size" "u_int recv_buf_size" "char *path" 1417e6f9ad07SBill Paul.Xc 1418e6f9ad07SBill Paul.Pp 1419e6f9ad07SBill PaulThis routine creates a 1420e6f9ad07SBill Paul.Tn UNIX Ns \-based 1421e6f9ad07SBill Paul.Tn RPC 1422e6f9ad07SBill Paulservice transport, to which it returns a pointer. 1423e6f9ad07SBill PaulThe transport is associated with the socket 1424e6f9ad07SBill Paul.Fa sock , 1425e6f9ad07SBill Paulwhich may be 1426e6f9ad07SBill Paul.Dv RPC_ANYSOCK , 1427e6f9ad07SBill Paulin which case a new socket is created. 1428e6f9ad07SBill Paul.Fa *path 1429e6f9ad07SBill Paulis a variable-length filesystem pathname of 1430e6f9ad07SBill Paulat most 104 characters. 1431e6f9ad07SBill PaulThis file is 1432e6f9ad07SBill Paul.Em not 1433e6f9ad07SBill Paulremoved when the socket is closed. 1434e6f9ad07SBill Paul.Xr unlink 2 1435e6f9ad07SBill Paulmust be used to remove the file. 1436e6f9ad07SBill PaulUpon completion, 1437e6f9ad07SBill Paul.Fa xprt\->xp_fd 1438e6f9ad07SBill Paulis the transport's socket descriptor. 1439e6f9ad07SBill PaulThis routine returns 1440e6f9ad07SBill Paul.Dv NULL 1441e6f9ad07SBill Paulif it fails. 1442e6f9ad07SBill PaulSince 1443e6f9ad07SBill Paul.Tn UNIX Ns \-based 1444e6f9ad07SBill Paul.Tn RPC 1445e6f9ad07SBill Pauluses buffered 1446e6f9ad07SBill Paul.Tn I/O , 1447e6f9ad07SBill Paulusers may specify the size of buffers; values of zero 1448e6f9ad07SBill Paulchoose suitable defaults. 1449e6f9ad07SBill Paul.Pp 1450e6f9ad07SBill Paul.It Xo 1451e6f9ad07SBill Paul.Ft "SVCXPRT *" 1452e6f9ad07SBill Paul.Xc 1453e6f9ad07SBill Paul.It Xo 1454e6f9ad07SBill Paul.Fn svcunixfd_create "int fd" "u_int sendsize" "u_int recvsize" 1455e6f9ad07SBill Paul.Xc 1456e6f9ad07SBill Paul.Pp 1457e6f9ad07SBill PaulCreate a service on top of any open descriptor. 1458e6f9ad07SBill Paul.Fa sendsize 1459e6f9ad07SBill Pauland 1460e6f9ad07SBill Paul.Fa recvsize 1461e6f9ad07SBill Paulindicate sizes for the send and receive buffers. 1462e6f9ad07SBill PaulIf they are 1463e6f9ad07SBill Paulzero, a reasonable default is chosen. 1464e6f9ad07SBill Paul.Pp 1465e6f9ad07SBill Paul.It Xo 1466e6f9ad07SBill Paul.Ft "SVCXPRT *" 1467e6f9ad07SBill Paul.Xc 1468e6f9ad07SBill Paul.It Xo 146923601548SRuslan Ermilov.Fn svcfd_create "int fd" "u_int sendsize" "u_int recvsize" 147023601548SRuslan Ermilov.Xc 147123601548SRuslan Ermilov.Pp 147223601548SRuslan ErmilovCreate a service on top of any open descriptor. 147323601548SRuslan ErmilovTypically, 14748360efbdSAlfred Perlsteinthis 14758360efbdSAlfred Perlsteindescriptor is a connected socket for a stream protocol such 14768360efbdSAlfred Perlsteinas 147723601548SRuslan Ermilov.Tn TCP . 147823601548SRuslan Ermilov.Fa sendsize 14798360efbdSAlfred Perlsteinand 148023601548SRuslan Ermilov.Fa recvsize 148123601548SRuslan Ermilovindicate sizes for the send and receive buffers. 148223601548SRuslan ErmilovIf they are 14838360efbdSAlfred Perlsteinzero, a reasonable default is chosen. 148423601548SRuslan Ermilov.Pp 148523601548SRuslan Ermilov.It Xo 148623601548SRuslan Ermilov.Ft "SVCXPRT *" 148723601548SRuslan Ermilov.Xc 148823601548SRuslan Ermilov.It Xo 148923601548SRuslan Ermilov.Fn svcudp_bufcreate "int sock" "u_int sendsize" "u_int recvsize" 149023601548SRuslan Ermilov.Xc 149123601548SRuslan Ermilov.Pp 14928360efbdSAlfred PerlsteinThis routine creates a 149323601548SRuslan Ermilov.Tn UDP/IP Ns \-based 149423601548SRuslan Ermilov.Tn RPC 14958360efbdSAlfred Perlsteinservice transport, to which it returns a pointer. 14968360efbdSAlfred PerlsteinThe transport is associated with the socket 149723601548SRuslan Ermilov.Fa sock , 14988360efbdSAlfred Perlsteinwhich may be 149923601548SRuslan Ermilov.Dv RPC_ANYSOCK , 15008360efbdSAlfred Perlsteinin which case a new socket is created. 15018360efbdSAlfred PerlsteinIf the socket is not bound to a local 150223601548SRuslan Ermilov.Tn UDP 150323601548SRuslan Ermilovport, then this routine binds it to an arbitrary port. 150423601548SRuslan ErmilovUpon 15058360efbdSAlfred Perlsteincompletion, 150623601548SRuslan Ermilov.Fa xprt\->xp_fd 15078360efbdSAlfred Perlsteinis the transport's socket descriptor, and 150823601548SRuslan Ermilov.Fa xprt\->xp_port 15098360efbdSAlfred Perlsteinis the transport's port number. 15108360efbdSAlfred PerlsteinThis routine returns 151123601548SRuslan Ermilov.Dv NULL 15128360efbdSAlfred Perlsteinif it fails. 151323601548SRuslan Ermilov.Pp 15148360efbdSAlfred PerlsteinThis allows the user to specify the maximum packet size for sending and 15158360efbdSAlfred Perlsteinreceiving 151623601548SRuslan Ermilov.Tn UDP Ns \-based 151723601548SRuslan Ermilov.Tn RPC 151823601548SRuslan Ermilovmessages. 151923601548SRuslan Ermilov.Pp 152023601548SRuslan Ermilov.It Xo 152123601548SRuslan Ermilov.Ft bool_t 152223601548SRuslan Ermilov.Fn xdr_accepted_reply "XDR *xdrs" "struct accepted_reply *ar" 152323601548SRuslan Ermilov.Xc 152423601548SRuslan Ermilov.Pp 15258360efbdSAlfred PerlsteinUsed for encoding 152623601548SRuslan Ermilov.Tn RPC 152723601548SRuslan Ermilovreply messages. 152823601548SRuslan ErmilovThis routine is useful for users who 15298360efbdSAlfred Perlsteinwish to generate 153023601548SRuslan Ermilov.Tn RPC Ns \-style 15318360efbdSAlfred Perlsteinmessages without using the 153223601548SRuslan Ermilov.Tn RPC 15338360efbdSAlfred Perlsteinpackage. 153423601548SRuslan Ermilov.Pp 153523601548SRuslan Ermilov.It Xo 153623601548SRuslan Ermilov.Ft bool_t 153723601548SRuslan Ermilov.Fn xdr_authunix_parms "XDR *xdrs" "struct authunix_parms *aupp" 153823601548SRuslan Ermilov.Xc 153923601548SRuslan Ermilov.Pp 15408360efbdSAlfred PerlsteinUsed for describing 154123601548SRuslan Ermilov.Ux 154223601548SRuslan Ermilovcredentials. 154323601548SRuslan ErmilovThis routine is useful for users 15448360efbdSAlfred Perlsteinwho wish to generate these credentials without using the 154523601548SRuslan Ermilov.Tn RPC 15468360efbdSAlfred Perlsteinauthentication package. 154723601548SRuslan Ermilov.Pp 154823601548SRuslan Ermilov.It Xo 154923601548SRuslan Ermilov.Ft void 155023601548SRuslan Ermilov.Xc 155123601548SRuslan Ermilov.It Xo 155223601548SRuslan Ermilov.Ft bool_t 155323601548SRuslan Ermilov.Fn xdr_callhdr "XDR *xdrs" "struct rpc_msg *chdr" 155423601548SRuslan Ermilov.Xc 155523601548SRuslan Ermilov.Pp 15568360efbdSAlfred PerlsteinUsed for describing 155723601548SRuslan Ermilov.Tn RPC 15588360efbdSAlfred Perlsteincall header messages. 15598360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 156023601548SRuslan Ermilov.Tn RPC Ns \-style 15618360efbdSAlfred Perlsteinmessages without using the 156223601548SRuslan Ermilov.Tn RPC 15638360efbdSAlfred Perlsteinpackage. 156423601548SRuslan Ermilov.Pp 156523601548SRuslan Ermilov.It Xo 156623601548SRuslan Ermilov.Ft bool_t 156723601548SRuslan Ermilov.Fn xdr_callmsg "XDR *xdrs" "struct rpc_msg *cmsg" 156823601548SRuslan Ermilov.Xc 156923601548SRuslan Ermilov.Pp 15708360efbdSAlfred PerlsteinUsed for describing 157123601548SRuslan Ermilov.Tn RPC 15728360efbdSAlfred Perlsteincall messages. 15738360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 157423601548SRuslan Ermilov.Tn RPC Ns \-style 15758360efbdSAlfred Perlsteinmessages without using the 157623601548SRuslan Ermilov.Tn RPC 15778360efbdSAlfred Perlsteinpackage. 157823601548SRuslan Ermilov.Pp 157923601548SRuslan Ermilov.It Xo 158023601548SRuslan Ermilov.Ft bool_t 158123601548SRuslan Ermilov.Fn xdr_opaque_auth "XDR *xdrs" "struct opaque_auth *ap" 158223601548SRuslan Ermilov.Xc 158323601548SRuslan Ermilov.Pp 15848360efbdSAlfred PerlsteinUsed for describing 158523601548SRuslan Ermilov.Tn RPC 15868360efbdSAlfred Perlsteinauthentication information messages. 15878360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 158823601548SRuslan Ermilov.Tn RPC Ns \-style 15898360efbdSAlfred Perlsteinmessages without using the 159023601548SRuslan Ermilov.Tn RPC 15918360efbdSAlfred Perlsteinpackage. 159223601548SRuslan Ermilov.Pp 159323601548SRuslan Ermilov.It Xo 159423601548SRuslan Ermilov.Vt struct pmap ; 159523601548SRuslan Ermilov.Xc 159623601548SRuslan Ermilov.It Xo 159723601548SRuslan Ermilov.Ft bool_t 159823601548SRuslan Ermilov.Fn xdr_pmap "XDR *xdrs" "struct pmap *regs" 159923601548SRuslan Ermilov.Xc 160023601548SRuslan Ermilov.Pp 16018360efbdSAlfred PerlsteinUsed for describing parameters to various 16028657581bSMaxim Sobolev.Xr rpcbind 8 16038360efbdSAlfred Perlsteinprocedures, externally. 16048360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 16058360efbdSAlfred Perlsteinthese parameters without using the 160623601548SRuslan Ermilov.Fn pmap_* 16078360efbdSAlfred Perlsteininterface. 160823601548SRuslan Ermilov.Pp 160923601548SRuslan Ermilov.It Xo 161023601548SRuslan Ermilov.Ft bool_t 161123601548SRuslan Ermilov.Fn xdr_pmaplist "XDR *xdrs" "struct pmaplist **rp" 161223601548SRuslan Ermilov.Xc 161323601548SRuslan Ermilov.Pp 16148360efbdSAlfred PerlsteinUsed for describing a list of port mappings, externally. 16158360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 16168360efbdSAlfred Perlsteinthese parameters without using the 161723601548SRuslan Ermilov.Fn pmap_* 16188360efbdSAlfred Perlsteininterface. 161923601548SRuslan Ermilov.Pp 162023601548SRuslan Ermilov.It Xo 162123601548SRuslan Ermilov.Ft bool_t 162223601548SRuslan Ermilov.Fn xdr_rejected_reply "XDR *xdrs" "struct rejected_reply *rr" 162323601548SRuslan Ermilov.Xc 162423601548SRuslan Ermilov.Pp 16258360efbdSAlfred PerlsteinUsed for describing 162623601548SRuslan Ermilov.Tn RPC 16278360efbdSAlfred Perlsteinreply messages. 16288360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 162923601548SRuslan Ermilov.Tn RPC Ns \-style 16308360efbdSAlfred Perlsteinmessages without using the 163123601548SRuslan Ermilov.Tn RPC 16328360efbdSAlfred Perlsteinpackage. 163323601548SRuslan Ermilov.Pp 163423601548SRuslan Ermilov.It Xo 163523601548SRuslan Ermilov.Ft bool_t 163623601548SRuslan Ermilov.Fn xdr_replymsg "XDR *xdrs" "struct rpc_msg *rmsg" 163723601548SRuslan Ermilov.Xc 163823601548SRuslan Ermilov.Pp 16398360efbdSAlfred PerlsteinUsed for describing 164023601548SRuslan Ermilov.Tn RPC 16418360efbdSAlfred Perlsteinreply messages. 16428360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 164323601548SRuslan Ermilov.Tn RPC 16448360efbdSAlfred Perlsteinstyle messages without using the 164523601548SRuslan Ermilov.Tn RPC 16468360efbdSAlfred Perlsteinpackage. 164723601548SRuslan Ermilov.Pp 164823601548SRuslan Ermilov.It Xo 164923601548SRuslan Ermilov.Ft void 165023601548SRuslan Ermilov.Xc 165123601548SRuslan Ermilov.It Xo 165223601548SRuslan Ermilov.Fn xprt_register "SVCXPRT *xprt" 165323601548SRuslan Ermilov.Xc 165423601548SRuslan Ermilov.Pp 16558360efbdSAlfred PerlsteinAfter 165623601548SRuslan Ermilov.Tn RPC 16578360efbdSAlfred Perlsteinservice transport handles are created, 16588360efbdSAlfred Perlsteinthey should register themselves with the 165923601548SRuslan Ermilov.Tn RPC 16608360efbdSAlfred Perlsteinservice package. 16618360efbdSAlfred PerlsteinThis routine modifies the global variable 166223601548SRuslan Ermilov.Va svc_fds . 16638360efbdSAlfred PerlsteinService implementors usually do not need this routine. 166423601548SRuslan Ermilov.Pp 166523601548SRuslan Ermilov.It Xo 166623601548SRuslan Ermilov.Ft void 166723601548SRuslan Ermilov.Xc 166823601548SRuslan Ermilov.It Xo 166923601548SRuslan Ermilov.Fn xprt_unregister "SVCXPRT *xprt" 167023601548SRuslan Ermilov.Xc 167123601548SRuslan Ermilov.Pp 16728360efbdSAlfred PerlsteinBefore an 167323601548SRuslan Ermilov.Tn RPC 16748360efbdSAlfred Perlsteinservice transport handle is destroyed, 16758360efbdSAlfred Perlsteinit should unregister itself with the 167623601548SRuslan Ermilov.Tn RPC 16778360efbdSAlfred Perlsteinservice package. 16788360efbdSAlfred PerlsteinThis routine modifies the global variable 167923601548SRuslan Ermilov.Va svc_fds . 16808360efbdSAlfred PerlsteinService implementors usually do not need this routine. 168123601548SRuslan Ermilov.El 168223601548SRuslan Ermilov.Sh SEE ALSO 168323601548SRuslan Ermilov.Xr rpc_secure 3 , 168423601548SRuslan Ermilov.Xr xdr 3 168523601548SRuslan Ermilov.Rs 168623601548SRuslan Ermilov.%T "Remote Procedure Calls: Protocol Specification" 168723601548SRuslan Ermilov.Re 168823601548SRuslan Ermilov.Rs 168923601548SRuslan Ermilov.%T "Remote Procedure Call Programming Guide" 169023601548SRuslan Ermilov.Re 169123601548SRuslan Ermilov.Rs 169223601548SRuslan Ermilov.%T "rpcgen Programming Guide" 169323601548SRuslan Ermilov.Re 169423601548SRuslan Ermilov.Rs 169523601548SRuslan Ermilov.%T "RPC: Remote Procedure Call Protocol Specification" 169623601548SRuslan Ermilov.%O RFC1050 169723601548SRuslan Ermilov.%Q "Sun Microsystems, Inc., USC-ISI" 169823601548SRuslan Ermilov.Re 1699