18360efbdSAlfred Perlstein.\" $NetBSD: rpc_soc.3,v 1.2 2000/06/07 13:39:43 simonb Exp $ 28360efbdSAlfred Perlstein.\" 323601548SRuslan Ermilov.Dd February 16, 1988 423601548SRuslan Ermilov.Dt RPC_SOC 3 523601548SRuslan Ermilov.Os 623601548SRuslan Ermilov.Sh NAME 723601548SRuslan Ermilov.Nm rpc_soc , 823601548SRuslan Ermilov.Nm auth_destroy , 923601548SRuslan Ermilov.Nm authnone_create , 1023601548SRuslan Ermilov.Nm authunix_create , 1123601548SRuslan Ermilov.Nm authunix_create_default , 1223601548SRuslan Ermilov.Nm callrpc , 1323601548SRuslan Ermilov.Nm clnt_broadcast , 1423601548SRuslan Ermilov.Nm clnt_call , 1523601548SRuslan Ermilov.Nm clnt_control , 1623601548SRuslan Ermilov.Nm clnt_create , 1723601548SRuslan Ermilov.Nm clnt_destroy , 1823601548SRuslan Ermilov.Nm clnt_freeres , 1923601548SRuslan Ermilov.Nm clnt_geterr , 2023601548SRuslan Ermilov.Nm clnt_pcreateerror , 2123601548SRuslan Ermilov.Nm clnt_perrno , 2223601548SRuslan Ermilov.Nm clnt_perror , 2323601548SRuslan Ermilov.Nm clnt_spcreateerror , 2423601548SRuslan Ermilov.Nm clnt_sperrno , 2523601548SRuslan Ermilov.Nm clnt_sperror , 2623601548SRuslan Ermilov.Nm clntraw_create , 2723601548SRuslan Ermilov.Nm clnttcp_create , 2823601548SRuslan Ermilov.Nm clntudp_bufcreate , 2923601548SRuslan Ermilov.Nm clntudp_create , 30e6f9ad07SBill Paul.Nm clntunix_create , 3123601548SRuslan Ermilov.Nm get_myaddress , 3223601548SRuslan Ermilov.Nm pmap_getmaps , 3323601548SRuslan Ermilov.Nm pmap_getport , 3423601548SRuslan Ermilov.Nm pmap_rmtcall , 3523601548SRuslan Ermilov.Nm pmap_set , 3623601548SRuslan Ermilov.Nm pmap_unset , 3723601548SRuslan Ermilov.Nm registerrpc , 3823601548SRuslan Ermilov.Nm rpc_createerr , 3923601548SRuslan Ermilov.Nm svc_destroy , 4023601548SRuslan Ermilov.Nm svc_fds , 4123601548SRuslan Ermilov.Nm svc_fdset , 4223601548SRuslan Ermilov.Nm svc_getargs , 4323601548SRuslan Ermilov.Nm svc_getcaller , 4423601548SRuslan Ermilov.Nm svc_getreq , 4523601548SRuslan Ermilov.Nm svc_getreqset , 4623601548SRuslan Ermilov.Nm svc_register , 4723601548SRuslan Ermilov.Nm svc_run , 4823601548SRuslan Ermilov.Nm svc_sendreply , 4923601548SRuslan Ermilov.Nm svc_unregister , 5023601548SRuslan Ermilov.Nm svcerr_auth , 5123601548SRuslan Ermilov.Nm svcerr_decode , 5223601548SRuslan Ermilov.Nm svcerr_noproc , 5323601548SRuslan Ermilov.Nm svcerr_noprog , 5423601548SRuslan Ermilov.Nm svcerr_progvers , 5523601548SRuslan Ermilov.Nm svcerr_systemerr , 5623601548SRuslan Ermilov.Nm svcerr_weakauth , 5723601548SRuslan Ermilov.Nm svcfd_create , 58e6f9ad07SBill Paul.Nm svcunixfd_create , 5923601548SRuslan Ermilov.Nm svcraw_create , 60e6f9ad07SBill Paul.Nm svcunix_create , 6123601548SRuslan Ermilov.Nm xdr_accepted_reply , 6223601548SRuslan Ermilov.Nm xdr_authunix_parms , 6323601548SRuslan Ermilov.Nm xdr_callhdr , 6423601548SRuslan Ermilov.Nm xdr_callmsg , 6523601548SRuslan Ermilov.Nm xdr_opaque_auth , 6623601548SRuslan Ermilov.Nm xdr_pmap , 6723601548SRuslan Ermilov.Nm xdr_pmaplist , 6823601548SRuslan Ermilov.Nm xdr_rejected_reply , 6923601548SRuslan Ermilov.Nm xdr_replymsg , 7023601548SRuslan Ermilov.Nm xprt_register , 7123601548SRuslan Ermilov.Nm xprt_unregister 7223601548SRuslan Ermilov.Nd "library routines for remote procedure calls" 7323601548SRuslan Ermilov.Sh LIBRARY 7423601548SRuslan Ermilov.Lb libc 7523601548SRuslan Ermilov.Sh SYNOPSIS 7632eef9aeSRuslan Ermilov.In rpc/rpc.h 7723601548SRuslan Ermilov.Pp 7823601548SRuslan ErmilovSee 7923601548SRuslan Ermilov.Sx DESCRIPTION 8023601548SRuslan Ermilovfor function declarations. 8123601548SRuslan Ermilov.Sh DESCRIPTION 8223601548SRuslan Ermilov.Bf -symbolic 8323601548SRuslan ErmilovThe 8423601548SRuslan Ermilov.Fn svc_* 8523601548SRuslan Ermilovand 8623601548SRuslan Ermilov.Fn clnt_* 8723601548SRuslan Ermilovfunctions described in this page are the old, TS-RPC 8823601548SRuslan Ermilovinterface to the XDR and RPC library, and exist for backward compatibility. 8923601548SRuslan ErmilovThe new interface is described in the pages 9023601548SRuslan Ermilovreferenced from 9123601548SRuslan Ermilov.Xr rpc 3 . 9223601548SRuslan Ermilov.Ef 9323601548SRuslan Ermilov.Pp 948360efbdSAlfred PerlsteinThese routines allow C programs to make procedure 958360efbdSAlfred Perlsteincalls on other machines across the network. 968360efbdSAlfred PerlsteinFirst, the client calls a procedure to send a 978360efbdSAlfred Perlsteindata packet to the server. 988360efbdSAlfred PerlsteinUpon receipt of the packet, the server calls a dispatch routine 998360efbdSAlfred Perlsteinto perform the requested service, and then sends back a 1008360efbdSAlfred Perlsteinreply. 1018360efbdSAlfred PerlsteinFinally, the procedure call returns to the client. 10223601548SRuslan Ermilov.Pp 10323601548SRuslan ErmilovRoutines that are used for Secure 10423601548SRuslan Ermilov.Tn RPC ( DES 10523601548SRuslan Ermilovauthentication) are described in 10623601548SRuslan Ermilov.Xr rpc_secure 3 . 10723601548SRuslan ErmilovSecure 10823601548SRuslan Ermilov.Tn RPC 10923601548SRuslan Ermilovcan be used only if 11023601548SRuslan Ermilov.Tn DES 11123601548SRuslan Ermilovencryption is available. 11223601548SRuslan Ermilov.Pp 113c1f71e84SJoel Dahl.Bl -tag -width indent -compact 11423601548SRuslan Ermilov.It Xo 11523601548SRuslan Ermilov.Ft void 11623601548SRuslan Ermilov.Xc 11723601548SRuslan Ermilov.It Xo 11823601548SRuslan Ermilov.Fn auth_destroy "AUTH *auth" 11923601548SRuslan Ermilov.Xc 12023601548SRuslan Ermilov.Pp 1218360efbdSAlfred PerlsteinA macro that destroys the authentication information associated with 12223601548SRuslan Ermilov.Fa auth . 1238360efbdSAlfred PerlsteinDestruction usually involves deallocation of private data 12423601548SRuslan Ermilovstructures. 12523601548SRuslan ErmilovThe use of 12623601548SRuslan Ermilov.Fa auth 1278360efbdSAlfred Perlsteinis undefined after calling 12823601548SRuslan Ermilov.Fn auth_destroy . 12923601548SRuslan Ermilov.Pp 13023601548SRuslan Ermilov.It Xo 13123601548SRuslan Ermilov.Ft "AUTH *" 13223601548SRuslan Ermilov.Xc 13323601548SRuslan Ermilov.It Xo 13423601548SRuslan Ermilov.Fn authnone_create 13523601548SRuslan Ermilov.Xc 13623601548SRuslan Ermilov.Pp 1378360efbdSAlfred PerlsteinCreate and return an 13823601548SRuslan Ermilov.Tn RPC 13923601548SRuslan Ermilovauthentication handle that passes nonusable authentication 14023601548SRuslan Ermilovinformation with each remote procedure call. 14123601548SRuslan ErmilovThis is the 14223601548SRuslan Ermilovdefault authentication used by 14323601548SRuslan Ermilov.Tn RPC . 14423601548SRuslan Ermilov.Pp 14523601548SRuslan Ermilov.It Xo 14623601548SRuslan Ermilov.Ft "AUTH *" 14723601548SRuslan Ermilov.Xc 14823601548SRuslan Ermilov.It Xo 149*0d1040e5SPedro F. Giffuni.Fn authunix_create "char *host" "u_int uid" "u_int gid" "int len" "u_int *aup_gids" 15023601548SRuslan Ermilov.Xc 15123601548SRuslan Ermilov.Pp 15223601548SRuslan ErmilovCreate and return an 15323601548SRuslan Ermilov.Tn RPC 1548360efbdSAlfred Perlsteinauthentication handle that contains 15523601548SRuslan Ermilov.Ux 1568360efbdSAlfred Perlsteinauthentication information. 1572efeeba5SRuslan ErmilovThe 15823601548SRuslan Ermilov.Fa host 1592efeeba5SRuslan Ermilovargument 1608360efbdSAlfred Perlsteinis the name of the machine on which the information was 1618360efbdSAlfred Perlsteincreated; 16223601548SRuslan Ermilov.Fa uid 16323601548SRuslan Ermilovis the user's user ID; 16423601548SRuslan Ermilov.Fa gid 16523601548SRuslan Ermilovis the user's current group ID; 16623601548SRuslan Ermilov.Fa len 1678360efbdSAlfred Perlsteinand 16823601548SRuslan Ermilov.Fa aup_gids 1698360efbdSAlfred Perlsteinrefer to a counted array of groups to which the user belongs. 1708360efbdSAlfred PerlsteinIt is easy to impersonate a user. 17123601548SRuslan Ermilov.Pp 17223601548SRuslan Ermilov.It Xo 17323601548SRuslan Ermilov.Ft "AUTH *" 17423601548SRuslan Ermilov.Xc 17523601548SRuslan Ermilov.It Xo 17623601548SRuslan Ermilov.Fn authunix_create_default 17723601548SRuslan Ermilov.Xc 17823601548SRuslan Ermilov.Pp 1798360efbdSAlfred PerlsteinCalls 18023601548SRuslan Ermilov.Fn authunix_create 1812efeeba5SRuslan Ermilovwith the appropriate arguments. 18223601548SRuslan Ermilov.Pp 18323601548SRuslan Ermilov.It Xo 184db7534cfSBruce Evans.Ft int 18523601548SRuslan Ermilov.Fo callrpc 18623601548SRuslan Ermilov.Fa "char *host" 18723601548SRuslan Ermilov.Fa "u_long prognum" 18823601548SRuslan Ermilov.Fa "u_long versnum" 18923601548SRuslan Ermilov.Fa "u_long procnum" 19023601548SRuslan Ermilov.Fa "xdrproc_t inproc" 191cc74aaddSAlfred Perlstein.Fa "void *in" 19223601548SRuslan Ermilov.Fa "xdrproc_t outproc" 193cc74aaddSAlfred Perlstein.Fa "void *out" 19423601548SRuslan Ermilov.Fc 19523601548SRuslan Ermilov.Xc 19623601548SRuslan Ermilov.Pp 1978360efbdSAlfred PerlsteinCall the remote procedure associated with 19823601548SRuslan Ermilov.Fa prognum , 19923601548SRuslan Ermilov.Fa versnum , 2008360efbdSAlfred Perlsteinand 20123601548SRuslan Ermilov.Fa procnum 20223601548SRuslan Ermilovon the machine 20323601548SRuslan Ermilov.Fa host . 2042efeeba5SRuslan ErmilovThe 20523601548SRuslan Ermilov.Fa in 2062efeeba5SRuslan Ermilovargument 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 2112efeeba5SRuslan Ermilovis used to encode the procedure's arguments, 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 . 3032efeeba5SRuslan ErmilovThe 30423601548SRuslan Ermilov.Fa in 3052efeeba5SRuslan Ermilovargument 3068360efbdSAlfred Perlsteinis the address of the procedure's argument(s), and 30723601548SRuslan Ermilov.Fa out 3088360efbdSAlfred Perlsteinis the address of where to place the result(s); 30923601548SRuslan Ermilov.Fa inproc 3102efeeba5SRuslan Ermilovis used to encode the procedure's arguments, and 31123601548SRuslan Ermilov.Fa outproc 3128360efbdSAlfred Perlsteinis used to decode the procedure's results; 31323601548SRuslan Ermilov.Fa tout 3148360efbdSAlfred Perlsteinis the time allowed for results to come back. 31523601548SRuslan Ermilov.Pp 31623601548SRuslan Ermilov.It Xo 31723601548SRuslan Ermilov.Ft void 31823601548SRuslan Ermilov.Fn clnt_destroy "CLIENT *clnt" 31923601548SRuslan Ermilov.Xc 32023601548SRuslan Ermilov.Pp 3218360efbdSAlfred PerlsteinA macro that destroys the client's 32223601548SRuslan Ermilov.Tn RPC 32323601548SRuslan Ermilovhandle. 32423601548SRuslan ErmilovDestruction usually involves deallocation 3258360efbdSAlfred Perlsteinof private data structures, including 32623601548SRuslan Ermilov.Fa clnt 32723601548SRuslan Ermilovitself. 32823601548SRuslan ErmilovUse of 32923601548SRuslan Ermilov.Fa clnt 3308360efbdSAlfred Perlsteinis undefined after calling 33123601548SRuslan Ermilov.Fn clnt_destroy . 3328360efbdSAlfred PerlsteinIf the 33323601548SRuslan Ermilov.Tn RPC 3348360efbdSAlfred Perlsteinlibrary opened the associated socket, it will close it also. 3358360efbdSAlfred PerlsteinOtherwise, the socket remains open. 33623601548SRuslan Ermilov.Pp 33723601548SRuslan Ermilov.It Xo 33823601548SRuslan Ermilov.Ft CLIENT * 33923601548SRuslan Ermilov.Xc 34023601548SRuslan Ermilov.It Xo 34123601548SRuslan Ermilov.Fn clnt_create "char *host" "u_long prog" "u_long vers" "char *proto" 34223601548SRuslan Ermilov.Xc 34323601548SRuslan Ermilov.Pp 3448360efbdSAlfred PerlsteinGeneric client creation routine. 3452efeeba5SRuslan ErmilovThe 34623601548SRuslan Ermilov.Fa host 3472efeeba5SRuslan Ermilovargument 3488360efbdSAlfred Perlsteinidentifies the name of the remote host where the server 3498360efbdSAlfred Perlsteinis located. 3502efeeba5SRuslan ErmilovThe 35123601548SRuslan Ermilov.Fa proto 3522efeeba5SRuslan Ermilovargument 35323601548SRuslan Ermilovindicates which kind of transport protocol to use. 35423601548SRuslan ErmilovThe 35523601548SRuslan Ermilovcurrently supported values for this field are 35623601548SRuslan Ermilov.Qq Li udp 35723601548SRuslan Ermilovand 35823601548SRuslan Ermilov.Qq Li tcp . 3598360efbdSAlfred PerlsteinDefault timeouts are set, but can be modified using 36023601548SRuslan Ermilov.Fn clnt_control . 36123601548SRuslan Ermilov.Pp 3628360efbdSAlfred PerlsteinWarning: Using 36323601548SRuslan Ermilov.Tn UDP 36423601548SRuslan Ermilovhas its shortcomings. 36523601548SRuslan ErmilovSince 36623601548SRuslan Ermilov.Tn UDP Ns \-based 36723601548SRuslan Ermilov.Tn RPC 3688360efbdSAlfred Perlsteinmessages can only hold up to 8 Kbytes of encoded data, 3698360efbdSAlfred Perlsteinthis transport cannot be used for procedures that take 3708360efbdSAlfred Perlsteinlarge arguments or return huge results. 37123601548SRuslan Ermilov.Pp 37223601548SRuslan Ermilov.It Xo 37323601548SRuslan Ermilov.Ft bool_t 37423601548SRuslan Ermilov.Xc 37523601548SRuslan Ermilov.It Xo 37623601548SRuslan Ermilov.Fn clnt_control "CLIENT *cl" "u_int req" "char *info" 37723601548SRuslan Ermilov.Xc 37823601548SRuslan Ermilov.Pp 3798360efbdSAlfred PerlsteinA macro used to change or retrieve various information 3808360efbdSAlfred Perlsteinabout a client object. 3812efeeba5SRuslan ErmilovThe 38223601548SRuslan Ermilov.Fa req 3832efeeba5SRuslan Ermilovargument 3848360efbdSAlfred Perlsteinindicates the type of operation, and 38523601548SRuslan Ermilov.Fa info 38623601548SRuslan Ermilovis a pointer to the information. 38723601548SRuslan ErmilovFor both 38823601548SRuslan Ermilov.Tn UDP 3898360efbdSAlfred Perlsteinand 39023601548SRuslan Ermilov.Tn TCP , 3918360efbdSAlfred Perlsteinthe supported values of 39223601548SRuslan Ermilov.Fa req 3938360efbdSAlfred Perlsteinand their argument types and what they do are: 39423601548SRuslan Ermilov.Bl -column "CLSET_RETRY_TIMEOUT" "struct sockaddr_in" 39510b4d262SJoel Dahl.It Dv CLSET_TIMEOUT Ta 39623601548SRuslan Ermilov.Vt "struct timeval" Ta "set total timeout" 39710b4d262SJoel Dahl.It Dv CLGET_TIMEOUT Ta 39823601548SRuslan Ermilov.Vt "struct timeval" Ta "get total timeout" 39923601548SRuslan Ermilov.El 40023601548SRuslan Ermilov.Pp 4018360efbdSAlfred PerlsteinNote: if you set the timeout using 40223601548SRuslan Ermilov.Fn clnt_control , 4032efeeba5SRuslan Ermilovthe timeout argument passed to 40423601548SRuslan Ermilov.Fn clnt_call 4058360efbdSAlfred Perlsteinwill be ignored in all future calls. 40623601548SRuslan Ermilov.Bl -column "CLSET_RETRY_TIMEOUT" "struct sockaddr_in" 40710b4d262SJoel Dahl.It Dv CLGET_SERVER_ADDR Ta 40823601548SRuslan Ermilov.Vt "struct sockaddr_in" Ta "get server's address" 40923601548SRuslan Ermilov.El 41023601548SRuslan Ermilov.Pp 4118360efbdSAlfred PerlsteinThe following operations are valid for 41223601548SRuslan Ermilov.Tn UDP 4138360efbdSAlfred Perlsteinonly: 41423601548SRuslan Ermilov.Bl -column "CLSET_RETRY_TIMEOUT" "struct sockaddr_in" 41510b4d262SJoel Dahl.It Dv CLSET_RETRY_TIMEOUT Ta 41623601548SRuslan Ermilov.Vt "struct timeval" Ta "set the retry timeout" 41710b4d262SJoel Dahl.It Dv CLGET_RETRY_TIMEOUT Ta 41823601548SRuslan Ermilov.Vt "struct timeval" Ta "get the retry timeout" 41923601548SRuslan Ermilov.El 42023601548SRuslan Ermilov.Pp 4218360efbdSAlfred PerlsteinThe retry timeout is the time that 42223601548SRuslan Ermilov.Tn "UDP RPC" 4238360efbdSAlfred Perlsteinwaits for the server to reply before 4248360efbdSAlfred Perlsteinretransmitting the request. 42523601548SRuslan Ermilov.Pp 42623601548SRuslan Ermilov.It Xo 42723601548SRuslan Ermilov.Ft bool_t 42823601548SRuslan Ermilov.Fn clnt_freeres "CLIENT *clnt" "xdrproc_t outproc" "char *out" 42923601548SRuslan Ermilov.Xc 43023601548SRuslan Ermilov.Pp 4318360efbdSAlfred PerlsteinA macro that frees any data allocated by the 43223601548SRuslan Ermilov.Tn RPC/XDR 4338360efbdSAlfred Perlsteinsystem when it decoded the results of an 43423601548SRuslan Ermilov.Tn RPC 43523601548SRuslan Ermilovcall. 4362efeeba5SRuslan ErmilovThe 43723601548SRuslan Ermilov.Fa out 4382efeeba5SRuslan Ermilovargument 4398360efbdSAlfred Perlsteinis the address of the results, and 44023601548SRuslan Ermilov.Fa outproc 4418360efbdSAlfred Perlsteinis the 44223601548SRuslan Ermilov.Tn XDR 4438360efbdSAlfred Perlsteinroutine describing the results. 4448360efbdSAlfred PerlsteinThis routine returns one if the results were successfully 4458360efbdSAlfred Perlsteinfreed, 4468360efbdSAlfred Perlsteinand zero otherwise. 44723601548SRuslan Ermilov.Pp 44823601548SRuslan Ermilov.It Xo 44923601548SRuslan Ermilov.Ft void 45023601548SRuslan Ermilov.Xc 45123601548SRuslan Ermilov.It Xo 45223601548SRuslan Ermilov.Fn clnt_geterr "CLIENT *clnt" "struct rpc_err *errp" 45323601548SRuslan Ermilov.Xc 45423601548SRuslan Ermilov.Pp 4558360efbdSAlfred PerlsteinA macro that copies the error structure out of the client 4568360efbdSAlfred Perlsteinhandle 4578360efbdSAlfred Perlsteinto the structure at address 45823601548SRuslan Ermilov.Fa errp . 45923601548SRuslan Ermilov.Pp 46023601548SRuslan Ermilov.It Xo 46123601548SRuslan Ermilov.Ft void 46223601548SRuslan Ermilov.Xc 46323601548SRuslan Ermilov.It Xo 46423601548SRuslan Ermilov.Fn clnt_pcreateerror "char *s" 46523601548SRuslan Ermilov.Xc 46623601548SRuslan Ermilov.Pp 46723601548SRuslan Ermilovprints a message to standard error indicating 4688360efbdSAlfred Perlsteinwhy a client 46923601548SRuslan Ermilov.Tn RPC 4708360efbdSAlfred Perlsteinhandle could not be created. 4718360efbdSAlfred PerlsteinThe message is prepended with string 47223601548SRuslan Ermilov.Fa s 4738360efbdSAlfred Perlsteinand a colon. 47423601548SRuslan ErmilovA newline is appended at the end of the message. 4758360efbdSAlfred PerlsteinUsed when a 47623601548SRuslan Ermilov.Fn clnt_create , 47723601548SRuslan Ermilov.Fn clntraw_create , 47823601548SRuslan Ermilov.Fn clnttcp_create , 4798360efbdSAlfred Perlsteinor 48023601548SRuslan Ermilov.Fn clntudp_create 4818360efbdSAlfred Perlsteincall fails. 48223601548SRuslan Ermilov.Pp 48323601548SRuslan Ermilov.It Xo 48423601548SRuslan Ermilov.Ft void 48523601548SRuslan Ermilov.Xc 48623601548SRuslan Ermilov.It Xo 48723601548SRuslan Ermilov.Fn clnt_perrno "enum clnt_stat stat" 48823601548SRuslan Ermilov.Xc 48923601548SRuslan Ermilov.Pp 4908360efbdSAlfred PerlsteinPrint a message to standard error corresponding 4918360efbdSAlfred Perlsteinto the condition indicated by 49223601548SRuslan Ermilov.Fa stat . 49323601548SRuslan ErmilovA newline is appended at the end of the message. 4948360efbdSAlfred PerlsteinUsed after 49523601548SRuslan Ermilov.Fn callrpc . 49623601548SRuslan Ermilov.Pp 49723601548SRuslan Ermilov.It Xo 49823601548SRuslan Ermilov.Ft void 49923601548SRuslan Ermilov.Fn clnt_perror "CLIENT *clnt" "char *s" 50023601548SRuslan Ermilov.Xc 50123601548SRuslan Ermilov.Pp 5028360efbdSAlfred PerlsteinPrint a message to standard error indicating why an 50323601548SRuslan Ermilov.Tn RPC 5048360efbdSAlfred Perlsteincall failed; 50523601548SRuslan Ermilov.Fa clnt 5068360efbdSAlfred Perlsteinis the handle used to do the call. 5078360efbdSAlfred PerlsteinThe message is prepended with string 50823601548SRuslan Ermilov.Fa s 5098360efbdSAlfred Perlsteinand a colon. 51023601548SRuslan ErmilovA newline is appended at the end of the message. 5118360efbdSAlfred PerlsteinUsed after 51223601548SRuslan Ermilov.Fn clnt_call . 51323601548SRuslan Ermilov.Pp 51423601548SRuslan Ermilov.It Xo 51523601548SRuslan Ermilov.Ft "char *" 51623601548SRuslan Ermilov.Xc 51723601548SRuslan Ermilov.It Xo 51823601548SRuslan Ermilov.Fn clnt_spcreateerror "char *s" 51923601548SRuslan Ermilov.Xc 52023601548SRuslan Ermilov.Pp 5218360efbdSAlfred PerlsteinLike 52223601548SRuslan Ermilov.Fn clnt_pcreateerror , 5238360efbdSAlfred Perlsteinexcept that it returns a string 5248360efbdSAlfred Perlsteininstead of printing to the standard error. 52523601548SRuslan Ermilov.Pp 5268360efbdSAlfred PerlsteinBugs: returns pointer to static data that is overwritten 5278360efbdSAlfred Perlsteinon each call. 52823601548SRuslan Ermilov.Pp 52923601548SRuslan Ermilov.It Xo 53023601548SRuslan Ermilov.Ft "char *" 53123601548SRuslan Ermilov.Xc 53223601548SRuslan Ermilov.It Xo 53323601548SRuslan Ermilov.Fn clnt_sperrno "enum clnt_stat stat" 53423601548SRuslan Ermilov.Xc 53523601548SRuslan Ermilov.Pp 5368360efbdSAlfred PerlsteinTake the same arguments as 53723601548SRuslan Ermilov.Fn clnt_perrno , 5388360efbdSAlfred Perlsteinbut instead of sending a message to the standard error 5398360efbdSAlfred Perlsteinindicating why an 54023601548SRuslan Ermilov.Tn RPC 5418360efbdSAlfred Perlsteincall failed, return a pointer to a string which contains 5428360efbdSAlfred Perlsteinthe message. 54323601548SRuslan Ermilov.Pp 5441fae73b1SRuslan ErmilovThe 54523601548SRuslan Ermilov.Fn clnt_sperrno 5461fae73b1SRuslan Ermilovfunction 5478360efbdSAlfred Perlsteinis used instead of 54823601548SRuslan Ermilov.Fn clnt_perrno 5498360efbdSAlfred Perlsteinif the program does not have a standard error (as a program 5508360efbdSAlfred Perlsteinrunning as a server quite likely does not), or if the 5518360efbdSAlfred Perlsteinprogrammer 5528360efbdSAlfred Perlsteindoes not want the message to be output with 55323601548SRuslan Ermilov.Fn printf , 55423601548SRuslan Ermilovor if a message format different from that supported by 55523601548SRuslan Ermilov.Fn clnt_perrno 5568360efbdSAlfred Perlsteinis to be used. 55723601548SRuslan Ermilov.Pp 5588360efbdSAlfred PerlsteinNote: unlike 55923601548SRuslan Ermilov.Fn clnt_sperror 5608360efbdSAlfred Perlsteinand 56123601548SRuslan Ermilov.Fn clnt_spcreateerror , 56223601548SRuslan Ermilov.Fn clnt_sperrno 5638360efbdSAlfred Perlsteinreturns pointer to static data, but the 5648360efbdSAlfred Perlsteinresult will not get overwritten on each call. 56523601548SRuslan Ermilov.Pp 56623601548SRuslan Ermilov.It Xo 56723601548SRuslan Ermilov.Ft "char *" 56823601548SRuslan Ermilov.Xc 56923601548SRuslan Ermilov.It Xo 57023601548SRuslan Ermilov.Fn clnt_sperror "CLIENT *rpch" "char *s" 57123601548SRuslan Ermilov.Xc 57223601548SRuslan Ermilov.Pp 5738360efbdSAlfred PerlsteinLike 57423601548SRuslan Ermilov.Fn clnt_perror , 5758360efbdSAlfred Perlsteinexcept that (like 57623601548SRuslan Ermilov.Fn clnt_sperrno ) 5778360efbdSAlfred Perlsteinit returns a string instead of printing to standard error. 57823601548SRuslan Ermilov.Pp 5798360efbdSAlfred PerlsteinBugs: returns pointer to static data that is overwritten 5808360efbdSAlfred Perlsteinon each call. 58123601548SRuslan Ermilov.Pp 58223601548SRuslan Ermilov.It Xo 58323601548SRuslan Ermilov.Ft "CLIENT *" 58423601548SRuslan Ermilov.Xc 58523601548SRuslan Ermilov.It Xo 58623601548SRuslan Ermilov.Fn clntraw_create "u_long prognum" "u_long versnum" 58723601548SRuslan Ermilov.Xc 58823601548SRuslan Ermilov.Pp 5898360efbdSAlfred PerlsteinThis routine creates a toy 59023601548SRuslan Ermilov.Tn RPC 5918360efbdSAlfred Perlsteinclient for the remote program 59223601548SRuslan Ermilov.Fa prognum , 5938360efbdSAlfred Perlsteinversion 59423601548SRuslan Ermilov.Fa versnum . 5958360efbdSAlfred PerlsteinThe transport used to pass messages to the service is 5968360efbdSAlfred Perlsteinactually a buffer within the process's address space, so the 5978360efbdSAlfred Perlsteincorresponding 59823601548SRuslan Ermilov.Tn RPC 5998360efbdSAlfred Perlsteinserver should live in the same address space; see 60023601548SRuslan Ermilov.Fn svcraw_create . 6018360efbdSAlfred PerlsteinThis allows simulation of 60223601548SRuslan Ermilov.Tn RPC 6038360efbdSAlfred Perlsteinand acquisition of 60423601548SRuslan Ermilov.Tn RPC 6058360efbdSAlfred Perlsteinoverheads, such as round trip times, without any 60623601548SRuslan Ermilovkernel interference. 60723601548SRuslan ErmilovThis routine returns 60823601548SRuslan Ermilov.Dv NULL 6098360efbdSAlfred Perlsteinif it fails. 61023601548SRuslan Ermilov.Pp 61123601548SRuslan Ermilov.It Xo 61223601548SRuslan Ermilov.Ft "CLIENT *" 61323601548SRuslan Ermilov.Xc 61423601548SRuslan Ermilov.It Xo 61523601548SRuslan Ermilov.Fo clnttcp_create 61623601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 61723601548SRuslan Ermilov.Fa "u_long prognum" 61823601548SRuslan Ermilov.Fa "u_long versnum" 61923601548SRuslan Ermilov.Fa "int *sockp" 62023601548SRuslan Ermilov.Fa "u_int sendsz" 62123601548SRuslan Ermilov.Fa "u_int recvsz" 62223601548SRuslan Ermilov.Fc 62323601548SRuslan Ermilov.Xc 62423601548SRuslan Ermilov.Pp 6258360efbdSAlfred PerlsteinThis routine creates an 62623601548SRuslan Ermilov.Tn RPC 6278360efbdSAlfred Perlsteinclient for the remote program 62823601548SRuslan Ermilov.Fa prognum , 6298360efbdSAlfred Perlsteinversion 63023601548SRuslan Ermilov.Fa versnum ; 6318360efbdSAlfred Perlsteinthe client uses 63223601548SRuslan Ermilov.Tn TCP/IP 63323601548SRuslan Ermilovas a transport. 63423601548SRuslan ErmilovThe remote program is located at Internet 6358360efbdSAlfred Perlsteinaddress 63623601548SRuslan Ermilov.Fa addr . 6378360efbdSAlfred PerlsteinIf 63823601548SRuslan Ermilov.Fa addr\->sin_port 6398360efbdSAlfred Perlsteinis zero, then it is set to the actual port that the remote 6408360efbdSAlfred Perlsteinprogram is listening on (the remote 6418657581bSMaxim Sobolev.Xr rpcbind 8 64223601548SRuslan Ermilovservice is consulted for this information). 6432efeeba5SRuslan ErmilovThe 64423601548SRuslan Ermilov.Fa sockp 6452efeeba5SRuslan Ermilovargument 6468360efbdSAlfred Perlsteinis a socket; if it is 64723601548SRuslan Ermilov.Dv RPC_ANYSOCK , 6488360efbdSAlfred Perlsteinthen this routine opens a new one and sets 64923601548SRuslan Ermilov.Fa sockp . 6508360efbdSAlfred PerlsteinSince 65123601548SRuslan Ermilov.Tn TCP Ns \-based 65223601548SRuslan Ermilov.Tn RPC 6538360efbdSAlfred Perlsteinuses buffered 65423601548SRuslan Ermilov.Tn I/O , 6558360efbdSAlfred Perlsteinthe user may specify the size of the send and receive buffers 6562efeeba5SRuslan Ermilovwith the 65723601548SRuslan Ermilov.Fa sendsz 6588360efbdSAlfred Perlsteinand 6592efeeba5SRuslan Ermilov.Fa recvsz 6602efeeba5SRuslan Ermilovarguments; 6618360efbdSAlfred Perlsteinvalues of zero choose suitable defaults. 6628360efbdSAlfred PerlsteinThis routine returns 66323601548SRuslan Ermilov.Dv NULL 6648360efbdSAlfred Perlsteinif it fails. 66523601548SRuslan Ermilov.Pp 66623601548SRuslan Ermilov.It Xo 66723601548SRuslan Ermilov.Ft "CLIENT *" 66823601548SRuslan Ermilov.Xc 66923601548SRuslan Ermilov.It Xo 67023601548SRuslan Ermilov.Fo clntudp_create 67123601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 67223601548SRuslan Ermilov.Fa "u_long prognum" 67323601548SRuslan Ermilov.Fa "u_long versnum" 67423601548SRuslan Ermilov.Fa "struct timeval wait" 67523601548SRuslan Ermilov.Fa "int *sockp" 67623601548SRuslan Ermilov.Fc 67723601548SRuslan Ermilov.Xc 67823601548SRuslan Ermilov.Pp 6798360efbdSAlfred PerlsteinThis routine creates an 68023601548SRuslan Ermilov.Tn RPC 6818360efbdSAlfred Perlsteinclient for the remote program 68223601548SRuslan Ermilov.Fa prognum , 6838360efbdSAlfred Perlsteinversion 68423601548SRuslan Ermilov.Fa versnum ; 68523601548SRuslan Ermilovthe client uses 68623601548SRuslan Ermilov.Tn UDP/IP 68723601548SRuslan Ermilovas a transport. 68823601548SRuslan ErmilovThe remote program is located at Internet 6898360efbdSAlfred Perlsteinaddress 69023601548SRuslan Ermilov.Fa addr . 6918360efbdSAlfred PerlsteinIf 69223601548SRuslan Ermilov.Fa addr\->sin_port 6938360efbdSAlfred Perlsteinis zero, then it is set to actual port that the remote 6948360efbdSAlfred Perlsteinprogram is listening on (the remote 6958657581bSMaxim Sobolev.Xr rpcbind 8 69623601548SRuslan Ermilovservice is consulted for this information). 6972efeeba5SRuslan ErmilovThe 69823601548SRuslan Ermilov.Fa sockp 6992efeeba5SRuslan Ermilovargument 7008360efbdSAlfred Perlsteinis a socket; if it is 70123601548SRuslan Ermilov.Dv RPC_ANYSOCK , 7028360efbdSAlfred Perlsteinthen this routine opens a new one and sets 70323601548SRuslan Ermilov.Fa sockp . 7048360efbdSAlfred PerlsteinThe 70523601548SRuslan Ermilov.Tn UDP 7068360efbdSAlfred Perlsteintransport resends the call message in intervals of 70723601548SRuslan Ermilov.Fa wait 7088360efbdSAlfred Perlsteintime until a response is received or until the call times 7098360efbdSAlfred Perlsteinout. 7108360efbdSAlfred PerlsteinThe total time for the call to time out is specified by 71123601548SRuslan Ermilov.Fn clnt_call . 71223601548SRuslan Ermilov.Pp 7138360efbdSAlfred PerlsteinWarning: since 71423601548SRuslan Ermilov.Tn UDP Ns \-based 71523601548SRuslan Ermilov.Tn RPC 7168360efbdSAlfred Perlsteinmessages can only hold up to 8 Kbytes 7178360efbdSAlfred Perlsteinof encoded data, this transport cannot be used for procedures 7188360efbdSAlfred Perlsteinthat take large arguments or return huge results. 71923601548SRuslan Ermilov.Pp 72023601548SRuslan Ermilov.It Xo 72123601548SRuslan Ermilov.Ft "CLIENT *" 72223601548SRuslan Ermilov.Xc 72323601548SRuslan Ermilov.It Xo 72423601548SRuslan Ermilov.Fo clntudp_bufcreate 72523601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 72623601548SRuslan Ermilov.Fa "u_long prognum" 72723601548SRuslan Ermilov.Fa "u_long versnum" 72823601548SRuslan Ermilov.Fa "struct timeval wait" 72923601548SRuslan Ermilov.Fa "int *sockp" 73023601548SRuslan Ermilov.Fa "unsigned int sendsize" 73123601548SRuslan Ermilov.Fa "unsigned int recosize" 73223601548SRuslan Ermilov.Fc 73323601548SRuslan Ermilov.Xc 73423601548SRuslan Ermilov.Pp 7358360efbdSAlfred PerlsteinThis routine creates an 73623601548SRuslan Ermilov.Tn RPC 7378360efbdSAlfred Perlsteinclient for the remote program 73823601548SRuslan Ermilov.Fa prognum , 7398360efbdSAlfred Perlsteinon 74023601548SRuslan Ermilov.Fa versnum ; 74123601548SRuslan Ermilovthe client uses 74223601548SRuslan Ermilov.Tn UDP/IP 74323601548SRuslan Ermilovas a transport. 74423601548SRuslan ErmilovThe remote program is located at Internet 7458360efbdSAlfred Perlsteinaddress 74623601548SRuslan Ermilov.Fa addr . 7478360efbdSAlfred PerlsteinIf 74823601548SRuslan Ermilov.Fa addr\->sin_port 7498360efbdSAlfred Perlsteinis zero, then it is set to actual port that the remote 7508360efbdSAlfred Perlsteinprogram is listening on (the remote 7518657581bSMaxim Sobolev.Xr rpcbind 8 75223601548SRuslan Ermilovservice is consulted for this information). 7532efeeba5SRuslan ErmilovThe 75423601548SRuslan Ermilov.Fa sockp 7552efeeba5SRuslan Ermilovargument 7568360efbdSAlfred Perlsteinis a socket; if it is 75723601548SRuslan Ermilov.Dv RPC_ANYSOCK , 7588360efbdSAlfred Perlsteinthen this routine opens a new one and sets 75923601548SRuslan Ermilov.Fa sockp . 7608360efbdSAlfred PerlsteinThe 76123601548SRuslan Ermilov.Tn UDP 7628360efbdSAlfred Perlsteintransport resends the call message in intervals of 76323601548SRuslan Ermilov.Fa wait 7648360efbdSAlfred Perlsteintime until a response is received or until the call times 7658360efbdSAlfred Perlsteinout. 7668360efbdSAlfred PerlsteinThe total time for the call to time out is specified by 76723601548SRuslan Ermilov.Fn clnt_call . 76823601548SRuslan Ermilov.Pp 76923601548SRuslan ErmilovThis allows the user to specify the maximum packet size 77023601548SRuslan Ermilovfor sending and receiving 77123601548SRuslan Ermilov.Tn UDP Ns \-based 77223601548SRuslan Ermilov.Tn RPC 7738360efbdSAlfred Perlsteinmessages. 77423601548SRuslan Ermilov.Pp 77523601548SRuslan Ermilov.It Xo 776e6f9ad07SBill Paul.Ft "CLIENT *" 777e6f9ad07SBill Paul.Xc 778e6f9ad07SBill Paul.It Xo 779e6f9ad07SBill Paul.Fo clntunix_create 780e6f9ad07SBill Paul.Fa "struct sockaddr_un *raddr" 781e6f9ad07SBill Paul.Fa "u_long prognum" 782e6f9ad07SBill Paul.Fa "u_long versnum" 783e6f9ad07SBill Paul.Fa "int *sockp" 784e6f9ad07SBill Paul.Fa "u_int sendsz" 785e6f9ad07SBill Paul.Fa "u_int recvsz" 786e6f9ad07SBill Paul.Fc 787e6f9ad07SBill Paul.Xc 788e6f9ad07SBill Paul.Pp 789e6f9ad07SBill PaulThis routine creates an 790e6f9ad07SBill Paul.Tn RPC 791e6f9ad07SBill Paulclient for the local 792e6f9ad07SBill Paulprogram 793e6f9ad07SBill Paul.Fa prognum , 794e6f9ad07SBill Paulversion 795e6f9ad07SBill Paul.Fa versnum ; 796e6f9ad07SBill Paulthe client uses 797872013cbSRuslan Ermilov.Ux Ns -domain 798e6f9ad07SBill Paulsockets as a transport. 799e6f9ad07SBill PaulThe local program is located at the 800e6f9ad07SBill Paul.Fa *raddr . 8012efeeba5SRuslan ErmilovThe 802e6f9ad07SBill Paul.Fa sockp 8032efeeba5SRuslan Ermilovargument 804e6f9ad07SBill Paulis a socket; if it is 805e6f9ad07SBill Paul.Dv RPC_ANYSOCK , 806e6f9ad07SBill Paulthen this routine opens a new one and sets 807e6f9ad07SBill Paul.Fa sockp . 808e6f9ad07SBill PaulSince 809872013cbSRuslan Ermilov.Ux Ns -based 810e6f9ad07SBill Paul.Tn RPC 811e6f9ad07SBill Pauluses buffered 812e6f9ad07SBill Paul.Tn I/O , 813e6f9ad07SBill Paulthe user may specify the size of the send and receive buffers 8142efeeba5SRuslan Ermilovwith the 815e6f9ad07SBill Paul.Fa sendsz 816e6f9ad07SBill Pauland 8172efeeba5SRuslan Ermilov.Fa recvsz 8182efeeba5SRuslan Ermilovarguments; 819e6f9ad07SBill Paulvalues of zero choose suitable defaults. 820e6f9ad07SBill PaulThis routine returns 821e6f9ad07SBill Paul.Dv NULL 822e6f9ad07SBill Paulif it fails. 823e6f9ad07SBill Paul.Pp 824e6f9ad07SBill Paul.It Xo 82523601548SRuslan Ermilov.Ft int 82623601548SRuslan Ermilov.Xc 82723601548SRuslan Ermilov.It Xo 82823601548SRuslan Ermilov.Fn get_myaddress "struct sockaddr_in *addr" 82923601548SRuslan Ermilov.Xc 83023601548SRuslan Ermilov.Pp 8318360efbdSAlfred PerlsteinStuff the machine's 83223601548SRuslan Ermilov.Tn IP 8338360efbdSAlfred Perlsteinaddress into 83423601548SRuslan Ermilov.Fa addr , 8358360efbdSAlfred Perlsteinwithout consulting the library routines that deal with 83623601548SRuslan Ermilov.Pa /etc/hosts . 8378360efbdSAlfred PerlsteinThe port number is always set to 83823601548SRuslan Ermilov.Fn htons PMAPPORT . 8398360efbdSAlfred PerlsteinReturns zero on success, non-zero on failure. 84023601548SRuslan Ermilov.Pp 84123601548SRuslan Ermilov.It Xo 84223601548SRuslan Ermilov.Ft "struct pmaplist *" 84323601548SRuslan Ermilov.Xc 84423601548SRuslan Ermilov.It Xo 84523601548SRuslan Ermilov.Fn pmap_getmaps "struct sockaddr_in *addr" 84623601548SRuslan Ermilov.Xc 84723601548SRuslan Ermilov.Pp 8488360efbdSAlfred PerlsteinA user interface to the 8498657581bSMaxim Sobolev.Xr rpcbind 8 8508360efbdSAlfred Perlsteinservice, which returns a list of the current 85123601548SRuslan Ermilov.Tn RPC 85223601548SRuslan Ermilovprogram\-to\-port mappings 8538360efbdSAlfred Perlsteinon the host located at 85423601548SRuslan Ermilov.Tn IP 8558360efbdSAlfred Perlsteinaddress 85623601548SRuslan Ermilov.Fa addr . 8578360efbdSAlfred PerlsteinThis routine can return 85823601548SRuslan Ermilov.Dv NULL . 8598360efbdSAlfred PerlsteinThe command 86023601548SRuslan Ermilov.Dq Nm rpcinfo Fl p 8618360efbdSAlfred Perlsteinuses this routine. 86223601548SRuslan Ermilov.Pp 86323601548SRuslan Ermilov.It Xo 86423601548SRuslan Ermilov.Ft u_short 86523601548SRuslan Ermilov.Xc 86623601548SRuslan Ermilov.It Xo 86723601548SRuslan Ermilov.Fo pmap_getport 86823601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 86923601548SRuslan Ermilov.Fa "u_long prognum" 87023601548SRuslan Ermilov.Fa "u_long versnum" 87123601548SRuslan Ermilov.Fa "u_long protocol" 87223601548SRuslan Ermilov.Fc 87323601548SRuslan Ermilov.Xc 87423601548SRuslan Ermilov.Pp 8758360efbdSAlfred PerlsteinA user interface to the 8768657581bSMaxim Sobolev.Xr rpcbind 8 8778360efbdSAlfred Perlsteinservice, which returns the port number 8788360efbdSAlfred Perlsteinon which waits a service that supports program number 87923601548SRuslan Ermilov.Fa prognum , 8808360efbdSAlfred Perlsteinversion 88123601548SRuslan Ermilov.Fa versnum , 8828360efbdSAlfred Perlsteinand speaks the transport protocol associated with 88323601548SRuslan Ermilov.Fa protocol . 8848360efbdSAlfred PerlsteinThe value of 88523601548SRuslan Ermilov.Fa protocol 8868360efbdSAlfred Perlsteinis most likely 88723601548SRuslan Ermilov.Dv IPPROTO_UDP 8888360efbdSAlfred Perlsteinor 88923601548SRuslan Ermilov.Dv IPPROTO_TCP . 8908360efbdSAlfred PerlsteinA return value of zero means that the mapping does not exist 8918360efbdSAlfred Perlsteinor that 8928360efbdSAlfred Perlsteinthe 89323601548SRuslan Ermilov.Tn RPC 89423601548SRuslan Ermilovsystem failed to contact the remote 8958657581bSMaxim Sobolev.Xr rpcbind 8 89623601548SRuslan Ermilovservice. 89723601548SRuslan ErmilovIn the latter case, the global variable 89823601548SRuslan Ermilov.Va rpc_createerr 8998360efbdSAlfred Perlsteincontains the 90023601548SRuslan Ermilov.Tn RPC 9018360efbdSAlfred Perlsteinstatus. 90223601548SRuslan Ermilov.Pp 90323601548SRuslan Ermilov.It Xo 90423601548SRuslan Ermilov.Ft "enum clnt_stat" 90523601548SRuslan Ermilov.Xc 90623601548SRuslan Ermilov.It Xo 90723601548SRuslan Ermilov.Fo pmap_rmtcall 90823601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 90923601548SRuslan Ermilov.Fa "u_long prognum" 91023601548SRuslan Ermilov.Fa "u_long versnum" 91123601548SRuslan Ermilov.Fa "u_long procnum" 91223601548SRuslan Ermilov.Fa "xdrproc_t inproc" 91323601548SRuslan Ermilov.Fa "char *in" 91423601548SRuslan Ermilov.Fa "xdrproc_t outproc" 91523601548SRuslan Ermilov.Fa "char *out" 91623601548SRuslan Ermilov.Fa "struct timeval tout" 91723601548SRuslan Ermilov.Fa "u_long *portp" 91823601548SRuslan Ermilov.Fc 91923601548SRuslan Ermilov.Xc 92023601548SRuslan Ermilov.Pp 9218360efbdSAlfred PerlsteinA user interface to the 9228657581bSMaxim Sobolev.Xr rpcbind 8 9238360efbdSAlfred Perlsteinservice, which instructs 9248657581bSMaxim Sobolev.Xr rpcbind 8 9258360efbdSAlfred Perlsteinon the host at 92623601548SRuslan Ermilov.Tn IP 9278360efbdSAlfred Perlsteinaddress 92823601548SRuslan Ermilov.Fa addr 9298360efbdSAlfred Perlsteinto make an 93023601548SRuslan Ermilov.Tn RPC 9318360efbdSAlfred Perlsteincall on your behalf to a procedure on that host. 9322efeeba5SRuslan ErmilovThe 93323601548SRuslan Ermilov.Fa portp 9342efeeba5SRuslan Ermilovargument 9358360efbdSAlfred Perlsteinwill be modified to the program's port number if the 9368360efbdSAlfred Perlsteinprocedure 93723601548SRuslan Ermilovsucceeds. 9382efeeba5SRuslan ErmilovThe definitions of other arguments are discussed 9398360efbdSAlfred Perlsteinin 94023601548SRuslan Ermilov.Fn callrpc 9418360efbdSAlfred Perlsteinand 94223601548SRuslan Ermilov.Fn clnt_call . 94323601548SRuslan ErmilovThis procedure should be used for a 94423601548SRuslan Ermilov.Dq ping 94523601548SRuslan Ermilovand nothing 9468360efbdSAlfred Perlsteinelse. 9478360efbdSAlfred PerlsteinSee also 94823601548SRuslan Ermilov.Fn clnt_broadcast . 94923601548SRuslan Ermilov.Pp 95023601548SRuslan Ermilov.It Xo 95123601548SRuslan Ermilov.Ft bool_t 95223601548SRuslan Ermilov.Fn pmap_set "u_long prognum" "u_long versnum" "u_long protocol" "u_short port" 95323601548SRuslan Ermilov.Xc 95423601548SRuslan Ermilov.Pp 9558360efbdSAlfred PerlsteinA user interface to the 9568657581bSMaxim Sobolev.Xr rpcbind 8 9578360efbdSAlfred Perlsteinservice, which establishes a mapping between the triple 95823601548SRuslan Ermilov.Pq Fa prognum , versnum , protocol 9598360efbdSAlfred Perlsteinand 96023601548SRuslan Ermilov.Fa port 9618360efbdSAlfred Perlsteinon the machine's 9628657581bSMaxim Sobolev.Xr rpcbind 8 96323601548SRuslan Ermilovservice. 96423601548SRuslan ErmilovThe value of 96523601548SRuslan Ermilov.Fa protocol 9668360efbdSAlfred Perlsteinis most likely 96723601548SRuslan Ermilov.Dv IPPROTO_UDP 9688360efbdSAlfred Perlsteinor 96923601548SRuslan Ermilov.Dv IPPROTO_TCP . 9708360efbdSAlfred PerlsteinThis routine returns one if it succeeds, zero otherwise. 9718360efbdSAlfred PerlsteinAutomatically done by 97223601548SRuslan Ermilov.Fn svc_register . 97323601548SRuslan Ermilov.Pp 97423601548SRuslan Ermilov.It Xo 97523601548SRuslan Ermilov.Ft bool_t 97623601548SRuslan Ermilov.Fn pmap_unset "u_long prognum" "u_long versnum" 97723601548SRuslan Ermilov.Xc 97823601548SRuslan Ermilov.Pp 9798360efbdSAlfred PerlsteinA user interface to the 9808657581bSMaxim Sobolev.Xr rpcbind 8 9818360efbdSAlfred Perlsteinservice, which destroys all mapping between the triple 98223601548SRuslan Ermilov.Pq Fa prognum , versnum , * 9838360efbdSAlfred Perlsteinand 98423601548SRuslan Ermilov.Fa ports 9858360efbdSAlfred Perlsteinon the machine's 9868657581bSMaxim Sobolev.Xr rpcbind 8 98723601548SRuslan Ermilovservice. 98823601548SRuslan ErmilovThis routine returns one if it succeeds, zero 9898360efbdSAlfred Perlsteinotherwise. 99023601548SRuslan Ermilov.Pp 99123601548SRuslan Ermilov.It Xo 99223601548SRuslan Ermilov.Ft bool_t 99323601548SRuslan Ermilov.Fo registerrpc 99423601548SRuslan Ermilov.Fa "u_long prognum" 99523601548SRuslan Ermilov.Fa "u_long versnum" 99623601548SRuslan Ermilov.Fa "u_long procnum" 99723601548SRuslan Ermilov.Fa "char *(*procname)(void)" 99823601548SRuslan Ermilov.Fa "xdrproc_t inproc" 99923601548SRuslan Ermilov.Fa "xdrproc_t outproc" 100023601548SRuslan Ermilov.Fc 100123601548SRuslan Ermilov.Xc 100223601548SRuslan Ermilov.Pp 10038360efbdSAlfred PerlsteinRegister procedure 100423601548SRuslan Ermilov.Fa procname 10058360efbdSAlfred Perlsteinwith the 100623601548SRuslan Ermilov.Tn RPC 100723601548SRuslan Ermilovservice package. 100823601548SRuslan ErmilovIf a request arrives for program 100923601548SRuslan Ermilov.Fa prognum , 10108360efbdSAlfred Perlsteinversion 101123601548SRuslan Ermilov.Fa versnum , 10128360efbdSAlfred Perlsteinand procedure 101323601548SRuslan Ermilov.Fa procnum , 101423601548SRuslan Ermilov.Fa procname 10152efeeba5SRuslan Ermilovis called with a pointer to its argument(s); 101623601548SRuslan Ermilov.Fa progname 10178360efbdSAlfred Perlsteinshould return a pointer to its static result(s); 101823601548SRuslan Ermilov.Fa inproc 10192efeeba5SRuslan Ermilovis used to decode the arguments while 102023601548SRuslan Ermilov.Fa outproc 10218360efbdSAlfred Perlsteinis used to encode the results. 10228360efbdSAlfred PerlsteinThis routine returns zero if the registration succeeded, \-1 10238360efbdSAlfred Perlsteinotherwise. 102423601548SRuslan Ermilov.Pp 10258360efbdSAlfred PerlsteinWarning: remote procedures registered in this form 10268360efbdSAlfred Perlsteinare accessed using the 102723601548SRuslan Ermilov.Tn UDP/IP 10288360efbdSAlfred Perlsteintransport; see 102923601548SRuslan Ermilov.Fn svcudp_create 10308360efbdSAlfred Perlsteinfor restrictions. 103123601548SRuslan Ermilov.Pp 103223601548SRuslan Ermilov.It Xo 103323601548SRuslan Ermilov.Vt "struct rpc_createerr" rpc_createerr ; 103423601548SRuslan Ermilov.Xc 103523601548SRuslan Ermilov.Pp 10368360efbdSAlfred PerlsteinA global variable whose value is set by any 103723601548SRuslan Ermilov.Tn RPC 10388360efbdSAlfred Perlsteinclient creation routine 103923601548SRuslan Ermilovthat does not succeed. 104023601548SRuslan ErmilovUse the routine 104123601548SRuslan Ermilov.Fn clnt_pcreateerror 10428360efbdSAlfred Perlsteinto print the reason why. 104323601548SRuslan Ermilov.Pp 104423601548SRuslan Ermilov.It Xo 104523601548SRuslan Ermilov.Ft bool_t 104623601548SRuslan Ermilov.Fn svc_destroy "SVCXPRT * xprt" 104723601548SRuslan Ermilov.Xc 104823601548SRuslan Ermilov.Pp 10498360efbdSAlfred PerlsteinA macro that destroys the 105023601548SRuslan Ermilov.Tn RPC 10518360efbdSAlfred Perlsteinservice transport handle, 105223601548SRuslan Ermilov.Fa xprt . 10538360efbdSAlfred PerlsteinDestruction usually involves deallocation 10548360efbdSAlfred Perlsteinof private data structures, including 105523601548SRuslan Ermilov.Fa xprt 105623601548SRuslan Ermilovitself. 105723601548SRuslan ErmilovUse of 105823601548SRuslan Ermilov.Fa xprt 10598360efbdSAlfred Perlsteinis undefined after calling this routine. 106023601548SRuslan Ermilov.Pp 106123601548SRuslan Ermilov.It Xo 106223601548SRuslan Ermilov.Vt fd_set svc_fdset ; 106323601548SRuslan Ermilov.Xc 106423601548SRuslan Ermilov.Pp 10658360efbdSAlfred PerlsteinA global variable reflecting the 106623601548SRuslan Ermilov.Tn RPC 10678360efbdSAlfred Perlsteinservice side's 10682efeeba5SRuslan Ermilovread file descriptor bit mask; it is suitable as a template argument 10698360efbdSAlfred Perlsteinto the 107023601548SRuslan Ermilov.Xr select 2 107123601548SRuslan Ermilovsystem call. 107223601548SRuslan ErmilovThis is only of interest 10738360efbdSAlfred Perlsteinif a service implementor does not call 107423601548SRuslan Ermilov.Fn svc_run , 10758360efbdSAlfred Perlsteinbut rather does his own asynchronous event processing. 107623601548SRuslan ErmilovThis variable is read\-only (do not pass its address to 107723601548SRuslan Ermilov.Xr select 2 ! ) , 10788360efbdSAlfred Perlsteinyet it may change after calls to 107923601548SRuslan Ermilov.Fn svc_getreqset 10808360efbdSAlfred Perlsteinor any creation routines. 108123601548SRuslan ErmilovAs well, note that if the process has descriptor limits 108223601548SRuslan Ermilovwhich are extended beyond 108323601548SRuslan Ermilov.Dv FD_SETSIZE , 108423601548SRuslan Ermilovthis variable will only be usable for the first 108523601548SRuslan Ermilov.Dv FD_SETSIZE 108623601548SRuslan Ermilovdescriptors. 108723601548SRuslan Ermilov.Pp 108823601548SRuslan Ermilov.It Xo 108923601548SRuslan Ermilov.Vt int svc_fds ; 109023601548SRuslan Ermilov.Xc 109123601548SRuslan Ermilov.Pp 10928360efbdSAlfred PerlsteinSimilar to 109323601548SRuslan Ermilov.Va svc_fdset , 109423601548SRuslan Ermilovbut limited to 32 descriptors. 109523601548SRuslan ErmilovThis 10968360efbdSAlfred Perlsteininterface is obsoleted by 109723601548SRuslan Ermilov.Va svc_fdset . 109823601548SRuslan Ermilov.Pp 109923601548SRuslan Ermilov.It Xo 110023601548SRuslan Ermilov.Ft bool_t 110123601548SRuslan Ermilov.Fn svc_freeargs "SVCXPRT *xprt" "xdrproc_t inproc" "char *in" 110223601548SRuslan Ermilov.Xc 110323601548SRuslan Ermilov.Pp 11048360efbdSAlfred PerlsteinA macro that frees any data allocated by the 110523601548SRuslan Ermilov.Tn RPC/XDR 11068360efbdSAlfred Perlsteinsystem when it decoded the arguments to a service procedure 11078360efbdSAlfred Perlsteinusing 110823601548SRuslan Ermilov.Fn svc_getargs . 11098360efbdSAlfred PerlsteinThis routine returns 1 if the results were successfully 11108360efbdSAlfred Perlsteinfreed, 11118360efbdSAlfred Perlsteinand zero otherwise. 111223601548SRuslan Ermilov.Pp 111323601548SRuslan Ermilov.It Xo 111423601548SRuslan Ermilov.Ft bool_t 111523601548SRuslan Ermilov.Fn svc_getargs "SVCXPRT *xprt" "xdrproc_t inproc" "char *in" 111623601548SRuslan Ermilov.Xc 111723601548SRuslan Ermilov.Pp 11188360efbdSAlfred PerlsteinA macro that decodes the arguments of an 111923601548SRuslan Ermilov.Tn RPC 11208360efbdSAlfred Perlsteinrequest 11218360efbdSAlfred Perlsteinassociated with the 112223601548SRuslan Ermilov.Tn RPC 11238360efbdSAlfred Perlsteinservice transport handle, 112423601548SRuslan Ermilov.Fa xprt . 11252efeeba5SRuslan ErmilovThe 112623601548SRuslan Ermilov.Fa in 11272efeeba5SRuslan Ermilovargument 11288360efbdSAlfred Perlsteinis the address where the arguments will be placed; 112923601548SRuslan Ermilov.Fa inproc 11308360efbdSAlfred Perlsteinis the 113123601548SRuslan Ermilov.Tn XDR 11328360efbdSAlfred Perlsteinroutine used to decode the arguments. 11338360efbdSAlfred PerlsteinThis routine returns one if decoding succeeds, and zero 11348360efbdSAlfred Perlsteinotherwise. 113523601548SRuslan Ermilov.Pp 113623601548SRuslan Ermilov.It Xo 113723601548SRuslan Ermilov.Ft "struct sockaddr_in *" 113823601548SRuslan Ermilov.Xc 113923601548SRuslan Ermilov.It Xo 114023601548SRuslan Ermilov.Fn svc_getcaller "SVCXPRT *xprt" 114123601548SRuslan Ermilov.Xc 114223601548SRuslan Ermilov.Pp 11438360efbdSAlfred PerlsteinThe approved way of getting the network address of the caller 11448360efbdSAlfred Perlsteinof a procedure associated with the 114523601548SRuslan Ermilov.Tn RPC 11468360efbdSAlfred Perlsteinservice transport handle, 114723601548SRuslan Ermilov.Fa xprt . 114823601548SRuslan Ermilov.Pp 114923601548SRuslan Ermilov.It Xo 115023601548SRuslan Ermilov.Ft void 115123601548SRuslan Ermilov.Fn svc_getreqset "fd_set *rdfds" 115223601548SRuslan Ermilov.Xc 115323601548SRuslan Ermilov.Pp 11548360efbdSAlfred PerlsteinThis routine is only of interest if a service implementor 11558360efbdSAlfred Perlsteindoes not call 115623601548SRuslan Ermilov.Fn svc_run , 11578360efbdSAlfred Perlsteinbut instead implements custom asynchronous event processing. 11588360efbdSAlfred PerlsteinIt is called when the 115923601548SRuslan Ermilov.Xr select 2 11608360efbdSAlfred Perlsteinsystem call has determined that an 116123601548SRuslan Ermilov.Tn RPC 11628360efbdSAlfred Perlsteinrequest has arrived on some 116323601548SRuslan Ermilov.Tn RPC 116423601548SRuslan Ermilovsocket(s); 116523601548SRuslan Ermilov.Fa rdfds 11668360efbdSAlfred Perlsteinis the resultant read file descriptor bit mask. 11678360efbdSAlfred PerlsteinThe routine returns when all sockets associated with the 11688360efbdSAlfred Perlsteinvalue of 116923601548SRuslan Ermilov.Fa rdfds 11708360efbdSAlfred Perlsteinhave been serviced. 117123601548SRuslan Ermilov.Pp 117223601548SRuslan Ermilov.It Xo 117323601548SRuslan Ermilov.Ft void 117423601548SRuslan Ermilov.Fn svc_getreq "int rdfds" 117523601548SRuslan Ermilov.Xc 117623601548SRuslan Ermilov.Pp 11778360efbdSAlfred PerlsteinSimilar to 117823601548SRuslan Ermilov.Fn svc_getreqset , 117923601548SRuslan Ermilovbut limited to 32 descriptors. 118023601548SRuslan ErmilovThis interface is obsoleted by 118123601548SRuslan Ermilov.Fn svc_getreqset . 118223601548SRuslan Ermilov.Pp 118323601548SRuslan Ermilov.It Xo 118423601548SRuslan Ermilov.Ft bool_t 118523601548SRuslan Ermilov.Fo svc_register 118623601548SRuslan Ermilov.Fa "SVCXPRT *xprt" 118723601548SRuslan Ermilov.Fa "u_long prognum" 118823601548SRuslan Ermilov.Fa "u_long versnum" 118923601548SRuslan Ermilov.Fa "void (*dispatch)(struct svc_req *, SVCXPRT *)" 119023601548SRuslan Ermilov.Fa "int protocol" 119123601548SRuslan Ermilov.Fc 119223601548SRuslan Ermilov.Xc 119323601548SRuslan Ermilov.Pp 11948360efbdSAlfred PerlsteinAssociates 119523601548SRuslan Ermilov.Fa prognum 11968360efbdSAlfred Perlsteinand 119723601548SRuslan Ermilov.Fa versnum 11988360efbdSAlfred Perlsteinwith the service dispatch procedure, 119923601548SRuslan Ermilov.Fn dispatch . 12008360efbdSAlfred PerlsteinIf 120123601548SRuslan Ermilov.Fa protocol 12028360efbdSAlfred Perlsteinis zero, the service is not registered with the 12038657581bSMaxim Sobolev.Xr rpcbind 8 120423601548SRuslan Ermilovservice. 120523601548SRuslan ErmilovIf 120623601548SRuslan Ermilov.Fa protocol 12078360efbdSAlfred Perlsteinis non-zero, then a mapping of the triple 120823601548SRuslan Ermilov.Pq Fa prognum , versnum , protocol 12098360efbdSAlfred Perlsteinto 121023601548SRuslan Ermilov.Fa xprt\->xp_port 12118360efbdSAlfred Perlsteinis established with the local 12128657581bSMaxim Sobolev.Xr rpcbind 8 12138360efbdSAlfred Perlsteinservice (generally 121423601548SRuslan Ermilov.Fa protocol 12158360efbdSAlfred Perlsteinis zero, 121623601548SRuslan Ermilov.Dv IPPROTO_UDP 12178360efbdSAlfred Perlsteinor 121823601548SRuslan Ermilov.Dv IPPROTO_TCP ) . 12198360efbdSAlfred PerlsteinThe procedure 122023601548SRuslan Ermilov.Fn dispatch 12218360efbdSAlfred Perlsteinhas the following form: 122223601548SRuslan Ermilov.Bd -ragged -offset indent 122323601548SRuslan Ermilov.Ft bool_t 122423601548SRuslan Ermilov.Fn dispatch "struct svc_req *request" "SVCXPRT *xprt" 122523601548SRuslan Ermilov.Ed 122623601548SRuslan Ermilov.Pp 12278360efbdSAlfred PerlsteinThe 122823601548SRuslan Ermilov.Fn svc_register 12298360efbdSAlfred Perlsteinroutine returns one if it succeeds, and zero otherwise. 123023601548SRuslan Ermilov.Pp 123123601548SRuslan Ermilov.It Xo 123223601548SRuslan Ermilov.Fn svc_run 123323601548SRuslan Ermilov.Xc 123423601548SRuslan Ermilov.Pp 123523601548SRuslan ErmilovThis routine never returns. 123623601548SRuslan ErmilovIt waits for 123723601548SRuslan Ermilov.Tn RPC 12388360efbdSAlfred Perlsteinrequests to arrive, and calls the appropriate service 12398360efbdSAlfred Perlsteinprocedure using 124023601548SRuslan Ermilov.Fn svc_getreq 124123601548SRuslan Ermilovwhen one arrives. 124223601548SRuslan ErmilovThis procedure is usually waiting for a 124323601548SRuslan Ermilov.Xr select 2 12448360efbdSAlfred Perlsteinsystem call to return. 124523601548SRuslan Ermilov.Pp 124623601548SRuslan Ermilov.It Xo 124723601548SRuslan Ermilov.Ft bool_t 124823601548SRuslan Ermilov.Fn svc_sendreply "SVCXPRT *xprt" "xdrproc_t outproc" "char *out" 124923601548SRuslan Ermilov.Xc 125023601548SRuslan Ermilov.Pp 12518360efbdSAlfred PerlsteinCalled by an 125223601548SRuslan Ermilov.Tn RPC 12538360efbdSAlfred Perlsteinservice's dispatch routine to send the results of a 125423601548SRuslan Ermilovremote procedure call. 12552efeeba5SRuslan ErmilovThe 125623601548SRuslan Ermilov.Fa xprt 12572efeeba5SRuslan Ermilovargument 12588360efbdSAlfred Perlsteinis the request's associated transport handle; 125923601548SRuslan Ermilov.Fa outproc 12608360efbdSAlfred Perlsteinis the 126123601548SRuslan Ermilov.Tn XDR 12628360efbdSAlfred Perlsteinroutine which is used to encode the results; and 126323601548SRuslan Ermilov.Fa out 12648360efbdSAlfred Perlsteinis the address of the results. 12658360efbdSAlfred PerlsteinThis routine returns one if it succeeds, zero otherwise. 126623601548SRuslan Ermilov.Pp 126723601548SRuslan Ermilov.It Xo 126823601548SRuslan Ermilov.Ft void 126923601548SRuslan Ermilov.Xc 127023601548SRuslan Ermilov.It Xo 127123601548SRuslan Ermilov.Fn svc_unregister "u_long prognum" "u_long versnum" 127223601548SRuslan Ermilov.Xc 127323601548SRuslan Ermilov.Pp 12748360efbdSAlfred PerlsteinRemove all mapping of the double 127523601548SRuslan Ermilov.Pq Fa prognum , versnum 12768360efbdSAlfred Perlsteinto dispatch routines, and of the triple 127723601548SRuslan Ermilov.Pq Fa prognum , versnum , * 12788360efbdSAlfred Perlsteinto port number. 127923601548SRuslan Ermilov.Pp 128023601548SRuslan Ermilov.It Xo 128123601548SRuslan Ermilov.Ft void 128223601548SRuslan Ermilov.Xc 128323601548SRuslan Ermilov.It Xo 128423601548SRuslan Ermilov.Fn svcerr_auth "SVCXPRT *xprt" "enum auth_stat why" 128523601548SRuslan Ermilov.Xc 128623601548SRuslan Ermilov.Pp 12878360efbdSAlfred PerlsteinCalled by a service dispatch routine that refuses to perform 12888360efbdSAlfred Perlsteina remote procedure call due to an authentication error. 128923601548SRuslan Ermilov.Pp 129023601548SRuslan Ermilov.It Xo 129123601548SRuslan Ermilov.Ft void 129223601548SRuslan Ermilov.Xc 129323601548SRuslan Ermilov.It Xo 129423601548SRuslan Ermilov.Fn svcerr_decode "SVCXPRT *xprt" 129523601548SRuslan Ermilov.Xc 129623601548SRuslan Ermilov.Pp 12978360efbdSAlfred PerlsteinCalled by a service dispatch routine that cannot successfully 12982efeeba5SRuslan Ermilovdecode its arguments. 129923601548SRuslan ErmilovSee also 130023601548SRuslan Ermilov.Fn svc_getargs . 130123601548SRuslan Ermilov.Pp 130223601548SRuslan Ermilov.It Xo 130323601548SRuslan Ermilov.Ft void 130423601548SRuslan Ermilov.Xc 130523601548SRuslan Ermilov.It Xo 130623601548SRuslan Ermilov.Fn svcerr_noproc "SVCXPRT *xprt" 130723601548SRuslan Ermilov.Xc 130823601548SRuslan Ermilov.Pp 13098360efbdSAlfred PerlsteinCalled by a service dispatch routine that does not implement 13108360efbdSAlfred Perlsteinthe procedure number that the caller requests. 131123601548SRuslan Ermilov.Pp 131223601548SRuslan Ermilov.It Xo 131323601548SRuslan Ermilov.Ft void 131423601548SRuslan Ermilov.Xc 131523601548SRuslan Ermilov.It Xo 131623601548SRuslan Ermilov.Fn svcerr_noprog "SVCXPRT *xprt" 131723601548SRuslan Ermilov.Xc 131823601548SRuslan Ermilov.Pp 13198360efbdSAlfred PerlsteinCalled when the desired program is not registered with the 132023601548SRuslan Ermilov.Tn RPC 132123601548SRuslan Ermilovpackage. 132223601548SRuslan ErmilovService implementors usually do not need this routine. 132323601548SRuslan Ermilov.Pp 132423601548SRuslan Ermilov.It Xo 132523601548SRuslan Ermilov.Ft void 132623601548SRuslan Ermilov.Xc 132723601548SRuslan Ermilov.It Xo 132823601548SRuslan Ermilov.Fn svcerr_progvers "SVCXPRT *xprt" "u_long low_vers" "u_long high_vers" 132923601548SRuslan Ermilov.Xc 133023601548SRuslan Ermilov.Pp 13318360efbdSAlfred PerlsteinCalled when the desired version of a program is not registered 13328360efbdSAlfred Perlsteinwith the 133323601548SRuslan Ermilov.Tn RPC 133423601548SRuslan Ermilovpackage. 133523601548SRuslan ErmilovService implementors usually do not need this routine. 133623601548SRuslan Ermilov.Pp 133723601548SRuslan Ermilov.It Xo 133823601548SRuslan Ermilov.Ft void 133923601548SRuslan Ermilov.Xc 134023601548SRuslan Ermilov.It Xo 134123601548SRuslan Ermilov.Fn svcerr_systemerr "SVCXPRT *xprt" 134223601548SRuslan Ermilov.Xc 134323601548SRuslan Ermilov.Pp 13448360efbdSAlfred PerlsteinCalled by a service dispatch routine when it detects a system 13458360efbdSAlfred Perlsteinerror 13468360efbdSAlfred Perlsteinnot covered by any particular protocol. 13478360efbdSAlfred PerlsteinFor example, if a service can no longer allocate storage, 13488360efbdSAlfred Perlsteinit may call this routine. 134923601548SRuslan Ermilov.Pp 135023601548SRuslan Ermilov.It Xo 135123601548SRuslan Ermilov.Ft void 135223601548SRuslan Ermilov.Xc 135323601548SRuslan Ermilov.It Xo 135423601548SRuslan Ermilov.Fn svcerr_weakauth "SVCXPRT *xprt" 135523601548SRuslan Ermilov.Xc 135623601548SRuslan Ermilov.Pp 13578360efbdSAlfred PerlsteinCalled by a service dispatch routine that refuses to perform 13588360efbdSAlfred Perlsteina remote procedure call due to insufficient 13592efeeba5SRuslan Ermilovauthentication arguments. 136023601548SRuslan ErmilovThe routine calls 136123601548SRuslan Ermilov.Fn svcerr_auth xprt AUTH_TOOWEAK . 136223601548SRuslan Ermilov.Pp 136323601548SRuslan Ermilov.It Xo 136423601548SRuslan Ermilov.Ft "SVCXPRT *" 136523601548SRuslan Ermilov.Xc 136623601548SRuslan Ermilov.It Xo 136723601548SRuslan Ermilov.Fn svcraw_create void 136823601548SRuslan Ermilov.Xc 136923601548SRuslan Ermilov.Pp 13708360efbdSAlfred PerlsteinThis routine creates a toy 137123601548SRuslan Ermilov.Tn RPC 137223601548SRuslan Ermilovservice transport, to which it returns a pointer. 137323601548SRuslan ErmilovThe transport 13748360efbdSAlfred Perlsteinis really a buffer within the process's address space, 13758360efbdSAlfred Perlsteinso the corresponding 137623601548SRuslan Ermilov.Tn RPC 13778360efbdSAlfred Perlsteinclient should live in the same 13788360efbdSAlfred Perlsteinaddress space; 13798360efbdSAlfred Perlsteinsee 138023601548SRuslan Ermilov.Fn clntraw_create . 13818360efbdSAlfred PerlsteinThis routine allows simulation of 138223601548SRuslan Ermilov.Tn RPC 13838360efbdSAlfred Perlsteinand acquisition of 138423601548SRuslan Ermilov.Tn RPC 13858360efbdSAlfred Perlsteinoverheads (such as round trip times), without any kernel 13868360efbdSAlfred Perlsteininterference. 13878360efbdSAlfred PerlsteinThis routine returns 138823601548SRuslan Ermilov.Dv NULL 13898360efbdSAlfred Perlsteinif it fails. 139023601548SRuslan Ermilov.Pp 139123601548SRuslan Ermilov.It Xo 139223601548SRuslan Ermilov.Ft "SVCXPRT *" 139323601548SRuslan Ermilov.Xc 139423601548SRuslan Ermilov.It Xo 139523601548SRuslan Ermilov.Fn svctcp_create "int sock" "u_int send_buf_size" "u_int recv_buf_size" 139623601548SRuslan Ermilov.Xc 139723601548SRuslan Ermilov.Pp 13988360efbdSAlfred PerlsteinThis routine creates a 139923601548SRuslan Ermilov.Tn TCP/IP Ns \-based 140023601548SRuslan Ermilov.Tn RPC 14018360efbdSAlfred Perlsteinservice transport, to which it returns a pointer. 14028360efbdSAlfred PerlsteinThe transport is associated with the socket 140323601548SRuslan Ermilov.Fa sock , 14048360efbdSAlfred Perlsteinwhich may be 140523601548SRuslan Ermilov.Dv RPC_ANYSOCK , 14068360efbdSAlfred Perlsteinin which case a new socket is created. 14078360efbdSAlfred PerlsteinIf the socket is not bound to a local 140823601548SRuslan Ermilov.Tn TCP 140923601548SRuslan Ermilovport, then this routine binds it to an arbitrary port. 141023601548SRuslan ErmilovUpon completion, 141123601548SRuslan Ermilov.Fa xprt\->xp_fd 14128360efbdSAlfred Perlsteinis the transport's socket descriptor, and 141323601548SRuslan Ermilov.Fa xprt\->xp_port 14148360efbdSAlfred Perlsteinis the transport's port number. 14158360efbdSAlfred PerlsteinThis routine returns 141623601548SRuslan Ermilov.Dv NULL 141723601548SRuslan Ermilovif it fails. 141823601548SRuslan ErmilovSince 141923601548SRuslan Ermilov.Tn TCP Ns \-based 142023601548SRuslan Ermilov.Tn RPC 14218360efbdSAlfred Perlsteinuses buffered 142223601548SRuslan Ermilov.Tn I/O , 14238360efbdSAlfred Perlsteinusers may specify the size of buffers; values of zero 14248360efbdSAlfred Perlsteinchoose suitable defaults. 142523601548SRuslan Ermilov.Pp 142623601548SRuslan Ermilov.It Xo 142723601548SRuslan Ermilov.Ft "SVCXPRT *" 142823601548SRuslan Ermilov.Xc 142923601548SRuslan Ermilov.It Xo 1430e6f9ad07SBill Paul.Fn svcunix_create "int sock" "u_int send_buf_size" "u_int recv_buf_size" "char *path" 1431e6f9ad07SBill Paul.Xc 1432e6f9ad07SBill Paul.Pp 1433e6f9ad07SBill PaulThis routine creates a 1434872013cbSRuslan Ermilov.Ux Ns -based 1435e6f9ad07SBill Paul.Tn RPC 1436e6f9ad07SBill Paulservice transport, to which it returns a pointer. 1437e6f9ad07SBill PaulThe transport is associated with the socket 1438e6f9ad07SBill Paul.Fa sock , 1439e6f9ad07SBill Paulwhich may be 1440e6f9ad07SBill Paul.Dv RPC_ANYSOCK , 1441e6f9ad07SBill Paulin which case a new socket is created. 14422efeeba5SRuslan ErmilovThe 1443e6f9ad07SBill Paul.Fa *path 14442efeeba5SRuslan Ermilovargument 1445e6f9ad07SBill Paulis a variable-length file system pathname of 1446e6f9ad07SBill Paulat most 104 characters. 1447e6f9ad07SBill PaulThis file is 1448e6f9ad07SBill Paul.Em not 1449e6f9ad07SBill Paulremoved when the socket is closed. 1450d6498251SPhilippe CharnierThe 1451e6f9ad07SBill Paul.Xr unlink 2 1452d6498251SPhilippe Charniersystem call must be used to remove the file. 1453e6f9ad07SBill PaulUpon completion, 1454e6f9ad07SBill Paul.Fa xprt\->xp_fd 1455e6f9ad07SBill Paulis the transport's socket descriptor. 1456e6f9ad07SBill PaulThis routine returns 1457e6f9ad07SBill Paul.Dv NULL 1458e6f9ad07SBill Paulif it fails. 1459e6f9ad07SBill PaulSince 1460872013cbSRuslan Ermilov.Ux Ns -based 1461e6f9ad07SBill Paul.Tn RPC 1462e6f9ad07SBill Pauluses buffered 1463e6f9ad07SBill Paul.Tn I/O , 1464e6f9ad07SBill Paulusers may specify the size of buffers; values of zero 1465e6f9ad07SBill Paulchoose suitable defaults. 1466e6f9ad07SBill Paul.Pp 1467e6f9ad07SBill Paul.It Xo 1468e6f9ad07SBill Paul.Ft "SVCXPRT *" 1469e6f9ad07SBill Paul.Xc 1470e6f9ad07SBill Paul.It Xo 1471e6f9ad07SBill Paul.Fn svcunixfd_create "int fd" "u_int sendsize" "u_int recvsize" 1472e6f9ad07SBill Paul.Xc 1473e6f9ad07SBill Paul.Pp 1474e6f9ad07SBill PaulCreate a service on top of any open descriptor. 14752efeeba5SRuslan ErmilovThe 1476e6f9ad07SBill Paul.Fa sendsize 1477e6f9ad07SBill Pauland 1478e6f9ad07SBill Paul.Fa recvsize 14792efeeba5SRuslan Ermilovarguments 1480e6f9ad07SBill Paulindicate sizes for the send and receive buffers. 1481e6f9ad07SBill PaulIf they are 1482e6f9ad07SBill Paulzero, a reasonable default is chosen. 1483e6f9ad07SBill Paul.Pp 1484e6f9ad07SBill Paul.It Xo 1485e6f9ad07SBill Paul.Ft "SVCXPRT *" 1486e6f9ad07SBill Paul.Xc 1487e6f9ad07SBill Paul.It Xo 148823601548SRuslan Ermilov.Fn svcfd_create "int fd" "u_int sendsize" "u_int recvsize" 148923601548SRuslan Ermilov.Xc 149023601548SRuslan Ermilov.Pp 149123601548SRuslan ErmilovCreate a service on top of any open descriptor. 149223601548SRuslan ErmilovTypically, 14938360efbdSAlfred Perlsteinthis 14948360efbdSAlfred Perlsteindescriptor is a connected socket for a stream protocol such 14958360efbdSAlfred Perlsteinas 149623601548SRuslan Ermilov.Tn TCP . 14972efeeba5SRuslan ErmilovThe 149823601548SRuslan Ermilov.Fa sendsize 14998360efbdSAlfred Perlsteinand 150023601548SRuslan Ermilov.Fa recvsize 15012efeeba5SRuslan Ermilovarguments 150223601548SRuslan Ermilovindicate sizes for the send and receive buffers. 150323601548SRuslan ErmilovIf they are 15048360efbdSAlfred Perlsteinzero, a reasonable default is chosen. 150523601548SRuslan Ermilov.Pp 150623601548SRuslan Ermilov.It Xo 150723601548SRuslan Ermilov.Ft "SVCXPRT *" 150823601548SRuslan Ermilov.Xc 150923601548SRuslan Ermilov.It Xo 151023601548SRuslan Ermilov.Fn svcudp_bufcreate "int sock" "u_int sendsize" "u_int recvsize" 151123601548SRuslan Ermilov.Xc 151223601548SRuslan Ermilov.Pp 15138360efbdSAlfred PerlsteinThis routine creates a 151423601548SRuslan Ermilov.Tn UDP/IP Ns \-based 151523601548SRuslan Ermilov.Tn RPC 15168360efbdSAlfred Perlsteinservice transport, to which it returns a pointer. 15178360efbdSAlfred PerlsteinThe transport is associated with the socket 151823601548SRuslan Ermilov.Fa sock , 15198360efbdSAlfred Perlsteinwhich may be 152023601548SRuslan Ermilov.Dv RPC_ANYSOCK , 15218360efbdSAlfred Perlsteinin which case a new socket is created. 15228360efbdSAlfred PerlsteinIf the socket is not bound to a local 152323601548SRuslan Ermilov.Tn UDP 152423601548SRuslan Ermilovport, then this routine binds it to an arbitrary port. 152523601548SRuslan ErmilovUpon 15268360efbdSAlfred Perlsteincompletion, 152723601548SRuslan Ermilov.Fa xprt\->xp_fd 15288360efbdSAlfred Perlsteinis the transport's socket descriptor, and 152923601548SRuslan Ermilov.Fa xprt\->xp_port 15308360efbdSAlfred Perlsteinis the transport's port number. 15318360efbdSAlfred PerlsteinThis routine returns 153223601548SRuslan Ermilov.Dv NULL 15338360efbdSAlfred Perlsteinif it fails. 153423601548SRuslan Ermilov.Pp 15358360efbdSAlfred PerlsteinThis allows the user to specify the maximum packet size for sending and 15368360efbdSAlfred Perlsteinreceiving 153723601548SRuslan Ermilov.Tn UDP Ns \-based 153823601548SRuslan Ermilov.Tn RPC 153923601548SRuslan Ermilovmessages. 154023601548SRuslan Ermilov.Pp 154123601548SRuslan Ermilov.It Xo 154223601548SRuslan Ermilov.Ft bool_t 154323601548SRuslan Ermilov.Fn xdr_accepted_reply "XDR *xdrs" "struct accepted_reply *ar" 154423601548SRuslan Ermilov.Xc 154523601548SRuslan Ermilov.Pp 15468360efbdSAlfred PerlsteinUsed for encoding 154723601548SRuslan Ermilov.Tn RPC 154823601548SRuslan Ermilovreply messages. 154923601548SRuslan ErmilovThis routine is useful for users who 15508360efbdSAlfred Perlsteinwish to generate 155123601548SRuslan Ermilov.Tn RPC Ns \-style 15528360efbdSAlfred Perlsteinmessages without using the 155323601548SRuslan Ermilov.Tn RPC 15548360efbdSAlfred Perlsteinpackage. 155523601548SRuslan Ermilov.Pp 155623601548SRuslan Ermilov.It Xo 155723601548SRuslan Ermilov.Ft bool_t 155823601548SRuslan Ermilov.Fn xdr_authunix_parms "XDR *xdrs" "struct authunix_parms *aupp" 155923601548SRuslan Ermilov.Xc 156023601548SRuslan Ermilov.Pp 15618360efbdSAlfred PerlsteinUsed for describing 156223601548SRuslan Ermilov.Ux 156323601548SRuslan Ermilovcredentials. 156423601548SRuslan ErmilovThis routine is useful for users 15658360efbdSAlfred Perlsteinwho wish to generate these credentials without using the 156623601548SRuslan Ermilov.Tn RPC 15678360efbdSAlfred Perlsteinauthentication package. 156823601548SRuslan Ermilov.Pp 156923601548SRuslan Ermilov.It Xo 157023601548SRuslan Ermilov.Ft void 157123601548SRuslan Ermilov.Xc 157223601548SRuslan Ermilov.It Xo 157323601548SRuslan Ermilov.Ft bool_t 157423601548SRuslan Ermilov.Fn xdr_callhdr "XDR *xdrs" "struct rpc_msg *chdr" 157523601548SRuslan Ermilov.Xc 157623601548SRuslan Ermilov.Pp 15778360efbdSAlfred PerlsteinUsed for describing 157823601548SRuslan Ermilov.Tn RPC 15798360efbdSAlfred Perlsteincall header messages. 15808360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 158123601548SRuslan Ermilov.Tn RPC Ns \-style 15828360efbdSAlfred Perlsteinmessages without using the 158323601548SRuslan Ermilov.Tn RPC 15848360efbdSAlfred Perlsteinpackage. 158523601548SRuslan Ermilov.Pp 158623601548SRuslan Ermilov.It Xo 158723601548SRuslan Ermilov.Ft bool_t 158823601548SRuslan Ermilov.Fn xdr_callmsg "XDR *xdrs" "struct rpc_msg *cmsg" 158923601548SRuslan Ermilov.Xc 159023601548SRuslan Ermilov.Pp 15918360efbdSAlfred PerlsteinUsed for describing 159223601548SRuslan Ermilov.Tn RPC 15938360efbdSAlfred Perlsteincall messages. 15948360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 159523601548SRuslan Ermilov.Tn RPC Ns \-style 15968360efbdSAlfred Perlsteinmessages without using the 159723601548SRuslan Ermilov.Tn RPC 15988360efbdSAlfred Perlsteinpackage. 159923601548SRuslan Ermilov.Pp 160023601548SRuslan Ermilov.It Xo 160123601548SRuslan Ermilov.Ft bool_t 160223601548SRuslan Ermilov.Fn xdr_opaque_auth "XDR *xdrs" "struct opaque_auth *ap" 160323601548SRuslan Ermilov.Xc 160423601548SRuslan Ermilov.Pp 16058360efbdSAlfred PerlsteinUsed for describing 160623601548SRuslan Ermilov.Tn RPC 16078360efbdSAlfred Perlsteinauthentication information messages. 16088360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 160923601548SRuslan Ermilov.Tn RPC Ns \-style 16108360efbdSAlfred Perlsteinmessages without using the 161123601548SRuslan Ermilov.Tn RPC 16128360efbdSAlfred Perlsteinpackage. 161323601548SRuslan Ermilov.Pp 161423601548SRuslan Ermilov.It Xo 161523601548SRuslan Ermilov.Vt struct pmap ; 161623601548SRuslan Ermilov.Xc 161723601548SRuslan Ermilov.It Xo 161823601548SRuslan Ermilov.Ft bool_t 161923601548SRuslan Ermilov.Fn xdr_pmap "XDR *xdrs" "struct pmap *regs" 162023601548SRuslan Ermilov.Xc 162123601548SRuslan Ermilov.Pp 16222efeeba5SRuslan ErmilovUsed for describing arguments to various 16238657581bSMaxim Sobolev.Xr rpcbind 8 16248360efbdSAlfred Perlsteinprocedures, externally. 16258360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 16262efeeba5SRuslan Ermilovthese arguments without using the 162723601548SRuslan Ermilov.Fn pmap_* 16288360efbdSAlfred Perlsteininterface. 162923601548SRuslan Ermilov.Pp 163023601548SRuslan Ermilov.It Xo 163123601548SRuslan Ermilov.Ft bool_t 163223601548SRuslan Ermilov.Fn xdr_pmaplist "XDR *xdrs" "struct pmaplist **rp" 163323601548SRuslan Ermilov.Xc 163423601548SRuslan Ermilov.Pp 16358360efbdSAlfred PerlsteinUsed for describing a list of port mappings, externally. 16368360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 16372efeeba5SRuslan Ermilovthese arguments without using the 163823601548SRuslan Ermilov.Fn pmap_* 16398360efbdSAlfred Perlsteininterface. 164023601548SRuslan Ermilov.Pp 164123601548SRuslan Ermilov.It Xo 164223601548SRuslan Ermilov.Ft bool_t 164323601548SRuslan Ermilov.Fn xdr_rejected_reply "XDR *xdrs" "struct rejected_reply *rr" 164423601548SRuslan Ermilov.Xc 164523601548SRuslan Ermilov.Pp 16468360efbdSAlfred PerlsteinUsed for describing 164723601548SRuslan Ermilov.Tn RPC 16488360efbdSAlfred Perlsteinreply messages. 16498360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 165023601548SRuslan Ermilov.Tn RPC Ns \-style 16518360efbdSAlfred Perlsteinmessages without using the 165223601548SRuslan Ermilov.Tn RPC 16538360efbdSAlfred Perlsteinpackage. 165423601548SRuslan Ermilov.Pp 165523601548SRuslan Ermilov.It Xo 165623601548SRuslan Ermilov.Ft bool_t 165723601548SRuslan Ermilov.Fn xdr_replymsg "XDR *xdrs" "struct rpc_msg *rmsg" 165823601548SRuslan Ermilov.Xc 165923601548SRuslan Ermilov.Pp 16608360efbdSAlfred PerlsteinUsed for describing 166123601548SRuslan Ermilov.Tn RPC 16628360efbdSAlfred Perlsteinreply messages. 16638360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 166423601548SRuslan Ermilov.Tn RPC 16658360efbdSAlfred Perlsteinstyle messages without using the 166623601548SRuslan Ermilov.Tn RPC 16678360efbdSAlfred Perlsteinpackage. 166823601548SRuslan Ermilov.Pp 166923601548SRuslan Ermilov.It Xo 167023601548SRuslan Ermilov.Ft void 167123601548SRuslan Ermilov.Xc 167223601548SRuslan Ermilov.It Xo 167323601548SRuslan Ermilov.Fn xprt_register "SVCXPRT *xprt" 167423601548SRuslan Ermilov.Xc 167523601548SRuslan Ermilov.Pp 16768360efbdSAlfred PerlsteinAfter 167723601548SRuslan Ermilov.Tn RPC 16788360efbdSAlfred Perlsteinservice transport handles are created, 16798360efbdSAlfred Perlsteinthey should register themselves with the 168023601548SRuslan Ermilov.Tn RPC 16818360efbdSAlfred Perlsteinservice package. 16828360efbdSAlfred PerlsteinThis routine modifies the global variable 168323601548SRuslan Ermilov.Va svc_fds . 16848360efbdSAlfred PerlsteinService implementors usually do not need this routine. 168523601548SRuslan Ermilov.Pp 168623601548SRuslan Ermilov.It Xo 168723601548SRuslan Ermilov.Ft void 168823601548SRuslan Ermilov.Xc 168923601548SRuslan Ermilov.It Xo 169023601548SRuslan Ermilov.Fn xprt_unregister "SVCXPRT *xprt" 169123601548SRuslan Ermilov.Xc 169223601548SRuslan Ermilov.Pp 16938360efbdSAlfred PerlsteinBefore an 169423601548SRuslan Ermilov.Tn RPC 16958360efbdSAlfred Perlsteinservice transport handle is destroyed, 16968360efbdSAlfred Perlsteinit should unregister itself with the 169723601548SRuslan Ermilov.Tn RPC 16988360efbdSAlfred Perlsteinservice package. 16998360efbdSAlfred PerlsteinThis routine modifies the global variable 170023601548SRuslan Ermilov.Va svc_fds . 17018360efbdSAlfred PerlsteinService implementors usually do not need this routine. 170223601548SRuslan Ermilov.El 170323601548SRuslan Ermilov.Sh SEE ALSO 170423601548SRuslan Ermilov.Xr rpc_secure 3 , 170523601548SRuslan Ermilov.Xr xdr 3 170623601548SRuslan Ermilov.Rs 170723601548SRuslan Ermilov.%T "Remote Procedure Calls: Protocol Specification" 170823601548SRuslan Ermilov.Re 170923601548SRuslan Ermilov.Rs 171023601548SRuslan Ermilov.%T "Remote Procedure Call Programming Guide" 171123601548SRuslan Ermilov.Re 171223601548SRuslan Ermilov.Rs 171323601548SRuslan Ermilov.%T "rpcgen Programming Guide" 171423601548SRuslan Ermilov.Re 171523601548SRuslan Ermilov.Rs 171623601548SRuslan Ermilov.%T "RPC: Remote Procedure Call Protocol Specification" 171723601548SRuslan Ermilov.%O RFC1050 171823601548SRuslan Ermilov.%Q "Sun Microsystems, Inc., USC-ISI" 171923601548SRuslan Ermilov.Re 1720