摘要:
第一次在博客园写博客,仅仅为的与大家交流与分享,欢迎批评与指正。首先,找出最长匹配IP,需要的是一个IP路由表,这来自于一个文件,例如:prefix_ip.txt,其中的内容为:157.246.230.40/32157.246.230.42/31231.181.216.48/28……本人将该数据存储在以下数据结构①中:/***** the ip from prefix_set.txt *****/typedef struct IP { unsigned int ip; unsigned int matchNum; //the length of prefix }ipNode;Trie Tree 阅读全文