Open System Services Library Calls Reference Manual (G06.28+, H06.05+)

OSS Library Calls (s) setprotoent(3)
NAME
setprotoent - Opens the protocols database /etc/protocols and sets the next entry to the rst
entry in the database
LIBRARY
G-series native OSS processes: /G/system/sysnn/zinetsrl
H-series OSS processes: /G/system/zdllnnn/zinetdll
SYNOPSIS
#include <netdb.h>
void setprotoent(
int stay_open);
PARAMETERS
stay_open If the value of this parameter is non-zero, the network protocols database will not
be closed after calls to getprotobyname( ), getprotobynumber(), and getpro-
toent().
DESCRIPTION
The setprotoent() (set protocol entry) function opens /etc/protocols, the network protocols data-
base, and sets the next entry marker to the rst entry in the database.
RETURN VALUES
Upon successful completion, the setprotoent() function returns a value of 0 (zero). Otherwise it
returns a value of -1.
ERRORS
The setprotoent() function does not set errno.
FILES
/etc/protocols The Internet network protocols database le. Each record in the le occupies a
single line and has three elds: the protocol name, the protocol number, and pro-
tocol aliases.
RELATED INFORMATION
Functions: endprotoent(3), getprotobyname(3), getprotobynumber(3), getprotoent(3).
Files: protocols(4).
527187-007 Hewlett-Packard Company 631