Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gethostbyaddr(3)

gethostbyname(3)

gethostent(3)

sethostent(3)

endhostent(3)  —  Subroutines

NAME

endhostent, endhostent_r − Ends retrieval of network host entries

LIBRARY

Standard C Library (libc.a)

SYNOPSIS

#include <netdb.h>

void endhostent ( void );

void endhostent_r (
        struct hostent_data ∗host_data);

PARAMETERS

host_dataIs data for the hosts database. 

DESCRIPTION

The endhostent() function closes the /etc/hosts file, previously opened with the gethostentbyaddr() or gethostentbyname() function.

The endhostent_r() function is the reentrant version of the endhostent() function.  The netdb.h header file defines the hostent and hostent_data structures. 

The system searches either the local /etc/hosts file or one of the files distributed by BIND or NIS 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 sethostent() function has been performed with a nonzero parameter, then the endhostent() function will not close the /etc/hosts file.  In this instance, the /etc/hosts file is not closed until a call to the exit() function.  A second sethostent() function must be issued with a parameter equal to 0 (zero) in order to ensure that a following endhostent() function will succeed. 

FILES

/etc/hostsContains the hostname database. 

RELATED INFORMATION

Functions: gethostbyaddr(3), gethostbyname(3), gethostent(3), sethostent(3)

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