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 5411fae73b1SRuslan ErmilovThe 54223601548SRuslan Ermilov.Fn clnt_sperrno 5431fae73b1SRuslan Ermilovfunction 5448360efbdSAlfred Perlsteinis used instead of 54523601548SRuslan Ermilov.Fn clnt_perrno 5468360efbdSAlfred Perlsteinif the program does not have a standard error (as a program 5478360efbdSAlfred Perlsteinrunning as a server quite likely does not), or if the 5488360efbdSAlfred Perlsteinprogrammer 5498360efbdSAlfred Perlsteindoes not want the message to be output with 55023601548SRuslan Ermilov.Fn printf , 55123601548SRuslan Ermilovor if a message format different from that supported by 55223601548SRuslan Ermilov.Fn clnt_perrno 5538360efbdSAlfred Perlsteinis to be used. 55423601548SRuslan Ermilov.Pp 5558360efbdSAlfred PerlsteinNote: unlike 55623601548SRuslan Ermilov.Fn clnt_sperror 5578360efbdSAlfred Perlsteinand 55823601548SRuslan Ermilov.Fn clnt_spcreateerror , 55923601548SRuslan Ermilov.Fn clnt_sperrno 5608360efbdSAlfred Perlsteinreturns pointer to static data, but the 5618360efbdSAlfred Perlsteinresult will not get overwritten on each call. 56223601548SRuslan Ermilov.Pp 56323601548SRuslan Ermilov.It Xo 56423601548SRuslan Ermilov.Ft "char *" 56523601548SRuslan Ermilov.Xc 56623601548SRuslan Ermilov.It Xo 56723601548SRuslan Ermilov.Fn clnt_sperror "CLIENT *rpch" "char *s" 56823601548SRuslan Ermilov.Xc 56923601548SRuslan Ermilov.Pp 5708360efbdSAlfred PerlsteinLike 57123601548SRuslan Ermilov.Fn clnt_perror , 5728360efbdSAlfred Perlsteinexcept that (like 57323601548SRuslan Ermilov.Fn clnt_sperrno ) 5748360efbdSAlfred Perlsteinit returns a string instead of printing to standard error. 57523601548SRuslan Ermilov.Pp 5768360efbdSAlfred PerlsteinBugs: returns pointer to static data that is overwritten 5778360efbdSAlfred Perlsteinon each call. 57823601548SRuslan Ermilov.Pp 57923601548SRuslan Ermilov.It Xo 58023601548SRuslan Ermilov.Ft "CLIENT *" 58123601548SRuslan Ermilov.Xc 58223601548SRuslan Ermilov.It Xo 58323601548SRuslan Ermilov.Fn clntraw_create "u_long prognum" "u_long versnum" 58423601548SRuslan Ermilov.Xc 58523601548SRuslan Ermilov.Pp 5868360efbdSAlfred PerlsteinThis routine creates a toy 58723601548SRuslan Ermilov.Tn RPC 5888360efbdSAlfred Perlsteinclient for the remote program 58923601548SRuslan Ermilov.Fa prognum , 5908360efbdSAlfred Perlsteinversion 59123601548SRuslan Ermilov.Fa versnum . 5928360efbdSAlfred PerlsteinThe transport used to pass messages to the service is 5938360efbdSAlfred Perlsteinactually a buffer within the process's address space, so the 5948360efbdSAlfred Perlsteincorresponding 59523601548SRuslan Ermilov.Tn RPC 5968360efbdSAlfred Perlsteinserver should live in the same address space; see 59723601548SRuslan Ermilov.Fn svcraw_create . 5988360efbdSAlfred PerlsteinThis allows simulation of 59923601548SRuslan Ermilov.Tn RPC 6008360efbdSAlfred Perlsteinand acquisition of 60123601548SRuslan Ermilov.Tn RPC 6028360efbdSAlfred Perlsteinoverheads, such as round trip times, without any 60323601548SRuslan Ermilovkernel interference. 60423601548SRuslan ErmilovThis routine returns 60523601548SRuslan Ermilov.Dv NULL 6068360efbdSAlfred Perlsteinif it fails. 60723601548SRuslan Ermilov.Pp 60823601548SRuslan Ermilov.It Xo 60923601548SRuslan Ermilov.Ft "CLIENT *" 61023601548SRuslan Ermilov.Xc 61123601548SRuslan Ermilov.It Xo 61223601548SRuslan Ermilov.Fo clnttcp_create 61323601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 61423601548SRuslan Ermilov.Fa "u_long prognum" 61523601548SRuslan Ermilov.Fa "u_long versnum" 61623601548SRuslan Ermilov.Fa "int *sockp" 61723601548SRuslan Ermilov.Fa "u_int sendsz" 61823601548SRuslan Ermilov.Fa "u_int recvsz" 61923601548SRuslan Ermilov.Fc 62023601548SRuslan Ermilov.Xc 62123601548SRuslan Ermilov.Pp 6228360efbdSAlfred PerlsteinThis routine creates an 62323601548SRuslan Ermilov.Tn RPC 6248360efbdSAlfred Perlsteinclient for the remote program 62523601548SRuslan Ermilov.Fa prognum , 6268360efbdSAlfred Perlsteinversion 62723601548SRuslan Ermilov.Fa versnum ; 6288360efbdSAlfred Perlsteinthe client uses 62923601548SRuslan Ermilov.Tn TCP/IP 63023601548SRuslan Ermilovas a transport. 63123601548SRuslan ErmilovThe remote program is located at Internet 6328360efbdSAlfred Perlsteinaddress 63323601548SRuslan Ermilov.Fa addr . 6348360efbdSAlfred PerlsteinIf 63523601548SRuslan Ermilov.Fa addr\->sin_port 6368360efbdSAlfred Perlsteinis zero, then it is set to the actual port that the remote 6378360efbdSAlfred Perlsteinprogram is listening on (the remote 6388657581bSMaxim Sobolev.Xr rpcbind 8 63923601548SRuslan Ermilovservice is consulted for this information). 64023601548SRuslan ErmilovThe parameter 64123601548SRuslan Ermilov.Fa sockp 6428360efbdSAlfred Perlsteinis a socket; if it is 64323601548SRuslan Ermilov.Dv RPC_ANYSOCK , 6448360efbdSAlfred Perlsteinthen this routine opens a new one and sets 64523601548SRuslan Ermilov.Fa sockp . 6468360efbdSAlfred PerlsteinSince 64723601548SRuslan Ermilov.Tn TCP Ns \-based 64823601548SRuslan Ermilov.Tn RPC 6498360efbdSAlfred Perlsteinuses buffered 65023601548SRuslan Ermilov.Tn I/O , 6518360efbdSAlfred Perlsteinthe user may specify the size of the send and receive buffers 6528360efbdSAlfred Perlsteinwith the parameters 65323601548SRuslan Ermilov.Fa sendsz 6548360efbdSAlfred Perlsteinand 65523601548SRuslan Ermilov.Fa recvsz ; 6568360efbdSAlfred Perlsteinvalues of zero choose suitable defaults. 6578360efbdSAlfred PerlsteinThis routine returns 65823601548SRuslan Ermilov.Dv NULL 6598360efbdSAlfred Perlsteinif it fails. 66023601548SRuslan Ermilov.Pp 66123601548SRuslan Ermilov.It Xo 66223601548SRuslan Ermilov.Ft "CLIENT *" 66323601548SRuslan Ermilov.Xc 66423601548SRuslan Ermilov.It Xo 66523601548SRuslan Ermilov.Fo clntudp_create 66623601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 66723601548SRuslan Ermilov.Fa "u_long prognum" 66823601548SRuslan Ermilov.Fa "u_long versnum" 66923601548SRuslan Ermilov.Fa "struct timeval wait" 67023601548SRuslan Ermilov.Fa "int *sockp" 67123601548SRuslan Ermilov.Fc 67223601548SRuslan Ermilov.Xc 67323601548SRuslan Ermilov.Pp 6748360efbdSAlfred PerlsteinThis routine creates an 67523601548SRuslan Ermilov.Tn RPC 6768360efbdSAlfred Perlsteinclient for the remote program 67723601548SRuslan Ermilov.Fa prognum , 6788360efbdSAlfred Perlsteinversion 67923601548SRuslan Ermilov.Fa versnum ; 68023601548SRuslan Ermilovthe client uses 68123601548SRuslan Ermilov.Tn UDP/IP 68223601548SRuslan Ermilovas a transport. 68323601548SRuslan ErmilovThe remote program is located at Internet 6848360efbdSAlfred Perlsteinaddress 68523601548SRuslan Ermilov.Fa addr . 6868360efbdSAlfred PerlsteinIf 68723601548SRuslan Ermilov.Fa addr\->sin_port 6888360efbdSAlfred Perlsteinis zero, then it is set to actual port that the remote 6898360efbdSAlfred Perlsteinprogram is listening on (the remote 6908657581bSMaxim Sobolev.Xr rpcbind 8 69123601548SRuslan Ermilovservice is consulted for this information). 69223601548SRuslan ErmilovThe parameter 69323601548SRuslan Ermilov.Fa sockp 6948360efbdSAlfred Perlsteinis a socket; if it is 69523601548SRuslan Ermilov.Dv RPC_ANYSOCK , 6968360efbdSAlfred Perlsteinthen this routine opens a new one and sets 69723601548SRuslan Ermilov.Fa sockp . 6988360efbdSAlfred PerlsteinThe 69923601548SRuslan Ermilov.Tn UDP 7008360efbdSAlfred Perlsteintransport resends the call message in intervals of 70123601548SRuslan Ermilov.Fa wait 7028360efbdSAlfred Perlsteintime until a response is received or until the call times 7038360efbdSAlfred Perlsteinout. 7048360efbdSAlfred PerlsteinThe total time for the call to time out is specified by 70523601548SRuslan Ermilov.Fn clnt_call . 70623601548SRuslan Ermilov.Pp 7078360efbdSAlfred PerlsteinWarning: since 70823601548SRuslan Ermilov.Tn UDP Ns \-based 70923601548SRuslan Ermilov.Tn RPC 7108360efbdSAlfred Perlsteinmessages can only hold up to 8 Kbytes 7118360efbdSAlfred Perlsteinof encoded data, this transport cannot be used for procedures 7128360efbdSAlfred Perlsteinthat take large arguments or return huge results. 71323601548SRuslan Ermilov.Pp 71423601548SRuslan Ermilov.It Xo 71523601548SRuslan Ermilov.Ft "CLIENT *" 71623601548SRuslan Ermilov.Xc 71723601548SRuslan Ermilov.It Xo 71823601548SRuslan Ermilov.Fo clntudp_bufcreate 71923601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 72023601548SRuslan Ermilov.Fa "u_long prognum" 72123601548SRuslan Ermilov.Fa "u_long versnum" 72223601548SRuslan Ermilov.Fa "struct timeval wait" 72323601548SRuslan Ermilov.Fa "int *sockp" 72423601548SRuslan Ermilov.Fa "unsigned int sendsize" 72523601548SRuslan Ermilov.Fa "unsigned int recosize" 72623601548SRuslan Ermilov.Fc 72723601548SRuslan Ermilov.Xc 72823601548SRuslan Ermilov.Pp 7298360efbdSAlfred PerlsteinThis routine creates an 73023601548SRuslan Ermilov.Tn RPC 7318360efbdSAlfred Perlsteinclient for the remote program 73223601548SRuslan Ermilov.Fa prognum , 7338360efbdSAlfred Perlsteinon 73423601548SRuslan Ermilov.Fa versnum ; 73523601548SRuslan Ermilovthe client uses 73623601548SRuslan Ermilov.Tn UDP/IP 73723601548SRuslan Ermilovas a transport. 73823601548SRuslan ErmilovThe remote program is located at Internet 7398360efbdSAlfred Perlsteinaddress 74023601548SRuslan Ermilov.Fa addr . 7418360efbdSAlfred PerlsteinIf 74223601548SRuslan Ermilov.Fa addr\->sin_port 7438360efbdSAlfred Perlsteinis zero, then it is set to actual port that the remote 7448360efbdSAlfred Perlsteinprogram is listening on (the remote 7458657581bSMaxim Sobolev.Xr rpcbind 8 74623601548SRuslan Ermilovservice is consulted for this information). 74723601548SRuslan ErmilovThe parameter 74823601548SRuslan Ermilov.Fa sockp 7498360efbdSAlfred Perlsteinis a socket; if it is 75023601548SRuslan Ermilov.Dv RPC_ANYSOCK , 7518360efbdSAlfred Perlsteinthen this routine opens a new one and sets 75223601548SRuslan Ermilov.Fa sockp . 7538360efbdSAlfred PerlsteinThe 75423601548SRuslan Ermilov.Tn UDP 7558360efbdSAlfred Perlsteintransport resends the call message in intervals of 75623601548SRuslan Ermilov.Fa wait 7578360efbdSAlfred Perlsteintime until a response is received or until the call times 7588360efbdSAlfred Perlsteinout. 7598360efbdSAlfred PerlsteinThe total time for the call to time out is specified by 76023601548SRuslan Ermilov.Fn clnt_call . 76123601548SRuslan Ermilov.Pp 76223601548SRuslan ErmilovThis allows the user to specify the maximum packet size 76323601548SRuslan Ermilovfor sending and receiving 76423601548SRuslan Ermilov.Tn UDP Ns \-based 76523601548SRuslan Ermilov.Tn RPC 7668360efbdSAlfred Perlsteinmessages. 76723601548SRuslan Ermilov.Pp 76823601548SRuslan Ermilov.It Xo 769e6f9ad07SBill Paul.Ft "CLIENT *" 770e6f9ad07SBill Paul.Xc 771e6f9ad07SBill Paul.It Xo 772e6f9ad07SBill Paul.Fo clntunix_create 773e6f9ad07SBill Paul.Fa "struct sockaddr_un *raddr" 774e6f9ad07SBill Paul.Fa "u_long prognum" 775e6f9ad07SBill Paul.Fa "u_long versnum" 776e6f9ad07SBill Paul.Fa "int *sockp" 777e6f9ad07SBill Paul.Fa "u_int sendsz" 778e6f9ad07SBill Paul.Fa "u_int recvsz" 779e6f9ad07SBill Paul.Fc 780e6f9ad07SBill Paul.Xc 781e6f9ad07SBill Paul.Pp 782e6f9ad07SBill PaulThis routine creates an 783e6f9ad07SBill Paul.Tn RPC 784e6f9ad07SBill Paulclient for the local 785e6f9ad07SBill Paulprogram 786e6f9ad07SBill Paul.Fa prognum , 787e6f9ad07SBill Paulversion 788e6f9ad07SBill Paul.Fa versnum ; 789e6f9ad07SBill Paulthe client uses 790872013cbSRuslan Ermilov.Ux Ns -domain 791e6f9ad07SBill Paulsockets as a transport. 792e6f9ad07SBill PaulThe local program is located at the 793e6f9ad07SBill Paul.Fa *raddr . 794e6f9ad07SBill PaulThe parameter 795e6f9ad07SBill Paul.Fa sockp 796e6f9ad07SBill Paulis a socket; if it is 797e6f9ad07SBill Paul.Dv RPC_ANYSOCK , 798e6f9ad07SBill Paulthen this routine opens a new one and sets 799e6f9ad07SBill Paul.Fa sockp . 800e6f9ad07SBill PaulSince 801872013cbSRuslan Ermilov.Ux Ns -based 802e6f9ad07SBill Paul.Tn RPC 803e6f9ad07SBill Pauluses buffered 804e6f9ad07SBill Paul.Tn I/O , 805e6f9ad07SBill Paulthe user may specify the size of the send and receive buffers 806e6f9ad07SBill Paulwith the parameters 807e6f9ad07SBill Paul.Fa sendsz 808e6f9ad07SBill Pauland 809e6f9ad07SBill Paul.Fa recvsz ; 810e6f9ad07SBill Paulvalues of zero choose suitable defaults. 811e6f9ad07SBill PaulThis routine returns 812e6f9ad07SBill Paul.Dv NULL 813e6f9ad07SBill Paulif it fails. 814e6f9ad07SBill Paul.Pp 815e6f9ad07SBill Paul.It Xo 81623601548SRuslan Ermilov.Ft int 81723601548SRuslan Ermilov.Xc 81823601548SRuslan Ermilov.It Xo 81923601548SRuslan Ermilov.Fn get_myaddress "struct sockaddr_in *addr" 82023601548SRuslan Ermilov.Xc 82123601548SRuslan Ermilov.Pp 8228360efbdSAlfred PerlsteinStuff the machine's 82323601548SRuslan Ermilov.Tn IP 8248360efbdSAlfred Perlsteinaddress into 82523601548SRuslan Ermilov.Fa addr , 8268360efbdSAlfred Perlsteinwithout consulting the library routines that deal with 82723601548SRuslan Ermilov.Pa /etc/hosts . 8288360efbdSAlfred PerlsteinThe port number is always set to 82923601548SRuslan Ermilov.Fn htons PMAPPORT . 8308360efbdSAlfred PerlsteinReturns zero on success, non-zero on failure. 83123601548SRuslan Ermilov.Pp 83223601548SRuslan Ermilov.It Xo 83323601548SRuslan Ermilov.Ft "struct pmaplist *" 83423601548SRuslan Ermilov.Xc 83523601548SRuslan Ermilov.It Xo 83623601548SRuslan Ermilov.Fn pmap_getmaps "struct sockaddr_in *addr" 83723601548SRuslan Ermilov.Xc 83823601548SRuslan Ermilov.Pp 8398360efbdSAlfred PerlsteinA user interface to the 8408657581bSMaxim Sobolev.Xr rpcbind 8 8418360efbdSAlfred Perlsteinservice, which returns a list of the current 84223601548SRuslan Ermilov.Tn RPC 84323601548SRuslan Ermilovprogram\-to\-port mappings 8448360efbdSAlfred Perlsteinon the host located at 84523601548SRuslan Ermilov.Tn IP 8468360efbdSAlfred Perlsteinaddress 84723601548SRuslan Ermilov.Fa addr . 8488360efbdSAlfred PerlsteinThis routine can return 84923601548SRuslan Ermilov.Dv NULL . 8508360efbdSAlfred PerlsteinThe command 85123601548SRuslan Ermilov.Dq Nm rpcinfo Fl p 8528360efbdSAlfred Perlsteinuses this routine. 85323601548SRuslan Ermilov.Pp 85423601548SRuslan Ermilov.It Xo 85523601548SRuslan Ermilov.Ft u_short 85623601548SRuslan Ermilov.Xc 85723601548SRuslan Ermilov.It Xo 85823601548SRuslan Ermilov.Fo pmap_getport 85923601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 86023601548SRuslan Ermilov.Fa "u_long prognum" 86123601548SRuslan Ermilov.Fa "u_long versnum" 86223601548SRuslan Ermilov.Fa "u_long protocol" 86323601548SRuslan Ermilov.Fc 86423601548SRuslan Ermilov.Xc 86523601548SRuslan Ermilov.Pp 8668360efbdSAlfred PerlsteinA user interface to the 8678657581bSMaxim Sobolev.Xr rpcbind 8 8688360efbdSAlfred Perlsteinservice, which returns the port number 8698360efbdSAlfred Perlsteinon which waits a service that supports program number 87023601548SRuslan Ermilov.Fa prognum , 8718360efbdSAlfred Perlsteinversion 87223601548SRuslan Ermilov.Fa versnum , 8738360efbdSAlfred Perlsteinand speaks the transport protocol associated with 87423601548SRuslan Ermilov.Fa protocol . 8758360efbdSAlfred PerlsteinThe value of 87623601548SRuslan Ermilov.Fa protocol 8778360efbdSAlfred Perlsteinis most likely 87823601548SRuslan Ermilov.Dv IPPROTO_UDP 8798360efbdSAlfred Perlsteinor 88023601548SRuslan Ermilov.Dv IPPROTO_TCP . 8818360efbdSAlfred PerlsteinA return value of zero means that the mapping does not exist 8828360efbdSAlfred Perlsteinor that 8838360efbdSAlfred Perlsteinthe 88423601548SRuslan Ermilov.Tn RPC 88523601548SRuslan Ermilovsystem failed to contact the remote 8868657581bSMaxim Sobolev.Xr rpcbind 8 88723601548SRuslan Ermilovservice. 88823601548SRuslan ErmilovIn the latter case, the global variable 88923601548SRuslan Ermilov.Va rpc_createerr 8908360efbdSAlfred Perlsteincontains the 89123601548SRuslan Ermilov.Tn RPC 8928360efbdSAlfred Perlsteinstatus. 89323601548SRuslan Ermilov.Pp 89423601548SRuslan Ermilov.It Xo 89523601548SRuslan Ermilov.Ft "enum clnt_stat" 89623601548SRuslan Ermilov.Xc 89723601548SRuslan Ermilov.It Xo 89823601548SRuslan Ermilov.Fo pmap_rmtcall 89923601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 90023601548SRuslan Ermilov.Fa "u_long prognum" 90123601548SRuslan Ermilov.Fa "u_long versnum" 90223601548SRuslan Ermilov.Fa "u_long procnum" 90323601548SRuslan Ermilov.Fa "xdrproc_t inproc" 90423601548SRuslan Ermilov.Fa "char *in" 90523601548SRuslan Ermilov.Fa "xdrproc_t outproc" 90623601548SRuslan Ermilov.Fa "char *out" 90723601548SRuslan Ermilov.Fa "struct timeval tout" 90823601548SRuslan Ermilov.Fa "u_long *portp" 90923601548SRuslan Ermilov.Fc 91023601548SRuslan Ermilov.Xc 91123601548SRuslan Ermilov.Pp 9128360efbdSAlfred PerlsteinA user interface to the 9138657581bSMaxim Sobolev.Xr rpcbind 8 9148360efbdSAlfred Perlsteinservice, which instructs 9158657581bSMaxim Sobolev.Xr rpcbind 8 9168360efbdSAlfred Perlsteinon the host at 91723601548SRuslan Ermilov.Tn IP 9188360efbdSAlfred Perlsteinaddress 91923601548SRuslan Ermilov.Fa addr 9208360efbdSAlfred Perlsteinto make an 92123601548SRuslan Ermilov.Tn RPC 9228360efbdSAlfred Perlsteincall on your behalf to a procedure on that host. 9238360efbdSAlfred PerlsteinThe parameter 92423601548SRuslan Ermilov.Fa portp 9258360efbdSAlfred Perlsteinwill be modified to the program's port number if the 9268360efbdSAlfred Perlsteinprocedure 92723601548SRuslan Ermilovsucceeds. 92823601548SRuslan ErmilovThe definitions of other parameters are discussed 9298360efbdSAlfred Perlsteinin 93023601548SRuslan Ermilov.Fn callrpc 9318360efbdSAlfred Perlsteinand 93223601548SRuslan Ermilov.Fn clnt_call . 93323601548SRuslan ErmilovThis procedure should be used for a 93423601548SRuslan Ermilov.Dq ping 93523601548SRuslan Ermilovand nothing 9368360efbdSAlfred Perlsteinelse. 9378360efbdSAlfred PerlsteinSee also 93823601548SRuslan Ermilov.Fn clnt_broadcast . 93923601548SRuslan Ermilov.Pp 94023601548SRuslan Ermilov.It Xo 94123601548SRuslan Ermilov.Ft bool_t 94223601548SRuslan Ermilov.Fn pmap_set "u_long prognum" "u_long versnum" "u_long protocol" "u_short port" 94323601548SRuslan Ermilov.Xc 94423601548SRuslan Ermilov.Pp 9458360efbdSAlfred PerlsteinA user interface to the 9468657581bSMaxim Sobolev.Xr rpcbind 8 9478360efbdSAlfred Perlsteinservice, which establishes a mapping between the triple 94823601548SRuslan Ermilov.Pq Fa prognum , versnum , protocol 9498360efbdSAlfred Perlsteinand 95023601548SRuslan Ermilov.Fa port 9518360efbdSAlfred Perlsteinon the machine's 9528657581bSMaxim Sobolev.Xr rpcbind 8 95323601548SRuslan Ermilovservice. 95423601548SRuslan ErmilovThe value of 95523601548SRuslan Ermilov.Fa protocol 9568360efbdSAlfred Perlsteinis most likely 95723601548SRuslan Ermilov.Dv IPPROTO_UDP 9588360efbdSAlfred Perlsteinor 95923601548SRuslan Ermilov.Dv IPPROTO_TCP . 9608360efbdSAlfred PerlsteinThis routine returns one if it succeeds, zero otherwise. 9618360efbdSAlfred PerlsteinAutomatically done by 96223601548SRuslan Ermilov.Fn svc_register . 96323601548SRuslan Ermilov.Pp 96423601548SRuslan Ermilov.It Xo 96523601548SRuslan Ermilov.Ft bool_t 96623601548SRuslan Ermilov.Fn pmap_unset "u_long prognum" "u_long versnum" 96723601548SRuslan Ermilov.Xc 96823601548SRuslan Ermilov.Pp 9698360efbdSAlfred PerlsteinA user interface to the 9708657581bSMaxim Sobolev.Xr rpcbind 8 9718360efbdSAlfred Perlsteinservice, which destroys all mapping between the triple 97223601548SRuslan Ermilov.Pq Fa prognum , versnum , * 9738360efbdSAlfred Perlsteinand 97423601548SRuslan Ermilov.Fa ports 9758360efbdSAlfred Perlsteinon the machine's 9768657581bSMaxim Sobolev.Xr rpcbind 8 97723601548SRuslan Ermilovservice. 97823601548SRuslan ErmilovThis routine returns one if it succeeds, zero 9798360efbdSAlfred Perlsteinotherwise. 98023601548SRuslan Ermilov.Pp 98123601548SRuslan Ermilov.It Xo 98223601548SRuslan Ermilov.Ft bool_t 98323601548SRuslan Ermilov.Fo registerrpc 98423601548SRuslan Ermilov.Fa "u_long prognum" 98523601548SRuslan Ermilov.Fa "u_long versnum" 98623601548SRuslan Ermilov.Fa "u_long procnum" 98723601548SRuslan Ermilov.Fa "char *(*procname)(void)" 98823601548SRuslan Ermilov.Fa "xdrproc_t inproc" 98923601548SRuslan Ermilov.Fa "xdrproc_t outproc" 99023601548SRuslan Ermilov.Fc 99123601548SRuslan Ermilov.Xc 99223601548SRuslan Ermilov.Pp 9938360efbdSAlfred PerlsteinRegister procedure 99423601548SRuslan Ermilov.Fa procname 9958360efbdSAlfred Perlsteinwith the 99623601548SRuslan Ermilov.Tn RPC 99723601548SRuslan Ermilovservice package. 99823601548SRuslan ErmilovIf a request arrives for program 99923601548SRuslan Ermilov.Fa prognum , 10008360efbdSAlfred Perlsteinversion 100123601548SRuslan Ermilov.Fa versnum , 10028360efbdSAlfred Perlsteinand procedure 100323601548SRuslan Ermilov.Fa procnum , 100423601548SRuslan Ermilov.Fa procname 10058360efbdSAlfred Perlsteinis called with a pointer to its parameter(s); 100623601548SRuslan Ermilov.Fa progname 10078360efbdSAlfred Perlsteinshould return a pointer to its static result(s); 100823601548SRuslan Ermilov.Fa inproc 10098360efbdSAlfred Perlsteinis used to decode the parameters while 101023601548SRuslan Ermilov.Fa outproc 10118360efbdSAlfred Perlsteinis used to encode the results. 10128360efbdSAlfred PerlsteinThis routine returns zero if the registration succeeded, \-1 10138360efbdSAlfred Perlsteinotherwise. 101423601548SRuslan Ermilov.Pp 10158360efbdSAlfred PerlsteinWarning: remote procedures registered in this form 10168360efbdSAlfred Perlsteinare accessed using the 101723601548SRuslan Ermilov.Tn UDP/IP 10188360efbdSAlfred Perlsteintransport; see 101923601548SRuslan Ermilov.Fn svcudp_create 10208360efbdSAlfred Perlsteinfor restrictions. 102123601548SRuslan Ermilov.Pp 102223601548SRuslan Ermilov.It Xo 102323601548SRuslan Ermilov.Vt "struct rpc_createerr" rpc_createerr ; 102423601548SRuslan Ermilov.Xc 102523601548SRuslan Ermilov.Pp 10268360efbdSAlfred PerlsteinA global variable whose value is set by any 102723601548SRuslan Ermilov.Tn RPC 10288360efbdSAlfred Perlsteinclient creation routine 102923601548SRuslan Ermilovthat does not succeed. 103023601548SRuslan ErmilovUse the routine 103123601548SRuslan Ermilov.Fn clnt_pcreateerror 10328360efbdSAlfred Perlsteinto print the reason why. 103323601548SRuslan Ermilov.Pp 103423601548SRuslan Ermilov.It Xo 103523601548SRuslan Ermilov.Ft bool_t 103623601548SRuslan Ermilov.Fn svc_destroy "SVCXPRT * xprt" 103723601548SRuslan Ermilov.Xc 103823601548SRuslan Ermilov.Pp 10398360efbdSAlfred PerlsteinA macro that destroys the 104023601548SRuslan Ermilov.Tn RPC 10418360efbdSAlfred Perlsteinservice transport handle, 104223601548SRuslan Ermilov.Fa xprt . 10438360efbdSAlfred PerlsteinDestruction usually involves deallocation 10448360efbdSAlfred Perlsteinof private data structures, including 104523601548SRuslan Ermilov.Fa xprt 104623601548SRuslan Ermilovitself. 104723601548SRuslan ErmilovUse of 104823601548SRuslan Ermilov.Fa xprt 10498360efbdSAlfred Perlsteinis undefined after calling this routine. 105023601548SRuslan Ermilov.Pp 105123601548SRuslan Ermilov.It Xo 105223601548SRuslan Ermilov.Vt fd_set svc_fdset ; 105323601548SRuslan Ermilov.Xc 105423601548SRuslan Ermilov.Pp 10558360efbdSAlfred PerlsteinA global variable reflecting the 105623601548SRuslan Ermilov.Tn RPC 10578360efbdSAlfred Perlsteinservice side's 105823601548SRuslan Ermilovread file descriptor bit mask; it is suitable as a template parameter 10598360efbdSAlfred Perlsteinto the 106023601548SRuslan Ermilov.Xr select 2 106123601548SRuslan Ermilovsystem call. 106223601548SRuslan ErmilovThis is only of interest 10638360efbdSAlfred Perlsteinif a service implementor does not call 106423601548SRuslan Ermilov.Fn svc_run , 10658360efbdSAlfred Perlsteinbut rather does his own asynchronous event processing. 106623601548SRuslan ErmilovThis variable is read\-only (do not pass its address to 106723601548SRuslan Ermilov.Xr select 2 ! ) , 10688360efbdSAlfred Perlsteinyet it may change after calls to 106923601548SRuslan Ermilov.Fn svc_getreqset 10708360efbdSAlfred Perlsteinor any creation routines. 107123601548SRuslan ErmilovAs well, note that if the process has descriptor limits 107223601548SRuslan Ermilovwhich are extended beyond 107323601548SRuslan Ermilov.Dv FD_SETSIZE , 107423601548SRuslan Ermilovthis variable will only be usable for the first 107523601548SRuslan Ermilov.Dv FD_SETSIZE 107623601548SRuslan Ermilovdescriptors. 107723601548SRuslan Ermilov.Pp 107823601548SRuslan Ermilov.It Xo 107923601548SRuslan Ermilov.Vt int svc_fds ; 108023601548SRuslan Ermilov.Xc 108123601548SRuslan Ermilov.Pp 10828360efbdSAlfred PerlsteinSimilar to 108323601548SRuslan Ermilov.Va svc_fdset , 108423601548SRuslan Ermilovbut limited to 32 descriptors. 108523601548SRuslan ErmilovThis 10868360efbdSAlfred Perlsteininterface is obsoleted by 108723601548SRuslan Ermilov.Va svc_fdset . 108823601548SRuslan Ermilov.Pp 108923601548SRuslan Ermilov.It Xo 109023601548SRuslan Ermilov.Ft bool_t 109123601548SRuslan Ermilov.Fn svc_freeargs "SVCXPRT *xprt" "xdrproc_t inproc" "char *in" 109223601548SRuslan Ermilov.Xc 109323601548SRuslan Ermilov.Pp 10948360efbdSAlfred PerlsteinA macro that frees any data allocated by the 109523601548SRuslan Ermilov.Tn RPC/XDR 10968360efbdSAlfred Perlsteinsystem when it decoded the arguments to a service procedure 10978360efbdSAlfred Perlsteinusing 109823601548SRuslan Ermilov.Fn svc_getargs . 10998360efbdSAlfred PerlsteinThis routine returns 1 if the results were successfully 11008360efbdSAlfred Perlsteinfreed, 11018360efbdSAlfred Perlsteinand zero otherwise. 110223601548SRuslan Ermilov.Pp 110323601548SRuslan Ermilov.It Xo 110423601548SRuslan Ermilov.Ft bool_t 110523601548SRuslan Ermilov.Fn svc_getargs "SVCXPRT *xprt" "xdrproc_t inproc" "char *in" 110623601548SRuslan Ermilov.Xc 110723601548SRuslan Ermilov.Pp 11088360efbdSAlfred PerlsteinA macro that decodes the arguments of an 110923601548SRuslan Ermilov.Tn RPC 11108360efbdSAlfred Perlsteinrequest 11118360efbdSAlfred Perlsteinassociated with the 111223601548SRuslan Ermilov.Tn RPC 11138360efbdSAlfred Perlsteinservice transport handle, 111423601548SRuslan Ermilov.Fa xprt . 11158360efbdSAlfred PerlsteinThe parameter 111623601548SRuslan Ermilov.Fa in 11178360efbdSAlfred Perlsteinis the address where the arguments will be placed; 111823601548SRuslan Ermilov.Fa inproc 11198360efbdSAlfred Perlsteinis the 112023601548SRuslan Ermilov.Tn XDR 11218360efbdSAlfred Perlsteinroutine used to decode the arguments. 11228360efbdSAlfred PerlsteinThis routine returns one if decoding succeeds, and zero 11238360efbdSAlfred Perlsteinotherwise. 112423601548SRuslan Ermilov.Pp 112523601548SRuslan Ermilov.It Xo 112623601548SRuslan Ermilov.Ft "struct sockaddr_in *" 112723601548SRuslan Ermilov.Xc 112823601548SRuslan Ermilov.It Xo 112923601548SRuslan Ermilov.Fn svc_getcaller "SVCXPRT *xprt" 113023601548SRuslan Ermilov.Xc 113123601548SRuslan Ermilov.Pp 11328360efbdSAlfred PerlsteinThe approved way of getting the network address of the caller 11338360efbdSAlfred Perlsteinof a procedure associated with the 113423601548SRuslan Ermilov.Tn RPC 11358360efbdSAlfred Perlsteinservice transport handle, 113623601548SRuslan Ermilov.Fa xprt . 113723601548SRuslan Ermilov.Pp 113823601548SRuslan Ermilov.It Xo 113923601548SRuslan Ermilov.Ft void 114023601548SRuslan Ermilov.Fn svc_getreqset "fd_set *rdfds" 114123601548SRuslan Ermilov.Xc 114223601548SRuslan Ermilov.Pp 11438360efbdSAlfred PerlsteinThis routine is only of interest if a service implementor 11448360efbdSAlfred Perlsteindoes not call 114523601548SRuslan Ermilov.Fn svc_run , 11468360efbdSAlfred Perlsteinbut instead implements custom asynchronous event processing. 11478360efbdSAlfred PerlsteinIt is called when the 114823601548SRuslan Ermilov.Xr select 2 11498360efbdSAlfred Perlsteinsystem call has determined that an 115023601548SRuslan Ermilov.Tn RPC 11518360efbdSAlfred Perlsteinrequest has arrived on some 115223601548SRuslan Ermilov.Tn RPC 115323601548SRuslan Ermilovsocket(s); 115423601548SRuslan Ermilov.Fa rdfds 11558360efbdSAlfred Perlsteinis the resultant read file descriptor bit mask. 11568360efbdSAlfred PerlsteinThe routine returns when all sockets associated with the 11578360efbdSAlfred Perlsteinvalue of 115823601548SRuslan Ermilov.Fa rdfds 11598360efbdSAlfred Perlsteinhave been serviced. 116023601548SRuslan Ermilov.Pp 116123601548SRuslan Ermilov.It Xo 116223601548SRuslan Ermilov.Ft void 116323601548SRuslan Ermilov.Fn svc_getreq "int rdfds" 116423601548SRuslan Ermilov.Xc 116523601548SRuslan Ermilov.Pp 11668360efbdSAlfred PerlsteinSimilar to 116723601548SRuslan Ermilov.Fn svc_getreqset , 116823601548SRuslan Ermilovbut limited to 32 descriptors. 116923601548SRuslan ErmilovThis interface is obsoleted by 117023601548SRuslan Ermilov.Fn svc_getreqset . 117123601548SRuslan Ermilov.Pp 117223601548SRuslan Ermilov.It Xo 117323601548SRuslan Ermilov.Ft bool_t 117423601548SRuslan Ermilov.Fo svc_register 117523601548SRuslan Ermilov.Fa "SVCXPRT *xprt" 117623601548SRuslan Ermilov.Fa "u_long prognum" 117723601548SRuslan Ermilov.Fa "u_long versnum" 117823601548SRuslan Ermilov.Fa "void (*dispatch)(struct svc_req *, SVCXPRT *)" 117923601548SRuslan Ermilov.Fa "int protocol" 118023601548SRuslan Ermilov.Fc 118123601548SRuslan Ermilov.Xc 118223601548SRuslan Ermilov.Pp 11838360efbdSAlfred PerlsteinAssociates 118423601548SRuslan Ermilov.Fa prognum 11858360efbdSAlfred Perlsteinand 118623601548SRuslan Ermilov.Fa versnum 11878360efbdSAlfred Perlsteinwith the service dispatch procedure, 118823601548SRuslan Ermilov.Fn dispatch . 11898360efbdSAlfred PerlsteinIf 119023601548SRuslan Ermilov.Fa protocol 11918360efbdSAlfred Perlsteinis zero, the service is not registered with the 11928657581bSMaxim Sobolev.Xr rpcbind 8 119323601548SRuslan Ermilovservice. 119423601548SRuslan ErmilovIf 119523601548SRuslan Ermilov.Fa protocol 11968360efbdSAlfred Perlsteinis non-zero, then a mapping of the triple 119723601548SRuslan Ermilov.Pq Fa prognum , versnum , protocol 11988360efbdSAlfred Perlsteinto 119923601548SRuslan Ermilov.Fa xprt\->xp_port 12008360efbdSAlfred Perlsteinis established with the local 12018657581bSMaxim Sobolev.Xr rpcbind 8 12028360efbdSAlfred Perlsteinservice (generally 120323601548SRuslan Ermilov.Fa protocol 12048360efbdSAlfred Perlsteinis zero, 120523601548SRuslan Ermilov.Dv IPPROTO_UDP 12068360efbdSAlfred Perlsteinor 120723601548SRuslan Ermilov.Dv IPPROTO_TCP ) . 12088360efbdSAlfred PerlsteinThe procedure 120923601548SRuslan Ermilov.Fn dispatch 12108360efbdSAlfred Perlsteinhas the following form: 121123601548SRuslan Ermilov.Bd -ragged -offset indent 121223601548SRuslan Ermilov.Ft bool_t 121323601548SRuslan Ermilov.Fn dispatch "struct svc_req *request" "SVCXPRT *xprt" 121423601548SRuslan Ermilov.Ed 121523601548SRuslan Ermilov.Pp 12168360efbdSAlfred PerlsteinThe 121723601548SRuslan Ermilov.Fn svc_register 12188360efbdSAlfred Perlsteinroutine returns one if it succeeds, and zero otherwise. 121923601548SRuslan Ermilov.Pp 122023601548SRuslan Ermilov.It Xo 122123601548SRuslan Ermilov.Fn svc_run 122223601548SRuslan Ermilov.Xc 122323601548SRuslan Ermilov.Pp 122423601548SRuslan ErmilovThis routine never returns. 122523601548SRuslan ErmilovIt waits for 122623601548SRuslan Ermilov.Tn RPC 12278360efbdSAlfred Perlsteinrequests to arrive, and calls the appropriate service 12288360efbdSAlfred Perlsteinprocedure using 122923601548SRuslan Ermilov.Fn svc_getreq 123023601548SRuslan Ermilovwhen one arrives. 123123601548SRuslan ErmilovThis procedure is usually waiting for a 123223601548SRuslan Ermilov.Xr select 2 12338360efbdSAlfred Perlsteinsystem call to return. 123423601548SRuslan Ermilov.Pp 123523601548SRuslan Ermilov.It Xo 123623601548SRuslan Ermilov.Ft bool_t 123723601548SRuslan Ermilov.Fn svc_sendreply "SVCXPRT *xprt" "xdrproc_t outproc" "char *out" 123823601548SRuslan Ermilov.Xc 123923601548SRuslan Ermilov.Pp 12408360efbdSAlfred PerlsteinCalled by an 124123601548SRuslan Ermilov.Tn RPC 12428360efbdSAlfred Perlsteinservice's dispatch routine to send the results of a 124323601548SRuslan Ermilovremote procedure call. 124423601548SRuslan ErmilovThe parameter 124523601548SRuslan Ermilov.Fa xprt 12468360efbdSAlfred Perlsteinis the request's associated transport handle; 124723601548SRuslan Ermilov.Fa outproc 12488360efbdSAlfred Perlsteinis the 124923601548SRuslan Ermilov.Tn XDR 12508360efbdSAlfred Perlsteinroutine which is used to encode the results; and 125123601548SRuslan Ermilov.Fa out 12528360efbdSAlfred Perlsteinis the address of the results. 12538360efbdSAlfred PerlsteinThis routine returns one if it succeeds, zero otherwise. 125423601548SRuslan Ermilov.Pp 125523601548SRuslan Ermilov.It Xo 125623601548SRuslan Ermilov.Ft void 125723601548SRuslan Ermilov.Xc 125823601548SRuslan Ermilov.It Xo 125923601548SRuslan Ermilov.Fn svc_unregister "u_long prognum" "u_long versnum" 126023601548SRuslan Ermilov.Xc 126123601548SRuslan Ermilov.Pp 12628360efbdSAlfred PerlsteinRemove all mapping of the double 126323601548SRuslan Ermilov.Pq Fa prognum , versnum 12648360efbdSAlfred Perlsteinto dispatch routines, and of the triple 126523601548SRuslan Ermilov.Pq Fa prognum , versnum , * 12668360efbdSAlfred Perlsteinto port number. 126723601548SRuslan Ermilov.Pp 126823601548SRuslan Ermilov.It Xo 126923601548SRuslan Ermilov.Ft void 127023601548SRuslan Ermilov.Xc 127123601548SRuslan Ermilov.It Xo 127223601548SRuslan Ermilov.Fn svcerr_auth "SVCXPRT *xprt" "enum auth_stat why" 127323601548SRuslan Ermilov.Xc 127423601548SRuslan Ermilov.Pp 12758360efbdSAlfred PerlsteinCalled by a service dispatch routine that refuses to perform 12768360efbdSAlfred Perlsteina remote procedure call due to an authentication error. 127723601548SRuslan Ermilov.Pp 127823601548SRuslan Ermilov.It Xo 127923601548SRuslan Ermilov.Ft void 128023601548SRuslan Ermilov.Xc 128123601548SRuslan Ermilov.It Xo 128223601548SRuslan Ermilov.Fn svcerr_decode "SVCXPRT *xprt" 128323601548SRuslan Ermilov.Xc 128423601548SRuslan Ermilov.Pp 12858360efbdSAlfred PerlsteinCalled by a service dispatch routine that cannot successfully 128623601548SRuslan Ermilovdecode its parameters. 128723601548SRuslan ErmilovSee also 128823601548SRuslan Ermilov.Fn svc_getargs . 128923601548SRuslan Ermilov.Pp 129023601548SRuslan Ermilov.It Xo 129123601548SRuslan Ermilov.Ft void 129223601548SRuslan Ermilov.Xc 129323601548SRuslan Ermilov.It Xo 129423601548SRuslan Ermilov.Fn svcerr_noproc "SVCXPRT *xprt" 129523601548SRuslan Ermilov.Xc 129623601548SRuslan Ermilov.Pp 12978360efbdSAlfred PerlsteinCalled by a service dispatch routine that does not implement 12988360efbdSAlfred Perlsteinthe procedure number that the caller requests. 129923601548SRuslan Ermilov.Pp 130023601548SRuslan Ermilov.It Xo 130123601548SRuslan Ermilov.Ft void 130223601548SRuslan Ermilov.Xc 130323601548SRuslan Ermilov.It Xo 130423601548SRuslan Ermilov.Fn svcerr_noprog "SVCXPRT *xprt" 130523601548SRuslan Ermilov.Xc 130623601548SRuslan Ermilov.Pp 13078360efbdSAlfred PerlsteinCalled when the desired program is not registered with the 130823601548SRuslan Ermilov.Tn RPC 130923601548SRuslan Ermilovpackage. 131023601548SRuslan ErmilovService implementors usually do not need this routine. 131123601548SRuslan Ermilov.Pp 131223601548SRuslan Ermilov.It Xo 131323601548SRuslan Ermilov.Ft void 131423601548SRuslan Ermilov.Xc 131523601548SRuslan Ermilov.It Xo 131623601548SRuslan Ermilov.Fn svcerr_progvers "SVCXPRT *xprt" "u_long low_vers" "u_long high_vers" 131723601548SRuslan Ermilov.Xc 131823601548SRuslan Ermilov.Pp 13198360efbdSAlfred PerlsteinCalled when the desired version of a program is not registered 13208360efbdSAlfred Perlsteinwith the 132123601548SRuslan Ermilov.Tn RPC 132223601548SRuslan Ermilovpackage. 132323601548SRuslan ErmilovService implementors usually do not need this routine. 132423601548SRuslan Ermilov.Pp 132523601548SRuslan Ermilov.It Xo 132623601548SRuslan Ermilov.Ft void 132723601548SRuslan Ermilov.Xc 132823601548SRuslan Ermilov.It Xo 132923601548SRuslan Ermilov.Fn svcerr_systemerr "SVCXPRT *xprt" 133023601548SRuslan Ermilov.Xc 133123601548SRuslan Ermilov.Pp 13328360efbdSAlfred PerlsteinCalled by a service dispatch routine when it detects a system 13338360efbdSAlfred Perlsteinerror 13348360efbdSAlfred Perlsteinnot covered by any particular protocol. 13358360efbdSAlfred PerlsteinFor example, if a service can no longer allocate storage, 13368360efbdSAlfred Perlsteinit may call this routine. 133723601548SRuslan Ermilov.Pp 133823601548SRuslan Ermilov.It Xo 133923601548SRuslan Ermilov.Ft void 134023601548SRuslan Ermilov.Xc 134123601548SRuslan Ermilov.It Xo 134223601548SRuslan Ermilov.Fn svcerr_weakauth "SVCXPRT *xprt" 134323601548SRuslan Ermilov.Xc 134423601548SRuslan Ermilov.Pp 13458360efbdSAlfred PerlsteinCalled by a service dispatch routine that refuses to perform 13468360efbdSAlfred Perlsteina remote procedure call due to insufficient 134723601548SRuslan Ermilovauthentication parameters. 134823601548SRuslan ErmilovThe routine calls 134923601548SRuslan Ermilov.Fn svcerr_auth xprt AUTH_TOOWEAK . 135023601548SRuslan Ermilov.Pp 135123601548SRuslan Ermilov.It Xo 135223601548SRuslan Ermilov.Ft "SVCXPRT *" 135323601548SRuslan Ermilov.Xc 135423601548SRuslan Ermilov.It Xo 135523601548SRuslan Ermilov.Fn svcraw_create void 135623601548SRuslan Ermilov.Xc 135723601548SRuslan Ermilov.Pp 13588360efbdSAlfred PerlsteinThis routine creates a toy 135923601548SRuslan Ermilov.Tn RPC 136023601548SRuslan Ermilovservice transport, to which it returns a pointer. 136123601548SRuslan ErmilovThe transport 13628360efbdSAlfred Perlsteinis really a buffer within the process's address space, 13638360efbdSAlfred Perlsteinso the corresponding 136423601548SRuslan Ermilov.Tn RPC 13658360efbdSAlfred Perlsteinclient should live in the same 13668360efbdSAlfred Perlsteinaddress space; 13678360efbdSAlfred Perlsteinsee 136823601548SRuslan Ermilov.Fn clntraw_create . 13698360efbdSAlfred PerlsteinThis routine allows simulation of 137023601548SRuslan Ermilov.Tn RPC 13718360efbdSAlfred Perlsteinand acquisition of 137223601548SRuslan Ermilov.Tn RPC 13738360efbdSAlfred Perlsteinoverheads (such as round trip times), without any kernel 13748360efbdSAlfred Perlsteininterference. 13758360efbdSAlfred PerlsteinThis routine returns 137623601548SRuslan Ermilov.Dv NULL 13778360efbdSAlfred Perlsteinif it fails. 137823601548SRuslan Ermilov.Pp 137923601548SRuslan Ermilov.It Xo 138023601548SRuslan Ermilov.Ft "SVCXPRT *" 138123601548SRuslan Ermilov.Xc 138223601548SRuslan Ermilov.It Xo 138323601548SRuslan Ermilov.Fn svctcp_create "int sock" "u_int send_buf_size" "u_int recv_buf_size" 138423601548SRuslan Ermilov.Xc 138523601548SRuslan Ermilov.Pp 13868360efbdSAlfred PerlsteinThis routine creates a 138723601548SRuslan Ermilov.Tn TCP/IP Ns \-based 138823601548SRuslan Ermilov.Tn RPC 13898360efbdSAlfred Perlsteinservice transport, to which it returns a pointer. 13908360efbdSAlfred PerlsteinThe transport is associated with the socket 139123601548SRuslan Ermilov.Fa sock , 13928360efbdSAlfred Perlsteinwhich may be 139323601548SRuslan Ermilov.Dv RPC_ANYSOCK , 13948360efbdSAlfred Perlsteinin which case a new socket is created. 13958360efbdSAlfred PerlsteinIf the socket is not bound to a local 139623601548SRuslan Ermilov.Tn TCP 139723601548SRuslan Ermilovport, then this routine binds it to an arbitrary port. 139823601548SRuslan ErmilovUpon completion, 139923601548SRuslan Ermilov.Fa xprt\->xp_fd 14008360efbdSAlfred Perlsteinis the transport's socket descriptor, and 140123601548SRuslan Ermilov.Fa xprt\->xp_port 14028360efbdSAlfred Perlsteinis the transport's port number. 14038360efbdSAlfred PerlsteinThis routine returns 140423601548SRuslan Ermilov.Dv NULL 140523601548SRuslan Ermilovif it fails. 140623601548SRuslan ErmilovSince 140723601548SRuslan Ermilov.Tn TCP Ns \-based 140823601548SRuslan Ermilov.Tn RPC 14098360efbdSAlfred Perlsteinuses buffered 141023601548SRuslan Ermilov.Tn I/O , 14118360efbdSAlfred Perlsteinusers may specify the size of buffers; values of zero 14128360efbdSAlfred Perlsteinchoose suitable defaults. 141323601548SRuslan Ermilov.Pp 141423601548SRuslan Ermilov.It Xo 141523601548SRuslan Ermilov.Ft "SVCXPRT *" 141623601548SRuslan Ermilov.Xc 141723601548SRuslan Ermilov.It Xo 1418e6f9ad07SBill Paul.Fn svcunix_create "int sock" "u_int send_buf_size" "u_int recv_buf_size" "char *path" 1419e6f9ad07SBill Paul.Xc 1420e6f9ad07SBill Paul.Pp 1421e6f9ad07SBill PaulThis routine creates a 1422872013cbSRuslan Ermilov.Ux Ns -based 1423e6f9ad07SBill Paul.Tn RPC 1424e6f9ad07SBill Paulservice transport, to which it returns a pointer. 1425e6f9ad07SBill PaulThe transport is associated with the socket 1426e6f9ad07SBill Paul.Fa sock , 1427e6f9ad07SBill Paulwhich may be 1428e6f9ad07SBill Paul.Dv RPC_ANYSOCK , 1429e6f9ad07SBill Paulin which case a new socket is created. 1430e6f9ad07SBill Paul.Fa *path 1431e6f9ad07SBill Paulis a variable-length file system pathname of 1432e6f9ad07SBill Paulat most 104 characters. 1433e6f9ad07SBill PaulThis file is 1434e6f9ad07SBill Paul.Em not 1435e6f9ad07SBill Paulremoved when the socket is closed. 1436e6f9ad07SBill Paul.Xr unlink 2 1437e6f9ad07SBill Paulmust be used to remove the file. 1438e6f9ad07SBill PaulUpon completion, 1439e6f9ad07SBill Paul.Fa xprt\->xp_fd 1440e6f9ad07SBill Paulis the transport's socket descriptor. 1441e6f9ad07SBill PaulThis routine returns 1442e6f9ad07SBill Paul.Dv NULL 1443e6f9ad07SBill Paulif it fails. 1444e6f9ad07SBill PaulSince 1445872013cbSRuslan Ermilov.Ux Ns -based 1446e6f9ad07SBill Paul.Tn RPC 1447e6f9ad07SBill Pauluses buffered 1448e6f9ad07SBill Paul.Tn I/O , 1449e6f9ad07SBill Paulusers may specify the size of buffers; values of zero 1450e6f9ad07SBill Paulchoose suitable defaults. 1451e6f9ad07SBill Paul.Pp 1452e6f9ad07SBill Paul.It Xo 1453e6f9ad07SBill Paul.Ft "SVCXPRT *" 1454e6f9ad07SBill Paul.Xc 1455e6f9ad07SBill Paul.It Xo 1456e6f9ad07SBill Paul.Fn svcunixfd_create "int fd" "u_int sendsize" "u_int recvsize" 1457e6f9ad07SBill Paul.Xc 1458e6f9ad07SBill Paul.Pp 1459e6f9ad07SBill PaulCreate a service on top of any open descriptor. 1460e6f9ad07SBill Paul.Fa sendsize 1461e6f9ad07SBill Pauland 1462e6f9ad07SBill Paul.Fa recvsize 1463e6f9ad07SBill Paulindicate sizes for the send and receive buffers. 1464e6f9ad07SBill PaulIf they are 1465e6f9ad07SBill Paulzero, a reasonable default is chosen. 1466e6f9ad07SBill Paul.Pp 1467e6f9ad07SBill Paul.It Xo 1468e6f9ad07SBill Paul.Ft "SVCXPRT *" 1469e6f9ad07SBill Paul.Xc 1470e6f9ad07SBill Paul.It Xo 147123601548SRuslan Ermilov.Fn svcfd_create "int fd" "u_int sendsize" "u_int recvsize" 147223601548SRuslan Ermilov.Xc 147323601548SRuslan Ermilov.Pp 147423601548SRuslan ErmilovCreate a service on top of any open descriptor. 147523601548SRuslan ErmilovTypically, 14768360efbdSAlfred Perlsteinthis 14778360efbdSAlfred Perlsteindescriptor is a connected socket for a stream protocol such 14788360efbdSAlfred Perlsteinas 147923601548SRuslan Ermilov.Tn TCP . 148023601548SRuslan Ermilov.Fa sendsize 14818360efbdSAlfred Perlsteinand 148223601548SRuslan Ermilov.Fa recvsize 148323601548SRuslan Ermilovindicate sizes for the send and receive buffers. 148423601548SRuslan ErmilovIf they are 14858360efbdSAlfred Perlsteinzero, a reasonable default is chosen. 148623601548SRuslan Ermilov.Pp 148723601548SRuslan Ermilov.It Xo 148823601548SRuslan Ermilov.Ft "SVCXPRT *" 148923601548SRuslan Ermilov.Xc 149023601548SRuslan Ermilov.It Xo 149123601548SRuslan Ermilov.Fn svcudp_bufcreate "int sock" "u_int sendsize" "u_int recvsize" 149223601548SRuslan Ermilov.Xc 149323601548SRuslan Ermilov.Pp 14948360efbdSAlfred PerlsteinThis routine creates a 149523601548SRuslan Ermilov.Tn UDP/IP Ns \-based 149623601548SRuslan Ermilov.Tn RPC 14978360efbdSAlfred Perlsteinservice transport, to which it returns a pointer. 14988360efbdSAlfred PerlsteinThe transport is associated with the socket 149923601548SRuslan Ermilov.Fa sock , 15008360efbdSAlfred Perlsteinwhich may be 150123601548SRuslan Ermilov.Dv RPC_ANYSOCK , 15028360efbdSAlfred Perlsteinin which case a new socket is created. 15038360efbdSAlfred PerlsteinIf the socket is not bound to a local 150423601548SRuslan Ermilov.Tn UDP 150523601548SRuslan Ermilovport, then this routine binds it to an arbitrary port. 150623601548SRuslan ErmilovUpon 15078360efbdSAlfred Perlsteincompletion, 150823601548SRuslan Ermilov.Fa xprt\->xp_fd 15098360efbdSAlfred Perlsteinis the transport's socket descriptor, and 151023601548SRuslan Ermilov.Fa xprt\->xp_port 15118360efbdSAlfred Perlsteinis the transport's port number. 15128360efbdSAlfred PerlsteinThis routine returns 151323601548SRuslan Ermilov.Dv NULL 15148360efbdSAlfred Perlsteinif it fails. 151523601548SRuslan Ermilov.Pp 15168360efbdSAlfred PerlsteinThis allows the user to specify the maximum packet size for sending and 15178360efbdSAlfred Perlsteinreceiving 151823601548SRuslan Ermilov.Tn UDP Ns \-based 151923601548SRuslan Ermilov.Tn RPC 152023601548SRuslan Ermilovmessages. 152123601548SRuslan Ermilov.Pp 152223601548SRuslan Ermilov.It Xo 152323601548SRuslan Ermilov.Ft bool_t 152423601548SRuslan Ermilov.Fn xdr_accepted_reply "XDR *xdrs" "struct accepted_reply *ar" 152523601548SRuslan Ermilov.Xc 152623601548SRuslan Ermilov.Pp 15278360efbdSAlfred PerlsteinUsed for encoding 152823601548SRuslan Ermilov.Tn RPC 152923601548SRuslan Ermilovreply messages. 153023601548SRuslan ErmilovThis routine is useful for users who 15318360efbdSAlfred Perlsteinwish to generate 153223601548SRuslan Ermilov.Tn RPC Ns \-style 15338360efbdSAlfred Perlsteinmessages without using the 153423601548SRuslan Ermilov.Tn RPC 15358360efbdSAlfred Perlsteinpackage. 153623601548SRuslan Ermilov.Pp 153723601548SRuslan Ermilov.It Xo 153823601548SRuslan Ermilov.Ft bool_t 153923601548SRuslan Ermilov.Fn xdr_authunix_parms "XDR *xdrs" "struct authunix_parms *aupp" 154023601548SRuslan Ermilov.Xc 154123601548SRuslan Ermilov.Pp 15428360efbdSAlfred PerlsteinUsed for describing 154323601548SRuslan Ermilov.Ux 154423601548SRuslan Ermilovcredentials. 154523601548SRuslan ErmilovThis routine is useful for users 15468360efbdSAlfred Perlsteinwho wish to generate these credentials without using the 154723601548SRuslan Ermilov.Tn RPC 15488360efbdSAlfred Perlsteinauthentication package. 154923601548SRuslan Ermilov.Pp 155023601548SRuslan Ermilov.It Xo 155123601548SRuslan Ermilov.Ft void 155223601548SRuslan Ermilov.Xc 155323601548SRuslan Ermilov.It Xo 155423601548SRuslan Ermilov.Ft bool_t 155523601548SRuslan Ermilov.Fn xdr_callhdr "XDR *xdrs" "struct rpc_msg *chdr" 155623601548SRuslan Ermilov.Xc 155723601548SRuslan Ermilov.Pp 15588360efbdSAlfred PerlsteinUsed for describing 155923601548SRuslan Ermilov.Tn RPC 15608360efbdSAlfred Perlsteincall header messages. 15618360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 156223601548SRuslan Ermilov.Tn RPC Ns \-style 15638360efbdSAlfred Perlsteinmessages without using the 156423601548SRuslan Ermilov.Tn RPC 15658360efbdSAlfred Perlsteinpackage. 156623601548SRuslan Ermilov.Pp 156723601548SRuslan Ermilov.It Xo 156823601548SRuslan Ermilov.Ft bool_t 156923601548SRuslan Ermilov.Fn xdr_callmsg "XDR *xdrs" "struct rpc_msg *cmsg" 157023601548SRuslan Ermilov.Xc 157123601548SRuslan Ermilov.Pp 15728360efbdSAlfred PerlsteinUsed for describing 157323601548SRuslan Ermilov.Tn RPC 15748360efbdSAlfred Perlsteincall messages. 15758360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 157623601548SRuslan Ermilov.Tn RPC Ns \-style 15778360efbdSAlfred Perlsteinmessages without using the 157823601548SRuslan Ermilov.Tn RPC 15798360efbdSAlfred Perlsteinpackage. 158023601548SRuslan Ermilov.Pp 158123601548SRuslan Ermilov.It Xo 158223601548SRuslan Ermilov.Ft bool_t 158323601548SRuslan Ermilov.Fn xdr_opaque_auth "XDR *xdrs" "struct opaque_auth *ap" 158423601548SRuslan Ermilov.Xc 158523601548SRuslan Ermilov.Pp 15868360efbdSAlfred PerlsteinUsed for describing 158723601548SRuslan Ermilov.Tn RPC 15888360efbdSAlfred Perlsteinauthentication information messages. 15898360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 159023601548SRuslan Ermilov.Tn RPC Ns \-style 15918360efbdSAlfred Perlsteinmessages without using the 159223601548SRuslan Ermilov.Tn RPC 15938360efbdSAlfred Perlsteinpackage. 159423601548SRuslan Ermilov.Pp 159523601548SRuslan Ermilov.It Xo 159623601548SRuslan Ermilov.Vt struct pmap ; 159723601548SRuslan Ermilov.Xc 159823601548SRuslan Ermilov.It Xo 159923601548SRuslan Ermilov.Ft bool_t 160023601548SRuslan Ermilov.Fn xdr_pmap "XDR *xdrs" "struct pmap *regs" 160123601548SRuslan Ermilov.Xc 160223601548SRuslan Ermilov.Pp 16038360efbdSAlfred PerlsteinUsed for describing parameters to various 16048657581bSMaxim Sobolev.Xr rpcbind 8 16058360efbdSAlfred Perlsteinprocedures, externally. 16068360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 16078360efbdSAlfred Perlsteinthese parameters without using the 160823601548SRuslan Ermilov.Fn pmap_* 16098360efbdSAlfred Perlsteininterface. 161023601548SRuslan Ermilov.Pp 161123601548SRuslan Ermilov.It Xo 161223601548SRuslan Ermilov.Ft bool_t 161323601548SRuslan Ermilov.Fn xdr_pmaplist "XDR *xdrs" "struct pmaplist **rp" 161423601548SRuslan Ermilov.Xc 161523601548SRuslan Ermilov.Pp 16168360efbdSAlfred PerlsteinUsed for describing a list of port mappings, externally. 16178360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 16188360efbdSAlfred Perlsteinthese parameters without using the 161923601548SRuslan Ermilov.Fn pmap_* 16208360efbdSAlfred Perlsteininterface. 162123601548SRuslan Ermilov.Pp 162223601548SRuslan Ermilov.It Xo 162323601548SRuslan Ermilov.Ft bool_t 162423601548SRuslan Ermilov.Fn xdr_rejected_reply "XDR *xdrs" "struct rejected_reply *rr" 162523601548SRuslan Ermilov.Xc 162623601548SRuslan Ermilov.Pp 16278360efbdSAlfred PerlsteinUsed for describing 162823601548SRuslan Ermilov.Tn RPC 16298360efbdSAlfred Perlsteinreply messages. 16308360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 163123601548SRuslan Ermilov.Tn RPC Ns \-style 16328360efbdSAlfred Perlsteinmessages without using the 163323601548SRuslan Ermilov.Tn RPC 16348360efbdSAlfred Perlsteinpackage. 163523601548SRuslan Ermilov.Pp 163623601548SRuslan Ermilov.It Xo 163723601548SRuslan Ermilov.Ft bool_t 163823601548SRuslan Ermilov.Fn xdr_replymsg "XDR *xdrs" "struct rpc_msg *rmsg" 163923601548SRuslan Ermilov.Xc 164023601548SRuslan Ermilov.Pp 16418360efbdSAlfred PerlsteinUsed for describing 164223601548SRuslan Ermilov.Tn RPC 16438360efbdSAlfred Perlsteinreply messages. 16448360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 164523601548SRuslan Ermilov.Tn RPC 16468360efbdSAlfred Perlsteinstyle messages without using the 164723601548SRuslan Ermilov.Tn RPC 16488360efbdSAlfred Perlsteinpackage. 164923601548SRuslan Ermilov.Pp 165023601548SRuslan Ermilov.It Xo 165123601548SRuslan Ermilov.Ft void 165223601548SRuslan Ermilov.Xc 165323601548SRuslan Ermilov.It Xo 165423601548SRuslan Ermilov.Fn xprt_register "SVCXPRT *xprt" 165523601548SRuslan Ermilov.Xc 165623601548SRuslan Ermilov.Pp 16578360efbdSAlfred PerlsteinAfter 165823601548SRuslan Ermilov.Tn RPC 16598360efbdSAlfred Perlsteinservice transport handles are created, 16608360efbdSAlfred Perlsteinthey should register themselves with the 166123601548SRuslan Ermilov.Tn RPC 16628360efbdSAlfred Perlsteinservice package. 16638360efbdSAlfred PerlsteinThis routine modifies the global variable 166423601548SRuslan Ermilov.Va svc_fds . 16658360efbdSAlfred PerlsteinService implementors usually do not need this routine. 166623601548SRuslan Ermilov.Pp 166723601548SRuslan Ermilov.It Xo 166823601548SRuslan Ermilov.Ft void 166923601548SRuslan Ermilov.Xc 167023601548SRuslan Ermilov.It Xo 167123601548SRuslan Ermilov.Fn xprt_unregister "SVCXPRT *xprt" 167223601548SRuslan Ermilov.Xc 167323601548SRuslan Ermilov.Pp 16748360efbdSAlfred PerlsteinBefore an 167523601548SRuslan Ermilov.Tn RPC 16768360efbdSAlfred Perlsteinservice transport handle is destroyed, 16778360efbdSAlfred Perlsteinit should unregister itself with the 167823601548SRuslan Ermilov.Tn RPC 16798360efbdSAlfred Perlsteinservice package. 16808360efbdSAlfred PerlsteinThis routine modifies the global variable 168123601548SRuslan Ermilov.Va svc_fds . 16828360efbdSAlfred PerlsteinService implementors usually do not need this routine. 168323601548SRuslan Ermilov.El 168423601548SRuslan Ermilov.Sh SEE ALSO 168523601548SRuslan Ermilov.Xr rpc_secure 3 , 168623601548SRuslan Ermilov.Xr xdr 3 168723601548SRuslan Ermilov.Rs 168823601548SRuslan Ermilov.%T "Remote Procedure Calls: Protocol Specification" 168923601548SRuslan Ermilov.Re 169023601548SRuslan Ermilov.Rs 169123601548SRuslan Ermilov.%T "Remote Procedure Call Programming Guide" 169223601548SRuslan Ermilov.Re 169323601548SRuslan Ermilov.Rs 169423601548SRuslan Ermilov.%T "rpcgen Programming Guide" 169523601548SRuslan Ermilov.Re 169623601548SRuslan Ermilov.Rs 169723601548SRuslan Ermilov.%T "RPC: Remote Procedure Call Protocol Specification" 169823601548SRuslan Ermilov.%O RFC1050 169923601548SRuslan Ermilov.%Q "Sun Microsystems, Inc., USC-ISI" 170023601548SRuslan Ermilov.Re 1701