xorp

BgpTrie< A > Class Template Reference

The BgpTrie is an augmented, specialized trie that allows us to lookup by network address or by path attribute list. More...

#include <bgp_trie.hh>

Inheritance diagram for BgpTrie< A >:
RefTrie< A, const ChainedSubnetRoute< A > >

List of all members.

Public Types

typedef ::IPNet< A > IPNet
typedef ::ChainedSubnetRoute< A > ChainedSubnetRoute
typedef map< const PAListRef
< A >, const
ChainedSubnetRoute
*, Path_Att_Ptr_Cmp< A > > 
PathmapType
typedef RefTrie< A, const
ChainedSubnetRoute > 
RouteTrie
typedef RouteTrie::iterator iterator

Public Member Functions

iterator insert (const IPNet &net, const SubnetRoute< A > &route)
void erase (const IPNet &net)
void delete_all_nodes ()
const PathmapType & pathmap () const

Private Attributes

PathmapType _pathmap

Detailed Description

template<class A>
class BgpTrie< A >

The BgpTrie is an augmented, specialized trie that allows us to lookup by network address or by path attribute list.

We need this because we can't efficiently extract entries with the same path attribute list from a regular trie. Each set of nodes with the same path attribute pointer are linked together into a chain (a circular doubly-linked list). The BgpTrie holds a pointer to any one of those nodes.

XXX mjh: I've changed the pathmap to be a nexthop map. This will still allow the code to find the next route when the igp distance failed, but is much faster. The downside is we may not dump routes with the same PA list together. Hopefully this can be remedied when we change to a pull-based model.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations