https://github.com/hrefhref/routing_table
Elixir/Rust NIF for an efficient routing table implementation, using a tree-bitmap
https://github.com/hrefhref/routing_table
elixir erlang networking routing
Last synced: 5 months ago
JSON representation
Elixir/Rust NIF for an efficient routing table implementation, using a tree-bitmap
- Host: GitHub
- URL: https://github.com/hrefhref/routing_table
- Owner: hrefhref
- Created: 2021-11-12T16:18:03.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-12T17:32:48.000Z (about 4 years ago)
- Last Synced: 2025-06-25T01:05:14.338Z (6 months ago)
- Topics: elixir, erlang, networking, routing
- Language: Rust
- Homepage:
- Size: 406 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Routing Table
Efficient RIB for Elixir, implemented using a Rust NIF and [treebitmap](https://crates.io/crates/treebitmap).
The tables covers both IPv4 and IPv6, and values are any erlang term, stored in ets.
```elixir
table = RoutingTable.new()
RoutingTable.add(table, {10, 69, 0, 0}, 16, :vpn)
RoutingTable.add(table, {10, 69, 1, 0}, 24, :lan)
:vpn = RoutingTable.lookup(table, {10, 69, 2, 1})
:lan = RoutingTable.lookup(table, {10, 69, 1, 1})
nil = RoutingTable.lookup(table, {10, 68, 1, 1})
```