method to build the PATRICIA trie for IP match