summaryrefslogtreecommitdiffhomepage
path: root/src/timers.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-04-14 18:51:15 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-04-21 04:31:26 +0200
commitf2c9cd05c8a9f96e6f4073af13f45960a2b29ab1 (patch)
tree801b5c680f531eb5e9be1965d8b32371e534dda9 /src/timers.c
parent08c09a63fd766e3557c8e63acf3dc90c86549a1e (diff)
routingtable: rewrite core functions
When removing by peer, prev needs to be set to *nptr in order to traverse that part of the trie. The other remove by IP function can simply be removed, as it's not in use. The root freeing function can use pre-order traversal instead of post-order. The pre-order traversal code in general is now a nice iterator macro. The common bits function can use the fast fls instructions and the match function can be rewritten to simply compare common bits. While we're at it, let's add tons of new tests, randomized checking against a dumb implementation, and graphviz output. And in general, it's nice to clean things up. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/timers.c')
0 files changed, 0 insertions, 0 deletions