Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

getprotobynumber_r(3) OSS Library Calls Reference Manual
The structure of type protoent is defined in the netdb.h header file as:
struct protoent {
char *p_name;
char **p_aliases;
int p_proto;
};
The fields of this structure are:
p_name Points to the official name of the protocol.
p_aliases Points to an array of null-terminated pointers to the alternate names for protocol.
p_proto Is the protocol number.
ERRORS
If this condition occurs, the getprotobynumber_r( ) function sets errno to the corresponding
value:
[ERANGE] Insufficient storage was supplied via buffer and buflen to contain the data to be
referenced by the resulting protoent structure.
FILES
/etc/protocols The Internet network protocols database file.
RELATED INFORMATION
Functions: getprotobyname(3), getprotobyname_r(3), getprotobynumber(3), getprotoent(3),
getprotoent_r(3), setprotoent(3), endprotoent(3).
Files: protocols(4), thread_safety(5).
STANDARDS CONFORMANCE
H06.21 and later H-series RVUs and J06.10 and later J-series RVUs
This function conforms to IEEE Std 1003.1 2004, POSIX System Application Program Interface.
Standard POSIX Threads Library version of this function
This function is an extension to the UNIX98 specification. Interfaces documented on this refer-
ence page conform to the following industry standards:
IEEE Std 1003.1-c1995, POSIX System Application Program Interface
The use of the header file spthread.h is an HP exception to the POSIX standard.
3112 Hewlett-Packard Company 527187-017