NAME::response¶
Description¶
Returns a list of records received in response to a DNS query made
with the NAME__lookup command. If no records
are returned, returns null.
Warning
This command has been deprecated with the release of version 15.1 in favor of the RESOLVER and DNSMSG namespaces.
Syntax¶
NAME::response [ address [<index>] | name ]
NAME::response¶
- If resolution of a name was requested, returns a list of up to 16 records received in response to a lookup request.
- If reverse resolution of an address was requested, returns the name received in response.
NAME::response address [<index>]¶
- Returns the address record at the indicated offset from the list of records received in response to a lookup request. (Valid index values are 0 through 15 inclusive. If index is not specified, returns a list of up to 16 address records.)
Examples¶
Resolve a name to a list of addresses & use the first one
when ... {
NAME::lookup $myHostname
}
when NAME_RESOLVED {
log local0. "NAME_RESOLVED: [NAME::response]"
set server_ip [NAME::response address 0]
}
Resolve an address to a name & log it:
when CLIENT_ACCEPTED {
NAME::lookup [IP::client_addr]
}
when NAME_RESOLVED {
log local0. "Client IP resolves to [NAME::response name]"
}