DNS::type

Description

This iRules command gets or sets the resource record type field
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

DNS::type <rr_obj> [value]

DNS::type <rr_obj> [value]

  • Gets or sets the resource record type field (e.g. A, AAAA, MX, NPTR, etc)

Examples

Remove SOA records from section
when DNS_RESPONSE {
    set rrs [DNS::answer]
    foreach rr $rrs {
        if { [DNS::type $rr] == "SOA" } {
            DNS::answer remove $rr
        }
    }
}