setnetent_r Subroutine

Purpose

Opens the /etc/networks file and sets the file marker.

Library

Standard C Library (libc.a)

Syntax

#include <netdb.h>
int setnetent_r(StayOpenflag, net_data)
struct netent_data *net_data;
int StayOpenflag;

Description

The setnetent_r subroutine opens the /etc/networks file and sets the file marker at the beginning of the file.

Parameters

Item Description
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.

Files

Item Description
/etc/networks Contains official network names.