getrpcbynumber()

The getrpcbynumber() call returns an RPC program entry specified by a number in the RPC file.

Syntax

#include <rpcnetdb.h>

struct rpcent *getrpcbynumber(number)
u_long number;

Parameters

number

Description

The getrpcbynumber() call sequentially searches from the beginning of the TCPIP\ETC\RPC file until it finds a matching RPC program number or encounters EOF.

Return Values

The getrpcbynumber() call returns a pointer to an object with the rpcent structure for the RPC program specified on the call. The rpcent structure is defined in <RPC\RPCNETDB.H> header file and contains the following elements:

Element

r _ name r _ aliases r _ number

The return value points to static data that later calls overwrite. A pointer to an rpcent structure indicates success. A NULL pointer indicates an error or EOF.

Related Calls


[Back: getrpcbyname()]
[Next: getrpcent()]