registerrpc(3) CLIX registerrpc(3)
NAME
registerrpc - Library function for remote procedure calls
LIBRARY
Berkeley Software Distribution Library (libbsd.a)
SYNOPSIS
int registerrpc(
ulong prognum ,
ulong versnum ,
ulong procnum ,
char *(*procname)() ,
xdrproc_t inproc ,
xdrproc_t outproc );
PARAMETERS
prognum Specifies the server program number.
versnum Specifies the server's version number.
procnum Specifies a procedure number within the server.
procname Specifies the address of the function to be called when a
procnum request is received.
inproc Specifies the XDR filter procedure for arguments.
outproc Specifies the XDR filter procedure for results.
DESCRIPTION
The registerrpc() function allows C programs to make procedure calls on
other machines across the network. First, the client calls a procedure to
send a data packet to the server. Upon receipt of the packet, the server
calls a dispatch routine to perform the requested service, and then sends
back a reply. Finally, the procedure call returns to the client.
The registerrpc() function registers procedure (*procname)() with the RPC
service package. If a request arrives for program prognum, version
versnum, and procedure procnum, (*procname)() is called with a pointer to
its parameters; progname should return a pointer to its static results;
inproc is used to decode the parameters while outproc is used to encode
the results.
CAUTIONS
Remote procedures registered in this form are accessed using the UDP/IP
2/94 - Intergraph Corporation 1
registerrpc(3) CLIX registerrpc(3)
transport. (See svcudp_create() for restrictions.)
RETURN VALUES
This function returns 0 if the registration succeeds, and -1 otherwise.
RELATED INFORMATION
Functions: xdr_int(3), xdr_bytes(3), xdr_getpos(3), xdr_pointer(3),
xdrrec_create(3), xdr_array(3), xdr_destroy(3), xdr_free(3),
xdr_inline(3), xdrmem_create(3), xdr_opaque(3), xdr_union(3),
xdr_vector(3), xdr_void(3)
CLIX Programming Guide
2 Intergraph Corporation - 2/94