ltm rule command DNS scrape
iRule(1) BIG-IP TMSH Manual iRule(1)
DNS::scrape
Allows users to walk over a DNS message and parse out information from
the packet based on user supplied arguments.
SYNOPSIS
DNS::scrape ('AUTHORITY' | 'ADDITIONAL' | 'ANSWER' | 'ALL')
(DNS_SCRAPE_VAL)+
DESCRIPTION
This iRules command allows users to walk over a DNS message and parse
out information from the packet based on user supplied arguments.
Note: This command functions only in the context of LTM iRules and
requires the DNS Profile, which is only enabled as part of GTM or the
DNS Services add-on.
Syntax
Note: Returned RDATA and QNAME data will be in binary format. QNAME
data may be compressed. If you need ASCII/Uncompressed equivalent data,
please use "DNS::rdata" or "DNS::question name" respectively.
DNS::scrape ANSWER +
* returns one or more of the specified keywords in the ANSWER section
as a list (or in the case of multiple fields, lists of lists.) the
field lists will be returned in the order specified.
DNS::scrape AUTHORITY +
* returns one or more of the specified keywords in the AUTHORITY
section as a list (or in the case of multiple fields, lists of
lists.) the field lists will be returned in the order specified.
DNS::scrape ADDITIONAL +
* returns one or more of the specified keywords in the ADDITIONAL
section as a list (or in the case of multiple fields, lists of
lists.) the field lists will be returned in the order specified.
DNS::scrape ALL +
* returns one or more of the specified keywords in ALL sections (but
never the question section) as a list (or in the case of multiple
fields, lists of lists.) the field lists will be returned in the
order specified.
RETURN VALUE
VALID DURING
EXAMPLES
when DNS_RESPONSE {
foreach rr [DNS::scrape ANSWER type ttl qnamelen rdatalen] {
log local2. "ANSWER: $rr"
}
foreach rr [DNS::scrape AUTHORITY type ttl class qnamelen rdatalen] {
log local2. "AUTHORITY: $rr"
}
foreach rr [DNS::scrape ADDITIONAL type ttl class qnamelen rdatalen] {
log local2. "ADDITIONAL: $rr"
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-11.5.0 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)