SYNOPSIS<nsinfo $name [$which]>
DESCRIPTION
The nsinfo
function obtains information about the most
recently completed nslookup
(here). It can
be called after a single nslookup
or within an nslookup
loop. The $name
argument is one of the following:
addrs
Returns the list of IP addresses given in the reply.name
Returns the canonical host name.aliases
Returns any aliases known for the host.errnum
Returns the error code (not a protocol code) from the last
lookup. 0 indicates a successful reply. See below for other
numbers.errmsg
Returns the error message from the last lookup. The possible
errnum
codes and their corresponding errmsg
messages are:
Ok
No recovery
Try again
Cannot open hosts file
Cannot connect to nameserver
Nameserver connection refused
Nameserver query timeout
Host not found
Bad IP address
Incorrect usage
Out of memory
Bad service
No data
Internal error
Unknown error
replyheader
Returns text information about the reply header, including id,
flags, opcode, and response code.
Added in version 3.01.989630000 20010511.replyrecords
Returns text information about the reply's records. An optional
second argument can be one of query
, answer
,
authority
, additional
or all
to return
records from just a particular section (or all sections). Each
value returned is a space-separated list of name, TTL, class,
type, and data (answer). Added in version 3.01.989630000 20010511.rawreply
Returns the raw packet data from the last reply, as a
varbyte
field. Largely superseded by replyheader
and replyrecords
options.
DIAGNOSTICSnsinfo
returns the requested information from the last
nslookup
completed.
EXAMPLE<nslookup $host>
IP address: $ret
<nsinfo aliases>
Aliases: <LOOP $ret> $ret </LOOP>
CAVEATS
The nsinfo
function was added in version 3.0.951800000 20000228.
If <urlcp dnsmode sys>
is set, less information may be
available from the reply.