Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ endprotoent(3) — OSF/1 3.0 αXP

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getprotoent(3)

getprotobynumber(3)

getprotobyname(3)

setprotoent(3)

endprotoent(3)  —  Subroutines

NAME

endprotoent, endprotoent_r − Close the /etc/protocols file

LIBRARY

Standard C Library (libc.a)

SYNOPSIS

#include <netdb.h> void endprotoent(void); void endprotoent_r(
        struct protoent_data ∗proto_data);

PARAMETERS

proto_dataIs data for the protocol database. 

DESCRIPTION

The endprotoent() function closes the /etc/protocols file, previously opened with the getprotoent(), getprotobyname(), or getprotobynumber() function. 

The endprotoent_r() function is the reentrant version of the endprotoent() function.  The netdb.h header file defines the protoent_data structure.  The system searches either the local /etc/protocols file or the NIS distributed networks file for the requested information.  To determine which file or files to search, and in which order, the system uses the switches in the /etc/svc.conf file. 

NOTES

If the most recent setprotent() function has been performed with a nonzero parameter, then the endprotoent() function will not close the /etc/protocols file.  In this instance, the /etc/protocols file is not closed until a call to the exit() function.  A second setprotent() call must be issued with a parameter equal to 0 (zero) in order to ensure that a following endprotoent() function will succeed. 

RELATED INFORMATION

Functions: getprotoent(3), getprotobynumber(3), getprotobyname(3), setprotoent(3). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026