treebitmap
treebitmap copied to clipboard
Fast IP lookup table for IPv4/IPv6 prefixes
Tests currently fail on master on latest Rust with this error: ``` failures: ---- tree_bitmap::tests::remove stdout ---- thread 'tree_bitmap::tests::remove' panicked at 'attempted to zero-initialize type `&str`, which is invalid', /home/charlie/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:625:9...
The use of [`mem::zeroed`](https://doc.rust-lang.org/nightly/std/mem/fn.zeroed.html) at https://github.com/hroi/treebitmap/blob/9540ae5e84d3f5123306588af45d0bd71f22cc44/src/tree_bitmap/allocator.rs#L195 looks illegal: `mem::zeroed` may only be used for types that actually allow zero-initialization, and here this is done for any user-controlled type `T`. So,...
This pull request includes: - Ported a test suite from WireGuard (https://git.zx2c4.com/WireGuard/tree/src/selftest/allowedips.c) - A randomized test ("property based test"), which compares the behavior to a naive implementation. Both set of...
My use case is I want to get a vector of all data relevant to an IP. I may have an IP ban for an IP at multiple levels.
I'm getting an occasional panic using this library on calling `IpLookupTable.remove()`. Panic location is below: ``` thread '' panicked at 'index out of bounds: the len is 0 but the...
If a tree node holds some mutable structure (like HashMap) it's desirable to modify it inline without removing, modifying and inserting it back.
The treebitmap is currently fixed-stride, 4 bits. Better compression can be achieved by a well-chosen variable-length stride. The Tree-Bitmap paper suggests `13-4-4-4-4-3` as a good choice for IPv4. A good...