• Juliusz Chroboczek's avatar
    Make route operations execute in O(log n). · a08dde85
    Juliusz Chroboczek authored
    This changes the route table to be a sorted table of linked lists of
    routes to a given prefix, which makes most route operations behave in
    O(log n).  Insertion and flushing of a prefix is still O(n), but these
    are fairly rare operations.
    
    A nice side-effect is that the route table is now private to route.c,
    which should make it easy to switch to a different data structure in
    the future.
    a08dde85
route.h 4.6 KB