| With an increasing scale of the network and the development of the application technology, more and more services need data packets classification and filter for real time and speediness. The data packet filters is the controlled process that in order to pass on and download data packets from network with the software or hardware equipments. The packet filter is the basic technology in the firewall, almost routers have this kind of function. The packet filter of the Netfilter/iptables in the Linux OS uses simple linearity graduation algorithm, so it is the lack of efficiency. Especially when the network changes more and more complex and the firewall needs to match the number of rules. The performance of firewall will be fall suddenly, and it will become the system bottleneck. Therefore I introduce a new packet filter algorithm that base on Binary tree, the name is My-filter. The algorithms enhance the performance of packet filter greatly. This algorithm is the high compatible packet filter, and it suitable packet filter of the number of rules, the rule of filter can achieve the fast match, and the memory structure is flexible. The algorithm of My-filter is simple and it has better time complex and spatial complex. |