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

OSS Library Calls (g - h) getnetbyaddr_r(3)
The structure of type netent is defined in the netdb.h header file as:
struct netent {
char *n_name;
char **n_aliases;
int n_addrtype;
uint32_t n_net;
};
The fields of this structure are:
n_name Points to the official name of the network.
n_aliases Points to an array of null-terminated pointers to the alternate names for the
network..mc
n_addrtype The type of network number being returned. Its value is always AF_INET, which
indicates that this is the network potion of an Internet address.
n_net Is the network number, in host order.
ERRORS
If this condition occurs, the getnetbyaddr_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 netent structure.
FILES
/etc/networks The Internet network name database file.
RELATED INFORMATION
Functions: getnetent(3), getnetent_r(3), getnetbyaddr(3), getnetbyname(3),
getnetbyname_r(3), setnetent(3), endnetent(3).
Files: networks(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.
527187-017 Hewlett-Packard Company 387