Using whatever host naming services are configured on the current machine,
get-host-entry
returns address or name information about the given host.
nil
is returned if the host is unknown.
The host argument can be one of the following:
a name string, for example
"www.foobar.com"
a dotted inet address string, for example
"209.130.14.246"
a integer representing the inet address, for example
#xD1820EF6
The fields argument is a list of keywords describing what information to return for the host. If
get-host-entry
succeeds, it returns multiple values, one value for each field specified. The following fields are allowed:
The primary IP address as an integer.
A list of all the IP addresses as integers.
The primary name as a string.
The alias names as a list of strings.
CL-USER 16 > (comm:get-host-entry "www.altavista.com"
:fields '(:address))
3511264349
CL-USER 17 > (comm:get-host-entry 3511264349
:fields '(:name))
"altavista.com"
CL-USER 18 > (comm:get-host-entry "altavista.com"
:fields '(:name
:address
:aliases))
"altavista.com"
3511264349
("www.altavista.com" "www.altavista.com")