Giter Site home page Giter Site logo

iptree's Introduction

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:

iptree's People

Contributors

juntaran avatar

Stargazers

猴子 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.