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.
The sethostent subroutine is part of Base Operating System (BOS) Runtime.
/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 Version 4.3 Communications Programming Concepts.