Chapter Contents |
Previous |
Next |
getrpcbynumber |
Portability: | UNIX compatible |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
CAUTION | |
PORTABILITY | |
IMPLEMENTATION | |
RELATED FUNCTIONS |
SYNOPSIS |
#include <netdb.h> struct rpcent *getrpcbynumber(int prognum);
DESCRIPTION |
Given the number of an RPC program, specified
by
prognum
,
getrpcbynumber
returns a pointer to the
rpcent
structure, which is defined
in
<netdb.h>
. This
structure is typically used to obtain the name for the RPC program from the
r_name
field. Refer to rpcent for details
on the
rpcent
structure.
The source of the data in the
rpcent
structure is the protocols file, that
is, a file with the same format as the
/etc/rpc
file on a UNIX operating system. Refer to /etc/rpc for information on the
logic used to determine the location of the protocols file.
RETURN VALUE |
If
getrpcbynumber
succeeds, it returns a pointer to the
rpcent
structure. A null pointer indicates the
network address was not found in the network file.
CAUTION |
The value that
getrpcbynumber
returns points to a static structure within the library.
You must copy the information from this structure before you make further
getrpcbyname
,
getrpcbynumber
, or
getrpcent
calls.
PORTABILITY |
getrpcbynumber
is portable to other systems that support Sun RPC 4.0.
IMPLEMENTATION |
This function is built from the Sun RPC 4.0 distribution.
RELATED FUNCTIONS |
endrpcent
,
getrpcbyname
,
getrpcent
,
setrpcent
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.