Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

OSS Library Calls (e - f) endservent(3)
NAME
endservent - Closes the connection to the network services database
LIBRARY
G-series native OSS processes: /G/system/sysnn/zinetsrl
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zinetdll |
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yinetdll |
SYNOPSIS
[#include <sys/socket.h>]
#include <netdb.h>
void endservent(void);
PARAMETERS
None.
DESCRIPTION
The endservent( ) function closes /etc/services, the network services database. /etc/services can
be opened with the getservent( ), getservbyname( ),orgetservbyport() functions (or their reen-
trant versions), or with the setservent() function.
The enumeration of /etc/services is a process-wide property shared by all threads. When used in
a multi-threaded application, the endservent( ) function closes /etc/services for all threads.
NOTES
If the setservent( ) function is called with the stay_open parameter set to a nonzero value, the
connection remains open until the endservent( ) or exit( ) function is called.
RETURN VALUES
The endservent( ) function does not return a value.
ERRORS
The endservent( ) function does not set errno.
FILES
/etc/services This is the Internet network service-name database. Each record in the file occu-
pies a single line and has four fields: the service name, the port reference, the
protocol name, and aliases.
RELATED INFORMATION
Functions: getservent(3), getservbyname(3), getservbyport(3), setservent(3).
Files: services(4).
527187-017 Hewlett-Packard Company 213