Table of Contents

NAME

SYNOPSIS

DESCRIPTION

The and functions each return a pointer to an object with the following structure containing the broken-out fields of a line in the network protocol data base, struct    protoent {    char    *p_name;    /* official name of protocol */
   char    **p_aliases;    /* alias list */
   int    p_proto;    /* protocol number */
}; The members of this structure are: The official name of the protocol. A zero terminated list of alternate names for the protocol. The protocol number. The function reads the next line of the file, opening the file if necessary. The function opens and rewinds the file. If the flag is non-zero, the net data base will not be closed after each call to or The function closes the file. The function and sequentially search from the beginning of the file until a matching protocol name or protocol number is found, or until is encountered.

RETURN VALUES

Null pointer (0) returned on or error.

FILES

SEE ALSO

HISTORY

The and functions appeared in

BUGS

These functions use a static data space; if the data is needed for future use, it should be copied before any subsequent calls overwrite it. Only the Internet protocols are currently understood.


Table of Contents