\hypertarget{classRibInTable}{
\section{RibInTable$<$ A $>$ Class Template Reference}
\label{classRibInTable}\index{RibInTable@{RibInTable}}
}


Specialized \hyperlink{classBGPRouteTable}{BGPRouteTable} that stores routes from a BGP peer.  




{\ttfamily \#include $<$route\_\-table\_\-ribin.hh$>$}

Inheritance diagram for RibInTable$<$ A $>$:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classRibInTable}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRibInTable_a5187a81f0cc518da5c9af6f3d6d9fca8}{
{\bfseries RibInTable} (string tablename, Safi safi, const \hyperlink{classPeerHandler}{PeerHandler} $\ast$peer)}
\label{classRibInTable_a5187a81f0cc518da5c9af6f3d6d9fca8}

\item 
void \hyperlink{classRibInTable_a4de3fa212a90a96a5622205f012b948e}{flush} ()
\begin{DoxyCompactList}\small\item\em Remove all \hyperlink{protocolthe-p}{the} stored routes. \item\end{DoxyCompactList}\item 
\hypertarget{classRibInTable_aee7bf589e4636202399bf3ca99645e6e}{
int {\bfseries add\_\-route} (\hyperlink{classInternalMessage}{InternalMessage}$<$ A $>$ \&, \hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$)}
\label{classRibInTable_aee7bf589e4636202399bf3ca99645e6e}

\item 
\hypertarget{classRibInTable_a03453c8674615b2fd00af3be26bdfa4e}{
int {\bfseries add\_\-route} (const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&net, FPAListRef \&pa\_\-list, const \hyperlink{classPolicyTags}{PolicyTags} \&policy\_\-tags)}
\label{classRibInTable_a03453c8674615b2fd00af3be26bdfa4e}

\item 
\hypertarget{classRibInTable_af3949a14be8b3d3388ce746627f7f74c}{
void {\bfseries ribin\_\-peering\_\-went\_\-down} ()}
\label{classRibInTable_af3949a14be8b3d3388ce746627f7f74c}

\item 
\hypertarget{classRibInTable_a5bcca992032158be455057689f02cff2}{
void {\bfseries ribin\_\-peering\_\-came\_\-up} ()}
\label{classRibInTable_a5bcca992032158be455057689f02cff2}

\item 
\hypertarget{classRibInTable_a50b6189ab4382ad3a3d4f3c17dc67abd}{
int {\bfseries replace\_\-route} (\hyperlink{classInternalMessage}{InternalMessage}$<$ A $>$ \&, \hyperlink{classInternalMessage}{InternalMessage}$<$ A $>$ \&, \hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$)}
\label{classRibInTable_a50b6189ab4382ad3a3d4f3c17dc67abd}

\item 
\hypertarget{classRibInTable_acf0f7d452334d60f580f2d470ca929bc}{
int {\bfseries delete\_\-route} (\hyperlink{classInternalMessage}{InternalMessage}$<$ A $>$ \&, \hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$)}
\label{classRibInTable_acf0f7d452334d60f580f2d470ca929bc}

\item 
\hypertarget{classRibInTable_a7f78650bce20215aa242472406938b3f}{
int {\bfseries delete\_\-route} (const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&net)}
\label{classRibInTable_a7f78650bce20215aa242472406938b3f}

\item 
\hypertarget{classRibInTable_a38762d3e3f7eedf4b16a10f15d1741c8}{
int {\bfseries push} (\hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$caller)}
\label{classRibInTable_a38762d3e3f7eedf4b16a10f15d1741c8}

\item 
\hypertarget{classRibInTable_a333f1cd4954aca12527408b52003ad83}{
int {\bfseries delete\_\-add\_\-routes} ()}
\label{classRibInTable_a333f1cd4954aca12527408b52003ad83}

\item 
\hypertarget{classRibInTable_af7115619fa8da6bfd37668e28fefd4e8}{
const \hyperlink{classSubnetRoute}{SubnetRoute}$<$ A $>$ $\ast$ {\bfseries lookup\_\-route} (const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&net, uint32\_\-t \&genid, FPAListRef \&pa\_\-list) const }
\label{classRibInTable_af7115619fa8da6bfd37668e28fefd4e8}

\item 
\hypertarget{classRibInTable_acdd5cb45594e5350aa0fa023aa11a71c}{
void {\bfseries route\_\-used} (const \hyperlink{classSubnetRoute}{SubnetRoute}$<$ A $>$ $\ast$route, bool in\_\-use)}
\label{classRibInTable_acdd5cb45594e5350aa0fa023aa11a71c}

\item 
\hypertarget{classRibInTable_aab5bc250021fb4f316cac0918bf5729f}{
\hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$ {\bfseries parent} ()}
\label{classRibInTable_aab5bc250021fb4f316cac0918bf5729f}

\item 
\hypertarget{classRibInTable_a57dc4dfe7d44e06ba05504196249d73c}{
RouteTableType {\bfseries type} () const }
\label{classRibInTable_a57dc4dfe7d44e06ba05504196249d73c}

\item 
\hypertarget{classRibInTable_accfae348457c96d7cfb048b702c1f2d1}{
string {\bfseries str} () const }
\label{classRibInTable_accfae348457c96d7cfb048b702c1f2d1}

\item 
\hypertarget{classRibInTable_a27d2f0b9f88b5281fd36d0e96510cfc6}{
bool {\bfseries get\_\-next\_\-message} (\hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$)}
\label{classRibInTable_a27d2f0b9f88b5281fd36d0e96510cfc6}

\item 
\hypertarget{classRibInTable_a52d79fca6dcafdab7fce2f6e4f00fd32}{
void {\bfseries set\_\-peer\_\-is\_\-up} ()}
\label{classRibInTable_a52d79fca6dcafdab7fce2f6e4f00fd32}

\item 
\hypertarget{classRibInTable_ad62a90f08cb2d9d3b6d5d6f6c37d46c0}{
bool {\bfseries dump\_\-next\_\-route} (\hyperlink{classDumpIterator}{DumpIterator}$<$ A $>$ \&dump\_\-iter)}
\label{classRibInTable_ad62a90f08cb2d9d3b6d5d6f6c37d46c0}

\item 
void \hyperlink{classRibInTable_a8341a03515a26275070b82d1ab08a62f}{igp\_\-nexthop\_\-changed} (const A \&bgp\_\-nexthop)
\begin{DoxyCompactList}\small\item\em Notification that \hyperlink{protocolthe-p}{the} status of this next hop has changed. \item\end{DoxyCompactList}\item 
\hypertarget{classRibInTable_a0018dc98b94cdeee787edcdccf2b18ca}{
int {\bfseries route\_\-count} () const }
\label{classRibInTable_a0018dc98b94cdeee787edcdccf2b18ca}

\item 
\hypertarget{classRibInTable_ab3370cab682ee55c80b17fddff1b33ac}{
\hyperlink{classBgpTrie}{BgpTrie}$<$ A $>$ \& {\bfseries trie} () const }
\label{classRibInTable_ab3370cab682ee55c80b17fddff1b33ac}

\item 
\hypertarget{classRibInTable_ad2fb8a9d108a147dc517b8aa7e046d3c}{
const \hyperlink{classPeerHandler}{PeerHandler} $\ast$ {\bfseries peer\_\-handler} () const }
\label{classRibInTable_ad2fb8a9d108a147dc517b8aa7e046d3c}

\item 
\hypertarget{classRibInTable_a564eab8fc351467fc0f89e2354fd558a}{
uint32\_\-t {\bfseries genid} () const }
\label{classRibInTable_a564eab8fc351467fc0f89e2354fd558a}

\item 
\hypertarget{classRibInTable_a4a3cf23699cfcfcfc4120e0caee2000d}{
void {\bfseries crash\_\-dump} () const }
\label{classRibInTable_a4a3cf23699cfcfcfc4120e0caee2000d}

\item 
\hypertarget{classRibInTable_a33cd0163b36a772431fab08d17a0e9c0}{
string {\bfseries dump\_\-state} () const }
\label{classRibInTable_a33cd0163b36a772431fab08d17a0e9c0}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRibInTable_a0fc9c2126efe58180a729e1dcd5c9f47}{
\hyperlink{classEventLoop}{EventLoop} \& {\bfseries eventloop} () const }
\label{classRibInTable_a0fc9c2126efe58180a729e1dcd5c9f47}

\item 
\hypertarget{classRibInTable_adfdbe38356cae9fdcdec1788beeef442}{
bool {\bfseries push\_\-next\_\-changed\_\-nexthop} ()}
\label{classRibInTable_adfdbe38356cae9fdcdec1788beeef442}

\item 
\hypertarget{classRibInTable_a46257346c98007ab8711f203512f49c6}{
void {\bfseries deletion\_\-nexthop\_\-check} (const \hyperlink{classSubnetRoute}{SubnetRoute}$<$ A $>$ $\ast$route)}
\label{classRibInTable_a46257346c98007ab8711f203512f49c6}

\item 
\hypertarget{classRibInTable_aba564e0473356249438aaf35e263e1a6}{
void {\bfseries next\_\-chain} ()}
\label{classRibInTable_aba564e0473356249438aaf35e263e1a6}

\item 
\hypertarget{classRibInTable_a1c593740bb0a53fe858dd425ab85877c}{
void {\bfseries stop\_\-nexthop\_\-push} ()}
\label{classRibInTable_a1c593740bb0a53fe858dd425ab85877c}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRibInTable_a2055413ac33f9ed55d80db4159c86f34}{
\hyperlink{classBgpTrie}{BgpTrie}$<$ A $>$ $\ast$ {\bfseries \_\-route\_\-table}}
\label{classRibInTable_a2055413ac33f9ed55d80db4159c86f34}

\item 
\hypertarget{classRibInTable_a8ab18c60393c6cf0485e9727f46ededd}{
const \hyperlink{classPeerHandler}{PeerHandler} $\ast$ {\bfseries \_\-peer}}
\label{classRibInTable_a8ab18c60393c6cf0485e9727f46ededd}

\item 
\hypertarget{classRibInTable_afc5927c49ca9f1e016fc6f890f725d7a}{
bool {\bfseries \_\-peer\_\-is\_\-up}}
\label{classRibInTable_afc5927c49ca9f1e016fc6f890f725d7a}

\item 
\hypertarget{classRibInTable_ab92cd806dd8a4675f353a30f1afd2a16}{
uint32\_\-t {\bfseries \_\-genid}}
\label{classRibInTable_ab92cd806dd8a4675f353a30f1afd2a16}

\item 
\hypertarget{classRibInTable_a08a1bcd535191d180a378c5ca65341dc}{
uint32\_\-t {\bfseries \_\-table\_\-version}}
\label{classRibInTable_a08a1bcd535191d180a378c5ca65341dc}

\item 
\hypertarget{classRibInTable_aba581684c7f6da3e79b5422757d2fe95}{
set$<$ A $>$ {\bfseries \_\-changed\_\-nexthops}}
\label{classRibInTable_aba581684c7f6da3e79b5422757d2fe95}

\item 
\hypertarget{classRibInTable_a799f4c1a63e49efa0f5e53e72f328160}{
bool {\bfseries \_\-nexthop\_\-push\_\-active}}
\label{classRibInTable_a799f4c1a63e49efa0f5e53e72f328160}

\item 
\hypertarget{classRibInTable_a9f9dc6d2a56c5e8e4ccd68e7656494c8}{
A {\bfseries \_\-current\_\-changed\_\-nexthop}}
\label{classRibInTable_a9f9dc6d2a56c5e8e4ccd68e7656494c8}

\item 
\hypertarget{classRibInTable_a3a548d92d3088bc3ea91a0f10a2ae4d1}{
\hyperlink{classBgpTrie}{BgpTrie}$<$ A $>$::PathmapType::const\_\-iterator {\bfseries \_\-current\_\-chain}}
\label{classRibInTable_a3a548d92d3088bc3ea91a0f10a2ae4d1}

\item 
\hypertarget{classRibInTable_a9c0edb07bfe3af885645d9fd855062c4}{
\hyperlink{classXorpTask}{XorpTask} {\bfseries \_\-push\_\-task}}
\label{classRibInTable_a9c0edb07bfe3af885645d9fd855062c4}

\end{DoxyCompactItemize}


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

Specialized \hyperlink{classBGPRouteTable}{BGPRouteTable} that stores routes from a BGP peer. The XORP BGP is internally implemented as a set of pipelines consisting of a series of BGPRouteTables. Each pipeline receives routes from a BGP peer, stores them, and applies filters to them to modify \hyperlink{protocolthe-p}{the} routes. Then \hyperlink{protocolthe-p}{the} pipelines converge on a single decision process, which decides which route wins amongst possible alternative routes. After decision, \hyperlink{protocolthe-p}{the} winning routes fanout again along a set of pipelines, again being filtered, before being transmitted to peers.

\hyperlink{classRibInTable}{RibInTable} is \hyperlink{protocolthe-p}{the} first stage in such a pipeline. It receives routes from a single BGP peer, and stores them. Changes are passed down \hyperlink{protocolthe-p}{the} pipeline as they occur, and route lookups from downstream are answered by \hyperlink{protocolthe-p}{the} \hyperlink{classRibInTable}{RibInTable}. 

\subsection{Member Function Documentation}
\hypertarget{classRibInTable_a4de3fa212a90a96a5622205f012b948e}{
\index{RibInTable@{RibInTable}!flush@{flush}}
\index{flush@{flush}!RibInTable@{RibInTable}}
\subsubsection[{flush}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ void {\bf RibInTable}$<$ A $>$::flush (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classRibInTable_a4de3fa212a90a96a5622205f012b948e}


Remove all \hyperlink{protocolthe-p}{the} stored routes. 

Used to flush static routes only. \hypertarget{classRibInTable_a8341a03515a26275070b82d1ab08a62f}{
\index{RibInTable@{RibInTable}!igp\_\-nexthop\_\-changed@{igp\_\-nexthop\_\-changed}}
\index{igp\_\-nexthop\_\-changed@{igp\_\-nexthop\_\-changed}!RibInTable@{RibInTable}}
\subsubsection[{igp\_\-nexthop\_\-changed}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ void {\bf RibInTable}$<$ A $>$::igp\_\-nexthop\_\-changed (
\begin{DoxyParamCaption}
\item[{const A \&}]{bgp\_\-nexthop}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRibInTable_a8341a03515a26275070b82d1ab08a62f}


Notification that \hyperlink{protocolthe-p}{the} status of this next hop has changed. 


\begin{DoxyParams}{Parameters}
{\em bgp\_\-nexthop} & The next hop that has changed. \\
\hline
\end{DoxyParams}


Reimplemented from \hyperlink{classBGPRouteTable_a2126e0a6eb87e2e8d5b8b79afa05359d}{BGPRouteTable$<$ A $>$}.



The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/bgp/route\_\-table\_\-ribin.hh\item 
/home/greearb/git/xorp.ct.github/xorp/bgp/route\_\-table\_\-ribin.cc\end{DoxyCompactItemize}
