Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4.2 |
both |
#define _XOPEN_SOURCE_EXTENDED 1
#include <netdb.h>
void setnetent(int stayopen);
#define _OE_SOCKETS
#include <netdb.h>
void setnetent(int stayopen);
The setnetent() function opens and rewinds the tcpip.HOSTS.ADDRINFO data set, which contains information about known networks. If the stayopen flag is nonzero, the tcpip.HOSTS.ADDRINFO remains open after each call to setnetent().
Special behavior for C++: To use this function with C++, you must use the _XOPEN_SOURCE_EXTENDED 1 feature test macro.
setnetent() returns no values.