dns.name.canonical_compare

dns.name

canonical_compare(a, b) -> cmp

Compare two domain names in DNSSEC canonical order

Returns -1 if a < b, 0 if a == b, 1 if a > b in canonical DNS name order (RFC 4034 Section 6.1). Names are compared label by label from the rightmost (closest to root) to leftmost. Shorter names sort before longer names when all compared labels match.