Remote Procedure and eXternal Data Representation API

The following table briefly describes each remote procedure and XDR call, and identifies where you can find the syntax, parameters, and other appropriate information for these calls.

Remote Procedure and XDR API Quick Reference

┌──────────────────────────────────────────────────────────────────┐
│RPC or XDR Call                  Description                      │
├──────────────────────────────────────────────────────────────────┤
│auth_destroy()                   Destroys authentication          │
│                                 information                      │
├──────────────────────────────────────────────────────────────────┤
│authnone_create()                Creates and returns a NULL RPC   │
│                                 authentication handle            │
├──────────────────────────────────────────────────────────────────┤
│authunix_create()                Creates and returns a UNIX-based │
│                                 authentication handle            │
├──────────────────────────────────────────────────────────────────┤
│authunix_create_default()        Calls authunix_create() with     │
│                                 default parameters               │
├──────────────────────────────────────────────────────────────────┤
│callrpc()                        Calls remote procedures          │
├──────────────────────────────────────────────────────────────────┤
│clnt_broadcast()                 Broadcasts a remote program to   │
│                                 all locally connected broadcast  │
│                                 networks                         │
├──────────────────────────────────────────────────────────────────┤
│clnt_call()                      Calls the remote procedure (     │
│                                 procnum) associated with the     │
│                                 client handle (clnt)             │
├──────────────────────────────────────────────────────────────────┤
│clnt_destroy()                   Destroys a client's RPC handle   │
├──────────────────────────────────────────────────────────────────┤
│clnt_freeres()                   Deallocates resources assigned   │
│                                 for decoding the results of an   │
│                                 RPC                              │
├──────────────────────────────────────────────────────────────────┤
│clnt_geterr()                    Copies the error structure from a│
│                                 client's handle to the local     │
│                                 structure                        │
├──────────────────────────────────────────────────────────────────┤
│clnt_pcreateerror()              Indicates why a client handle    │
│                                 cannot be created                │
├──────────────────────────────────────────────────────────────────┤
│clnt_perrno()                    Writes a message to the standard │
│                                 error device corresponding to the│
│                                 condition indicated by stat      │
├──────────────────────────────────────────────────────────────────┤
│clnt_perror()                    Writes an error message          │
│                                 indicating why RPC failed        │
├──────────────────────────────────────────────────────────────────┤
│clntraw_create()                 Creates a client transport handle│
│                                 to use in a single task          │
├──────────────────────────────────────────────────────────────────┤
│clnttcp_create()                 Creates an RPC client transport  │
│                                 handle for the remote program    │
│                                 using TCP transport              │
├──────────────────────────────────────────────────────────────────┤
│clntudp_create()                 Creates an RPC client transport  │
│                                 handle for the remote program    │
│                                 using UDP transport              │
├──────────────────────────────────────────────────────────────────┤
│get_myaddress()                  Returns the local host's internet│
│                                 address                          │
├──────────────────────────────────────────────────────────────────┤
│getrpcbyname()                   Returns an RPC program entry     │
│                                 specified by a name in the RPC   │
│                                 file                             │
├──────────────────────────────────────────────────────────────────┤
│getrpcbynumber()                 Returns an RPC program entry     │
│                                 specified by a number in the RPC │
│                                 file                             │
├──────────────────────────────────────────────────────────────────┤
│getrpcent()                      Returns the next entry in the    │
│                                 TCPIP\ETC\RPC file               │
├──────────────────────────────────────────────────────────────────┤
│pmap_getmaps()                   Returns a list of current        │
│                                 program-to-port mappings on a    │
│                                 specified remote host's          │
│                                 Portmapper                       │
├──────────────────────────────────────────────────────────────────┤
│pmap_getport()                   Returns the port number          │
│                                 associated with the remote       │
│                                 program, the version, and the    │
│                                 transport protocol               │
├──────────────────────────────────────────────────────────────────┤
│pmap_rmtcall()                   Instructs Portmapper to make an  │
│                                 RPC call to a procedure on a host│
│                                 on your behalf                   │
├──────────────────────────────────────────────────────────────────┤
│pmap_set()                       Sets the mapping of the program  │
│                                 to port on the local machine's   │
│                                 Portmapper                       │
├──────────────────────────────────────────────────────────────────┤
│pmap_unset()                     Removes the mappings associated  │
│                                 with prognum and versnum on the  │
│                                 local machine's Portmapper       │
├──────────────────────────────────────────────────────────────────┤
│registerrpc()                    Registers a procedure with the   │
│                                 local Portmapper and creates a   │
│                                 control structure to remember the│
│                                 server procedure and its XDR     │
│                                 routine                          │
├──────────────────────────────────────────────────────────────────┤
│rpc_createerr                    A global variable that is set    │
│                                 when any RPC client creation     │
│                                 routine fails                    │
├──────────────────────────────────────────────────────────────────┤
│svc_destroy()                    Deletes the RPC service transport│
│                                 handle xprt, which becomes       │
│                                 undefined after this routine is  │
│                                 called                           │
├──────────────────────────────────────────────────────────────────┤
│svc_freeargs()                   Frees storage allocated to decode│
│                                 the arguments received by        │
│                                 svc_getargs()                    │
├──────────────────────────────────────────────────────────────────┤
│svc_getargs()                    Uses the XDR routine inproc to   │
│                                 decode the arguments of an RPC   │
│                                 request associated with the RPC  │
│                                 service transport handle xprt    │
├──────────────────────────────────────────────────────────────────┤
│svc_getcaller()                  Gets the network address of the  │
│                                 client associated with the       │
│                                 service transport handle         │
├──────────────────────────────────────────────────────────────────┤
│svc_getreq()                     Implements asynchronous event    │
│                                 processing and returns control to│
│                                 the program after all sockets    │
│                                 have been serviced               │
├──────────────────────────────────────────────────────────────────┤
│svc_register()                   Registers procedures on the local│
│                                 Portmapper                       │
├──────────────────────────────────────────────────────────────────┤
│svc_run()                        Accepts RPC requests and calls   │
│                                 the appropriate service using    │
│                                 svc_getreq()                     │
├──────────────────────────────────────────────────────────────────┤
│svc_sendreply()                  Sends the results of an RPC to   │
│                                 the caller                       │
├──────────────────────────────────────────────────────────────────┤
│svc_socks[ ]                     An array of socket descriptors   │
│                                 being serviced                   │
├──────────────────────────────────────────────────────────────────┤
│svc_unregister()                 Removes all local mappings of    │
│                                 prognum versnum to dispatch      │
│                                 routines (prognum, versnum, *)   │
│                                 and to port numbers              │
├──────────────────────────────────────────────────────────────────┤
│svcerr_auth()                    Sends an error reply when the    │
│                                 service dispatch routine cannot  │
│                                 execute an RPC request because of│
│                                 authentication errors            │
├──────────────────────────────────────────────────────────────────┤
│svcerr_decode()                  Sends an error reply when the    │
│                                 service dispatch routine cannot  │
│                                 decode its parameters            │
├──────────────────────────────────────────────────────────────────┤
│svcerr_noproc()                  Sends an error reply when the    │
│                                 service dispatch routine cannot  │
│                                 call the procedure requested     │
├──────────────────────────────────────────────────────────────────┤
│svcerr_noprog()                  Sends an error code when the     │
│                                 requested program is not         │
│                                 registered                       │
├──────────────────────────────────────────────────────────────────┤
│svcerr_progvers()                Sends the low version number and │
│                                 high version number of RPC       │
│                                 service when the version numbers │
│                                 of two RPC programs do not match │
├──────────────────────────────────────────────────────────────────┤
│svcerr_systemerr()               Sends an error reply when the    │
│                                 service dispatch routine detects │
│                                 a system error that has not been │
│                                 handled                          │
├──────────────────────────────────────────────────────────────────┤
│svcerr_weakauth()                Sends an error reply when the    │
│                                 service dispatch routine cannot  │
│                                 run an RPC because of weak       │
│                                 authentication parameters        │
├──────────────────────────────────────────────────────────────────┤
│svcraw_create()                  Creates a local RPC service      │
│                                 transport handle to simulate RPC │
│                                 programs within one host         │
├──────────────────────────────────────────────────────────────────┤
│svctcp_create()                  Creates a TCP-based service      │
│                                 transport                        │
├──────────────────────────────────────────────────────────────────┤
│svcudp_create()                  Creates a UDP-based service      │
│                                 transport                        │
├──────────────────────────────────────────────────────────────────┤
│xdr_accepted_reply()             Translates between an RPC reply  │
│                                 message and its external         │
│                                 representation                   │
├──────────────────────────────────────────────────────────────────┤
│xdr_array()                      Translates between an array and  │
│                                 its external representation      │
├──────────────────────────────────────────────────────────────────┤
│xdr_authunix_parms()             Translates between UNIX-based    │
│                                 authentication information and   │
│                                 its external representation      │
├──────────────────────────────────────────────────────────────────┤
│xdr_bool()                       Translates between a Boolean and │
│                                 its external representation      │
├──────────────────────────────────────────────────────────────────┤
│xdr_bytes()                      Translates between byte strings  │
│                                 and their external               │
│                                 representations                  │
├──────────────────────────────────────────────────────────────────┤
│xdr_callhdr()                    Translates between an RPC message│
│                                 header and its external          │
│                                 representation                   │
├──────────────────────────────────────────────────────────────────┤
│xdr_callmsg()                    Translates between RPC call      │
│                                 messages (header and             │
│                                 authentication, not argument     │
│                                 data) and their external         │
│                                 representations                  │
├──────────────────────────────────────────────────────────────────┤
│xdr_destroy()                    Destroys the XDR stream pointed  │
│                                 to by the xdrs parameter         │
├──────────────────────────────────────────────────────────────────┤
│xdr_double()                     Translates between C             │
│                                 double-precision numbers and     │
│                                 their external representations   │
├──────────────────────────────────────────────────────────────────┤
│xdr_enum()                       Translates between C-enumerated  │
│                                 groups and their external        │
│                                 representations                  │
├──────────────────────────────────────────────────────────────────┤
│xdr_float()                      Translates between C             │
│                                 floating-point numbers and their │
│                                 external representations         │
├──────────────────────────────────────────────────────────────────┤
│xdr_getpos()                     Starts the get-position routine  │
│                                 associated with the XDR stream,  │
│                                 xdrs                             │
├──────────────────────────────────────────────────────────────────┤
│xdr_inline()                     Returns a pointer to a continuous│
│                                 piece of the XDR stream's buffer │
├──────────────────────────────────────────────────────────────────┤
│xdr_int()                        Translates between C integers and│
│                                 their external representations   │
├──────────────────────────────────────────────────────────────────┤
│xdr_long()                       Translates between C long        │
│                                 integers and their external      │
│                                 representations                  │
├──────────────────────────────────────────────────────────────────┤
│xdr_opaque()                     Translates between fixed-size    │
│                                 opaque data and its external     │
│                                 representation                   │
├──────────────────────────────────────────────────────────────────┤
│xdr_opaque_auth()                Translates between RPC message   │
│                                 authentications and their        │
│                                 external representations         │
├──────────────────────────────────────────────────────────────────┤
│xdr_pmap()                       Translates an RPC procedure      │
│                                 identification, such as is used  │
│                                 in calls to Portmapper           │
├──────────────────────────────────────────────────────────────────┤
│xdr_pmaplist()                   Translates a variable number of  │
│                                 RPC procedure identifications,   │
│                                 such as those Portmapper creates │
├──────────────────────────────────────────────────────────────────┤
│xdr_reference()                  Provides pointer chasing within  │
│                                 structures                       │
├──────────────────────────────────────────────────────────────────┤
│xdr_rejected_reply()             Translates between rejected RPC  │
│                                 reply messages and their external│
│                                 representations                  │
├──────────────────────────────────────────────────────────────────┤
│xdr_replymsg()                   Translates between RPC reply     │
│                                 messages and their external      │
│                                 representations                  │
├──────────────────────────────────────────────────────────────────┤
│xdr_setpos()                     Starts the set-position routine  │
│                                 associated with a XDR stream,    │
│                                 xdrs                             │
├──────────────────────────────────────────────────────────────────┤
│xdr_short()                      Translates between C short       │
│                                 integers and their external      │
│                                 representations                  │
├──────────────────────────────────────────────────────────────────┤
│xdr_string()                     Translates between C strings and │
│                                 their external representations   │
├──────────────────────────────────────────────────────────────────┤
│xdr_u_int()                      Translates between C unsigned    │
│                                 integers and their external      │
│                                 representations                  │
├──────────────────────────────────────────────────────────────────┤
│xdr_u_long()                     Translates between C unsigned    │
│                                 long integers and their external │
│                                 representations                  │
├──────────────────────────────────────────────────────────────────┤
│xdr_u_short()                    Translates between C unsigned    │
│                                 short integers and their external│
│                                 representations                  │
├──────────────────────────────────────────────────────────────────┤
│xdr_union()                      Translates between a             │
│                                 discriminated C union and its    │
│                                 external representation          │
├──────────────────────────────────────────────────────────────────┤
│xdr_vector()                     Translates between a fixed-length│
│                                 array and its external           │
│                                 representation                   │
├──────────────────────────────────────────────────────────────────┤
│xdr_void()                       Returns a value of 1             │
├──────────────────────────────────────────────────────────────────┤
│xdr_wrapstring()                 Translates between strings and   │
│                                 their external representations   │
├──────────────────────────────────────────────────────────────────┤
│xdrmem_create()                  Initializes the XDR stream       │
│                                 pointed to by xdrs               │
├──────────────────────────────────────────────────────────────────┤
│xdrrec_create()                  Initializes the XDR stream       │
│                                 pointed to by xdrs               │
├──────────────────────────────────────────────────────────────────┤
│xdrrec_endofrecord()             Marks the data in the output     │
│                                 buffer as a completed record     │
├──────────────────────────────────────────────────────────────────┤
│xdrrec_eof()                     Marks the end of the file, after │
│                                 using the rest of the current    │
│                                 record in the XDR stream         │
├──────────────────────────────────────────────────────────────────┤
│xdrrec_skiprecord()              Discards the rest of the XDR     │
│                                 stream's current record in the   │
│                                 input buffer                     │
├──────────────────────────────────────────────────────────────────┤
│xdrstdio_create()                Initializes the XDR stream       │
│                                 pointed to by xdrs               │
├──────────────────────────────────────────────────────────────────┤
│xprt_register()                  Registers service transport      │
│                                 handles with the RPC service     │
│                                 package; also modifies the global│
│                                 variable svc_socks[ ]            │
├──────────────────────────────────────────────────────────────────┤
│xprt_unregister()                Unregisters the RPC service      │
│                                 transport handle                 │
└──────────────────────────────────────────────────────────────────┘


[Back: R0LIB32 Library]
[Next: auth_destroy()]