z/OS Communications Server: IP Programmer's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


registerrpc()

z/OS Communications Server: IP Programmer's Guide and Reference
SC27-3659-02

Format

#include <rpc.h>
int
registerrpc(prognum, versnum, procnum, procname, inproc, outproc)
u_long prognum;
u_long versnum;
u_long procnum;
char *(*procname) ();
xdrproc_t inproc;
xdrproc_t outproc;

Parameters

prognum
Specifies the program number to register.
versnum
Specifies the version number to register.
procnum
Specifies the procedure number to register.
procname
Indicates the procedure that is called when the registered program is requested. procname must accept a pointer to its arguments, and return a static pointer to its results.
inproc
Specifies the XDR routine used to decode the arguments.
outproc
Specifies the XDR routine that encodes the results.

Usage

The registerrpc() call registers a procedure (prognum, versnum, procnum) with the local portmapper, and creates a control structure to remember the server procedure and its XDR routine. The control structure is used by svc_run(). When a request arrives for the program (prognum, versnum, procnum), the procedure procname is called. Procedures registered using registerrpc() are accessed using the UDP transport layer.
Note: xdr_enum() cannot be used as an argument to registerrpc(). See xdr_enum() for more information.
Requirement: When your application registers with rpcbind rather than with portmapper, the following requirements apply:
  • Your registration request must originate from an IP address on the local host.
  • If you have defined the SAF profile EZB.RPCBIND.sysname.rpcbindname.REGISTRY in the SERVAUTH class, your application user ID must be granted at least READ access to permit this library call.

Return codes

The value 1 indicates success; the value -1 indicates an error.

Context

  • svc_register()
  • svc_run()

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014