Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 1.06 KB

README.md

File metadata and controls

44 lines (28 loc) · 1.06 KB

IPTree

使用二叉树存储路由规则,可以自由增加、删除、查找IP是否存在于路由

现有状态:

Binary_IP_Tree:

前缀匹配路由,端口号配置为 int
可以修改为 端口号 []int,存储一组端口号,这样形成一个 路由+端口 结构
两个该结构一个定为 src ,一个定为 dst ,组合为四元组

Radix_IP_Tree:

前缀匹配,golang 实现 ngx_radix_tree
value 值也就是 端口号为 Uint32Slice 类型 (uint32[])

ACL_Tree_4:

四元组匹配完成

ACL_Tree_5:

五元组匹配,其中删除存在问题

Todo:

ID Todo Done
1 增加端口号范围
2 五元组匹配
3 黑白名单
4 Golang重写
5 Radix Tree版本

Reference: