endservent() — Close network services information data sets

Standards

Standards / Extensions C or C++ Dependencies

XPG4.2
Single UNIX Specification, Version 3

both  

Format

X/Open:
#define _XOPEN_SOURCE_EXTENDED 1
#include <netdb.h>

void endservent(void);
Berkeley sockets:
#define _OE_SOCKETS
#include <netdb.h>

void endservent();

General description

The endservent() function closes the /etc/services or the tcpip.ETC.SERVICES data set, which contains information about network services. Example services are name server, File Transfer Protocol (FTP), and telnet.

Special behavior for C++: To use this function with C++, you must use the _XOPEN_SOURCE_EXTENDED 1 feature test macro.

Related information