endprotoent()--Close Protocol Database
Syntax
#include <netdb.h> void endprotoent()
Service Program Name: QSOSRV2
Default Public Authority: *USE
Threadsafe: No; see Usage Notes.
The endprotoent() function is used to close the protocols database file. The file is opened by those functions that retrieve information about a protocol (for example, getprotoent()).
Authorities
No authorization is required.
Usage Notes
- When the _XOPEN_SOURCE
macro defined to the value 520 or greater, the protocols file is always closed.
When the _XOPEN_SOURCE macro is not so defined, the protocols file is not closed if a setprotoent()
with a nonzero parameter value was previously completed.
- System i® Navigator or the
following CL commands can be
used to access the protocol database file:
- WRKPCLTBLE (Work with Protocol Table Entries)
- ADDPCLTBLE (Add Protocol Table Entry)
- RMVPCLTBLE (Remove Protocol Table Entry)
- WRKPCLTBLE (Work with Protocol Table Entries)
- Do not use the endprotoent() function in a multithreaded
environment. See the multithread alternative endprotoent_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 endprotoent() API is mapped to qso_endprotoent98().
Related Information
- _XOPEN_SOURCE--Using _XOPEN_SOURCE for the UNIX® 98
compatible interface
- getprotoent()--Get Next Entry from Protocol
Database
- setprotoent()--Open Protocol Database
- getprotobyname()--Get Protocol Information for
Protocol Name
- getprotobynumber()--Get Protocol Information for Protocol Number
API introduced: V3R1