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

  man pages->Tru64 Unix man pages -> hostalias (3)              
Title
Content
Arch
Section
 

hostalias(3)

Contents


NAME    [Toc]    [Back]

       hostalias - Search for host aliases

SYNOPSIS    [Toc]    [Back]

       #include  <sys/types.h>  #include  <netinet/in.h> #include
       <arpa/nameser.h> #include <resolv.h>

       char *hostalias(
               char *name );

       The following function is supported in order  to  maintain
       backward compatibility with previous versions of the operating
 system.  int hostalias_r(
               char *name,
               char *buf,
               int len );

PARAMETERS    [Toc]    [Back]

       Points to the name of the host to  retrieve  aliases  for.
       Specifies  the  buffer  for the host alias.  Specifies the
       length of buf.

DESCRIPTION    [Toc]    [Back]

       The hostalias() function searches for the alias associated
       with   the  name.  The  HOSTALIASES  environment  variable
       defines the name of a file in which aliases are  kept,  in
       the form:

       host alias

NOTES    [Toc]    [Back]

       The hostalias_r() function is the reentrant version of the
       hostalias() function. It is supported in order to maintain
       backward compatibility with previous versions of the operating
 system.  When successful, hostalias_r() provides the
       alias name(s) in the buffer pointed at by buf, and returns
       a value of 0 (zero). (This buffer should be at least MAXDNAME
 characters.)  Otherwise, it returns a value of -1 and
       may set errno.

RETURN VALUES    [Toc]    [Back]

       Upon  successful  completion,  the  hostalias()   function
       returns  the  host  alias.  Otherwise,  a  null pointer is
       returned.

ERRORS    [Toc]    [Back]

       If the following condition occurs, the hostalias_r() function
  sets  errno  to the corresponding value.  Host alias
       could not be found.  The buf parameter is invalid  or  too
       small.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: res_mkquery(3), getenv(3).



                                                     hostalias(3)
[ Back ]
 Similar pages
Name OS Title
rcp Tru64 Copies files on the same host, between a local host and a remote host, and between two remote hosts
aliases IRIX aliases file for sendmail
aliases OpenBSD aliases file for sendmail
aliases FreeBSD aliases file for sendmail
newaliases Linux update /etc/aliases database
alias IRIX define or display aliases
alias Tru64 Defines or displays aliases
aliases HP-UX aliases file for sendmail
praliases IRIX display system mail aliases
praliases FreeBSD display system mail aliases
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service