[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Communications, Volume 2

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

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

/etc/networks Contains official network names.

Related Information

endnetent_r Subroutine, getnetbyaddr_r Subroutine, getnetbyname_r Subroutine, and getnetent_r Subroutine.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]