setprotoent(3) — Subroutines
OSF — Environment_Note_Added
NAME
setprotoent − Opens and rewinds the /etc/protocols file
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <netdb.h> void setprotoent (
int stay_open );
PARAMETERS
stay_openIndicates when to close the protocols file. Specifying a value of 0 (zero) closes the file after each call to the getprotoent() function.Specifying a nonzero value allows the /etc/protocols file to remain open after each function.
DESCRIPTION
The setprotoent() (set protocol entry) function opens the /etc/protocols file and sets the file marker to the beginning of the file.
RETURN VALUES
The return value points to static data that is overwritten by subsequent calls.
FILES
/etc/protocols
Contains the protocol 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/protocols 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)