diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2023-05-16 13:25:48 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2023-05-16 13:25:48 +0200 |
commit | 3cf91fb9eb5e6aa51e63edcd237ee266373aec79 (patch) | |
tree | 094d80d17e747e6307b48125bdcc0250366c0be5 /test/bt-utils.h | |
parent | a8a64ca0fed41c78376b27880e934296bd3c3a7f (diff) |
Nest: Add tests and benchmark for FIB
Basic fib_get() / fib_find() test for random prefixes, FIB_WALK() test,
and benchmark for fib_find(). Also generalize and reuse some code from
trie tests.
Diffstat (limited to 'test/bt-utils.h')
-rw-r--r-- | test/bt-utils.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/bt-utils.h b/test/bt-utils.h index 13d267cc..d29a0b7c 100644 --- a/test/bt-utils.h +++ b/test/bt-utils.h @@ -26,6 +26,12 @@ uint bt_naive_pow(uint base, uint power); void bt_bytes_to_hex(char *buf, const byte *in_data, size_t size); +void bt_random_net(net_addr *net, int type); +net_addr *bt_random_nets(int type, uint n); +net_addr *bt_random_net_subset(net_addr *src, uint sn, uint dn); +void bt_read_net(const char *str, net_addr *net, int type); +net_addr *bt_read_nets(FILE *f, int type, uint *n); +net_addr *bt_read_net_file(const char *filename, int type, uint *n); void bt_bird_init(void); void bt_bird_cleanup(void); |