*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> sethostresorder (3c)              
Title
Content
Arch
Section
 

Contents


SETHOSTRESORDER(3N)					   SETHOSTRESORDER(3N)


NAME    [Toc]    [Back]

     sethostresorder - specify order of	host-address resolution	services

SYNOPSIS    [Toc]    [Back]

     int sethostresorder(const char *order);

DESCRIPTION    [Toc]    [Back]

     The gethostbyname(3N) and gethostbyaddr(3N) routines can access three
     types of host-address databases:

     o	the hosts file,	/etc/hosts,

     o	Sun's network information service (NIS)	and

     o	the Berkeley Internet Name Domain service ("BIND name server").

     sethostresorder allows a program to specify the order of services to
     resolve Internet addresses	and hostnames from these databases.

     sethostresorder should be called before the first time gethostbyname and
     gethostbyaddr are called.	The order argument is a	character string that
     contains keywords for the lookup services.	 See the description of
     hostresorder in resolver(4) for the list and meaning of keywords and
     separators.  The colon (:)	character is equivalent	to white space as a
     keyword separator.	 For example,

	  sethostresorder("nis bind local");
	  sethostresorder("nis:bind:local");

     are equivalent.

     There are two versions of this routine:  the standard  version in libc
     and the NIS version in libsun.  The programmatic interface	of both
     versions is identical, except the standard	version	ignores	the NIS
     keyword. The libc default order is	``bind / local'' and the libsun
     default is	``nis /	bind / local''.

     This routine overrides the	order specified	by the hostresorder keyword in
     /etc/resolv.conf and the HOSTRESORDER environment variable.

DIAGNOSTICS    [Toc]    [Back]

     sethostresorder returns 0 if the order was	changed, otherwise it returns
     -1.  Unrecognized keywords	are ignored.

SEE ALSO    [Toc]    [Back]

      
      
     intro(3), gethostbyname(3N), resolver(4)


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
configResolver IRIX updates the host resolution order.
arp Tru64 Address Resolution Protocol
arp IRIX Address Resolution Protocol
arp FreeBSD Address Resolution Protocol
arp OpenBSD Address Resolution Protocol
ntohl Tru64 Convert an unsigned 32-bit integer from Internet network byte order to host byte order
htons Tru64 Convert an unsigned short (16-bit) integer from host byte order to network byte order
hostname FreeBSD host name resolution description
hostname HP-UX host name resolution description
hostname OpenBSD host name resolution description
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service