registerrpc Subroutine

Purpose

Registers a procedure with the Remote Procedure Call (RPC) service package.

Library

C Library (libc.a)

Syntax

#include <rpc/rpc.h>

registerrpc (prognum, versnum, procnum, procname, inproc, outproc)
u_long  prognum,  versnum,  procnum;
char * (* procname) ();
xdrproc_t  inproc,  outproc;

Description

The registerrpc subroutine registers a procedure with the RPC service package.

If a request arrives that matches the values of the prognum parameter, the versnum parameter, and the procnum parameter, then the procname parameter is called with a pointer to its parameters, after which it returns a pointer to its static results.

Note: Remote procedures registered in this form are accessed using the User Datagram Protocol/Internet Protocol (UDP/IP) transport protocol only.

Parameters

Item Description
prognum Specifies the program number of the remote program.
versnum Specifies the version number of the remote program.
procnum Identifies the procedure number to be called.
procname Identifies the procedure name.
inproc Specifies the eXternal Data Representation (XDR) subroutine that decodes the procedure parameters.
outproc Specifies the XDR subroutine that encodes the procedure results.

Return Values

Upon successful completion, this subroutine returns a value of 1. If unsuccessful, it returns a value of -1.