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.Pp 115c1f71e84SJoel Dahl.Bl -tag -width indent -compact 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 151*0d1040e5SPedro F. Giffuni.Fn authunix_create "char *host" "u_int uid" "u_int gid" "int len" "u_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. 1592efeeba5SRuslan ErmilovThe 16023601548SRuslan Ermilov.Fa host 1612efeeba5SRuslan Ermilovargument 1628360efbdSAlfred Perlsteinis the name of the machine on which the information was 1638360efbdSAlfred Perlsteincreated; 16423601548SRuslan Ermilov.Fa uid 16523601548SRuslan Ermilovis the user's user ID; 16623601548SRuslan Ermilov.Fa gid 16723601548SRuslan Ermilovis the user's current group ID; 16823601548SRuslan Ermilov.Fa len 1698360efbdSAlfred Perlsteinand 17023601548SRuslan Ermilov.Fa aup_gids 1718360efbdSAlfred Perlsteinrefer to a counted array of groups to which the user belongs. 1728360efbdSAlfred PerlsteinIt is easy to impersonate a user. 17323601548SRuslan Ermilov.Pp 17423601548SRuslan Ermilov.It Xo 17523601548SRuslan Ermilov.Ft "AUTH *" 17623601548SRuslan Ermilov.Xc 17723601548SRuslan Ermilov.It Xo 17823601548SRuslan Ermilov.Fn authunix_create_default 17923601548SRuslan Ermilov.Xc 18023601548SRuslan Ermilov.Pp 1818360efbdSAlfred PerlsteinCalls 18223601548SRuslan Ermilov.Fn authunix_create 1832efeeba5SRuslan Ermilovwith the appropriate arguments. 18423601548SRuslan Ermilov.Pp 18523601548SRuslan Ermilov.It Xo 186db7534cfSBruce Evans.Ft int 18723601548SRuslan Ermilov.Fo callrpc 18823601548SRuslan Ermilov.Fa "char *host" 18923601548SRuslan Ermilov.Fa "u_long prognum" 19023601548SRuslan Ermilov.Fa "u_long versnum" 19123601548SRuslan Ermilov.Fa "u_long procnum" 19223601548SRuslan Ermilov.Fa "xdrproc_t inproc" 193cc74aaddSAlfred Perlstein.Fa "void *in" 19423601548SRuslan Ermilov.Fa "xdrproc_t outproc" 195cc74aaddSAlfred Perlstein.Fa "void *out" 19623601548SRuslan Ermilov.Fc 19723601548SRuslan Ermilov.Xc 19823601548SRuslan Ermilov.Pp 1998360efbdSAlfred PerlsteinCall the remote procedure associated with 20023601548SRuslan Ermilov.Fa prognum , 20123601548SRuslan Ermilov.Fa versnum , 2028360efbdSAlfred Perlsteinand 20323601548SRuslan Ermilov.Fa procnum 20423601548SRuslan Ermilovon the machine 20523601548SRuslan Ermilov.Fa host . 2062efeeba5SRuslan ErmilovThe 20723601548SRuslan Ermilov.Fa in 2082efeeba5SRuslan Ermilovargument 2098360efbdSAlfred Perlsteinis the address of the procedure's argument(s), and 21023601548SRuslan Ermilov.Fa out 2118360efbdSAlfred Perlsteinis the address of where to place the result(s); 21223601548SRuslan Ermilov.Fa inproc 2132efeeba5SRuslan Ermilovis used to encode the procedure's arguments, and 21423601548SRuslan Ermilov.Fa outproc 2158360efbdSAlfred Perlsteinis used to decode the procedure's results. 2168360efbdSAlfred PerlsteinThis routine returns zero if it succeeds, or the value of 21723601548SRuslan Ermilov.Vt "enum clnt_stat" 2188360efbdSAlfred Perlsteincast to an integer if it fails. 2198360efbdSAlfred PerlsteinThe routine 22023601548SRuslan Ermilov.Fn clnt_perrno 2218360efbdSAlfred Perlsteinis handy for translating failure statuses into messages. 22223601548SRuslan Ermilov.Pp 2238360efbdSAlfred PerlsteinWarning: calling remote procedures with this routine 2248360efbdSAlfred Perlsteinuses 22523601548SRuslan Ermilov.Tn UDP/IP 2268360efbdSAlfred Perlsteinas a transport; see 22723601548SRuslan Ermilov.Fn clntudp_create 2288360efbdSAlfred Perlsteinfor restrictions. 2298360efbdSAlfred PerlsteinYou do not have control of timeouts or authentication using 2308360efbdSAlfred Perlsteinthis routine. 23123601548SRuslan Ermilov.Pp 23223601548SRuslan Ermilov.It Xo 23323601548SRuslan Ermilov.Ft "enum clnt_stat" 23423601548SRuslan Ermilov.Xc 23523601548SRuslan Ermilov.It Xo 23623601548SRuslan Ermilov.Fo clnt_broadcast 23723601548SRuslan Ermilov.Fa "u_long prognum" 23823601548SRuslan Ermilov.Fa "u_long versnum" 23923601548SRuslan Ermilov.Fa "u_long procnum" 24023601548SRuslan Ermilov.Fa "xdrproc_t inproc" 24123601548SRuslan Ermilov.Fa "char *in" 24223601548SRuslan Ermilov.Fa "xdrproc_t outproc" 24323601548SRuslan Ermilov.Fa "char *out" 24423601548SRuslan Ermilov.Fa "bool_t (*eachresult)(caddr_t, struct sockaddr_in *)" 24523601548SRuslan Ermilov.Fc 24623601548SRuslan Ermilov.Xc 24723601548SRuslan Ermilov.Pp 2488360efbdSAlfred PerlsteinLike 24923601548SRuslan Ermilov.Fn callrpc , 2508360efbdSAlfred Perlsteinexcept the call message is broadcast to all locally 25123601548SRuslan Ermilovconnected broadcast nets. 25223601548SRuslan ErmilovEach time it receives a 2538360efbdSAlfred Perlsteinresponse, this routine calls 25423601548SRuslan Ermilov.Fn eachresult , 2558360efbdSAlfred Perlsteinwhose form is: 25623601548SRuslan Ermilov.Bd -ragged -offset indent 25723601548SRuslan Ermilov.Ft bool_t 25823601548SRuslan Ermilov.Fn eachresult "caddr_t out" "struct sockaddr_in *addr" 25923601548SRuslan Ermilov.Ed 26023601548SRuslan Ermilov.Pp 2618360efbdSAlfred Perlsteinwhere 26223601548SRuslan Ermilov.Fa out 2638360efbdSAlfred Perlsteinis the same as 26423601548SRuslan Ermilov.Fa out 2658360efbdSAlfred Perlsteinpassed to 26623601548SRuslan Ermilov.Fn clnt_broadcast , 2678360efbdSAlfred Perlsteinexcept that the remote procedure's output is decoded there; 26823601548SRuslan Ermilov.Fa addr 2698360efbdSAlfred Perlsteinpoints to the address of the machine that sent the results. 2708360efbdSAlfred PerlsteinIf 27123601548SRuslan Ermilov.Fn eachresult 2728360efbdSAlfred Perlsteinreturns zero, 27323601548SRuslan Ermilov.Fn clnt_broadcast 2748360efbdSAlfred Perlsteinwaits for more replies; otherwise it returns with appropriate 2758360efbdSAlfred Perlsteinstatus. 27623601548SRuslan Ermilov.Pp 2778360efbdSAlfred PerlsteinWarning: broadcast sockets are limited in size to the 27823601548SRuslan Ermilovmaximum transfer unit of the data link. 27923601548SRuslan ErmilovFor ethernet, 2808360efbdSAlfred Perlsteinthis value is 1500 bytes. 28123601548SRuslan Ermilov.Pp 28223601548SRuslan Ermilov.It Xo 28323601548SRuslan Ermilov.Ft "enum clnt_stat" 28423601548SRuslan Ermilov.Xc 28523601548SRuslan Ermilov.It Xo 28623601548SRuslan Ermilov.Fo clnt_call 28723601548SRuslan Ermilov.Fa "CLIENT *clnt" 28823601548SRuslan Ermilov.Fa "u_long procnum" 28923601548SRuslan Ermilov.Fa "xdrproc_t inproc" 29023601548SRuslan Ermilov.Fa "char *in" 29123601548SRuslan Ermilov.Fa "xdrproc_t outproc" 29223601548SRuslan Ermilov.Fa "char *out" 29323601548SRuslan Ermilov.Fa "struct timeval tout" 29423601548SRuslan Ermilov.Fc 29523601548SRuslan Ermilov.Xc 29623601548SRuslan Ermilov.Pp 2978360efbdSAlfred PerlsteinA macro that calls the remote procedure 29823601548SRuslan Ermilov.Fa procnum 2998360efbdSAlfred Perlsteinassociated with the client handle, 30023601548SRuslan Ermilov.Fa clnt , 3018360efbdSAlfred Perlsteinwhich is obtained with an 30223601548SRuslan Ermilov.Tn RPC 3038360efbdSAlfred Perlsteinclient creation routine such as 30423601548SRuslan Ermilov.Fn clnt_create . 3052efeeba5SRuslan ErmilovThe 30623601548SRuslan Ermilov.Fa in 3072efeeba5SRuslan Ermilovargument 3088360efbdSAlfred Perlsteinis the address of the procedure's argument(s), and 30923601548SRuslan Ermilov.Fa out 3108360efbdSAlfred Perlsteinis the address of where to place the result(s); 31123601548SRuslan Ermilov.Fa inproc 3122efeeba5SRuslan Ermilovis used to encode the procedure's arguments, and 31323601548SRuslan Ermilov.Fa outproc 3148360efbdSAlfred Perlsteinis used to decode the procedure's results; 31523601548SRuslan Ermilov.Fa tout 3168360efbdSAlfred Perlsteinis the time allowed for results to come back. 31723601548SRuslan Ermilov.Pp 31823601548SRuslan Ermilov.It Xo 31923601548SRuslan Ermilov.Ft void 32023601548SRuslan Ermilov.Fn clnt_destroy "CLIENT *clnt" 32123601548SRuslan Ermilov.Xc 32223601548SRuslan Ermilov.Pp 3238360efbdSAlfred PerlsteinA macro that destroys the client's 32423601548SRuslan Ermilov.Tn RPC 32523601548SRuslan Ermilovhandle. 32623601548SRuslan ErmilovDestruction usually involves deallocation 3278360efbdSAlfred Perlsteinof private data structures, including 32823601548SRuslan Ermilov.Fa clnt 32923601548SRuslan Ermilovitself. 33023601548SRuslan ErmilovUse of 33123601548SRuslan Ermilov.Fa clnt 3328360efbdSAlfred Perlsteinis undefined after calling 33323601548SRuslan Ermilov.Fn clnt_destroy . 3348360efbdSAlfred PerlsteinIf the 33523601548SRuslan Ermilov.Tn RPC 3368360efbdSAlfred Perlsteinlibrary opened the associated socket, it will close it also. 3378360efbdSAlfred PerlsteinOtherwise, the socket remains open. 33823601548SRuslan Ermilov.Pp 33923601548SRuslan Ermilov.It Xo 34023601548SRuslan Ermilov.Ft CLIENT * 34123601548SRuslan Ermilov.Xc 34223601548SRuslan Ermilov.It Xo 34323601548SRuslan Ermilov.Fn clnt_create "char *host" "u_long prog" "u_long vers" "char *proto" 34423601548SRuslan Ermilov.Xc 34523601548SRuslan Ermilov.Pp 3468360efbdSAlfred PerlsteinGeneric client creation routine. 3472efeeba5SRuslan ErmilovThe 34823601548SRuslan Ermilov.Fa host 3492efeeba5SRuslan Ermilovargument 3508360efbdSAlfred Perlsteinidentifies the name of the remote host where the server 3518360efbdSAlfred Perlsteinis located. 3522efeeba5SRuslan ErmilovThe 35323601548SRuslan Ermilov.Fa proto 3542efeeba5SRuslan Ermilovargument 35523601548SRuslan Ermilovindicates which kind of transport protocol to use. 35623601548SRuslan ErmilovThe 35723601548SRuslan Ermilovcurrently supported values for this field are 35823601548SRuslan Ermilov.Qq Li udp 35923601548SRuslan Ermilovand 36023601548SRuslan Ermilov.Qq Li tcp . 3618360efbdSAlfred PerlsteinDefault timeouts are set, but can be modified using 36223601548SRuslan Ermilov.Fn clnt_control . 36323601548SRuslan Ermilov.Pp 3648360efbdSAlfred PerlsteinWarning: Using 36523601548SRuslan Ermilov.Tn UDP 36623601548SRuslan Ermilovhas its shortcomings. 36723601548SRuslan ErmilovSince 36823601548SRuslan Ermilov.Tn UDP Ns \-based 36923601548SRuslan Ermilov.Tn RPC 3708360efbdSAlfred Perlsteinmessages can only hold up to 8 Kbytes of encoded data, 3718360efbdSAlfred Perlsteinthis transport cannot be used for procedures that take 3728360efbdSAlfred Perlsteinlarge arguments or return huge results. 37323601548SRuslan Ermilov.Pp 37423601548SRuslan Ermilov.It Xo 37523601548SRuslan Ermilov.Ft bool_t 37623601548SRuslan Ermilov.Xc 37723601548SRuslan Ermilov.It Xo 37823601548SRuslan Ermilov.Fn clnt_control "CLIENT *cl" "u_int req" "char *info" 37923601548SRuslan Ermilov.Xc 38023601548SRuslan Ermilov.Pp 3818360efbdSAlfred PerlsteinA macro used to change or retrieve various information 3828360efbdSAlfred Perlsteinabout a client object. 3832efeeba5SRuslan ErmilovThe 38423601548SRuslan Ermilov.Fa req 3852efeeba5SRuslan Ermilovargument 3868360efbdSAlfred Perlsteinindicates the type of operation, and 38723601548SRuslan Ermilov.Fa info 38823601548SRuslan Ermilovis a pointer to the information. 38923601548SRuslan ErmilovFor both 39023601548SRuslan Ermilov.Tn UDP 3918360efbdSAlfred Perlsteinand 39223601548SRuslan Ermilov.Tn TCP , 3938360efbdSAlfred Perlsteinthe supported values of 39423601548SRuslan Ermilov.Fa req 3958360efbdSAlfred Perlsteinand their argument types and what they do are: 39623601548SRuslan Ermilov.Bl -column "CLSET_RETRY_TIMEOUT" "struct sockaddr_in" 39710b4d262SJoel Dahl.It Dv CLSET_TIMEOUT Ta 39823601548SRuslan Ermilov.Vt "struct timeval" Ta "set total timeout" 39910b4d262SJoel Dahl.It Dv CLGET_TIMEOUT Ta 40023601548SRuslan Ermilov.Vt "struct timeval" Ta "get total timeout" 40123601548SRuslan Ermilov.El 40223601548SRuslan Ermilov.Pp 4038360efbdSAlfred PerlsteinNote: if you set the timeout using 40423601548SRuslan Ermilov.Fn clnt_control , 4052efeeba5SRuslan Ermilovthe timeout argument passed to 40623601548SRuslan Ermilov.Fn clnt_call 4078360efbdSAlfred Perlsteinwill be ignored in all future calls. 40823601548SRuslan Ermilov.Bl -column "CLSET_RETRY_TIMEOUT" "struct sockaddr_in" 40910b4d262SJoel Dahl.It Dv CLGET_SERVER_ADDR Ta 41023601548SRuslan Ermilov.Vt "struct sockaddr_in" Ta "get server's address" 41123601548SRuslan Ermilov.El 41223601548SRuslan Ermilov.Pp 4138360efbdSAlfred PerlsteinThe following operations are valid for 41423601548SRuslan Ermilov.Tn UDP 4158360efbdSAlfred Perlsteinonly: 41623601548SRuslan Ermilov.Bl -column "CLSET_RETRY_TIMEOUT" "struct sockaddr_in" 41710b4d262SJoel Dahl.It Dv CLSET_RETRY_TIMEOUT Ta 41823601548SRuslan Ermilov.Vt "struct timeval" Ta "set the retry timeout" 41910b4d262SJoel Dahl.It Dv CLGET_RETRY_TIMEOUT Ta 42023601548SRuslan Ermilov.Vt "struct timeval" Ta "get the retry timeout" 42123601548SRuslan Ermilov.El 42223601548SRuslan Ermilov.Pp 4238360efbdSAlfred PerlsteinThe retry timeout is the time that 42423601548SRuslan Ermilov.Tn "UDP RPC" 4258360efbdSAlfred Perlsteinwaits for the server to reply before 4268360efbdSAlfred Perlsteinretransmitting the request. 42723601548SRuslan Ermilov.Pp 42823601548SRuslan Ermilov.It Xo 42923601548SRuslan Ermilov.Ft bool_t 43023601548SRuslan Ermilov.Fn clnt_freeres "CLIENT *clnt" "xdrproc_t outproc" "char *out" 43123601548SRuslan Ermilov.Xc 43223601548SRuslan Ermilov.Pp 4338360efbdSAlfred PerlsteinA macro that frees any data allocated by the 43423601548SRuslan Ermilov.Tn RPC/XDR 4358360efbdSAlfred Perlsteinsystem when it decoded the results of an 43623601548SRuslan Ermilov.Tn RPC 43723601548SRuslan Ermilovcall. 4382efeeba5SRuslan ErmilovThe 43923601548SRuslan Ermilov.Fa out 4402efeeba5SRuslan Ermilovargument 4418360efbdSAlfred Perlsteinis the address of the results, and 44223601548SRuslan Ermilov.Fa outproc 4438360efbdSAlfred Perlsteinis the 44423601548SRuslan Ermilov.Tn XDR 4458360efbdSAlfred Perlsteinroutine describing the results. 4468360efbdSAlfred PerlsteinThis routine returns one if the results were successfully 4478360efbdSAlfred Perlsteinfreed, 4488360efbdSAlfred Perlsteinand zero otherwise. 44923601548SRuslan Ermilov.Pp 45023601548SRuslan Ermilov.It Xo 45123601548SRuslan Ermilov.Ft void 45223601548SRuslan Ermilov.Xc 45323601548SRuslan Ermilov.It Xo 45423601548SRuslan Ermilov.Fn clnt_geterr "CLIENT *clnt" "struct rpc_err *errp" 45523601548SRuslan Ermilov.Xc 45623601548SRuslan Ermilov.Pp 4578360efbdSAlfred PerlsteinA macro that copies the error structure out of the client 4588360efbdSAlfred Perlsteinhandle 4598360efbdSAlfred Perlsteinto the structure at address 46023601548SRuslan Ermilov.Fa errp . 46123601548SRuslan Ermilov.Pp 46223601548SRuslan Ermilov.It Xo 46323601548SRuslan Ermilov.Ft void 46423601548SRuslan Ermilov.Xc 46523601548SRuslan Ermilov.It Xo 46623601548SRuslan Ermilov.Fn clnt_pcreateerror "char *s" 46723601548SRuslan Ermilov.Xc 46823601548SRuslan Ermilov.Pp 46923601548SRuslan Ermilovprints a message to standard error indicating 4708360efbdSAlfred Perlsteinwhy a client 47123601548SRuslan Ermilov.Tn RPC 4728360efbdSAlfred Perlsteinhandle could not be created. 4738360efbdSAlfred PerlsteinThe message is prepended with string 47423601548SRuslan Ermilov.Fa s 4758360efbdSAlfred Perlsteinand a colon. 47623601548SRuslan ErmilovA newline is appended at the end of the message. 4778360efbdSAlfred PerlsteinUsed when a 47823601548SRuslan Ermilov.Fn clnt_create , 47923601548SRuslan Ermilov.Fn clntraw_create , 48023601548SRuslan Ermilov.Fn clnttcp_create , 4818360efbdSAlfred Perlsteinor 48223601548SRuslan Ermilov.Fn clntudp_create 4838360efbdSAlfred Perlsteincall fails. 48423601548SRuslan Ermilov.Pp 48523601548SRuslan Ermilov.It Xo 48623601548SRuslan Ermilov.Ft void 48723601548SRuslan Ermilov.Xc 48823601548SRuslan Ermilov.It Xo 48923601548SRuslan Ermilov.Fn clnt_perrno "enum clnt_stat stat" 49023601548SRuslan Ermilov.Xc 49123601548SRuslan Ermilov.Pp 4928360efbdSAlfred PerlsteinPrint a message to standard error corresponding 4938360efbdSAlfred Perlsteinto the condition indicated by 49423601548SRuslan Ermilov.Fa stat . 49523601548SRuslan ErmilovA newline is appended at the end of the message. 4968360efbdSAlfred PerlsteinUsed after 49723601548SRuslan Ermilov.Fn callrpc . 49823601548SRuslan Ermilov.Pp 49923601548SRuslan Ermilov.It Xo 50023601548SRuslan Ermilov.Ft void 50123601548SRuslan Ermilov.Fn clnt_perror "CLIENT *clnt" "char *s" 50223601548SRuslan Ermilov.Xc 50323601548SRuslan Ermilov.Pp 5048360efbdSAlfred PerlsteinPrint a message to standard error indicating why an 50523601548SRuslan Ermilov.Tn RPC 5068360efbdSAlfred Perlsteincall failed; 50723601548SRuslan Ermilov.Fa clnt 5088360efbdSAlfred Perlsteinis the handle used to do the call. 5098360efbdSAlfred PerlsteinThe message is prepended with string 51023601548SRuslan Ermilov.Fa s 5118360efbdSAlfred Perlsteinand a colon. 51223601548SRuslan ErmilovA newline is appended at the end of the message. 5138360efbdSAlfred PerlsteinUsed after 51423601548SRuslan Ermilov.Fn clnt_call . 51523601548SRuslan Ermilov.Pp 51623601548SRuslan Ermilov.It Xo 51723601548SRuslan Ermilov.Ft "char *" 51823601548SRuslan Ermilov.Xc 51923601548SRuslan Ermilov.It Xo 52023601548SRuslan Ermilov.Fn clnt_spcreateerror "char *s" 52123601548SRuslan Ermilov.Xc 52223601548SRuslan Ermilov.Pp 5238360efbdSAlfred PerlsteinLike 52423601548SRuslan Ermilov.Fn clnt_pcreateerror , 5258360efbdSAlfred Perlsteinexcept that it returns a string 5268360efbdSAlfred Perlsteininstead of printing to the standard error. 52723601548SRuslan Ermilov.Pp 5288360efbdSAlfred PerlsteinBugs: returns pointer to static data that is overwritten 5298360efbdSAlfred Perlsteinon each call. 53023601548SRuslan Ermilov.Pp 53123601548SRuslan Ermilov.It Xo 53223601548SRuslan Ermilov.Ft "char *" 53323601548SRuslan Ermilov.Xc 53423601548SRuslan Ermilov.It Xo 53523601548SRuslan Ermilov.Fn clnt_sperrno "enum clnt_stat stat" 53623601548SRuslan Ermilov.Xc 53723601548SRuslan Ermilov.Pp 5388360efbdSAlfred PerlsteinTake the same arguments as 53923601548SRuslan Ermilov.Fn clnt_perrno , 5408360efbdSAlfred Perlsteinbut instead of sending a message to the standard error 5418360efbdSAlfred Perlsteinindicating why an 54223601548SRuslan Ermilov.Tn RPC 5438360efbdSAlfred Perlsteincall failed, return a pointer to a string which contains 5448360efbdSAlfred Perlsteinthe message. 54523601548SRuslan Ermilov.Pp 5461fae73b1SRuslan ErmilovThe 54723601548SRuslan Ermilov.Fn clnt_sperrno 5481fae73b1SRuslan Ermilovfunction 5498360efbdSAlfred Perlsteinis used instead of 55023601548SRuslan Ermilov.Fn clnt_perrno 5518360efbdSAlfred Perlsteinif the program does not have a standard error (as a program 5528360efbdSAlfred Perlsteinrunning as a server quite likely does not), or if the 5538360efbdSAlfred Perlsteinprogrammer 5548360efbdSAlfred Perlsteindoes not want the message to be output with 55523601548SRuslan Ermilov.Fn printf , 55623601548SRuslan Ermilovor if a message format different from that supported by 55723601548SRuslan Ermilov.Fn clnt_perrno 5588360efbdSAlfred Perlsteinis to be used. 55923601548SRuslan Ermilov.Pp 5608360efbdSAlfred PerlsteinNote: unlike 56123601548SRuslan Ermilov.Fn clnt_sperror 5628360efbdSAlfred Perlsteinand 56323601548SRuslan Ermilov.Fn clnt_spcreateerror , 56423601548SRuslan Ermilov.Fn clnt_sperrno 5658360efbdSAlfred Perlsteinreturns pointer to static data, but the 5668360efbdSAlfred Perlsteinresult will not get overwritten on each call. 56723601548SRuslan Ermilov.Pp 56823601548SRuslan Ermilov.It Xo 56923601548SRuslan Ermilov.Ft "char *" 57023601548SRuslan Ermilov.Xc 57123601548SRuslan Ermilov.It Xo 57223601548SRuslan Ermilov.Fn clnt_sperror "CLIENT *rpch" "char *s" 57323601548SRuslan Ermilov.Xc 57423601548SRuslan Ermilov.Pp 5758360efbdSAlfred PerlsteinLike 57623601548SRuslan Ermilov.Fn clnt_perror , 5778360efbdSAlfred Perlsteinexcept that (like 57823601548SRuslan Ermilov.Fn clnt_sperrno ) 5798360efbdSAlfred Perlsteinit returns a string instead of printing to standard error. 58023601548SRuslan Ermilov.Pp 5818360efbdSAlfred PerlsteinBugs: returns pointer to static data that is overwritten 5828360efbdSAlfred Perlsteinon each call. 58323601548SRuslan Ermilov.Pp 58423601548SRuslan Ermilov.It Xo 58523601548SRuslan Ermilov.Ft "CLIENT *" 58623601548SRuslan Ermilov.Xc 58723601548SRuslan Ermilov.It Xo 58823601548SRuslan Ermilov.Fn clntraw_create "u_long prognum" "u_long versnum" 58923601548SRuslan Ermilov.Xc 59023601548SRuslan Ermilov.Pp 5918360efbdSAlfred PerlsteinThis routine creates a toy 59223601548SRuslan Ermilov.Tn RPC 5938360efbdSAlfred Perlsteinclient for the remote program 59423601548SRuslan Ermilov.Fa prognum , 5958360efbdSAlfred Perlsteinversion 59623601548SRuslan Ermilov.Fa versnum . 5978360efbdSAlfred PerlsteinThe transport used to pass messages to the service is 5988360efbdSAlfred Perlsteinactually a buffer within the process's address space, so the 5998360efbdSAlfred Perlsteincorresponding 60023601548SRuslan Ermilov.Tn RPC 6018360efbdSAlfred Perlsteinserver should live in the same address space; see 60223601548SRuslan Ermilov.Fn svcraw_create . 6038360efbdSAlfred PerlsteinThis allows simulation of 60423601548SRuslan Ermilov.Tn RPC 6058360efbdSAlfred Perlsteinand acquisition of 60623601548SRuslan Ermilov.Tn RPC 6078360efbdSAlfred Perlsteinoverheads, such as round trip times, without any 60823601548SRuslan Ermilovkernel interference. 60923601548SRuslan ErmilovThis routine returns 61023601548SRuslan Ermilov.Dv NULL 6118360efbdSAlfred Perlsteinif it fails. 61223601548SRuslan Ermilov.Pp 61323601548SRuslan Ermilov.It Xo 61423601548SRuslan Ermilov.Ft "CLIENT *" 61523601548SRuslan Ermilov.Xc 61623601548SRuslan Ermilov.It Xo 61723601548SRuslan Ermilov.Fo clnttcp_create 61823601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 61923601548SRuslan Ermilov.Fa "u_long prognum" 62023601548SRuslan Ermilov.Fa "u_long versnum" 62123601548SRuslan Ermilov.Fa "int *sockp" 62223601548SRuslan Ermilov.Fa "u_int sendsz" 62323601548SRuslan Ermilov.Fa "u_int recvsz" 62423601548SRuslan Ermilov.Fc 62523601548SRuslan Ermilov.Xc 62623601548SRuslan Ermilov.Pp 6278360efbdSAlfred PerlsteinThis routine creates an 62823601548SRuslan Ermilov.Tn RPC 6298360efbdSAlfred Perlsteinclient for the remote program 63023601548SRuslan Ermilov.Fa prognum , 6318360efbdSAlfred Perlsteinversion 63223601548SRuslan Ermilov.Fa versnum ; 6338360efbdSAlfred Perlsteinthe client uses 63423601548SRuslan Ermilov.Tn TCP/IP 63523601548SRuslan Ermilovas a transport. 63623601548SRuslan ErmilovThe remote program is located at Internet 6378360efbdSAlfred Perlsteinaddress 63823601548SRuslan Ermilov.Fa addr . 6398360efbdSAlfred PerlsteinIf 64023601548SRuslan Ermilov.Fa addr\->sin_port 6418360efbdSAlfred Perlsteinis zero, then it is set to the actual port that the remote 6428360efbdSAlfred Perlsteinprogram is listening on (the remote 6438657581bSMaxim Sobolev.Xr rpcbind 8 64423601548SRuslan Ermilovservice is consulted for this information). 6452efeeba5SRuslan ErmilovThe 64623601548SRuslan Ermilov.Fa sockp 6472efeeba5SRuslan Ermilovargument 6488360efbdSAlfred Perlsteinis a socket; if it is 64923601548SRuslan Ermilov.Dv RPC_ANYSOCK , 6508360efbdSAlfred Perlsteinthen this routine opens a new one and sets 65123601548SRuslan Ermilov.Fa sockp . 6528360efbdSAlfred PerlsteinSince 65323601548SRuslan Ermilov.Tn TCP Ns \-based 65423601548SRuslan Ermilov.Tn RPC 6558360efbdSAlfred Perlsteinuses buffered 65623601548SRuslan Ermilov.Tn I/O , 6578360efbdSAlfred Perlsteinthe user may specify the size of the send and receive buffers 6582efeeba5SRuslan Ermilovwith the 65923601548SRuslan Ermilov.Fa sendsz 6608360efbdSAlfred Perlsteinand 6612efeeba5SRuslan Ermilov.Fa recvsz 6622efeeba5SRuslan Ermilovarguments; 6638360efbdSAlfred Perlsteinvalues of zero choose suitable defaults. 6648360efbdSAlfred PerlsteinThis routine returns 66523601548SRuslan Ermilov.Dv NULL 6668360efbdSAlfred Perlsteinif it fails. 66723601548SRuslan Ermilov.Pp 66823601548SRuslan Ermilov.It Xo 66923601548SRuslan Ermilov.Ft "CLIENT *" 67023601548SRuslan Ermilov.Xc 67123601548SRuslan Ermilov.It Xo 67223601548SRuslan Ermilov.Fo clntudp_create 67323601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 67423601548SRuslan Ermilov.Fa "u_long prognum" 67523601548SRuslan Ermilov.Fa "u_long versnum" 67623601548SRuslan Ermilov.Fa "struct timeval wait" 67723601548SRuslan Ermilov.Fa "int *sockp" 67823601548SRuslan Ermilov.Fc 67923601548SRuslan Ermilov.Xc 68023601548SRuslan Ermilov.Pp 6818360efbdSAlfred PerlsteinThis routine creates an 68223601548SRuslan Ermilov.Tn RPC 6838360efbdSAlfred Perlsteinclient for the remote program 68423601548SRuslan Ermilov.Fa prognum , 6858360efbdSAlfred Perlsteinversion 68623601548SRuslan Ermilov.Fa versnum ; 68723601548SRuslan Ermilovthe client uses 68823601548SRuslan Ermilov.Tn UDP/IP 68923601548SRuslan Ermilovas a transport. 69023601548SRuslan ErmilovThe remote program is located at Internet 6918360efbdSAlfred Perlsteinaddress 69223601548SRuslan Ermilov.Fa addr . 6938360efbdSAlfred PerlsteinIf 69423601548SRuslan Ermilov.Fa addr\->sin_port 6958360efbdSAlfred Perlsteinis zero, then it is set to actual port that the remote 6968360efbdSAlfred Perlsteinprogram is listening on (the remote 6978657581bSMaxim Sobolev.Xr rpcbind 8 69823601548SRuslan Ermilovservice is consulted for this information). 6992efeeba5SRuslan ErmilovThe 70023601548SRuslan Ermilov.Fa sockp 7012efeeba5SRuslan Ermilovargument 7028360efbdSAlfred Perlsteinis a socket; if it is 70323601548SRuslan Ermilov.Dv RPC_ANYSOCK , 7048360efbdSAlfred Perlsteinthen this routine opens a new one and sets 70523601548SRuslan Ermilov.Fa sockp . 7068360efbdSAlfred PerlsteinThe 70723601548SRuslan Ermilov.Tn UDP 7088360efbdSAlfred Perlsteintransport resends the call message in intervals of 70923601548SRuslan Ermilov.Fa wait 7108360efbdSAlfred Perlsteintime until a response is received or until the call times 7118360efbdSAlfred Perlsteinout. 7128360efbdSAlfred PerlsteinThe total time for the call to time out is specified by 71323601548SRuslan Ermilov.Fn clnt_call . 71423601548SRuslan Ermilov.Pp 7158360efbdSAlfred PerlsteinWarning: since 71623601548SRuslan Ermilov.Tn UDP Ns \-based 71723601548SRuslan Ermilov.Tn RPC 7188360efbdSAlfred Perlsteinmessages can only hold up to 8 Kbytes 7198360efbdSAlfred Perlsteinof encoded data, this transport cannot be used for procedures 7208360efbdSAlfred Perlsteinthat take large arguments or return huge results. 72123601548SRuslan Ermilov.Pp 72223601548SRuslan Ermilov.It Xo 72323601548SRuslan Ermilov.Ft "CLIENT *" 72423601548SRuslan Ermilov.Xc 72523601548SRuslan Ermilov.It Xo 72623601548SRuslan Ermilov.Fo clntudp_bufcreate 72723601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 72823601548SRuslan Ermilov.Fa "u_long prognum" 72923601548SRuslan Ermilov.Fa "u_long versnum" 73023601548SRuslan Ermilov.Fa "struct timeval wait" 73123601548SRuslan Ermilov.Fa "int *sockp" 73223601548SRuslan Ermilov.Fa "unsigned int sendsize" 73323601548SRuslan Ermilov.Fa "unsigned int recosize" 73423601548SRuslan Ermilov.Fc 73523601548SRuslan Ermilov.Xc 73623601548SRuslan Ermilov.Pp 7378360efbdSAlfred PerlsteinThis routine creates an 73823601548SRuslan Ermilov.Tn RPC 7398360efbdSAlfred Perlsteinclient for the remote program 74023601548SRuslan Ermilov.Fa prognum , 7418360efbdSAlfred Perlsteinon 74223601548SRuslan Ermilov.Fa versnum ; 74323601548SRuslan Ermilovthe client uses 74423601548SRuslan Ermilov.Tn UDP/IP 74523601548SRuslan Ermilovas a transport. 74623601548SRuslan ErmilovThe remote program is located at Internet 7478360efbdSAlfred Perlsteinaddress 74823601548SRuslan Ermilov.Fa addr . 7498360efbdSAlfred PerlsteinIf 75023601548SRuslan Ermilov.Fa addr\->sin_port 7518360efbdSAlfred Perlsteinis zero, then it is set to actual port that the remote 7528360efbdSAlfred Perlsteinprogram is listening on (the remote 7538657581bSMaxim Sobolev.Xr rpcbind 8 75423601548SRuslan Ermilovservice is consulted for this information). 7552efeeba5SRuslan ErmilovThe 75623601548SRuslan Ermilov.Fa sockp 7572efeeba5SRuslan Ermilovargument 7588360efbdSAlfred Perlsteinis a socket; if it is 75923601548SRuslan Ermilov.Dv RPC_ANYSOCK , 7608360efbdSAlfred Perlsteinthen this routine opens a new one and sets 76123601548SRuslan Ermilov.Fa sockp . 7628360efbdSAlfred PerlsteinThe 76323601548SRuslan Ermilov.Tn UDP 7648360efbdSAlfred Perlsteintransport resends the call message in intervals of 76523601548SRuslan Ermilov.Fa wait 7668360efbdSAlfred Perlsteintime until a response is received or until the call times 7678360efbdSAlfred Perlsteinout. 7688360efbdSAlfred PerlsteinThe total time for the call to time out is specified by 76923601548SRuslan Ermilov.Fn clnt_call . 77023601548SRuslan Ermilov.Pp 77123601548SRuslan ErmilovThis allows the user to specify the maximum packet size 77223601548SRuslan Ermilovfor sending and receiving 77323601548SRuslan Ermilov.Tn UDP Ns \-based 77423601548SRuslan Ermilov.Tn RPC 7758360efbdSAlfred Perlsteinmessages. 77623601548SRuslan Ermilov.Pp 77723601548SRuslan Ermilov.It Xo 778e6f9ad07SBill Paul.Ft "CLIENT *" 779e6f9ad07SBill Paul.Xc 780e6f9ad07SBill Paul.It Xo 781e6f9ad07SBill Paul.Fo clntunix_create 782e6f9ad07SBill Paul.Fa "struct sockaddr_un *raddr" 783e6f9ad07SBill Paul.Fa "u_long prognum" 784e6f9ad07SBill Paul.Fa "u_long versnum" 785e6f9ad07SBill Paul.Fa "int *sockp" 786e6f9ad07SBill Paul.Fa "u_int sendsz" 787e6f9ad07SBill Paul.Fa "u_int recvsz" 788e6f9ad07SBill Paul.Fc 789e6f9ad07SBill Paul.Xc 790e6f9ad07SBill Paul.Pp 791e6f9ad07SBill PaulThis routine creates an 792e6f9ad07SBill Paul.Tn RPC 793e6f9ad07SBill Paulclient for the local 794e6f9ad07SBill Paulprogram 795e6f9ad07SBill Paul.Fa prognum , 796e6f9ad07SBill Paulversion 797e6f9ad07SBill Paul.Fa versnum ; 798e6f9ad07SBill Paulthe client uses 799872013cbSRuslan Ermilov.Ux Ns -domain 800e6f9ad07SBill Paulsockets as a transport. 801e6f9ad07SBill PaulThe local program is located at the 802e6f9ad07SBill Paul.Fa *raddr . 8032efeeba5SRuslan ErmilovThe 804e6f9ad07SBill Paul.Fa sockp 8052efeeba5SRuslan Ermilovargument 806e6f9ad07SBill Paulis a socket; if it is 807e6f9ad07SBill Paul.Dv RPC_ANYSOCK , 808e6f9ad07SBill Paulthen this routine opens a new one and sets 809e6f9ad07SBill Paul.Fa sockp . 810e6f9ad07SBill PaulSince 811872013cbSRuslan Ermilov.Ux Ns -based 812e6f9ad07SBill Paul.Tn RPC 813e6f9ad07SBill Pauluses buffered 814e6f9ad07SBill Paul.Tn I/O , 815e6f9ad07SBill Paulthe user may specify the size of the send and receive buffers 8162efeeba5SRuslan Ermilovwith the 817e6f9ad07SBill Paul.Fa sendsz 818e6f9ad07SBill Pauland 8192efeeba5SRuslan Ermilov.Fa recvsz 8202efeeba5SRuslan Ermilovarguments; 821e6f9ad07SBill Paulvalues of zero choose suitable defaults. 822e6f9ad07SBill PaulThis routine returns 823e6f9ad07SBill Paul.Dv NULL 824e6f9ad07SBill Paulif it fails. 825e6f9ad07SBill Paul.Pp 826e6f9ad07SBill Paul.It Xo 82723601548SRuslan Ermilov.Ft int 82823601548SRuslan Ermilov.Xc 82923601548SRuslan Ermilov.It Xo 83023601548SRuslan Ermilov.Fn get_myaddress "struct sockaddr_in *addr" 83123601548SRuslan Ermilov.Xc 83223601548SRuslan Ermilov.Pp 8338360efbdSAlfred PerlsteinStuff the machine's 83423601548SRuslan Ermilov.Tn IP 8358360efbdSAlfred Perlsteinaddress into 83623601548SRuslan Ermilov.Fa addr , 8378360efbdSAlfred Perlsteinwithout consulting the library routines that deal with 83823601548SRuslan Ermilov.Pa /etc/hosts . 8398360efbdSAlfred PerlsteinThe port number is always set to 84023601548SRuslan Ermilov.Fn htons PMAPPORT . 8418360efbdSAlfred PerlsteinReturns zero on success, non-zero on failure. 84223601548SRuslan Ermilov.Pp 84323601548SRuslan Ermilov.It Xo 84423601548SRuslan Ermilov.Ft "struct pmaplist *" 84523601548SRuslan Ermilov.Xc 84623601548SRuslan Ermilov.It Xo 84723601548SRuslan Ermilov.Fn pmap_getmaps "struct sockaddr_in *addr" 84823601548SRuslan Ermilov.Xc 84923601548SRuslan Ermilov.Pp 8508360efbdSAlfred PerlsteinA user interface to the 8518657581bSMaxim Sobolev.Xr rpcbind 8 8528360efbdSAlfred Perlsteinservice, which returns a list of the current 85323601548SRuslan Ermilov.Tn RPC 85423601548SRuslan Ermilovprogram\-to\-port mappings 8558360efbdSAlfred Perlsteinon the host located at 85623601548SRuslan Ermilov.Tn IP 8578360efbdSAlfred Perlsteinaddress 85823601548SRuslan Ermilov.Fa addr . 8598360efbdSAlfred PerlsteinThis routine can return 86023601548SRuslan Ermilov.Dv NULL . 8618360efbdSAlfred PerlsteinThe command 86223601548SRuslan Ermilov.Dq Nm rpcinfo Fl p 8638360efbdSAlfred Perlsteinuses this routine. 86423601548SRuslan Ermilov.Pp 86523601548SRuslan Ermilov.It Xo 86623601548SRuslan Ermilov.Ft u_short 86723601548SRuslan Ermilov.Xc 86823601548SRuslan Ermilov.It Xo 86923601548SRuslan Ermilov.Fo pmap_getport 87023601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 87123601548SRuslan Ermilov.Fa "u_long prognum" 87223601548SRuslan Ermilov.Fa "u_long versnum" 87323601548SRuslan Ermilov.Fa "u_long protocol" 87423601548SRuslan Ermilov.Fc 87523601548SRuslan Ermilov.Xc 87623601548SRuslan Ermilov.Pp 8778360efbdSAlfred PerlsteinA user interface to the 8788657581bSMaxim Sobolev.Xr rpcbind 8 8798360efbdSAlfred Perlsteinservice, which returns the port number 8808360efbdSAlfred Perlsteinon which waits a service that supports program number 88123601548SRuslan Ermilov.Fa prognum , 8828360efbdSAlfred Perlsteinversion 88323601548SRuslan Ermilov.Fa versnum , 8848360efbdSAlfred Perlsteinand speaks the transport protocol associated with 88523601548SRuslan Ermilov.Fa protocol . 8868360efbdSAlfred PerlsteinThe value of 88723601548SRuslan Ermilov.Fa protocol 8888360efbdSAlfred Perlsteinis most likely 88923601548SRuslan Ermilov.Dv IPPROTO_UDP 8908360efbdSAlfred Perlsteinor 89123601548SRuslan Ermilov.Dv IPPROTO_TCP . 8928360efbdSAlfred PerlsteinA return value of zero means that the mapping does not exist 8938360efbdSAlfred Perlsteinor that 8948360efbdSAlfred Perlsteinthe 89523601548SRuslan Ermilov.Tn RPC 89623601548SRuslan Ermilovsystem failed to contact the remote 8978657581bSMaxim Sobolev.Xr rpcbind 8 89823601548SRuslan Ermilovservice. 89923601548SRuslan ErmilovIn the latter case, the global variable 90023601548SRuslan Ermilov.Va rpc_createerr 9018360efbdSAlfred Perlsteincontains the 90223601548SRuslan Ermilov.Tn RPC 9038360efbdSAlfred Perlsteinstatus. 90423601548SRuslan Ermilov.Pp 90523601548SRuslan Ermilov.It Xo 90623601548SRuslan Ermilov.Ft "enum clnt_stat" 90723601548SRuslan Ermilov.Xc 90823601548SRuslan Ermilov.It Xo 90923601548SRuslan Ermilov.Fo pmap_rmtcall 91023601548SRuslan Ermilov.Fa "struct sockaddr_in *addr" 91123601548SRuslan Ermilov.Fa "u_long prognum" 91223601548SRuslan Ermilov.Fa "u_long versnum" 91323601548SRuslan Ermilov.Fa "u_long procnum" 91423601548SRuslan Ermilov.Fa "xdrproc_t inproc" 91523601548SRuslan Ermilov.Fa "char *in" 91623601548SRuslan Ermilov.Fa "xdrproc_t outproc" 91723601548SRuslan Ermilov.Fa "char *out" 91823601548SRuslan Ermilov.Fa "struct timeval tout" 91923601548SRuslan Ermilov.Fa "u_long *portp" 92023601548SRuslan Ermilov.Fc 92123601548SRuslan Ermilov.Xc 92223601548SRuslan Ermilov.Pp 9238360efbdSAlfred PerlsteinA user interface to the 9248657581bSMaxim Sobolev.Xr rpcbind 8 9258360efbdSAlfred Perlsteinservice, which instructs 9268657581bSMaxim Sobolev.Xr rpcbind 8 9278360efbdSAlfred Perlsteinon the host at 92823601548SRuslan Ermilov.Tn IP 9298360efbdSAlfred Perlsteinaddress 93023601548SRuslan Ermilov.Fa addr 9318360efbdSAlfred Perlsteinto make an 93223601548SRuslan Ermilov.Tn RPC 9338360efbdSAlfred Perlsteincall on your behalf to a procedure on that host. 9342efeeba5SRuslan ErmilovThe 93523601548SRuslan Ermilov.Fa portp 9362efeeba5SRuslan Ermilovargument 9378360efbdSAlfred Perlsteinwill be modified to the program's port number if the 9388360efbdSAlfred Perlsteinprocedure 93923601548SRuslan Ermilovsucceeds. 9402efeeba5SRuslan ErmilovThe definitions of other arguments are discussed 9418360efbdSAlfred Perlsteinin 94223601548SRuslan Ermilov.Fn callrpc 9438360efbdSAlfred Perlsteinand 94423601548SRuslan Ermilov.Fn clnt_call . 94523601548SRuslan ErmilovThis procedure should be used for a 94623601548SRuslan Ermilov.Dq ping 94723601548SRuslan Ermilovand nothing 9488360efbdSAlfred Perlsteinelse. 9498360efbdSAlfred PerlsteinSee also 95023601548SRuslan Ermilov.Fn clnt_broadcast . 95123601548SRuslan Ermilov.Pp 95223601548SRuslan Ermilov.It Xo 95323601548SRuslan Ermilov.Ft bool_t 95423601548SRuslan Ermilov.Fn pmap_set "u_long prognum" "u_long versnum" "u_long protocol" "u_short port" 95523601548SRuslan Ermilov.Xc 95623601548SRuslan Ermilov.Pp 9578360efbdSAlfred PerlsteinA user interface to the 9588657581bSMaxim Sobolev.Xr rpcbind 8 9598360efbdSAlfred Perlsteinservice, which establishes a mapping between the triple 96023601548SRuslan Ermilov.Pq Fa prognum , versnum , protocol 9618360efbdSAlfred Perlsteinand 96223601548SRuslan Ermilov.Fa port 9638360efbdSAlfred Perlsteinon the machine's 9648657581bSMaxim Sobolev.Xr rpcbind 8 96523601548SRuslan Ermilovservice. 96623601548SRuslan ErmilovThe value of 96723601548SRuslan Ermilov.Fa protocol 9688360efbdSAlfred Perlsteinis most likely 96923601548SRuslan Ermilov.Dv IPPROTO_UDP 9708360efbdSAlfred Perlsteinor 97123601548SRuslan Ermilov.Dv IPPROTO_TCP . 9728360efbdSAlfred PerlsteinThis routine returns one if it succeeds, zero otherwise. 9738360efbdSAlfred PerlsteinAutomatically done by 97423601548SRuslan Ermilov.Fn svc_register . 97523601548SRuslan Ermilov.Pp 97623601548SRuslan Ermilov.It Xo 97723601548SRuslan Ermilov.Ft bool_t 97823601548SRuslan Ermilov.Fn pmap_unset "u_long prognum" "u_long versnum" 97923601548SRuslan Ermilov.Xc 98023601548SRuslan Ermilov.Pp 9818360efbdSAlfred PerlsteinA user interface to the 9828657581bSMaxim Sobolev.Xr rpcbind 8 9838360efbdSAlfred Perlsteinservice, which destroys all mapping between the triple 98423601548SRuslan Ermilov.Pq Fa prognum , versnum , * 9858360efbdSAlfred Perlsteinand 98623601548SRuslan Ermilov.Fa ports 9878360efbdSAlfred Perlsteinon the machine's 9888657581bSMaxim Sobolev.Xr rpcbind 8 98923601548SRuslan Ermilovservice. 99023601548SRuslan ErmilovThis routine returns one if it succeeds, zero 9918360efbdSAlfred Perlsteinotherwise. 99223601548SRuslan Ermilov.Pp 99323601548SRuslan Ermilov.It Xo 99423601548SRuslan Ermilov.Ft bool_t 99523601548SRuslan Ermilov.Fo registerrpc 99623601548SRuslan Ermilov.Fa "u_long prognum" 99723601548SRuslan Ermilov.Fa "u_long versnum" 99823601548SRuslan Ermilov.Fa "u_long procnum" 99923601548SRuslan Ermilov.Fa "char *(*procname)(void)" 100023601548SRuslan Ermilov.Fa "xdrproc_t inproc" 100123601548SRuslan Ermilov.Fa "xdrproc_t outproc" 100223601548SRuslan Ermilov.Fc 100323601548SRuslan Ermilov.Xc 100423601548SRuslan Ermilov.Pp 10058360efbdSAlfred PerlsteinRegister procedure 100623601548SRuslan Ermilov.Fa procname 10078360efbdSAlfred Perlsteinwith the 100823601548SRuslan Ermilov.Tn RPC 100923601548SRuslan Ermilovservice package. 101023601548SRuslan ErmilovIf a request arrives for program 101123601548SRuslan Ermilov.Fa prognum , 10128360efbdSAlfred Perlsteinversion 101323601548SRuslan Ermilov.Fa versnum , 10148360efbdSAlfred Perlsteinand procedure 101523601548SRuslan Ermilov.Fa procnum , 101623601548SRuslan Ermilov.Fa procname 10172efeeba5SRuslan Ermilovis called with a pointer to its argument(s); 101823601548SRuslan Ermilov.Fa progname 10198360efbdSAlfred Perlsteinshould return a pointer to its static result(s); 102023601548SRuslan Ermilov.Fa inproc 10212efeeba5SRuslan Ermilovis used to decode the arguments while 102223601548SRuslan Ermilov.Fa outproc 10238360efbdSAlfred Perlsteinis used to encode the results. 10248360efbdSAlfred PerlsteinThis routine returns zero if the registration succeeded, \-1 10258360efbdSAlfred Perlsteinotherwise. 102623601548SRuslan Ermilov.Pp 10278360efbdSAlfred PerlsteinWarning: remote procedures registered in this form 10288360efbdSAlfred Perlsteinare accessed using the 102923601548SRuslan Ermilov.Tn UDP/IP 10308360efbdSAlfred Perlsteintransport; see 103123601548SRuslan Ermilov.Fn svcudp_create 10328360efbdSAlfred Perlsteinfor restrictions. 103323601548SRuslan Ermilov.Pp 103423601548SRuslan Ermilov.It Xo 103523601548SRuslan Ermilov.Vt "struct rpc_createerr" rpc_createerr ; 103623601548SRuslan Ermilov.Xc 103723601548SRuslan Ermilov.Pp 10388360efbdSAlfred PerlsteinA global variable whose value is set by any 103923601548SRuslan Ermilov.Tn RPC 10408360efbdSAlfred Perlsteinclient creation routine 104123601548SRuslan Ermilovthat does not succeed. 104223601548SRuslan ErmilovUse the routine 104323601548SRuslan Ermilov.Fn clnt_pcreateerror 10448360efbdSAlfred Perlsteinto print the reason why. 104523601548SRuslan Ermilov.Pp 104623601548SRuslan Ermilov.It Xo 104723601548SRuslan Ermilov.Ft bool_t 104823601548SRuslan Ermilov.Fn svc_destroy "SVCXPRT * xprt" 104923601548SRuslan Ermilov.Xc 105023601548SRuslan Ermilov.Pp 10518360efbdSAlfred PerlsteinA macro that destroys the 105223601548SRuslan Ermilov.Tn RPC 10538360efbdSAlfred Perlsteinservice transport handle, 105423601548SRuslan Ermilov.Fa xprt . 10558360efbdSAlfred PerlsteinDestruction usually involves deallocation 10568360efbdSAlfred Perlsteinof private data structures, including 105723601548SRuslan Ermilov.Fa xprt 105823601548SRuslan Ermilovitself. 105923601548SRuslan ErmilovUse of 106023601548SRuslan Ermilov.Fa xprt 10618360efbdSAlfred Perlsteinis undefined after calling this routine. 106223601548SRuslan Ermilov.Pp 106323601548SRuslan Ermilov.It Xo 106423601548SRuslan Ermilov.Vt fd_set svc_fdset ; 106523601548SRuslan Ermilov.Xc 106623601548SRuslan Ermilov.Pp 10678360efbdSAlfred PerlsteinA global variable reflecting the 106823601548SRuslan Ermilov.Tn RPC 10698360efbdSAlfred Perlsteinservice side's 10702efeeba5SRuslan Ermilovread file descriptor bit mask; it is suitable as a template argument 10718360efbdSAlfred Perlsteinto the 107223601548SRuslan Ermilov.Xr select 2 107323601548SRuslan Ermilovsystem call. 107423601548SRuslan ErmilovThis is only of interest 10758360efbdSAlfred Perlsteinif a service implementor does not call 107623601548SRuslan Ermilov.Fn svc_run , 10778360efbdSAlfred Perlsteinbut rather does his own asynchronous event processing. 107823601548SRuslan ErmilovThis variable is read\-only (do not pass its address to 107923601548SRuslan Ermilov.Xr select 2 ! ) , 10808360efbdSAlfred Perlsteinyet it may change after calls to 108123601548SRuslan Ermilov.Fn svc_getreqset 10828360efbdSAlfred Perlsteinor any creation routines. 108323601548SRuslan ErmilovAs well, note that if the process has descriptor limits 108423601548SRuslan Ermilovwhich are extended beyond 108523601548SRuslan Ermilov.Dv FD_SETSIZE , 108623601548SRuslan Ermilovthis variable will only be usable for the first 108723601548SRuslan Ermilov.Dv FD_SETSIZE 108823601548SRuslan Ermilovdescriptors. 108923601548SRuslan Ermilov.Pp 109023601548SRuslan Ermilov.It Xo 109123601548SRuslan Ermilov.Vt int svc_fds ; 109223601548SRuslan Ermilov.Xc 109323601548SRuslan Ermilov.Pp 10948360efbdSAlfred PerlsteinSimilar to 109523601548SRuslan Ermilov.Va svc_fdset , 109623601548SRuslan Ermilovbut limited to 32 descriptors. 109723601548SRuslan ErmilovThis 10988360efbdSAlfred Perlsteininterface is obsoleted by 109923601548SRuslan Ermilov.Va svc_fdset . 110023601548SRuslan Ermilov.Pp 110123601548SRuslan Ermilov.It Xo 110223601548SRuslan Ermilov.Ft bool_t 110323601548SRuslan Ermilov.Fn svc_freeargs "SVCXPRT *xprt" "xdrproc_t inproc" "char *in" 110423601548SRuslan Ermilov.Xc 110523601548SRuslan Ermilov.Pp 11068360efbdSAlfred PerlsteinA macro that frees any data allocated by the 110723601548SRuslan Ermilov.Tn RPC/XDR 11088360efbdSAlfred Perlsteinsystem when it decoded the arguments to a service procedure 11098360efbdSAlfred Perlsteinusing 111023601548SRuslan Ermilov.Fn svc_getargs . 11118360efbdSAlfred PerlsteinThis routine returns 1 if the results were successfully 11128360efbdSAlfred Perlsteinfreed, 11138360efbdSAlfred Perlsteinand zero otherwise. 111423601548SRuslan Ermilov.Pp 111523601548SRuslan Ermilov.It Xo 111623601548SRuslan Ermilov.Ft bool_t 111723601548SRuslan Ermilov.Fn svc_getargs "SVCXPRT *xprt" "xdrproc_t inproc" "char *in" 111823601548SRuslan Ermilov.Xc 111923601548SRuslan Ermilov.Pp 11208360efbdSAlfred PerlsteinA macro that decodes the arguments of an 112123601548SRuslan Ermilov.Tn RPC 11228360efbdSAlfred Perlsteinrequest 11238360efbdSAlfred Perlsteinassociated with the 112423601548SRuslan Ermilov.Tn RPC 11258360efbdSAlfred Perlsteinservice transport handle, 112623601548SRuslan Ermilov.Fa xprt . 11272efeeba5SRuslan ErmilovThe 112823601548SRuslan Ermilov.Fa in 11292efeeba5SRuslan Ermilovargument 11308360efbdSAlfred Perlsteinis the address where the arguments will be placed; 113123601548SRuslan Ermilov.Fa inproc 11328360efbdSAlfred Perlsteinis the 113323601548SRuslan Ermilov.Tn XDR 11348360efbdSAlfred Perlsteinroutine used to decode the arguments. 11358360efbdSAlfred PerlsteinThis routine returns one if decoding succeeds, and zero 11368360efbdSAlfred Perlsteinotherwise. 113723601548SRuslan Ermilov.Pp 113823601548SRuslan Ermilov.It Xo 113923601548SRuslan Ermilov.Ft "struct sockaddr_in *" 114023601548SRuslan Ermilov.Xc 114123601548SRuslan Ermilov.It Xo 114223601548SRuslan Ermilov.Fn svc_getcaller "SVCXPRT *xprt" 114323601548SRuslan Ermilov.Xc 114423601548SRuslan Ermilov.Pp 11458360efbdSAlfred PerlsteinThe approved way of getting the network address of the caller 11468360efbdSAlfred Perlsteinof a procedure associated with the 114723601548SRuslan Ermilov.Tn RPC 11488360efbdSAlfred Perlsteinservice transport handle, 114923601548SRuslan Ermilov.Fa xprt . 115023601548SRuslan Ermilov.Pp 115123601548SRuslan Ermilov.It Xo 115223601548SRuslan Ermilov.Ft void 115323601548SRuslan Ermilov.Fn svc_getreqset "fd_set *rdfds" 115423601548SRuslan Ermilov.Xc 115523601548SRuslan Ermilov.Pp 11568360efbdSAlfred PerlsteinThis routine is only of interest if a service implementor 11578360efbdSAlfred Perlsteindoes not call 115823601548SRuslan Ermilov.Fn svc_run , 11598360efbdSAlfred Perlsteinbut instead implements custom asynchronous event processing. 11608360efbdSAlfred PerlsteinIt is called when the 116123601548SRuslan Ermilov.Xr select 2 11628360efbdSAlfred Perlsteinsystem call has determined that an 116323601548SRuslan Ermilov.Tn RPC 11648360efbdSAlfred Perlsteinrequest has arrived on some 116523601548SRuslan Ermilov.Tn RPC 116623601548SRuslan Ermilovsocket(s); 116723601548SRuslan Ermilov.Fa rdfds 11688360efbdSAlfred Perlsteinis the resultant read file descriptor bit mask. 11698360efbdSAlfred PerlsteinThe routine returns when all sockets associated with the 11708360efbdSAlfred Perlsteinvalue of 117123601548SRuslan Ermilov.Fa rdfds 11728360efbdSAlfred Perlsteinhave been serviced. 117323601548SRuslan Ermilov.Pp 117423601548SRuslan Ermilov.It Xo 117523601548SRuslan Ermilov.Ft void 117623601548SRuslan Ermilov.Fn svc_getreq "int rdfds" 117723601548SRuslan Ermilov.Xc 117823601548SRuslan Ermilov.Pp 11798360efbdSAlfred PerlsteinSimilar to 118023601548SRuslan Ermilov.Fn svc_getreqset , 118123601548SRuslan Ermilovbut limited to 32 descriptors. 118223601548SRuslan ErmilovThis interface is obsoleted by 118323601548SRuslan Ermilov.Fn svc_getreqset . 118423601548SRuslan Ermilov.Pp 118523601548SRuslan Ermilov.It Xo 118623601548SRuslan Ermilov.Ft bool_t 118723601548SRuslan Ermilov.Fo svc_register 118823601548SRuslan Ermilov.Fa "SVCXPRT *xprt" 118923601548SRuslan Ermilov.Fa "u_long prognum" 119023601548SRuslan Ermilov.Fa "u_long versnum" 119123601548SRuslan Ermilov.Fa "void (*dispatch)(struct svc_req *, SVCXPRT *)" 119223601548SRuslan Ermilov.Fa "int protocol" 119323601548SRuslan Ermilov.Fc 119423601548SRuslan Ermilov.Xc 119523601548SRuslan Ermilov.Pp 11968360efbdSAlfred PerlsteinAssociates 119723601548SRuslan Ermilov.Fa prognum 11988360efbdSAlfred Perlsteinand 119923601548SRuslan Ermilov.Fa versnum 12008360efbdSAlfred Perlsteinwith the service dispatch procedure, 120123601548SRuslan Ermilov.Fn dispatch . 12028360efbdSAlfred PerlsteinIf 120323601548SRuslan Ermilov.Fa protocol 12048360efbdSAlfred Perlsteinis zero, the service is not registered with the 12058657581bSMaxim Sobolev.Xr rpcbind 8 120623601548SRuslan Ermilovservice. 120723601548SRuslan ErmilovIf 120823601548SRuslan Ermilov.Fa protocol 12098360efbdSAlfred Perlsteinis non-zero, then a mapping of the triple 121023601548SRuslan Ermilov.Pq Fa prognum , versnum , protocol 12118360efbdSAlfred Perlsteinto 121223601548SRuslan Ermilov.Fa xprt\->xp_port 12138360efbdSAlfred Perlsteinis established with the local 12148657581bSMaxim Sobolev.Xr rpcbind 8 12158360efbdSAlfred Perlsteinservice (generally 121623601548SRuslan Ermilov.Fa protocol 12178360efbdSAlfred Perlsteinis zero, 121823601548SRuslan Ermilov.Dv IPPROTO_UDP 12198360efbdSAlfred Perlsteinor 122023601548SRuslan Ermilov.Dv IPPROTO_TCP ) . 12218360efbdSAlfred PerlsteinThe procedure 122223601548SRuslan Ermilov.Fn dispatch 12238360efbdSAlfred Perlsteinhas the following form: 122423601548SRuslan Ermilov.Bd -ragged -offset indent 122523601548SRuslan Ermilov.Ft bool_t 122623601548SRuslan Ermilov.Fn dispatch "struct svc_req *request" "SVCXPRT *xprt" 122723601548SRuslan Ermilov.Ed 122823601548SRuslan Ermilov.Pp 12298360efbdSAlfred PerlsteinThe 123023601548SRuslan Ermilov.Fn svc_register 12318360efbdSAlfred Perlsteinroutine returns one if it succeeds, and zero otherwise. 123223601548SRuslan Ermilov.Pp 123323601548SRuslan Ermilov.It Xo 123423601548SRuslan Ermilov.Fn svc_run 123523601548SRuslan Ermilov.Xc 123623601548SRuslan Ermilov.Pp 123723601548SRuslan ErmilovThis routine never returns. 123823601548SRuslan ErmilovIt waits for 123923601548SRuslan Ermilov.Tn RPC 12408360efbdSAlfred Perlsteinrequests to arrive, and calls the appropriate service 12418360efbdSAlfred Perlsteinprocedure using 124223601548SRuslan Ermilov.Fn svc_getreq 124323601548SRuslan Ermilovwhen one arrives. 124423601548SRuslan ErmilovThis procedure is usually waiting for a 124523601548SRuslan Ermilov.Xr select 2 12468360efbdSAlfred Perlsteinsystem call to return. 124723601548SRuslan Ermilov.Pp 124823601548SRuslan Ermilov.It Xo 124923601548SRuslan Ermilov.Ft bool_t 125023601548SRuslan Ermilov.Fn svc_sendreply "SVCXPRT *xprt" "xdrproc_t outproc" "char *out" 125123601548SRuslan Ermilov.Xc 125223601548SRuslan Ermilov.Pp 12538360efbdSAlfred PerlsteinCalled by an 125423601548SRuslan Ermilov.Tn RPC 12558360efbdSAlfred Perlsteinservice's dispatch routine to send the results of a 125623601548SRuslan Ermilovremote procedure call. 12572efeeba5SRuslan ErmilovThe 125823601548SRuslan Ermilov.Fa xprt 12592efeeba5SRuslan Ermilovargument 12608360efbdSAlfred Perlsteinis the request's associated transport handle; 126123601548SRuslan Ermilov.Fa outproc 12628360efbdSAlfred Perlsteinis the 126323601548SRuslan Ermilov.Tn XDR 12648360efbdSAlfred Perlsteinroutine which is used to encode the results; and 126523601548SRuslan Ermilov.Fa out 12668360efbdSAlfred Perlsteinis the address of the results. 12678360efbdSAlfred PerlsteinThis routine returns one if it succeeds, zero otherwise. 126823601548SRuslan Ermilov.Pp 126923601548SRuslan Ermilov.It Xo 127023601548SRuslan Ermilov.Ft void 127123601548SRuslan Ermilov.Xc 127223601548SRuslan Ermilov.It Xo 127323601548SRuslan Ermilov.Fn svc_unregister "u_long prognum" "u_long versnum" 127423601548SRuslan Ermilov.Xc 127523601548SRuslan Ermilov.Pp 12768360efbdSAlfred PerlsteinRemove all mapping of the double 127723601548SRuslan Ermilov.Pq Fa prognum , versnum 12788360efbdSAlfred Perlsteinto dispatch routines, and of the triple 127923601548SRuslan Ermilov.Pq Fa prognum , versnum , * 12808360efbdSAlfred Perlsteinto port number. 128123601548SRuslan Ermilov.Pp 128223601548SRuslan Ermilov.It Xo 128323601548SRuslan Ermilov.Ft void 128423601548SRuslan Ermilov.Xc 128523601548SRuslan Ermilov.It Xo 128623601548SRuslan Ermilov.Fn svcerr_auth "SVCXPRT *xprt" "enum auth_stat why" 128723601548SRuslan Ermilov.Xc 128823601548SRuslan Ermilov.Pp 12898360efbdSAlfred PerlsteinCalled by a service dispatch routine that refuses to perform 12908360efbdSAlfred Perlsteina remote procedure call due to an authentication error. 129123601548SRuslan Ermilov.Pp 129223601548SRuslan Ermilov.It Xo 129323601548SRuslan Ermilov.Ft void 129423601548SRuslan Ermilov.Xc 129523601548SRuslan Ermilov.It Xo 129623601548SRuslan Ermilov.Fn svcerr_decode "SVCXPRT *xprt" 129723601548SRuslan Ermilov.Xc 129823601548SRuslan Ermilov.Pp 12998360efbdSAlfred PerlsteinCalled by a service dispatch routine that cannot successfully 13002efeeba5SRuslan Ermilovdecode its arguments. 130123601548SRuslan ErmilovSee also 130223601548SRuslan Ermilov.Fn svc_getargs . 130323601548SRuslan Ermilov.Pp 130423601548SRuslan Ermilov.It Xo 130523601548SRuslan Ermilov.Ft void 130623601548SRuslan Ermilov.Xc 130723601548SRuslan Ermilov.It Xo 130823601548SRuslan Ermilov.Fn svcerr_noproc "SVCXPRT *xprt" 130923601548SRuslan Ermilov.Xc 131023601548SRuslan Ermilov.Pp 13118360efbdSAlfred PerlsteinCalled by a service dispatch routine that does not implement 13128360efbdSAlfred Perlsteinthe procedure number that the caller requests. 131323601548SRuslan Ermilov.Pp 131423601548SRuslan Ermilov.It Xo 131523601548SRuslan Ermilov.Ft void 131623601548SRuslan Ermilov.Xc 131723601548SRuslan Ermilov.It Xo 131823601548SRuslan Ermilov.Fn svcerr_noprog "SVCXPRT *xprt" 131923601548SRuslan Ermilov.Xc 132023601548SRuslan Ermilov.Pp 13218360efbdSAlfred PerlsteinCalled when the desired program is not registered with the 132223601548SRuslan Ermilov.Tn RPC 132323601548SRuslan Ermilovpackage. 132423601548SRuslan ErmilovService implementors usually do not need this routine. 132523601548SRuslan Ermilov.Pp 132623601548SRuslan Ermilov.It Xo 132723601548SRuslan Ermilov.Ft void 132823601548SRuslan Ermilov.Xc 132923601548SRuslan Ermilov.It Xo 133023601548SRuslan Ermilov.Fn svcerr_progvers "SVCXPRT *xprt" "u_long low_vers" "u_long high_vers" 133123601548SRuslan Ermilov.Xc 133223601548SRuslan Ermilov.Pp 13338360efbdSAlfred PerlsteinCalled when the desired version of a program is not registered 13348360efbdSAlfred Perlsteinwith the 133523601548SRuslan Ermilov.Tn RPC 133623601548SRuslan Ermilovpackage. 133723601548SRuslan ErmilovService implementors usually do not need this routine. 133823601548SRuslan Ermilov.Pp 133923601548SRuslan Ermilov.It Xo 134023601548SRuslan Ermilov.Ft void 134123601548SRuslan Ermilov.Xc 134223601548SRuslan Ermilov.It Xo 134323601548SRuslan Ermilov.Fn svcerr_systemerr "SVCXPRT *xprt" 134423601548SRuslan Ermilov.Xc 134523601548SRuslan Ermilov.Pp 13468360efbdSAlfred PerlsteinCalled by a service dispatch routine when it detects a system 13478360efbdSAlfred Perlsteinerror 13488360efbdSAlfred Perlsteinnot covered by any particular protocol. 13498360efbdSAlfred PerlsteinFor example, if a service can no longer allocate storage, 13508360efbdSAlfred Perlsteinit may call this routine. 135123601548SRuslan Ermilov.Pp 135223601548SRuslan Ermilov.It Xo 135323601548SRuslan Ermilov.Ft void 135423601548SRuslan Ermilov.Xc 135523601548SRuslan Ermilov.It Xo 135623601548SRuslan Ermilov.Fn svcerr_weakauth "SVCXPRT *xprt" 135723601548SRuslan Ermilov.Xc 135823601548SRuslan Ermilov.Pp 13598360efbdSAlfred PerlsteinCalled by a service dispatch routine that refuses to perform 13608360efbdSAlfred Perlsteina remote procedure call due to insufficient 13612efeeba5SRuslan Ermilovauthentication arguments. 136223601548SRuslan ErmilovThe routine calls 136323601548SRuslan Ermilov.Fn svcerr_auth xprt AUTH_TOOWEAK . 136423601548SRuslan Ermilov.Pp 136523601548SRuslan Ermilov.It Xo 136623601548SRuslan Ermilov.Ft "SVCXPRT *" 136723601548SRuslan Ermilov.Xc 136823601548SRuslan Ermilov.It Xo 136923601548SRuslan Ermilov.Fn svcraw_create void 137023601548SRuslan Ermilov.Xc 137123601548SRuslan Ermilov.Pp 13728360efbdSAlfred PerlsteinThis routine creates a toy 137323601548SRuslan Ermilov.Tn RPC 137423601548SRuslan Ermilovservice transport, to which it returns a pointer. 137523601548SRuslan ErmilovThe transport 13768360efbdSAlfred Perlsteinis really a buffer within the process's address space, 13778360efbdSAlfred Perlsteinso the corresponding 137823601548SRuslan Ermilov.Tn RPC 13798360efbdSAlfred Perlsteinclient should live in the same 13808360efbdSAlfred Perlsteinaddress space; 13818360efbdSAlfred Perlsteinsee 138223601548SRuslan Ermilov.Fn clntraw_create . 13838360efbdSAlfred PerlsteinThis routine allows simulation of 138423601548SRuslan Ermilov.Tn RPC 13858360efbdSAlfred Perlsteinand acquisition of 138623601548SRuslan Ermilov.Tn RPC 13878360efbdSAlfred Perlsteinoverheads (such as round trip times), without any kernel 13888360efbdSAlfred Perlsteininterference. 13898360efbdSAlfred PerlsteinThis routine returns 139023601548SRuslan Ermilov.Dv NULL 13918360efbdSAlfred Perlsteinif it fails. 139223601548SRuslan Ermilov.Pp 139323601548SRuslan Ermilov.It Xo 139423601548SRuslan Ermilov.Ft "SVCXPRT *" 139523601548SRuslan Ermilov.Xc 139623601548SRuslan Ermilov.It Xo 139723601548SRuslan Ermilov.Fn svctcp_create "int sock" "u_int send_buf_size" "u_int recv_buf_size" 139823601548SRuslan Ermilov.Xc 139923601548SRuslan Ermilov.Pp 14008360efbdSAlfred PerlsteinThis routine creates a 140123601548SRuslan Ermilov.Tn TCP/IP Ns \-based 140223601548SRuslan Ermilov.Tn RPC 14038360efbdSAlfred Perlsteinservice transport, to which it returns a pointer. 14048360efbdSAlfred PerlsteinThe transport is associated with the socket 140523601548SRuslan Ermilov.Fa sock , 14068360efbdSAlfred Perlsteinwhich may be 140723601548SRuslan Ermilov.Dv RPC_ANYSOCK , 14088360efbdSAlfred Perlsteinin which case a new socket is created. 14098360efbdSAlfred PerlsteinIf the socket is not bound to a local 141023601548SRuslan Ermilov.Tn TCP 141123601548SRuslan Ermilovport, then this routine binds it to an arbitrary port. 141223601548SRuslan ErmilovUpon completion, 141323601548SRuslan Ermilov.Fa xprt\->xp_fd 14148360efbdSAlfred Perlsteinis the transport's socket descriptor, and 141523601548SRuslan Ermilov.Fa xprt\->xp_port 14168360efbdSAlfred Perlsteinis the transport's port number. 14178360efbdSAlfred PerlsteinThis routine returns 141823601548SRuslan Ermilov.Dv NULL 141923601548SRuslan Ermilovif it fails. 142023601548SRuslan ErmilovSince 142123601548SRuslan Ermilov.Tn TCP Ns \-based 142223601548SRuslan Ermilov.Tn RPC 14238360efbdSAlfred Perlsteinuses buffered 142423601548SRuslan Ermilov.Tn I/O , 14258360efbdSAlfred Perlsteinusers may specify the size of buffers; values of zero 14268360efbdSAlfred Perlsteinchoose suitable defaults. 142723601548SRuslan Ermilov.Pp 142823601548SRuslan Ermilov.It Xo 142923601548SRuslan Ermilov.Ft "SVCXPRT *" 143023601548SRuslan Ermilov.Xc 143123601548SRuslan Ermilov.It Xo 1432e6f9ad07SBill Paul.Fn svcunix_create "int sock" "u_int send_buf_size" "u_int recv_buf_size" "char *path" 1433e6f9ad07SBill Paul.Xc 1434e6f9ad07SBill Paul.Pp 1435e6f9ad07SBill PaulThis routine creates a 1436872013cbSRuslan Ermilov.Ux Ns -based 1437e6f9ad07SBill Paul.Tn RPC 1438e6f9ad07SBill Paulservice transport, to which it returns a pointer. 1439e6f9ad07SBill PaulThe transport is associated with the socket 1440e6f9ad07SBill Paul.Fa sock , 1441e6f9ad07SBill Paulwhich may be 1442e6f9ad07SBill Paul.Dv RPC_ANYSOCK , 1443e6f9ad07SBill Paulin which case a new socket is created. 14442efeeba5SRuslan ErmilovThe 1445e6f9ad07SBill Paul.Fa *path 14462efeeba5SRuslan Ermilovargument 1447e6f9ad07SBill Paulis a variable-length file system pathname of 1448e6f9ad07SBill Paulat most 104 characters. 1449e6f9ad07SBill PaulThis file is 1450e6f9ad07SBill Paul.Em not 1451e6f9ad07SBill Paulremoved when the socket is closed. 1452d6498251SPhilippe CharnierThe 1453e6f9ad07SBill Paul.Xr unlink 2 1454d6498251SPhilippe Charniersystem call must be used to remove the file. 1455e6f9ad07SBill PaulUpon completion, 1456e6f9ad07SBill Paul.Fa xprt\->xp_fd 1457e6f9ad07SBill Paulis the transport's socket descriptor. 1458e6f9ad07SBill PaulThis routine returns 1459e6f9ad07SBill Paul.Dv NULL 1460e6f9ad07SBill Paulif it fails. 1461e6f9ad07SBill PaulSince 1462872013cbSRuslan Ermilov.Ux Ns -based 1463e6f9ad07SBill Paul.Tn RPC 1464e6f9ad07SBill Pauluses buffered 1465e6f9ad07SBill Paul.Tn I/O , 1466e6f9ad07SBill Paulusers may specify the size of buffers; values of zero 1467e6f9ad07SBill Paulchoose suitable defaults. 1468e6f9ad07SBill Paul.Pp 1469e6f9ad07SBill Paul.It Xo 1470e6f9ad07SBill Paul.Ft "SVCXPRT *" 1471e6f9ad07SBill Paul.Xc 1472e6f9ad07SBill Paul.It Xo 1473e6f9ad07SBill Paul.Fn svcunixfd_create "int fd" "u_int sendsize" "u_int recvsize" 1474e6f9ad07SBill Paul.Xc 1475e6f9ad07SBill Paul.Pp 1476e6f9ad07SBill PaulCreate a service on top of any open descriptor. 14772efeeba5SRuslan ErmilovThe 1478e6f9ad07SBill Paul.Fa sendsize 1479e6f9ad07SBill Pauland 1480e6f9ad07SBill Paul.Fa recvsize 14812efeeba5SRuslan Ermilovarguments 1482e6f9ad07SBill Paulindicate sizes for the send and receive buffers. 1483e6f9ad07SBill PaulIf they are 1484e6f9ad07SBill Paulzero, a reasonable default is chosen. 1485e6f9ad07SBill Paul.Pp 1486e6f9ad07SBill Paul.It Xo 1487e6f9ad07SBill Paul.Ft "SVCXPRT *" 1488e6f9ad07SBill Paul.Xc 1489e6f9ad07SBill Paul.It Xo 149023601548SRuslan Ermilov.Fn svcfd_create "int fd" "u_int sendsize" "u_int recvsize" 149123601548SRuslan Ermilov.Xc 149223601548SRuslan Ermilov.Pp 149323601548SRuslan ErmilovCreate a service on top of any open descriptor. 149423601548SRuslan ErmilovTypically, 14958360efbdSAlfred Perlsteinthis 14968360efbdSAlfred Perlsteindescriptor is a connected socket for a stream protocol such 14978360efbdSAlfred Perlsteinas 149823601548SRuslan Ermilov.Tn TCP . 14992efeeba5SRuslan ErmilovThe 150023601548SRuslan Ermilov.Fa sendsize 15018360efbdSAlfred Perlsteinand 150223601548SRuslan Ermilov.Fa recvsize 15032efeeba5SRuslan Ermilovarguments 150423601548SRuslan Ermilovindicate sizes for the send and receive buffers. 150523601548SRuslan ErmilovIf they are 15068360efbdSAlfred Perlsteinzero, a reasonable default is chosen. 150723601548SRuslan Ermilov.Pp 150823601548SRuslan Ermilov.It Xo 150923601548SRuslan Ermilov.Ft "SVCXPRT *" 151023601548SRuslan Ermilov.Xc 151123601548SRuslan Ermilov.It Xo 151223601548SRuslan Ermilov.Fn svcudp_bufcreate "int sock" "u_int sendsize" "u_int recvsize" 151323601548SRuslan Ermilov.Xc 151423601548SRuslan Ermilov.Pp 15158360efbdSAlfred PerlsteinThis routine creates a 151623601548SRuslan Ermilov.Tn UDP/IP Ns \-based 151723601548SRuslan Ermilov.Tn RPC 15188360efbdSAlfred Perlsteinservice transport, to which it returns a pointer. 15198360efbdSAlfred PerlsteinThe transport is associated with the socket 152023601548SRuslan Ermilov.Fa sock , 15218360efbdSAlfred Perlsteinwhich may be 152223601548SRuslan Ermilov.Dv RPC_ANYSOCK , 15238360efbdSAlfred Perlsteinin which case a new socket is created. 15248360efbdSAlfred PerlsteinIf the socket is not bound to a local 152523601548SRuslan Ermilov.Tn UDP 152623601548SRuslan Ermilovport, then this routine binds it to an arbitrary port. 152723601548SRuslan ErmilovUpon 15288360efbdSAlfred Perlsteincompletion, 152923601548SRuslan Ermilov.Fa xprt\->xp_fd 15308360efbdSAlfred Perlsteinis the transport's socket descriptor, and 153123601548SRuslan Ermilov.Fa xprt\->xp_port 15328360efbdSAlfred Perlsteinis the transport's port number. 15338360efbdSAlfred PerlsteinThis routine returns 153423601548SRuslan Ermilov.Dv NULL 15358360efbdSAlfred Perlsteinif it fails. 153623601548SRuslan Ermilov.Pp 15378360efbdSAlfred PerlsteinThis allows the user to specify the maximum packet size for sending and 15388360efbdSAlfred Perlsteinreceiving 153923601548SRuslan Ermilov.Tn UDP Ns \-based 154023601548SRuslan Ermilov.Tn RPC 154123601548SRuslan Ermilovmessages. 154223601548SRuslan Ermilov.Pp 154323601548SRuslan Ermilov.It Xo 154423601548SRuslan Ermilov.Ft bool_t 154523601548SRuslan Ermilov.Fn xdr_accepted_reply "XDR *xdrs" "struct accepted_reply *ar" 154623601548SRuslan Ermilov.Xc 154723601548SRuslan Ermilov.Pp 15488360efbdSAlfred PerlsteinUsed for encoding 154923601548SRuslan Ermilov.Tn RPC 155023601548SRuslan Ermilovreply messages. 155123601548SRuslan ErmilovThis routine is useful for users who 15528360efbdSAlfred Perlsteinwish to generate 155323601548SRuslan Ermilov.Tn RPC Ns \-style 15548360efbdSAlfred Perlsteinmessages without using the 155523601548SRuslan Ermilov.Tn RPC 15568360efbdSAlfred Perlsteinpackage. 155723601548SRuslan Ermilov.Pp 155823601548SRuslan Ermilov.It Xo 155923601548SRuslan Ermilov.Ft bool_t 156023601548SRuslan Ermilov.Fn xdr_authunix_parms "XDR *xdrs" "struct authunix_parms *aupp" 156123601548SRuslan Ermilov.Xc 156223601548SRuslan Ermilov.Pp 15638360efbdSAlfred PerlsteinUsed for describing 156423601548SRuslan Ermilov.Ux 156523601548SRuslan Ermilovcredentials. 156623601548SRuslan ErmilovThis routine is useful for users 15678360efbdSAlfred Perlsteinwho wish to generate these credentials without using the 156823601548SRuslan Ermilov.Tn RPC 15698360efbdSAlfred Perlsteinauthentication package. 157023601548SRuslan Ermilov.Pp 157123601548SRuslan Ermilov.It Xo 157223601548SRuslan Ermilov.Ft void 157323601548SRuslan Ermilov.Xc 157423601548SRuslan Ermilov.It Xo 157523601548SRuslan Ermilov.Ft bool_t 157623601548SRuslan Ermilov.Fn xdr_callhdr "XDR *xdrs" "struct rpc_msg *chdr" 157723601548SRuslan Ermilov.Xc 157823601548SRuslan Ermilov.Pp 15798360efbdSAlfred PerlsteinUsed for describing 158023601548SRuslan Ermilov.Tn RPC 15818360efbdSAlfred Perlsteincall header messages. 15828360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 158323601548SRuslan Ermilov.Tn RPC Ns \-style 15848360efbdSAlfred Perlsteinmessages without using the 158523601548SRuslan Ermilov.Tn RPC 15868360efbdSAlfred Perlsteinpackage. 158723601548SRuslan Ermilov.Pp 158823601548SRuslan Ermilov.It Xo 158923601548SRuslan Ermilov.Ft bool_t 159023601548SRuslan Ermilov.Fn xdr_callmsg "XDR *xdrs" "struct rpc_msg *cmsg" 159123601548SRuslan Ermilov.Xc 159223601548SRuslan Ermilov.Pp 15938360efbdSAlfred PerlsteinUsed for describing 159423601548SRuslan Ermilov.Tn RPC 15958360efbdSAlfred Perlsteincall messages. 15968360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 159723601548SRuslan Ermilov.Tn RPC Ns \-style 15988360efbdSAlfred Perlsteinmessages without using the 159923601548SRuslan Ermilov.Tn RPC 16008360efbdSAlfred Perlsteinpackage. 160123601548SRuslan Ermilov.Pp 160223601548SRuslan Ermilov.It Xo 160323601548SRuslan Ermilov.Ft bool_t 160423601548SRuslan Ermilov.Fn xdr_opaque_auth "XDR *xdrs" "struct opaque_auth *ap" 160523601548SRuslan Ermilov.Xc 160623601548SRuslan Ermilov.Pp 16078360efbdSAlfred PerlsteinUsed for describing 160823601548SRuslan Ermilov.Tn RPC 16098360efbdSAlfred Perlsteinauthentication information messages. 16108360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 161123601548SRuslan Ermilov.Tn RPC Ns \-style 16128360efbdSAlfred Perlsteinmessages without using the 161323601548SRuslan Ermilov.Tn RPC 16148360efbdSAlfred Perlsteinpackage. 161523601548SRuslan Ermilov.Pp 161623601548SRuslan Ermilov.It Xo 161723601548SRuslan Ermilov.Vt struct pmap ; 161823601548SRuslan Ermilov.Xc 161923601548SRuslan Ermilov.It Xo 162023601548SRuslan Ermilov.Ft bool_t 162123601548SRuslan Ermilov.Fn xdr_pmap "XDR *xdrs" "struct pmap *regs" 162223601548SRuslan Ermilov.Xc 162323601548SRuslan Ermilov.Pp 16242efeeba5SRuslan ErmilovUsed for describing arguments to various 16258657581bSMaxim Sobolev.Xr rpcbind 8 16268360efbdSAlfred Perlsteinprocedures, externally. 16278360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 16282efeeba5SRuslan Ermilovthese arguments without using the 162923601548SRuslan Ermilov.Fn pmap_* 16308360efbdSAlfred Perlsteininterface. 163123601548SRuslan Ermilov.Pp 163223601548SRuslan Ermilov.It Xo 163323601548SRuslan Ermilov.Ft bool_t 163423601548SRuslan Ermilov.Fn xdr_pmaplist "XDR *xdrs" "struct pmaplist **rp" 163523601548SRuslan Ermilov.Xc 163623601548SRuslan Ermilov.Pp 16378360efbdSAlfred PerlsteinUsed for describing a list of port mappings, externally. 16388360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 16392efeeba5SRuslan Ermilovthese arguments without using the 164023601548SRuslan Ermilov.Fn pmap_* 16418360efbdSAlfred Perlsteininterface. 164223601548SRuslan Ermilov.Pp 164323601548SRuslan Ermilov.It Xo 164423601548SRuslan Ermilov.Ft bool_t 164523601548SRuslan Ermilov.Fn xdr_rejected_reply "XDR *xdrs" "struct rejected_reply *rr" 164623601548SRuslan Ermilov.Xc 164723601548SRuslan Ermilov.Pp 16488360efbdSAlfred PerlsteinUsed for describing 164923601548SRuslan Ermilov.Tn RPC 16508360efbdSAlfred Perlsteinreply messages. 16518360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 165223601548SRuslan Ermilov.Tn RPC Ns \-style 16538360efbdSAlfred Perlsteinmessages without using the 165423601548SRuslan Ermilov.Tn RPC 16558360efbdSAlfred Perlsteinpackage. 165623601548SRuslan Ermilov.Pp 165723601548SRuslan Ermilov.It Xo 165823601548SRuslan Ermilov.Ft bool_t 165923601548SRuslan Ermilov.Fn xdr_replymsg "XDR *xdrs" "struct rpc_msg *rmsg" 166023601548SRuslan Ermilov.Xc 166123601548SRuslan Ermilov.Pp 16628360efbdSAlfred PerlsteinUsed for describing 166323601548SRuslan Ermilov.Tn RPC 16648360efbdSAlfred Perlsteinreply messages. 16658360efbdSAlfred PerlsteinThis routine is useful for users who wish to generate 166623601548SRuslan Ermilov.Tn RPC 16678360efbdSAlfred Perlsteinstyle messages without using the 166823601548SRuslan Ermilov.Tn RPC 16698360efbdSAlfred Perlsteinpackage. 167023601548SRuslan Ermilov.Pp 167123601548SRuslan Ermilov.It Xo 167223601548SRuslan Ermilov.Ft void 167323601548SRuslan Ermilov.Xc 167423601548SRuslan Ermilov.It Xo 167523601548SRuslan Ermilov.Fn xprt_register "SVCXPRT *xprt" 167623601548SRuslan Ermilov.Xc 167723601548SRuslan Ermilov.Pp 16788360efbdSAlfred PerlsteinAfter 167923601548SRuslan Ermilov.Tn RPC 16808360efbdSAlfred Perlsteinservice transport handles are created, 16818360efbdSAlfred Perlsteinthey should register themselves with the 168223601548SRuslan Ermilov.Tn RPC 16838360efbdSAlfred Perlsteinservice package. 16848360efbdSAlfred PerlsteinThis routine modifies the global variable 168523601548SRuslan Ermilov.Va svc_fds . 16868360efbdSAlfred PerlsteinService implementors usually do not need this routine. 168723601548SRuslan Ermilov.Pp 168823601548SRuslan Ermilov.It Xo 168923601548SRuslan Ermilov.Ft void 169023601548SRuslan Ermilov.Xc 169123601548SRuslan Ermilov.It Xo 169223601548SRuslan Ermilov.Fn xprt_unregister "SVCXPRT *xprt" 169323601548SRuslan Ermilov.Xc 169423601548SRuslan Ermilov.Pp 16958360efbdSAlfred PerlsteinBefore an 169623601548SRuslan Ermilov.Tn RPC 16978360efbdSAlfred Perlsteinservice transport handle is destroyed, 16988360efbdSAlfred Perlsteinit should unregister itself with the 169923601548SRuslan Ermilov.Tn RPC 17008360efbdSAlfred Perlsteinservice package. 17018360efbdSAlfred PerlsteinThis routine modifies the global variable 170223601548SRuslan Ermilov.Va svc_fds . 17038360efbdSAlfred PerlsteinService implementors usually do not need this routine. 170423601548SRuslan Ermilov.El 170523601548SRuslan Ermilov.Sh SEE ALSO 170623601548SRuslan Ermilov.Xr rpc_secure 3 , 170723601548SRuslan Ermilov.Xr xdr 3 170823601548SRuslan Ermilov.Rs 170923601548SRuslan Ermilov.%T "Remote Procedure Calls: Protocol Specification" 171023601548SRuslan Ermilov.Re 171123601548SRuslan Ermilov.Rs 171223601548SRuslan Ermilov.%T "Remote Procedure Call Programming Guide" 171323601548SRuslan Ermilov.Re 171423601548SRuslan Ermilov.Rs 171523601548SRuslan Ermilov.%T "rpcgen Programming Guide" 171623601548SRuslan Ermilov.Re 171723601548SRuslan Ermilov.Rs 171823601548SRuslan Ermilov.%T "RPC: Remote Procedure Call Protocol Specification" 171923601548SRuslan Ermilov.%O RFC1050 172023601548SRuslan Ermilov.%Q "Sun Microsystems, Inc., USC-ISI" 172123601548SRuslan Ermilov.Re 1722