|
NAMEgetnetent , getnetbyaddr ,
getnetbyname , setnetent ,
endnetent —
get network entry
LIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <netdb.h>
struct netent *
struct netent *
struct netent *
void
void
DESCRIPTIONThegetnetent (), getnetbyname (),
and getnetbyaddr () functions each return a pointer to
an object with the following structure describing an internet network. This
structure contains either the information obtained from the nameserver,
named(8),
broken-out fields of a line in the network data base
/etc/networks, or entries supplied by the
yp(8) system.
The order of the lookups is controlled by the `networks' entry in
nsswitch.conf(5).
struct netent { char *n_name; /* official name of net */ char **n_aliases; /* alias list */ int n_addrtype; /* net number type */ uint32_t n_net; /* net number */ }; The members of this structure are:
The The The The FILES
DIAGNOSTICSNull pointer returned onEOF or error.
SEE ALSOnetworks(5)RFC 1101 HISTORYThegetnetent (), getnetbyaddr (),
getnetbyname (), setnetent (),
and endnetent () functions appeared in
4.2BSD.
BUGSThe data space used by these functions is thread-specific; if future use requires the data, it should be copied before any subsequent calls to these functions overwrite it. Only Internet network numbers are currently understood. Expecting network numbers to fit in no more than 32 bits is probably naive.
Visit the GSP FreeBSD Man Page Interface. |