Reads the next entry from the protocols table.
Format
#include <netdb.h>
struct protoent *getprotoent();
1 – Description
This function returns a pointer to a protoent structure
containing the data from the protocols table. For information
about the protoent structure, refer to protoent Structure.
The getprotoent() function keeps an index to the table, allowing
successive calls to be used to search the entire table.
All information is contained in a static area, so it must be
copied to be saved.
Related Functions
See also getprotobyname() and getprotobynumber().
2 – Return Values
NULL Indicates the end of the table or an error.
x A pointer to a protoent structure.