Opens the /etc/protocols file and sets the file marker.
Standard C Library (libc.a)
#include <netdb.h>
int setprotoent_r(StayOpenflag, proto_data);
int StayOpenflag;
struct protoent_data *proto_data;
The setprotoent_r subroutine opens the /etc/protocols file and sets the file marker to the beginning of the file.
| Item | Description |
|---|---|
| StayOpenflag | Indicates when to close the /etc/protocols file. Specifying a value of 0 closes the file after each call to getprotoent. Specifying a nonzero value allows the /etc/protocols file to remain open after each subroutine. |
| Item | Description |
|---|---|
| /etc/protocols | Contains the protocol names. |