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

Technical Reference: Communications, Volume 2

setservent_r Subroutine

Purpose

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

Library

Standard C Library (libc.a)

Syntax

#include <netdb.h>

int setservent_r(StayOpenflag, serv_data) 
int StayOpenflag;
struct servent_data serv_data;

Description

The setservent_r subroutine opens the /etc/services file and sets the file marker at the beginning of the file.

Parameters

StayOpenflag Indicates when to close the /etc/services file.

Specifying a value of 0 closes the file after each call to the getservent subroutine. Specifying a nonzero value allows the file to remain open after each call.

serv_data Points to the servent_data structure.

Files

/etc/services Contains service names.

Related Information

endservent_r Subroutine, getservbyport_r Subroutine, getservent_r Subroutine, and getservbyname_r Subroutine.

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