]> git.ipfire.org Git - thirdparty/bird.git/commit
Trie: Implement longest-prefix-match queries and walks
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Fri, 26 Nov 2021 02:26:36 +0000 (03:26 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Fri, 26 Nov 2021 02:26:36 +0000 (03:26 +0100)
commit14fc24f3a53ebc5525b854ccdc93274aa74a400f
treeef3cbfe4e0e6ff1c1d21677c232626e08ee8d5e8
parent062e69bf520e5788913bdd564076ad9892b24a87
Trie: Implement longest-prefix-match queries and walks

The prefix trie now supports longest-prefix-match query by function
trie_match_longest_ipX() and it can be extended to iteration over all
covering prefixes for a given prefix (from longest to shortest) using
TRIE_WALK_TO_ROOT_IPx() macro.
filter/data.h
filter/trie.c
filter/trie_test.c
test/birdtest.c