osf1 man page for hostalias

Query: hostalias

OS: osf1

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

hostalias(3)						     Library Functions Manual						      hostalias(3)

NAME
hostalias - Searches for host aliases
SYNOPSIS
#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
Points to the name of the host to retrieve aliases for. Specifies the buffer for the host alias. Specifies the length of buf.
DESCRIPTION
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
The hostalias_r() function is the reentrant version of the hostalias() function. It is supported in order to maintain backward compatibil- ity 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
Upon successful completion, the hostalias() function returns the host alias. Otherwise, a null pointer is returned.
ERRORS
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.
RELATED INFORMATION
Functions: res_mkquery(3), getenv(3). delim off hostalias(3)
Related Man Pages
getfsfile(3) - osf1
getfsspec_r(3) - osf1
gethostbyname(3) - osf1
hostalias(3) - osf1
setfsent(3) - osf1
Similar Topics in the Unix Linux Community
Script to maintain file versions