[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Communications Technical Reference, Volume 1

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

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.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The callrpc subroutine, svcudp_create subroutine.

List of RPC Programming References.

eXternal Data Representation (XDR) Overview for Programming and Remote Procedure Call (RPC) Overview for Programming in AIX Version 4.3 Communications Programming Concepts.


[ Previous | Next | Contents | Glossary | Home | Search ]