Open System Services Library Calls Reference Manual (G06.27+, H06.04+)

OSS Library Calls (s) setservent(3)
NAME
setservent - Opens the network services database /etc/services and sets the next entry to the rst
entry
LIBRARY
G-series native OSS processes: /G/system/sysnn/zinetsrl
H-series OSS processes: /G/system/zdllnnn/zinetdll
SYNOPSIS
#include <netdb.h>
void setservent(
int stay_open);
PARAMETERS
stay_open If this parameter is set to a nonzero value, the network services database will not
be closed after calls to getservent(), getservbyname(),orgetservbyport().
DESCRIPTION
The setservent() (set service entry) function opens the /etc/services le and sets the next entry
marker to the rst entry in the le.
RETURN VALUES
Upon successful completion, the setservent() function returns a value of 0 (zero). Otherwise, it
returns a value of -1.
ERRORS
The setservent() function does not set errno.
FILES
/etc/services This is the Internet network service-name database. Each record in the le occu-
pies a single line and has four elds: the service name, the port reference, the
protocol name, and aliases.
RELATED INFORMATION
Functions: endservent(3), getservbyname(3), getservbyport(3), getservent(3), setprotoent(3).
Files: services(4).
527187-004 Hewlett-Packard Company 629