Opens network host file.
Standard C Library (libc.a) (libbind) libnis) (liblocal)
#include <netdb.h>
sethostent ( StayOpen)
int StayOpen;
When using the sethostent subroutine in DNS/BIND name service resolution, sethostent allows a request for the use of a connected socket using TCP for queries. If the StayOpen parameter is non-zero, this sets the option to send all queries to the name server using TCP and to retain the connection after each call to gethostbyname or gethostbyaddr.
When using the sethostent subroutine to search the /etc/hosts file, sethostent opens and rewinds the /etc/hosts file. If the StayOpen parameter is non-zero, the hosts database is not closed after each call to gethostbyname or gethostbyaddr.
/etc/hosts | Contains the host name database. |
/etc/netsvc.conf | Contains the name services ordering. |
/etc/include/netdb.h | Contains the network database structure. |
The endhostent subroutine, gethostbyaddr subroutine, gethostbyname subroutine, gethostent subroutine.
Sockets Overview and Network Address Translation in AIX 5L Version 5.2 Communications Programming Concepts.