From 3cf91fb9eb5e6aa51e63edcd237ee266373aec79 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Tue, 16 May 2023 13:25:48 +0200 Subject: 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. --- test/bt-utils.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/bt-utils.h') 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); -- cgit v1.2.3