A trie data structure for DNS and ARP queries