Opens the /etc/networks file and sets the file marker.
Standard C Library (libc.a)
#include <netdb.h> int setnetent_r(StayOpenflag, net_data) struct netent_data *net_data; int StayOpenflag;
The setnetent_r subroutine opens the /etc/networks file and sets the file marker at the beginning of the file.
StayOpenflag | Contains a value used to indicate when to close the /etc/networks file.
Specifying a value of 0 closes the /etc/networks file after each call to the getnetent subroutine. Specifying a nonzero value leaves the /etc/networks file open after each call. |
net_data | Points to the netent_data structure. |
/etc/networks | Contains official network names. |
endnetent_r Subroutine, getnetbyaddr_r Subroutine, getnetbyname_r Subroutine, and getnetent_r Subroutine.