GETHOST(8)

NAME
gethost - Fetch name or IP address for a host

SYNOPSIS
gethost [ -a ] -t type { name | IP.ADDR }

DESCRIPTION

The gethost program retrieves the host name or IP address from the given parameter. It will call the procedure gethostbyname to translate a name to an IP address and the procedure gethostbyaddr to translate the IP address to a name. The resulting name or dotted IP address is written to the stdout file.

OPTIONS

-t type
    Specify the type of the translation desired. This parameter is required. The type is one of the types defined in the section labeled TYPES.

-a  Print all addresses or names associated with the key. If this option is not supplied only the first item is printed.

name
    The name is used if the translation is from name to IP address. It may be any name acceptable to the gethostbyname procedure.

IP.ADDR
    The dotted decimal IP address is used if the translation from IP address to name. The address is translated to an internet address and then used as a parameter to gethostbyaddr procedure to translate the name.

TYPES

name
    Translate the name to an IP address.

addr
    Translate the IP address to a name.

full
    Translate the alias name to the official name.

    Perform a special sequence similar to the operations performed by the mail transfer agents. The input name is translated to an IP address. The resulting IP address is then translated back to a name list and the official name is printed.

SECURITY
This program poses no security risk and may run as any account.

SEE ALSO
netmath will manipulate the IP addresses for common operations such as logical and, or, and exclusive or.

netmath(8), gethost(8)

COPYRIGHT
The gethost program is in public domain. This is not the GNU public license.

WARRENTY
No warranty is expressed or implied. If it breaks then you get to keep both pieces.

AUTHOR
Al Longyear <longyear@netcom.com>