An open API service indexing awesome lists of open source software.

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

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})
```