Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getrpcent(3C) — HP-UX 6.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rpcinfo(1M)

rpc(4)

GETRPCENT(3C)  —  Series 300 Only

NAME

getrpcent, getrpcbyname, getrpcbynumber − get rpc entry

SYNOPSIS

#include <netdb.h>

struct rpcent *getrpcent()

struct rpcent *getrpcbyname(name)
char *name;

struct rpcent *getrpcbynumber(number)
int number;

setrpcent(stayopen)
int stayopen

endrpcent()

DESCRIPTION

Each getrpcent, getrpcbyname, and getrpcbynumber function returns a pointer to an object with the following structure containing the broken-out fields of a line in the rpc program number data base, /etc/rpc.

struct rpcent {
char    *r_name;        /* name of server for
                           this rpc program */
char    **r_aliases;    /* NULL terminated list
                           of aliases */
int     r_number;       /* rpc program number for
                           this service */
};

The getrpcent function reads the next line of the file, opening the file if necessary. 

The setrpcent function opens and rewinds the file.  If the stayopen flag is non-zero, the net database is not closed after each call to getrpcent (either directly or indirectly through one of the other “getrpc” calls). 

The endrpcent function closes the file. 

Both getrpcbyname and getrpcbynumber sequentially search from the beginning of the file until a matching rpc program name or program number is found, or until EOF is encountered. 

RETURN VALUE

The getrpcent , getrpcbyname , and getrpcbynumber functions return a null pointer (0) on EOF or when unable to access the information in /etc/rpc either directly or through a Yellow Pages database. 

WARNINGS

All information is contained in a static area so it must be copied if it is to be saved. 

AUTHOR

Sun Microsystems, Inc. 

FILES

/etc/rpc

SEE ALSO

rpcinfo(1M), rpc(4). 

INTERNATIONAL SUPPORT

8-bit data, 16-bit data, messages

Hewlett-Packard Company  —  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026