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

Technical Reference: Communications, Volume 2

setprotoent_r Subroutine

Purpose

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

Library

Standard C Library (libc.a)

Syntax

#include <netdb.h>

int setprotoent_r(StayOpenflag, proto_data);
int StayOpenflag;
struct protoent_data *proto_data;

Description

The setprotoent_r subroutine opens the /etc/protocols file and sets the file marker to the beginning of the file.

Parameters

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.

Files

/etc/protocols Contains the protocol names.

Related Information

endprotoent_r Subroutine, getprotobyname_r Subroutine, getprotobynumber_r Subroutine, and getprotoent_r Subroutine.

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