|
|
ahostDNS lookup |
||||
| Usage | ||||
|
||||
| Description | ||||
| Starts a DNS lookup for the <dnsquery> and reports the
results by calling the callback routine.
The -i switch causes the command to execute
in IPv6 mode (and lookup ONLY IPv6 hosts!). The -a switch causes the command to run in "unspecified" mode and return any available address: IPv4 or Ipv6. This command also performs reverse lookups (if you pass an IP address as <hostname>). The callback command gets passed five parameters: $0 contains the query string (<dnsquery> in fact) $1 contains the value 1 if the query was succesfull. In that case the remaining parameters are set as follows: $2 contains the first ip address associated to the <dnsquery> $3 contains the hostname associated to the <dnsquery> $4 contains the eventual <magicdata> passed. If $1 contains the value 0 then the query has failed and $2 contains an error message explaining the failure. $3 is empty $4 contains the eventual <magicdata> passed. Please note that if the dns query fails to even start for some reason then your callback MAY be called even before ahost() returns. |
||||
| Switches | ||||
|
||||
| Syntax Specification | ||||
|
||||
| Examples | ||||
|
||||
| See also | ||||
| host |