setservent(3) — Subroutines
OSF — Environment_Note_Added
NAME
setservent − Gets service file entry
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <netdb.h> void setservent (
int stay_open );
PARAMETERS
stay_openIndicates when to close the services file.Specifying a value of 0 (zero) closes the file after each call to the getservent() function.Specifying a nonzero value allows the file to remain open after each call.
DESCRIPTION
The setservent() (set service entry) function opens the /etc/services file and sets the file marker at the beginning of the file.
RETURN VALUES
If an error occurs or the end of the file is reached, the setservent() function returns a null pointer.
FILES
/etc/services
Contains service names.
ENVIRONMENT NOTES
This section describes system features that are not generic to OSF/1 but that are provided in this OSF/1 implementation.
Digital Extensions
The system searches either the local /etc/sevices file or the NIS distributed networks file for the requested information. To determine which file or files to search, and in which order, the system uses the switches in the /etc/svc.conf file.
RELATED INFORMATION
Functions: endprotoent(3), getprotobyname(3), getprotobynumber(3), getprotoent(3), getservbyname(3), getservbyport(3), getservent(3), setprotoent(3)