\hypertarget{classBgpTrie}{
\section{BgpTrie$<$ A $>$ Class Template Reference}
\label{classBgpTrie}\index{BgpTrie@{BgpTrie}}
}


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




{\ttfamily \#include $<$bgp\_\-trie.hh$>$}

Inheritance diagram for BgpTrie$<$ A $>$:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classBgpTrie}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classBgpTrie_ae8c835b7ea2679f37028fa7fdc98a673}{
typedef ::IPNet$<$ A $>$ {\bfseries IPNet}}
\label{classBgpTrie_ae8c835b7ea2679f37028fa7fdc98a673}

\item 
\hypertarget{classBgpTrie_a73b0edef0e1b09972903c42643e5b296}{
typedef ::ChainedSubnetRoute$<$ A $>$ {\bfseries ChainedSubnetRoute}}
\label{classBgpTrie_a73b0edef0e1b09972903c42643e5b296}

\item 
\hypertarget{classBgpTrie_a2a1cd4b830b0aa4d769404b868983734}{
typedef map$<$ const \hyperlink{classPAListRef}{PAListRef}$<$ A $>$, const ChainedSubnetRoute $\ast$, \hyperlink{classPath__Att__Ptr__Cmp}{Path\_\-Att\_\-Ptr\_\-Cmp}$<$ A $>$ $>$ {\bfseries PathmapType}}
\label{classBgpTrie_a2a1cd4b830b0aa4d769404b868983734}

\item 
\hypertarget{classBgpTrie_a16eda34c31aac6dcaefca5cd19179702}{
typedef \hyperlink{classRefTrie}{RefTrie}$<$ A, const ChainedSubnetRoute $>$ {\bfseries RouteTrie}}
\label{classBgpTrie_a16eda34c31aac6dcaefca5cd19179702}

\item 
\hypertarget{classBgpTrie_a5b01c7aa393645df637ba7362e056a2b}{
typedef \hyperlink{classRefTriePostOrderIterator}{RouteTrie::iterator} {\bfseries iterator}}
\label{classBgpTrie_a5b01c7aa393645df637ba7362e056a2b}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classBgpTrie_a1a3480f7c05b9f237e08710145854714}{
\hyperlink{classRefTriePostOrderIterator}{iterator} {\bfseries insert} (const IPNet \&net, const \hyperlink{classSubnetRoute}{SubnetRoute}$<$ A $>$ \&route)}
\label{classBgpTrie_a1a3480f7c05b9f237e08710145854714}

\item 
\hypertarget{classBgpTrie_ae56fd9b7e51bb44d4d40a702f8a2db30}{
void {\bfseries erase} (const IPNet \&net)}
\label{classBgpTrie_ae56fd9b7e51bb44d4d40a702f8a2db30}

\item 
\hypertarget{classBgpTrie_af4d7292cc46b3ae0d597610df9fb0600}{
void {\bfseries delete\_\-all\_\-nodes} ()}
\label{classBgpTrie_af4d7292cc46b3ae0d597610df9fb0600}

\item 
\hypertarget{classBgpTrie_aba37afd1747252a6f7141f388de13dc2}{
const PathmapType \& {\bfseries pathmap} () const }
\label{classBgpTrie_aba37afd1747252a6f7141f388de13dc2}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classBgpTrie_a89910835415d937e7d7e77d84c618df7}{
PathmapType {\bfseries \_\-pathmap}}
\label{classBgpTrie_a89910835415d937e7d7e77d84c618df7}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$class A$>$ class BgpTrie$<$ A $>$}

The \hyperlink{classBgpTrie}{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 \hyperlink{protocolthe-p}{the} same path attribute list from a regular trie. Each set of nodes with \hyperlink{protocolthe-p}{the} same path attribute pointer are linked together into a chain (a circular doubly-\/linked list). The \hyperlink{classBgpTrie}{BgpTrie} holds a pointer to any one of those nodes.

XXX mjh: I've changed \hyperlink{protocolthe-p}{the} pathmap to be a nexthop map. This will still allow \hyperlink{protocolthe-p}{the} code to find \hyperlink{protocolthe-p}{the} next route when \hyperlink{protocolthe-p}{the} igp distance failed, but is much faster. The downside is we may not dump routes with \hyperlink{protocolthe-p}{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:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/bgp/bgp\_\-trie.hh\item 
/home/greearb/git/xorp.ct.github/xorp/bgp/bgp\_\-trie.cc\end{DoxyCompactItemize}
