Module utils

Module utils 

Source

Functions§

canonicalize_ipnet
Canonicalize an IP network by ensuring it uses the network address
hash_u64
Hash a value to u64 using the default hasher
host_size_key
Host size key function for sorting - equivalent to Python’s host_size_key Returns (priority, string_repr) where priority is:
ipnet_to_bits
Convert an IP network to a vector of bits for radix tree traversal
normalize_dns
Normalize a DNS hostname to canonical form (IDNA + lowercase)