setprotoent

Opens, rewinds, or closes the protocols database file.

Format

#include  <netdb.h>

void setprotoent  (int stay_open);

Arguments

stay_open
Specifies a value used to indicate when to close the protocols database file:

Description

The setprotoent routine opens, or rewinds the protocols database file and sets the file marker to the beginning of the file.

Passing a nonzero value to the stay_open parameter keeps the connection open until you call the endprotoent, or exit routine.

See also endprotoent, exit, and getprotoent in this section.

Return Values
Indicates success. 
Indicates an error; unable to open the protocols database file. 

Errors
  If the setprotoent routine fails, the error is further specified in the global errno. 


Previous Page | Next Page | Table of Contents | Index