Implemented dns_domain_walk which walks the domain prefixes one at
a time