Getnetent – Comtrol eCos User Manual
Page 526

Chapter 38. TCP/IP Library Reference
OpenBSD intentionally uses different NI_MAXHOST value from what RFC2553
suggests, to avoid buffer length handling mistakes.
BSD
May 25, 1995
BSD
getnetent
GETNETENT(3)
System Library Functions Manual
GETNETENT(3)
NAME
getnetent, getnetbyaddr, getnetbyname, setnetent, endnetent - get network
entry
SYNOPSIS
#include
<
netdb.h>
struct netent *
getnetent(void);
struct netent *
getnetbyname(char *name);
struct netent *
getnetbyaddr(in_addr_t net, int type);
void
setnetent(int stayopen);
void
endnetent(void);
DESCRIPTION
The getnetent(), getnetbyname(), and getnetbyaddr() functions each return
a pointer to an object with the following structure containing the bro-
ken-out fields of a line in the network database, /etc/networks.
struct
netent {
char
*n_name;
/* official name of net */
char
**n_aliases;
/* alias list */
int
n_addrtype;
/* net number type */
in_addr_t
n_net;
/* net number */
};
The members of this structure are:
n_name
The official name of the network.
n_aliases
A zero-terminated list of alternate names for the network.
n_addrtype
The type of the network number returned; currently only
AF_INET.
422