endnetent()--Close Network Database
Syntax
#include <netdb.h> void endnetent()
Service Program Name: QSOSRV2
Default Public Authority: *USE
Threadsafe: No; see Usage Notes.
The endnetent() function is used to close the network database file. The file is opened by those functions that retrieve information about a network (for example, getnetent()).
Usage Notes
- When the _XOPEN_SOURCE macro defined to the value 520 or greater, the network file is always closed.
When the _XOPEN_SOURCE macro is not so defined, the network file is not closed if a setnetent() with
a nonzero parameter value was previously completed.
- System i® Navigator or the following CL commands can be
used to access the network database file:
- WRKNETTBLE (Work with Network Table Entries)
- ADDNETTBLE (Add Network Table Entry)
- RMVNETTBLE (Remove Network Table Entry)
- WRKNETTBLE (Work with Network Table Entries)
- Do not use the endnetent() function in a multithreaded
environment. See the multithread alternative endnetent_r()
function.
- When you develop in C-based languages and an application is compiled with the _XOPEN_SOURCE macro defined to the value 520 or greater, the endnetent() API is mapped to qso_endnetent98().
Authorities
No authorization is required.
Related Information
- _XOPEN_SOURCE--Using _XOPEN_SOURCE for the UNIX® 98
compatible interface
- getnetent()--Get Next Entry from Network
Database
- setnetent()--Open Network Database
- getnetbyaddr()--Get Network Information for IP
Address
- getnetbyname()--Get Network Information for Domain Name
API introduced: V3R1