\hypertarget{classRIB}{
\section{RIB$<$ A $>$ Class Template Reference}
\label{classRIB}\index{RIB@{RIB}}
}


Master class for a \hyperlink{classRIB}{RIB}.  




{\ttfamily \#include $<$rib.hh$>$}

Inheritance diagram for RIB$<$ A $>$:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classRIB}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classRIB_a1a42490004dd37e3e81d8ffcdde64d19}{RIB} (RibTransportType rib\_\-type, \hyperlink{classRibManager}{RibManager} \&rib\_\-manager, \hyperlink{classEventLoop}{EventLoop} \&eventloop)
\begin{DoxyCompactList}\small\item\em \hyperlink{classRIB}{RIB} Constructor. \item\end{DoxyCompactList}\item 
\hypertarget{classRIB_a01495e805b54862caa564ba35785058d}{
virtual \hyperlink{classRIB_a01495e805b54862caa564ba35785058d}{$\sim$RIB} ()}
\label{classRIB_a01495e805b54862caa564ba35785058d}

\begin{DoxyCompactList}\small\item\em \hyperlink{classRIB}{RIB} Destructor. \item\end{DoxyCompactList}\item 
\hypertarget{classRIB_acea82148a973aa38753a2cbadc605134}{
void \hyperlink{classRIB_acea82148a973aa38753a2cbadc605134}{set\_\-errors\_\-are\_\-fatal} ()}
\label{classRIB_acea82148a973aa38753a2cbadc605134}

\begin{DoxyCompactList}\small\item\em Set test-\/mode: abort on some errors that we'd normally mask. \item\end{DoxyCompactList}\item 
list$<$ string $>$ \hyperlink{classRIB_a5754893aaeb5868d428878b0ef9a2c43}{registered\_\-protocol\_\-names} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} list with \hyperlink{protocolthe-p}{the} registered protocol names. \item\end{DoxyCompactList}\item 
void \hyperlink{classRIB_a5ae394438b739795d7364fc225498843}{initialize} (\hyperlink{classRegisterServer}{RegisterServer} \&register\_\-server)
\begin{DoxyCompactList}\small\item\em Initialize \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. \item\end{DoxyCompactList}\item 
int \hyperlink{classRIB_a177a924142c2f66c08c57c5825addf07}{initialize\_\-redist\_\-all} (const string \&all)
\begin{DoxyCompactList}\small\item\em Initialize \hyperlink{protocolthe-p}{the} RIB's \hyperlink{classRedistTable}{RedistTable} at \hyperlink{protocolthe-p}{the} end so that \hyperlink{protocolthe-p}{the} winning routes are exported to \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} clients (e.g., \hyperlink{protocolthe-p}{the} FEA). \item\end{DoxyCompactList}\item 
int \hyperlink{classRIB_a9875635ddb507d4d2a39d04e5130b1f8}{initialize\_\-policy\_\-redist} ()
\begin{DoxyCompactList}\small\item\em Initialize \hyperlink{protocolthe-p}{the} RIB's \hyperlink{classPolicyRedistTable}{PolicyRedistTable}. \item\end{DoxyCompactList}\item 
int \hyperlink{classRIB_a5ed34370e09b6869c3a94901d8f781d5}{initialize\_\-register} (\hyperlink{classRegisterServer}{RegisterServer} \&register\_\-server)
\begin{DoxyCompactList}\small\item\em Initialize \hyperlink{protocolthe-p}{the} RIB's \hyperlink{classRegisterTable}{RegisterTable}. \item\end{DoxyCompactList}\item 
int \hyperlink{classRIB_a6a6ba6077dd738e8b1cd958c810c96cb}{new\_\-origin\_\-table} (const string \&tablename, const string \&target\_\-class, const string \&target\_\-instance, uint32\_\-t admin\_\-distance, ProtocolType protocol\_\-type)
\begin{DoxyCompactList}\small\item\em Add a new \hyperlink{classOriginTable}{OriginTable}. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classRIB_a6a2609516000033adb8e3244637582ac}{new\_\-vif} (const string \&vifname, const \hyperlink{classVif}{Vif} \&vif)
\begin{DoxyCompactList}\small\item\em Inform \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} about \hyperlink{protocolthe-p}{the} existence of a Virtual Interface. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classRIB_a4aa4c8ec323266ce7ab5aa3521cc5cd9}{delete\_\-vif} (const string \&vifname)
\begin{DoxyCompactList}\small\item\em Inform \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} that a VIF no longer exists. \item\end{DoxyCompactList}\item 
virtual void \hyperlink{classRIB_abdfe515c2d0cbf36bfa339c7b603449d}{destroy\_\-deleted\_\-vif} (\hyperlink{classRibVif}{RibVif} $\ast$rib\_\-vif)
\begin{DoxyCompactList}\small\item\em Destroy a VIF container for a VIF that no longer exists. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classRIB_a667679d0775181b9180ba906d60bce53}{set\_\-vif\_\-flags} (const string \&vifname, bool is\_\-p2p, bool is\_\-loopback, bool is\_\-multicast, bool is\_\-broadcast, bool is\_\-up, uint32\_\-t mtu)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} vif flags of a configured vif. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classRIB_acc0d99d838d5c8f67914cdfb3dc45011}{add\_\-vif\_\-address} (const string \&vifname, const A \&addr, const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&subnet, const A \&broadcast\_\-addr, const A \&peer\_\-addr)
\begin{DoxyCompactList}\small\item\em Add an address and subnet to a existing VIF. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classRIB_a112c213298ed15ceb49a64191a6831d6}{delete\_\-vif\_\-address} (const string \&vifname, const A \&addr)
\begin{DoxyCompactList}\small\item\em Remove an address and \hyperlink{protocolthe-p}{the} associated subnet from an existing VIF. \item\end{DoxyCompactList}\item 
int \hyperlink{classRIB_a37c702bbb7489427fa77679ebb7e5f96}{add\_\-connected\_\-route} (const \hyperlink{classRibVif}{RibVif} \&vif, const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&net, const A \&nexthop\_\-addr, const A \&peer\_\-addr)
\begin{DoxyCompactList}\small\item\em Add a route to \hyperlink{protocolthe-p}{the} \char`\"{}connected\char`\"{} \hyperlink{classOriginTable}{OriginTable}. \item\end{DoxyCompactList}\item 
int \hyperlink{classRIB_a65cc8beb6ab9a8fae3c100eef82beeb8}{delete\_\-connected\_\-route} (const \hyperlink{classRibVif}{RibVif} \&vif, const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&net, const A \&peer\_\-addr)
\begin{DoxyCompactList}\small\item\em Delete a route from \hyperlink{protocolthe-p}{the} \char`\"{}connected\char`\"{} \hyperlink{classOriginTable}{OriginTable}. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classRIB_abca421a4eaa27681f0b0d1bd7534aba7}{add\_\-route} (const string \&tablename, const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&net, const A \&nexthop\_\-addr, const string \&ifname, const string \&vifname, uint32\_\-t metric, const \hyperlink{classPolicyTags}{PolicyTags} \&policytags)
\begin{DoxyCompactList}\small\item\em Add a route via \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} called tablename. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classRIB_ab81972c9baf72dc7541033d4e9afca25}{replace\_\-route} (const string \&tablename, const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&net, const A \&nexthop\_\-addr, const string \&ifname, const string \&vifname, uint32\_\-t metric, const \hyperlink{classPolicyTags}{PolicyTags} \&policytags)
\begin{DoxyCompactList}\small\item\em Replace an existing route via \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} called tablename. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classRIB_afdbcb3609b125c9531348b8cc1dd47d0}{verify\_\-route} (const A \&lookupaddr, const string \&ifname, const A \&nexthop\_\-addr, uint32\_\-t metric, RibVerifyType matchtype)
\begin{DoxyCompactList}\small\item\em Verify \hyperlink{protocolthe-p}{the} result of a route lookup in \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} matches \hyperlink{protocolthe-p}{the} parameters we expect. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classRIB_aa5dedaafd083b9e87948008cf9ab2930}{delete\_\-route} (const string \&tablename, const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&subnet)
\begin{DoxyCompactList}\small\item\em Delete an existing route via \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} called tablename. \item\end{DoxyCompactList}\item 
virtual const A \& \hyperlink{classRIB_a3cdcab44de9a8f06ab49de5ab9387050}{lookup\_\-route} (const A \&lookupaddr)
\begin{DoxyCompactList}\small\item\em Lookup an address in \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} to determine \hyperlink{protocolthe-p}{the} nexthop router to which packets for this address will be forwarded. \item\end{DoxyCompactList}\item 
\hypertarget{classRIB_ac00587f7cf7188a280d4599d405e66af}{
virtual \hyperlink{classRouteRange}{RouteRange}$<$ A $>$ $\ast$ \hyperlink{classRIB_ac00587f7cf7188a280d4599d405e66af}{route\_\-range\_\-lookup} (const A \&lookupaddr)}
\label{classRIB_ac00587f7cf7188a280d4599d405e66af}

\begin{DoxyCompactList}\small\item\em Used for debugging only. \item\end{DoxyCompactList}\item 
virtual \hyperlink{classRouteRegister}{RouteRegister}$<$ A $>$ $\ast$ \hyperlink{classRIB_a5e5e89b06837f910ec8a56b232589f78}{route\_\-register} (const A \&lookupaddr, const string \&module)
\begin{DoxyCompactList}\small\item\em Register interest in being notified about all changes to routing information that would affect traffic destined for a particular address. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classRIB_aaf000b43ebf7f162e1015bdbcc979aa7}{route\_\-deregister} (const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&subnet, const string \&module)
\begin{DoxyCompactList}\small\item\em De-\/register interest in being notified about all changes to routing information for a particular address. \item\end{DoxyCompactList}\item 
\hyperlink{classProtocol}{Protocol} $\ast$ \hyperlink{classRIB_a16b06b8db264b90d9dfc927bbedf00f2}{find\_\-protocol} (const string \&protocol)
\begin{DoxyCompactList}\small\item\em Find a routing protocol, given its protocol name. \item\end{DoxyCompactList}\item 
\hypertarget{classRIB_a8fd3c3ce13c78e0aad0552cc009a0e69}{
\hyperlink{classRedistTable}{RedistTable}$<$ A $>$ $\ast$ \hyperlink{classRIB_a8fd3c3ce13c78e0aad0552cc009a0e69}{protocol\_\-redist\_\-table} (const string \&protocol)}
\label{classRIB_a8fd3c3ce13c78e0aad0552cc009a0e69}

\begin{DoxyCompactList}\small\item\em Get route redistribution table for specified routing protocol. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classRIB_a6588f3758bae5504907acdcd2e924913}{add\_\-igp\_\-table} (const string \&tablename, const string \&target\_\-class, const string \&target\_\-instance)
\begin{DoxyCompactList}\small\item\em Create \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} for an IGP protocol and plumb it into \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classRIB_a6f0dd2499855ac1e5d6d872b27e1fdab}{delete\_\-igp\_\-table} (const string \&tablename, const string \&target\_\-class, const string \&target\_\-instance)
\begin{DoxyCompactList}\small\item\em Delete \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} for an IGP protocol and unplumb it from \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classRIB_a424c4482c7c99b8bd7c88dd90ef6fe06}{add\_\-egp\_\-table} (const string \&tablename, const string \&target\_\-class, const string \&target\_\-instance)
\begin{DoxyCompactList}\small\item\em Create \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} for an EGP protocol and plumb it into \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{classRIB_ad22e1325930b14eb57c90d1cb41c782e}{delete\_\-egp\_\-table} (const string \&tablename, const string \&target\_\-class, const string \&target\_\-instance)
\begin{DoxyCompactList}\small\item\em Delete \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} for an EGP protocol and unplumb it from \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. \item\end{DoxyCompactList}\item 
void \hyperlink{classRIB_ab5fda3db01137ca7dccd249df97425f6}{target\_\-death} (const string \&target\_\-class, const string \&target\_\-instance)
\begin{DoxyCompactList}\small\item\em An XRL Target died. \item\end{DoxyCompactList}\item 
\hypertarget{classRIB_a19a4cbfaf2756c55a7d33e3a3e72fbbc}{
void \hyperlink{classRIB_a19a4cbfaf2756c55a7d33e3a3e72fbbc}{print\_\-rib} () const }
\label{classRIB_a19a4cbfaf2756c55a7d33e3a3e72fbbc}

\begin{DoxyCompactList}\small\item\em Print \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} structure for debugging. \item\end{DoxyCompactList}\item 
\hypertarget{classRIB_a3df7b4c6ce5027d5eaa56812be6d374e}{
string \hyperlink{classRIB_a3df7b4c6ce5027d5eaa56812be6d374e}{name} () const }
\label{classRIB_a3df7b4c6ce5027d5eaa56812be6d374e}

\begin{DoxyCompactList}\small\item\em Get \hyperlink{classRIB}{RIB} name. \item\end{DoxyCompactList}\item 
\hypertarget{classRIB_aab06cb7ed5bedd177f135aa2ad4cedf2}{
void \hyperlink{classRIB_aab06cb7ed5bedd177f135aa2ad4cedf2}{push\_\-routes} ()}
\label{classRIB_aab06cb7ed5bedd177f135aa2ad4cedf2}

\begin{DoxyCompactList}\small\item\em \hyperlink{classPush}{Push} routes through policy filters for re-\/filtering. \item\end{DoxyCompactList}\item 
int \hyperlink{classRIB_a0a98fbcf548ce08537895fb70be31133}{set\_\-protocol\_\-admin\_\-distance} (const string \&protocol\_\-name, const uint32\_\-t \&admin\_\-distance)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} admin distance associated with a routing protocol. \item\end{DoxyCompactList}\item 
map$<$ string, uint32\_\-t $>$ \& \hyperlink{classRIB_ac536ec922b980ac8b18c3ba0e938448e}{get\_\-protocol\_\-admin\_\-distances} ()
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} map of all registered admin distances. \item\end{DoxyCompactList}\item 
uint32\_\-t \hyperlink{classRIB_a856b61d31ca7709611245695b9f3621a}{get\_\-protocol\_\-admin\_\-distance} (const string \&protocol\_\-name)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} admin distance associated with a routing protocol. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRIB_ab11af84e9c1046a672bd68f585cb42ee}{
\hyperlink{classRibManager}{RibManager} \& {\bfseries \_\-rib\_\-manager}}
\label{classRIB_ab11af84e9c1046a672bd68f585cb42ee}

\item 
\hypertarget{classRIB_a1125155bd548452d639f4e2d3acafc36}{
\hyperlink{classEventLoop}{EventLoop} \& {\bfseries \_\-eventloop}}
\label{classRIB_a1125155bd548452d639f4e2d3acafc36}

\item 
\hypertarget{classRIB_af450b59f593d2cc519c783f198f0e668}{
\hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$ {\bfseries \_\-final\_\-table}}
\label{classRIB_af450b59f593d2cc519c783f198f0e668}

\item 
\hypertarget{classRIB_a97bc18cdf5e7aa950a259abdba46bc9e}{
\hyperlink{classRegisterTable}{RegisterTable}$<$ A $>$ $\ast$ {\bfseries \_\-register\_\-table}}
\label{classRIB_a97bc18cdf5e7aa950a259abdba46bc9e}

\item 
\hypertarget{classRIB_a17c45d9d9624feae07160a77b87057b2}{
bool {\bfseries \_\-multicast}}
\label{classRIB_a17c45d9d9624feae07160a77b87057b2}

\item 
\hypertarget{classRIB_a1fe47b5288b06150ff95c9b7df5f023d}{
bool {\bfseries \_\-errors\_\-are\_\-fatal}}
\label{classRIB_a1fe47b5288b06150ff95c9b7df5f023d}

\item 
\hypertarget{classRIB_a3c0783919df6dfe4369a29d35b2c10fe}{
\hyperlink{classPolicyRedistTable}{PolicyRedistTable}$<$ A $>$ $\ast$ {\bfseries \_\-policy\_\-redist\_\-table}}
\label{classRIB_a3c0783919df6dfe4369a29d35b2c10fe}

\item 
\hypertarget{classRIB_a758c8959986bee16de7e93a16f98b9e7}{
list$<$ \hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$ $>$ {\bfseries \_\-tables}}
\label{classRIB_a758c8959986bee16de7e93a16f98b9e7}

\item 
\hypertarget{classRIB_a21b4539f498c7a657cd077287f5cc907}{
map$<$ string, \hyperlink{classProtocol}{Protocol} $\ast$ $>$ {\bfseries \_\-protocols}}
\label{classRIB_a21b4539f498c7a657cd077287f5cc907}

\item 
\hypertarget{classRIB_a0940df3a8f9583d40620774057e89b00}{
map$<$ string, \hyperlink{classOriginTable}{OriginTable}$<$ A $>$ $\ast$ $>$ {\bfseries \_\-routing\_\-protocol\_\-instances}}
\label{classRIB_a0940df3a8f9583d40620774057e89b00}

\item 
\hypertarget{classRIB_ab87ebf203cfb00f47b54f38ecea6f234}{
map$<$ string, \hyperlink{classRibVif}{RibVif} $\ast$ $>$ {\bfseries \_\-vifs}}
\label{classRIB_ab87ebf203cfb00f47b54f38ecea6f234}

\item 
\hypertarget{classRIB_a7e1f998f39dfbbb13845b7203ddd49ea}{
map$<$ string, \hyperlink{classRibVif}{RibVif} $\ast$ $>$ {\bfseries \_\-deleted\_\-vifs}}
\label{classRIB_a7e1f998f39dfbbb13845b7203ddd49ea}

\item 
\hypertarget{classRIB_a77d11835e6b46a1461d7cc2bb73fbc23}{
map$<$ string, uint32\_\-t $>$ {\bfseries \_\-admin\_\-distances}}
\label{classRIB_a77d11835e6b46a1461d7cc2bb73fbc23}

\item 
\hypertarget{classRIB_aaca385159f0aeca41a5acf971197089b}{
map$<$ A, \hyperlink{classIPExternalNextHop}{IPExternalNextHop}$<$ A $>$ $>$ {\bfseries \_\-external\_\-nexthops}}
\label{classRIB_aaca385159f0aeca41a5acf971197089b}

\item 
\hypertarget{classRIB_af453b143f1573d600cd7d0dd629c420b}{
map$<$ A, \hyperlink{classIPPeerNextHop}{IPPeerNextHop}$<$ A $>$ $>$ {\bfseries \_\-peer\_\-nexthops}}
\label{classRIB_af453b143f1573d600cd7d0dd629c420b}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{classRIB_a899067f90fddf72272a88aaaf30ad3cf}{add\_\-origin\_\-table} (const string \&tablename, const string \&target\_\-class, const string \&target\_\-instance, ProtocolType protocol\_\-type)
\begin{DoxyCompactList}\small\item\em Used to implement \hyperlink{classRIB_a6588f3758bae5504907acdcd2e924913}{add\_\-igp\_\-table} and \hyperlink{classRIB_a424c4482c7c99b8bd7c88dd90ef6fe06}{add\_\-egp\_\-table}. \item\end{DoxyCompactList}\item 
int \hyperlink{classRIB_ae8689106f8219d64765df23d392e61ad}{delete\_\-origin\_\-table} (const string \&tablename, const string \&target\_\-class, const string \&target\_\-instance)
\begin{DoxyCompactList}\small\item\em Used to implement \hyperlink{classRIB_a6f0dd2499855ac1e5d6d872b27e1fdab}{delete\_\-igp\_\-table} and \hyperlink{classRIB_ad22e1325930b14eb57c90d1cb41c782e}{delete\_\-egp\_\-table}. \item\end{DoxyCompactList}\item 
int \hyperlink{classRIB_a381ad4a45a45c007c6fb1b213dd24134}{add\_\-policy\_\-connected\_\-table} (const string \&origin\_\-tablename)
\begin{DoxyCompactList}\small\item\em Add a table for policy filtering of connected routes. \item\end{DoxyCompactList}\item 
int \hyperlink{classRIB_a036f28a25da1d8c148d43496d906fe07}{add\_\-redist\_\-table} (const string \&origin\_\-tablename)
\begin{DoxyCompactList}\small\item\em Add a \hyperlink{classRedistTable}{RedistTable} behind \hyperlink{classOriginTable}{OriginTable}. \item\end{DoxyCompactList}\item 
\hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$ \hyperlink{classRIB_a6c4a8f31f5db0d126b859500bf7c9fd4}{track\_\-back} (\hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$rt, int typemask) const 
\begin{DoxyCompactList}\small\item\em track\_\-back trough \hyperlink{protocolthe-p}{the} RouteTables' parent pointers to find \hyperlink{protocolthe-p}{the} last (i.e, nearest \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable}) table that matches \hyperlink{protocolthe-p}{the} mask in typemask. \item\end{DoxyCompactList}\item 
\hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$ \hyperlink{classRIB_a31cef02026718e73ea2cb720d1490d0a}{track\_\-forward} (\hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$rt, int typemask) const 
\begin{DoxyCompactList}\small\item\em track\_\-forward trough \hyperlink{protocolthe-p}{the} RouteTables' child pointers to find \hyperlink{protocolthe-p}{the} last able that matches \hyperlink{protocolthe-p}{the} mask in typemask. \item\end{DoxyCompactList}\item 
\hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$ \hyperlink{classRIB_a78e7011397e0e7d76a9f47da403a161f}{find\_\-table} (const string \&tablename)
\begin{DoxyCompactList}\small\item\em Find a routing table, given its table name. \item\end{DoxyCompactList}\item 
\hyperlink{classOriginTable}{OriginTable}$<$ A $>$ $\ast$ \hyperlink{classRIB_ab1a5069868c361104a21874ecd2a94d8}{find\_\-table\_\-by\_\-instance} (const string \&tablename, const string \&target\_\-class, const string \&target\_\-instance)
\begin{DoxyCompactList}\small\item\em Find a routing table, given its protocol name and XRL target instance name. \item\end{DoxyCompactList}\item 
int \hyperlink{classRIB_a3421b6342f147fc1c912a0639ff3aee8}{add\_\-table} (\hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$table)
\begin{DoxyCompactList}\small\item\em Add table to \hyperlink{classRIB}{RIB}, but don't do any plumbing. \item\end{DoxyCompactList}\item 
int \hyperlink{classRIB_a922a2f5ab8a12e148ccc76be0af277cf}{remove\_\-table} (const string \&tablename)
\begin{DoxyCompactList}\small\item\em Remove table from \hyperlink{classRIB}{RIB}, but don't do any unplumbing. \item\end{DoxyCompactList}\item 
\hyperlink{classRibVif}{RibVif} $\ast$ \hyperlink{classRIB_a0bdae860b83b115e4c7c462b95f61484}{find\_\-vif} (const A \&addr)
\begin{DoxyCompactList}\small\item\em Find \hyperlink{protocolthe-p}{the} virtual interface associated with one of this router's addresses. \item\end{DoxyCompactList}\item 
\hyperlink{classIPExternalNextHop}{IPExternalNextHop}$<$ A $>$ $\ast$ \hyperlink{classRIB_ae60fd131879656c506b714f41450889e}{find\_\-external\_\-nexthop} (const A \&addr)
\begin{DoxyCompactList}\small\item\em Find \hyperlink{protocolthe-p}{the} IP \hyperlink{classExternal}{External} Nexthop class instance associated with an IP address. \item\end{DoxyCompactList}\item 
\hyperlink{classIPPeerNextHop}{IPPeerNextHop}$<$ A $>$ $\ast$ \hyperlink{classRIB_a9da38703a6ba43e243b03dd4ff025559}{find\_\-peer\_\-nexthop} (const A \&addr)
\begin{DoxyCompactList}\small\item\em Find \hyperlink{protocolthe-p}{the} IP \hyperlink{classPeer}{Peer} Nexthop class instance associated with an IP address. \item\end{DoxyCompactList}\item 
\hyperlink{classIPExternalNextHop}{IPExternalNextHop}$<$ A $>$ $\ast$ \hyperlink{classRIB_a58c4b04595588c97e17dc76619f0a313}{find\_\-or\_\-create\_\-external\_\-nexthop} (const A \&addr)
\begin{DoxyCompactList}\small\item\em Find or create \hyperlink{protocolthe-p}{the} IP \hyperlink{classExternal}{External} Nexthop class instance associated with an IP address. \item\end{DoxyCompactList}\item 
\hyperlink{classIPPeerNextHop}{IPPeerNextHop}$<$ A $>$ $\ast$ \hyperlink{classRIB_a1fa5acc3ef020d495c990c0f4250429a}{find\_\-or\_\-create\_\-peer\_\-nexthop} (const A \&addr)
\begin{DoxyCompactList}\small\item\em Find or create \hyperlink{protocolthe-p}{the} IP \hyperlink{classPeer}{Peer} Nexthop class instance associated with an IP address. \item\end{DoxyCompactList}\item 
\hypertarget{classRIB_af75fb36259f578e73ec00b50916c7f0c}{
void \hyperlink{classRIB_af75fb36259f578e73ec00b50916c7f0c}{flush} ()}
\label{classRIB_af75fb36259f578e73ec00b50916c7f0c}

\begin{DoxyCompactList}\small\item\em Flush out routing table changes to other processes. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


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

Master class for a \hyperlink{classRIB}{RIB}. \hyperlink{classRIB}{RIB} is \hyperlink{protocolthe-p}{the} master class for a \hyperlink{classRouting}{Routing} Information Base. It holds \hyperlink{protocolthe-p}{the} \hyperlink{classRibVif}{RibVif} table, routing tables for each protocol, etc. Typically we would have one \hyperlink{classRIB}{RIB} for \hyperlink{classIPv4}{IPv4} unicast, one for \hyperlink{classIPv4}{IPv4} multicast topology, one for \hyperlink{classIPv6}{IPv6} unicast and one for \hyperlink{classIPv6}{IPv6} multicast.

Note that \hyperlink{protocolthe-p}{the} XRL commands assume some level of filtering has already taken place to route to command to \hyperlink{protocolthe-p}{the} right \hyperlink{classRIB}{RIB}. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classRIB_a1a42490004dd37e3e81d8ffcdde64d19}{
\index{RIB@{RIB}!RIB@{RIB}}
\index{RIB@{RIB}!RIB@{RIB}}
\subsubsection[{RIB}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ {\bf RIB}$<$ A $>$::{\bf RIB} (
\begin{DoxyParamCaption}
\item[{RibTransportType}]{rib\_\-type, }
\item[{{\bf RibManager} \&}]{rib\_\-manager, }
\item[{{\bf EventLoop} \&}]{eventloop}
\end{DoxyParamCaption}
)}}
\label{classRIB_a1a42490004dd37e3e81d8ffcdde64d19}


\hyperlink{classRIB}{RIB} Constructor. 


\begin{DoxyParams}{Parameters}
{\em rib\_\-type} & indicates whether this \hyperlink{classRIB}{RIB} holds UNICAST or MULTICAST routing information. In \hyperlink{protocolthe-p}{the} case of multicast, this is \hyperlink{protocolthe-p}{the} topology information, not \hyperlink{protocolthe-p}{the} forwarding information. \\
\hline
{\em rib\_\-manager} & \hyperlink{protocolthe-p}{the} main \hyperlink{classRIB}{RIB} manager process holding stuff that's common to all \hyperlink{protocolthe-p}{the} individual RIBs. \\
\hline
{\em eventloop} & \hyperlink{protocolthe-p}{the} main event loop. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classRIB_a37c702bbb7489427fa77679ebb7e5f96}{
\index{RIB@{RIB}!add\_\-connected\_\-route@{add\_\-connected\_\-route}}
\index{add\_\-connected\_\-route@{add\_\-connected\_\-route}!RIB@{RIB}}
\subsubsection[{add\_\-connected\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ int {\bf RIB}$<$ A $>$::add\_\-connected\_\-route (
\begin{DoxyParamCaption}
\item[{const {\bf RibVif} \&}]{vif, }
\item[{const {\bf IPNet}$<$ A $>$ \&}]{net, }
\item[{const A \&}]{nexthop\_\-addr, }
\item[{const A \&}]{peer\_\-addr}
\end{DoxyParamCaption}
)}}
\label{classRIB_a37c702bbb7489427fa77679ebb7e5f96}


Add a route to \hyperlink{protocolthe-p}{the} \char`\"{}connected\char`\"{} \hyperlink{classOriginTable}{OriginTable}. 


\begin{DoxyParams}{Parameters}
{\em vif} & \hyperlink{protocolthe-p}{the} vif with \hyperlink{protocolthe-p}{the} connected route. \\
\hline
{\em net} & \hyperlink{protocolthe-p}{the} subnet (address and prefix length) of \hyperlink{protocolthe-p}{the} route. \\
\hline
{\em nexthop\_\-addr} & \hyperlink{protocolthe-p}{the} nexthop address of \hyperlink{protocolthe-p}{the} route to add. \\
\hline
{\em peer\_\-addr} & \hyperlink{protocolthe-p}{the} peer address for \hyperlink{protocolthe-p}{the} route to add (if a point-\/to-\/point interface). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_a424c4482c7c99b8bd7c88dd90ef6fe06}{
\index{RIB@{RIB}!add\_\-egp\_\-table@{add\_\-egp\_\-table}}
\index{add\_\-egp\_\-table@{add\_\-egp\_\-table}!RIB@{RIB}}
\subsubsection[{add\_\-egp\_\-table}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf RIB}$<$ A $>$::add\_\-egp\_\-table (
\begin{DoxyParamCaption}
\item[{const string \&}]{tablename, }
\item[{const string \&}]{target\_\-class, }
\item[{const string \&}]{target\_\-instance}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_a424c4482c7c99b8bd7c88dd90ef6fe06}


Create \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} for an EGP protocol and plumb it into \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. 

Typically this will be called when a new instance of an EGP routing protocol such as EBGP or IBGP starts up. Note that EBGP and IBGP should register separately.


\begin{DoxyParams}{Parameters}
{\em tablename} & \hyperlink{protocolthe-p}{the} routing protocol name. This should be one of \hyperlink{protocolthe-p}{the} list of names \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} knows about, or \hyperlink{protocolthe-p}{the} incorrect default administrative distance will be applied. \\
\hline
{\em target\_\-class} & \hyperlink{protocolthe-p}{the} XRL target class of \hyperlink{protocolthe-p}{the} routing protocol that will supply routes to this \hyperlink{classOriginTable}{OriginTable}. \\
\hline
{\em target\_\-instance} & \hyperlink{protocolthe-p}{the} XRL target instance of \hyperlink{protocolthe-p}{the} routing protocol that will supply routes to this \hyperlink{classOriginTable}{OriginTable}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_a6588f3758bae5504907acdcd2e924913}{
\index{RIB@{RIB}!add\_\-igp\_\-table@{add\_\-igp\_\-table}}
\index{add\_\-igp\_\-table@{add\_\-igp\_\-table}!RIB@{RIB}}
\subsubsection[{add\_\-igp\_\-table}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf RIB}$<$ A $>$::add\_\-igp\_\-table (
\begin{DoxyParamCaption}
\item[{const string \&}]{tablename, }
\item[{const string \&}]{target\_\-class, }
\item[{const string \&}]{target\_\-instance}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_a6588f3758bae5504907acdcd2e924913}


Create \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} for an IGP protocol and plumb it into \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. 

Typically this will be called when a new instance of an IGP routing protocol such as OSPF starts up.


\begin{DoxyParams}{Parameters}
{\em tablename} & \hyperlink{protocolthe-p}{the} routing protocol name. This should be one of \hyperlink{protocolthe-p}{the} list of names \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} knows about, or \hyperlink{protocolthe-p}{the} incorrect default administrative distance will be applied. \\
\hline
{\em target\_\-class} & \hyperlink{protocolthe-p}{the} XRL target class of \hyperlink{protocolthe-p}{the} routing protocol that will supply routes to this \hyperlink{classOriginTable}{OriginTable}. \\
\hline
{\em target\_\-instance} & \hyperlink{protocolthe-p}{the} XRL target instance of \hyperlink{protocolthe-p}{the} routing protocol that will supply routes to this \hyperlink{classOriginTable}{OriginTable}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_a899067f90fddf72272a88aaaf30ad3cf}{
\index{RIB@{RIB}!add\_\-origin\_\-table@{add\_\-origin\_\-table}}
\index{add\_\-origin\_\-table@{add\_\-origin\_\-table}!RIB@{RIB}}
\subsubsection[{add\_\-origin\_\-table}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf RIB}$<$ A $>$::add\_\-origin\_\-table (
\begin{DoxyParamCaption}
\item[{const string \&}]{tablename, }
\item[{const string \&}]{target\_\-class, }
\item[{const string \&}]{target\_\-instance, }
\item[{ProtocolType}]{protocol\_\-type}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classRIB_a899067f90fddf72272a88aaaf30ad3cf}


Used to implement \hyperlink{classRIB_a6588f3758bae5504907acdcd2e924913}{add\_\-igp\_\-table} and \hyperlink{classRIB_a424c4482c7c99b8bd7c88dd90ef6fe06}{add\_\-egp\_\-table}. 


\begin{DoxyParams}{Parameters}
{\em tablename} & \hyperlink{protocolthe-p}{the} routing protocol name. \\
\hline
{\em target\_\-class} & \hyperlink{protocolthe-p}{the} XRL target class of \hyperlink{protocolthe-p}{the} routing protocol that will supply routes to this \hyperlink{classOriginTable}{OriginTable}. \\
\hline
{\em target\_\-instance} & \hyperlink{protocolthe-p}{the} XRL target instance of \hyperlink{protocolthe-p}{the} routing protocol that will supply routes to this \hyperlink{classOriginTable}{OriginTable}. \\
\hline
{\em protocol\_\-type} & \hyperlink{protocolthe-p}{the} routing protocol type (ProtocolType). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_a381ad4a45a45c007c6fb1b213dd24134}{
\index{RIB@{RIB}!add\_\-policy\_\-connected\_\-table@{add\_\-policy\_\-connected\_\-table}}
\index{add\_\-policy\_\-connected\_\-table@{add\_\-policy\_\-connected\_\-table}!RIB@{RIB}}
\subsubsection[{add\_\-policy\_\-connected\_\-table}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf RIB}$<$ A $>$::add\_\-policy\_\-connected\_\-table (
\begin{DoxyParamCaption}
\item[{const string \&}]{origin\_\-tablename}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classRIB_a381ad4a45a45c007c6fb1b213dd24134}


Add a table for policy filtering of connected routes. 

This is used to enable route redistribution of connected routes.


\begin{DoxyParams}{Parameters}
{\em origin\_\-tablename} & The name of \hyperlink{protocolthe-p}{the} origin table. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_a036f28a25da1d8c148d43496d906fe07}{
\index{RIB@{RIB}!add\_\-redist\_\-table@{add\_\-redist\_\-table}}
\index{add\_\-redist\_\-table@{add\_\-redist\_\-table}!RIB@{RIB}}
\subsubsection[{add\_\-redist\_\-table}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf RIB}$<$ A $>$::add\_\-redist\_\-table (
\begin{DoxyParamCaption}
\item[{const string \&}]{origin\_\-tablename}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classRIB_a036f28a25da1d8c148d43496d906fe07}


Add a \hyperlink{classRedistTable}{RedistTable} behind \hyperlink{classOriginTable}{OriginTable}. 

This allows routes associated with \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} to be redistributed in future.


\begin{DoxyParams}{Parameters}
{\em origin\_\-tablename} & Name of \hyperlink{classOriginTable}{OriginTable}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_abca421a4eaa27681f0b0d1bd7534aba7}{
\index{RIB@{RIB}!add\_\-route@{add\_\-route}}
\index{add\_\-route@{add\_\-route}!RIB@{RIB}}
\subsubsection[{add\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ int {\bf RIB}$<$ A $>$::add\_\-route (
\begin{DoxyParamCaption}
\item[{const string \&}]{tablename, }
\item[{const {\bf IPNet}$<$ A $>$ \&}]{net, }
\item[{const A \&}]{nexthop\_\-addr, }
\item[{const string \&}]{ifname, }
\item[{const string \&}]{vifname, }
\item[{uint32\_\-t}]{metric, }
\item[{const {\bf PolicyTags} \&}]{policytags}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_abca421a4eaa27681f0b0d1bd7534aba7}


Add a route via \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} called tablename. 


\begin{DoxyParams}{Parameters}
{\em tablename} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} into which \hyperlink{protocolthe-p}{the} route should be inserted. \\
\hline
{\em net} & \hyperlink{protocolthe-p}{the} subnet (address and prefix length) of \hyperlink{protocolthe-p}{the} route. \\
\hline
{\em nexthop\_\-addr} & \hyperlink{protocolthe-p}{the} nexthop that packets destined for net should be forwarded to. \\
\hline
{\em ifname} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} physical interface toward \hyperlink{protocolthe-p}{the} destination. If an empty string \hyperlink{protocolthe-p}{the} interface will be chosen by \hyperlink{classRIB}{RIB}. \\
\hline
{\em vifname} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} virtual interface toward \hyperlink{protocolthe-p}{the} destination. If an empty string \hyperlink{protocolthe-p}{the} interface will be chosen by \hyperlink{classRIB}{RIB}. \\
\hline
{\em metric} & \hyperlink{protocolthe-p}{the} routing protocol metric associated with this route. \\
\hline
{\em policytags} & \hyperlink{protocolthe-p}{the} policy-\/tags for this route. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_a3421b6342f147fc1c912a0639ff3aee8}{
\index{RIB@{RIB}!add\_\-table@{add\_\-table}}
\index{add\_\-table@{add\_\-table}!RIB@{RIB}}
\subsubsection[{add\_\-table}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ int {\bf RIB}$<$ A $>$::add\_\-table (
\begin{DoxyParamCaption}
\item[{{\bf RouteTable}$<$ A $>$ $\ast$}]{table}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, private\mbox{]}}}}
\label{classRIB_a3421b6342f147fc1c912a0639ff3aee8}


Add table to \hyperlink{classRIB}{RIB}, but don't do any plumbing. 

It is an error to add \hyperlink{protocolthe-p}{the} same table twice or multiple tables with \hyperlink{protocolthe-p}{the} same name.


\begin{DoxyParams}{Parameters}
{\em table} & \hyperlink{protocolthe-p}{the} table to be added.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_acc0d99d838d5c8f67914cdfb3dc45011}{
\index{RIB@{RIB}!add\_\-vif\_\-address@{add\_\-vif\_\-address}}
\index{add\_\-vif\_\-address@{add\_\-vif\_\-address}!RIB@{RIB}}
\subsubsection[{add\_\-vif\_\-address}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ int {\bf RIB}$<$ A $>$::add\_\-vif\_\-address (
\begin{DoxyParamCaption}
\item[{const string \&}]{vifname, }
\item[{const A \&}]{addr, }
\item[{const {\bf IPNet}$<$ A $>$ \&}]{subnet, }
\item[{const A \&}]{broadcast\_\-addr, }
\item[{const A \&}]{peer\_\-addr}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_acc0d99d838d5c8f67914cdfb3dc45011}


Add an address and subnet to a existing VIF. 

Each VIF may have multiple addresses and associated subnets.


\begin{DoxyParams}{Parameters}
{\em vifname} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} VIF \hyperlink{protocolthe-p}{the} address will be added to. \\
\hline
{\em addr} & \hyperlink{protocolthe-p}{the} address to be added. This must be one of \hyperlink{protocolthe-p}{the} addresses of this router. \\
\hline
{\em subnet} & \hyperlink{protocolthe-p}{the} subnet that is connected to this VIF corresponding to \hyperlink{protocolthe-p}{the} address addr. \\
\hline
{\em broadcast} & \hyperlink{protocolthe-p}{the} broadcast address to add. In case of \hyperlink{classIPv6}{IPv6} this address is ignored. \\
\hline
{\em peer} & \hyperlink{protocolthe-p}{the} peer address to add. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_a65cc8beb6ab9a8fae3c100eef82beeb8}{
\index{RIB@{RIB}!delete\_\-connected\_\-route@{delete\_\-connected\_\-route}}
\index{delete\_\-connected\_\-route@{delete\_\-connected\_\-route}!RIB@{RIB}}
\subsubsection[{delete\_\-connected\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ int {\bf RIB}$<$ A $>$::delete\_\-connected\_\-route (
\begin{DoxyParamCaption}
\item[{const {\bf RibVif} \&}]{vif, }
\item[{const {\bf IPNet}$<$ A $>$ \&}]{net, }
\item[{const A \&}]{peer\_\-addr}
\end{DoxyParamCaption}
)}}
\label{classRIB_a65cc8beb6ab9a8fae3c100eef82beeb8}


Delete a route from \hyperlink{protocolthe-p}{the} \char`\"{}connected\char`\"{} \hyperlink{classOriginTable}{OriginTable}. 


\begin{DoxyParams}{Parameters}
{\em vif} & \hyperlink{protocolthe-p}{the} vif with \hyperlink{protocolthe-p}{the} connected route. \\
\hline
{\em net} & \hyperlink{protocolthe-p}{the} subnet (address and prefix length) of \hyperlink{protocolthe-p}{the} route. \\
\hline
{\em peer\_\-addr} & \hyperlink{protocolthe-p}{the} peer address for \hyperlink{protocolthe-p}{the} route to delete (if a point-\/to-\/point interface). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_ad22e1325930b14eb57c90d1cb41c782e}{
\index{RIB@{RIB}!delete\_\-egp\_\-table@{delete\_\-egp\_\-table}}
\index{delete\_\-egp\_\-table@{delete\_\-egp\_\-table}!RIB@{RIB}}
\subsubsection[{delete\_\-egp\_\-table}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf RIB}$<$ A $>$::delete\_\-egp\_\-table (
\begin{DoxyParamCaption}
\item[{const string \&}]{tablename, }
\item[{const string \&}]{target\_\-class, }
\item[{const string \&}]{target\_\-instance}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_ad22e1325930b14eb57c90d1cb41c782e}


Delete \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} for an EGP protocol and unplumb it from \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. 

Typically this will be called when an instance of an EGP routing protocol such as BGP exits.


\begin{DoxyParams}{Parameters}
{\em tablename} & \hyperlink{protocolthe-p}{the} routing protocol name, previously registered using \hyperlink{classRIB_a6588f3758bae5504907acdcd2e924913}{add\_\-igp\_\-table}. \\
\hline
{\em target\_\-class} & \hyperlink{protocolthe-p}{the} XRL target class of \hyperlink{protocolthe-p}{the} routing protocol that supplied routes to this \hyperlink{classOriginTable}{OriginTable}. \\
\hline
{\em target\_\-instance} & \hyperlink{protocolthe-p}{the} XRL target instance of \hyperlink{protocolthe-p}{the} routing protocol that supplied routes to this \hyperlink{classOriginTable}{OriginTable}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_a6f0dd2499855ac1e5d6d872b27e1fdab}{
\index{RIB@{RIB}!delete\_\-igp\_\-table@{delete\_\-igp\_\-table}}
\index{delete\_\-igp\_\-table@{delete\_\-igp\_\-table}!RIB@{RIB}}
\subsubsection[{delete\_\-igp\_\-table}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf RIB}$<$ A $>$::delete\_\-igp\_\-table (
\begin{DoxyParamCaption}
\item[{const string \&}]{tablename, }
\item[{const string \&}]{target\_\-class, }
\item[{const string \&}]{target\_\-instance}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_a6f0dd2499855ac1e5d6d872b27e1fdab}


Delete \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} for an IGP protocol and unplumb it from \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. 

Typically this will be called when an instance of an IGP routing protocol such as OSPF exits.


\begin{DoxyParams}{Parameters}
{\em tablename} & \hyperlink{protocolthe-p}{the} routing protocol name, previously registered using \hyperlink{classRIB_a6588f3758bae5504907acdcd2e924913}{add\_\-igp\_\-table}. \\
\hline
{\em target\_\-class} & \hyperlink{protocolthe-p}{the} XRL target class of \hyperlink{protocolthe-p}{the} routing protocol that supplied routes to this \hyperlink{classOriginTable}{OriginTable}. \\
\hline
{\em target\_\-instance} & \hyperlink{protocolthe-p}{the} XRL target instance of \hyperlink{protocolthe-p}{the} routing protocol that supplied routes to this \hyperlink{classOriginTable}{OriginTable}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_ae8689106f8219d64765df23d392e61ad}{
\index{RIB@{RIB}!delete\_\-origin\_\-table@{delete\_\-origin\_\-table}}
\index{delete\_\-origin\_\-table@{delete\_\-origin\_\-table}!RIB@{RIB}}
\subsubsection[{delete\_\-origin\_\-table}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ int {\bf RIB}$<$ A $>$::delete\_\-origin\_\-table (
\begin{DoxyParamCaption}
\item[{const string \&}]{tablename, }
\item[{const string \&}]{target\_\-class, }
\item[{const string \&}]{target\_\-instance}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classRIB_ae8689106f8219d64765df23d392e61ad}


Used to implement \hyperlink{classRIB_a6f0dd2499855ac1e5d6d872b27e1fdab}{delete\_\-igp\_\-table} and \hyperlink{classRIB_ad22e1325930b14eb57c90d1cb41c782e}{delete\_\-egp\_\-table}. 


\begin{DoxyParams}{Parameters}
{\em tablename} & \hyperlink{protocolthe-p}{the} routing protocol name. \\
\hline
{\em target\_\-class} & \hyperlink{protocolthe-p}{the} XRL target class of \hyperlink{protocolthe-p}{the} routing protocol that will supply routes to this \hyperlink{classOriginTable}{OriginTable}. \\
\hline
{\em target\_\-instance} & \hyperlink{protocolthe-p}{the} XRL target instance of \hyperlink{protocolthe-p}{the} routing protocol that supplied routes to this \hyperlink{classOriginTable}{OriginTable}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_aa5dedaafd083b9e87948008cf9ab2930}{
\index{RIB@{RIB}!delete\_\-route@{delete\_\-route}}
\index{delete\_\-route@{delete\_\-route}!RIB@{RIB}}
\subsubsection[{delete\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ int {\bf RIB}$<$ A $>$::delete\_\-route (
\begin{DoxyParamCaption}
\item[{const string \&}]{tablename, }
\item[{const {\bf IPNet}$<$ A $>$ \&}]{subnet}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_aa5dedaafd083b9e87948008cf9ab2930}


Delete an existing route via \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} called tablename. 


\begin{DoxyParams}{Parameters}
{\em tablename} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} in which \hyperlink{protocolthe-p}{the} route should be deleted. \\
\hline
{\em subnet} & \hyperlink{protocolthe-p}{the} subnet (address and prefix length) of \hyperlink{protocolthe-p}{the} route to be deleted. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_a4aa4c8ec323266ce7ab5aa3521cc5cd9}{
\index{RIB@{RIB}!delete\_\-vif@{delete\_\-vif}}
\index{delete\_\-vif@{delete\_\-vif}!RIB@{RIB}}
\subsubsection[{delete\_\-vif}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf RIB}$<$ A $>$::delete\_\-vif (
\begin{DoxyParamCaption}
\item[{const string \&}]{vifname}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_a4aa4c8ec323266ce7ab5aa3521cc5cd9}


Inform \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} that a VIF no longer exists. 


\begin{DoxyParams}{Parameters}
{\em vifname} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} VIF, as previously indicated by new\_\-vif. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_a112c213298ed15ceb49a64191a6831d6}{
\index{RIB@{RIB}!delete\_\-vif\_\-address@{delete\_\-vif\_\-address}}
\index{delete\_\-vif\_\-address@{delete\_\-vif\_\-address}!RIB@{RIB}}
\subsubsection[{delete\_\-vif\_\-address}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ int {\bf RIB}$<$ A $>$::delete\_\-vif\_\-address (
\begin{DoxyParamCaption}
\item[{const string \&}]{vifname, }
\item[{const A \&}]{addr}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_a112c213298ed15ceb49a64191a6831d6}


Remove an address and \hyperlink{protocolthe-p}{the} associated subnet from an existing VIF. 


\begin{DoxyParams}{Parameters}
{\em vifname} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} VIF \hyperlink{protocolthe-p}{the} address will be removed from. \\
\hline
{\em addr} & \hyperlink{protocolthe-p}{the} address to be removed. This must be an address previously added by add\_\-vif\_\-address. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_abdfe515c2d0cbf36bfa339c7b603449d}{
\index{RIB@{RIB}!destroy\_\-deleted\_\-vif@{destroy\_\-deleted\_\-vif}}
\index{destroy\_\-deleted\_\-vif@{destroy\_\-deleted\_\-vif}!RIB@{RIB}}
\subsubsection[{destroy\_\-deleted\_\-vif}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ void {\bf RIB}$<$ A $>$::destroy\_\-deleted\_\-vif (
\begin{DoxyParamCaption}
\item[{{\bf RibVif} $\ast$}]{rib\_\-vif}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_abdfe515c2d0cbf36bfa339c7b603449d}


Destroy a VIF container for a VIF that no longer exists. 


\begin{DoxyParams}{Parameters}
{\em rib\_\-vif} & \hyperlink{protocolthe-p}{the} VIF container that will be destroyed. \\
\hline
\end{DoxyParams}
\hypertarget{classRIB_ae60fd131879656c506b714f41450889e}{
\index{RIB@{RIB}!find\_\-external\_\-nexthop@{find\_\-external\_\-nexthop}}
\index{find\_\-external\_\-nexthop@{find\_\-external\_\-nexthop}!RIB@{RIB}}
\subsubsection[{find\_\-external\_\-nexthop}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ {\bf IPExternalNextHop}$<$ A $>$ $\ast$ {\bf RIB}$<$ A $>$::find\_\-external\_\-nexthop (
\begin{DoxyParamCaption}
\item[{const A \&}]{addr}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, private\mbox{]}}}}
\label{classRIB_ae60fd131879656c506b714f41450889e}


Find \hyperlink{protocolthe-p}{the} IP \hyperlink{classExternal}{External} Nexthop class instance associated with an IP address. 


\begin{DoxyParams}{Parameters}
{\em addr} & \hyperlink{protocolthe-p}{the} IP address of \hyperlink{protocolthe-p}{the} nexthop router. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to external next hop if it exists, NULL otherwise. 
\end{DoxyReturn}
\hypertarget{classRIB_a58c4b04595588c97e17dc76619f0a313}{
\index{RIB@{RIB}!find\_\-or\_\-create\_\-external\_\-nexthop@{find\_\-or\_\-create\_\-external\_\-nexthop}}
\index{find\_\-or\_\-create\_\-external\_\-nexthop@{find\_\-or\_\-create\_\-external\_\-nexthop}!RIB@{RIB}}
\subsubsection[{find\_\-or\_\-create\_\-external\_\-nexthop}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ {\bf IPExternalNextHop}$<$ A $>$ $\ast$ {\bf RIB}$<$ A $>$::find\_\-or\_\-create\_\-external\_\-nexthop (
\begin{DoxyParamCaption}
\item[{const A \&}]{addr}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, private\mbox{]}}}}
\label{classRIB_a58c4b04595588c97e17dc76619f0a313}


Find or create \hyperlink{protocolthe-p}{the} IP \hyperlink{classExternal}{External} Nexthop class instance associated with an IP address. 


\begin{DoxyParams}{Parameters}
{\em addr} & \hyperlink{protocolthe-p}{the} IP address of \hyperlink{protocolthe-p}{the} nexthop router. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} \hyperlink{classIPExternalNextHop}{IPExternalNextHop} class instance for addr 
\end{DoxyReturn}
\hypertarget{classRIB_a1fa5acc3ef020d495c990c0f4250429a}{
\index{RIB@{RIB}!find\_\-or\_\-create\_\-peer\_\-nexthop@{find\_\-or\_\-create\_\-peer\_\-nexthop}}
\index{find\_\-or\_\-create\_\-peer\_\-nexthop@{find\_\-or\_\-create\_\-peer\_\-nexthop}!RIB@{RIB}}
\subsubsection[{find\_\-or\_\-create\_\-peer\_\-nexthop}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ {\bf IPPeerNextHop}$<$ A $>$ $\ast$ {\bf RIB}$<$ A $>$::find\_\-or\_\-create\_\-peer\_\-nexthop (
\begin{DoxyParamCaption}
\item[{const A \&}]{addr}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, private\mbox{]}}}}
\label{classRIB_a1fa5acc3ef020d495c990c0f4250429a}


Find or create \hyperlink{protocolthe-p}{the} IP \hyperlink{classPeer}{Peer} Nexthop class instance associated with an IP address. 


\begin{DoxyParams}{Parameters}
{\em addr} & \hyperlink{protocolthe-p}{the} IP address of \hyperlink{protocolthe-p}{the} nexthop router. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} \hyperlink{classIPPeerNextHop}{IPPeerNextHop} class instance for addr. 
\end{DoxyReturn}
\hypertarget{classRIB_a9da38703a6ba43e243b03dd4ff025559}{
\index{RIB@{RIB}!find\_\-peer\_\-nexthop@{find\_\-peer\_\-nexthop}}
\index{find\_\-peer\_\-nexthop@{find\_\-peer\_\-nexthop}!RIB@{RIB}}
\subsubsection[{find\_\-peer\_\-nexthop}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ {\bf IPPeerNextHop}$<$ A $>$ $\ast$ {\bf RIB}$<$ A $>$::find\_\-peer\_\-nexthop (
\begin{DoxyParamCaption}
\item[{const A \&}]{addr}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, private\mbox{]}}}}
\label{classRIB_a9da38703a6ba43e243b03dd4ff025559}


Find \hyperlink{protocolthe-p}{the} IP \hyperlink{classPeer}{Peer} Nexthop class instance associated with an IP address. 


\begin{DoxyParams}{Parameters}
{\em addr} & \hyperlink{protocolthe-p}{the} IP address of \hyperlink{protocolthe-p}{the} nexthop router. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to peer next hop if it exists, NULL otherwise. 
\end{DoxyReturn}
\hypertarget{classRIB_a16b06b8db264b90d9dfc927bbedf00f2}{
\index{RIB@{RIB}!find\_\-protocol@{find\_\-protocol}}
\index{find\_\-protocol@{find\_\-protocol}!RIB@{RIB}}
\subsubsection[{find\_\-protocol}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ {\bf Protocol} $\ast$ {\bf RIB}$<$ A $>$::find\_\-protocol (
\begin{DoxyParamCaption}
\item[{const string \&}]{protocol}
\end{DoxyParamCaption}
)}}
\label{classRIB_a16b06b8db264b90d9dfc927bbedf00f2}


Find a routing protocol, given its protocol name. 


\begin{DoxyParams}{Parameters}
{\em protocol} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} protocol to search for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to protocol if exists, NULL otherwise. 
\end{DoxyReturn}
\hypertarget{classRIB_a78e7011397e0e7d76a9f47da403a161f}{
\index{RIB@{RIB}!find\_\-table@{find\_\-table}}
\index{find\_\-table@{find\_\-table}!RIB@{RIB}}
\subsubsection[{find\_\-table}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ {\bf RouteTable}$<$ A $>$ $\ast$ {\bf RIB}$<$ A $>$::find\_\-table (
\begin{DoxyParamCaption}
\item[{const string \&}]{tablename}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, private\mbox{]}}}}
\label{classRIB_a78e7011397e0e7d76a9f47da403a161f}


Find a routing table, given its table name. 


\begin{DoxyParams}{Parameters}
{\em tablename} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} table to search for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to table if exists, NULL otherwise. 
\end{DoxyReturn}
\hypertarget{classRIB_ab1a5069868c361104a21874ecd2a94d8}{
\index{RIB@{RIB}!find\_\-table\_\-by\_\-instance@{find\_\-table\_\-by\_\-instance}}
\index{find\_\-table\_\-by\_\-instance@{find\_\-table\_\-by\_\-instance}!RIB@{RIB}}
\subsubsection[{find\_\-table\_\-by\_\-instance}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ {\bf OriginTable}$<$ A $>$ $\ast$ {\bf RIB}$<$ A $>$::find\_\-table\_\-by\_\-instance (
\begin{DoxyParamCaption}
\item[{const string \&}]{tablename, }
\item[{const string \&}]{target\_\-class, }
\item[{const string \&}]{target\_\-instance}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, private\mbox{]}}}}
\label{classRIB_ab1a5069868c361104a21874ecd2a94d8}


Find a routing table, given its protocol name and XRL target instance name. 


\begin{DoxyParams}{Parameters}
{\em tablename} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} protocol to search for. \\
\hline
{\em target\_\-class} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} target class to search for. \\
\hline
{\em target\_\-instance} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} target instance to search for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to table if exists, NULL otherwise. 
\end{DoxyReturn}
\hypertarget{classRIB_a0bdae860b83b115e4c7c462b95f61484}{
\index{RIB@{RIB}!find\_\-vif@{find\_\-vif}}
\index{find\_\-vif@{find\_\-vif}!RIB@{RIB}}
\subsubsection[{find\_\-vif}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ {\bf RibVif} $\ast$ {\bf RIB}$<$ A $>$::find\_\-vif (
\begin{DoxyParamCaption}
\item[{const A \&}]{addr}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, private\mbox{]}}}}
\label{classRIB_a0bdae860b83b115e4c7c462b95f61484}


Find \hyperlink{protocolthe-p}{the} virtual interface associated with one of this router's addresses. 


\begin{DoxyParams}{Parameters}
{\em addr} & \hyperlink{protocolthe-p}{the} IP address to lookup. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to \hyperlink{classRibVif}{RibVif} on success, NULL otherwise. 
\end{DoxyReturn}
\hypertarget{classRIB_a856b61d31ca7709611245695b9f3621a}{
\index{RIB@{RIB}!get\_\-protocol\_\-admin\_\-distance@{get\_\-protocol\_\-admin\_\-distance}}
\index{get\_\-protocol\_\-admin\_\-distance@{get\_\-protocol\_\-admin\_\-distance}!RIB@{RIB}}
\subsubsection[{get\_\-protocol\_\-admin\_\-distance}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ uint32\_\-t {\bf RIB}$<$ A $>$::get\_\-protocol\_\-admin\_\-distance (
\begin{DoxyParamCaption}
\item[{const string \&}]{protocol\_\-name}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRIB_a856b61d31ca7709611245695b9f3621a}


Get \hyperlink{protocolthe-p}{the} admin distance associated with a routing protocol. 


\begin{DoxyParams}{Parameters}
{\em protocol\_\-name} & \hyperlink{protocolthe-p}{the} canonical name of a routing protocol, in lower case. Eg \char`\"{}ospf\char`\"{}, \char`\"{}ibgp\char`\"{}, etc. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} admin distance; UNKNOWN\_\-ADMIN\_\-DISTANCE if unknown. 
\end{DoxyReturn}
\hypertarget{classRIB_ac536ec922b980ac8b18c3ba0e938448e}{
\index{RIB@{RIB}!get\_\-protocol\_\-admin\_\-distances@{get\_\-protocol\_\-admin\_\-distances}}
\index{get\_\-protocol\_\-admin\_\-distances@{get\_\-protocol\_\-admin\_\-distances}!RIB@{RIB}}
\subsubsection[{get\_\-protocol\_\-admin\_\-distances}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ map$<$string, uint32\_\-t$>$\& {\bf RIB}$<$ A $>$::get\_\-protocol\_\-admin\_\-distances (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRIB_ac536ec922b980ac8b18c3ba0e938448e}


Get \hyperlink{protocolthe-p}{the} map of all registered admin distances. 

\begin{DoxyReturn}{Returns}
a reference to \hyperlink{protocolthe-p}{the} \_\-admin\_\-distance map. 
\end{DoxyReturn}
\hypertarget{classRIB_a5ae394438b739795d7364fc225498843}{
\index{RIB@{RIB}!initialize@{initialize}}
\index{initialize@{initialize}!RIB@{RIB}}
\subsubsection[{initialize}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ void {\bf RIB}$<$ A $>$::initialize (
\begin{DoxyParamCaption}
\item[{{\bf RegisterServer} \&}]{register\_\-server}
\end{DoxyParamCaption}
)}}
\label{classRIB_a5ae394438b739795d7364fc225498843}


Initialize \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. 

Note that it is an error to initialize \hyperlink{protocolthe-p}{the} table twice.


\begin{DoxyParams}{Parameters}
{\em register\_\-server} & \hyperlink{protocolthe-p}{the} \hyperlink{classRegisterServer}{RegisterServer} to initialize \hyperlink{protocolthe-p}{the} Rib with. \\
\hline
\end{DoxyParams}
\hypertarget{classRIB_a9875635ddb507d4d2a39d04e5130b1f8}{
\index{RIB@{RIB}!initialize\_\-policy\_\-redist@{initialize\_\-policy\_\-redist}}
\index{initialize\_\-policy\_\-redist@{initialize\_\-policy\_\-redist}!RIB@{RIB}}
\subsubsection[{initialize\_\-policy\_\-redist}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf RIB}$<$ A $>$::initialize\_\-policy\_\-redist (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classRIB_a9875635ddb507d4d2a39d04e5130b1f8}


Initialize \hyperlink{protocolthe-p}{the} RIB's \hyperlink{classPolicyRedistTable}{PolicyRedistTable}. 

The \hyperlink{classPolicyRedistTable}{PolicyRedistTable} enables route redistribution according to policy configuration. Based on \hyperlink{protocolthe-p}{the} policy tags of routes passing through this table, a redistribution request is sent to \hyperlink{protocolthe-p}{the} relevant protocols. If routes are being deleted, protocols are informed to stop advertising \hyperlink{protocolthe-p}{the} route. \hypertarget{classRIB_a177a924142c2f66c08c57c5825addf07}{
\index{RIB@{RIB}!initialize\_\-redist\_\-all@{initialize\_\-redist\_\-all}}
\index{initialize\_\-redist\_\-all@{initialize\_\-redist\_\-all}!RIB@{RIB}}
\subsubsection[{initialize\_\-redist\_\-all}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf RIB}$<$ A $>$::initialize\_\-redist\_\-all (
\begin{DoxyParamCaption}
\item[{const string \&}]{all}
\end{DoxyParamCaption}
)}}
\label{classRIB_a177a924142c2f66c08c57c5825addf07}


Initialize \hyperlink{protocolthe-p}{the} RIB's \hyperlink{classRedistTable}{RedistTable} at \hyperlink{protocolthe-p}{the} end so that \hyperlink{protocolthe-p}{the} winning routes are exported to \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} clients (e.g., \hyperlink{protocolthe-p}{the} FEA). 

Note that it is an error to initialize \hyperlink{protocolthe-p}{the} table twice.

\begin{DoxySeeAlso}{See also}
\hyperlink{classRedistTable}{RedistTable} 
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em all} & a keyword string which can be used by \hyperlink{classRIB}{RIB} clients to register with \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} to receive \hyperlink{protocolthe-p}{the} winning routes from \hyperlink{protocolthe-p}{the} \hyperlink{classRedistTable}{RedistTable}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_a5ed34370e09b6869c3a94901d8f781d5}{
\index{RIB@{RIB}!initialize\_\-register@{initialize\_\-register}}
\index{initialize\_\-register@{initialize\_\-register}!RIB@{RIB}}
\subsubsection[{initialize\_\-register}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf RIB}$<$ A $>$::initialize\_\-register (
\begin{DoxyParamCaption}
\item[{{\bf RegisterServer} \&}]{register\_\-server}
\end{DoxyParamCaption}
)}}
\label{classRIB_a5ed34370e09b6869c3a94901d8f781d5}


Initialize \hyperlink{protocolthe-p}{the} RIB's \hyperlink{classRegisterTable}{RegisterTable}. 

The \hyperlink{classRegisterTable}{RegisterTable} allows routing protocols such as BGP to register interest in routing information that affects specfic addresses. Note that it is an error to initialize \hyperlink{protocolthe-p}{the} table twice.


\begin{DoxyParams}{Parameters}
{\em register\_\-server} & \hyperlink{protocolthe-p}{the} \hyperlink{classRegisterServer}{RegisterServer} to initialize \hyperlink{protocolthe-p}{the} Rib with. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_a3cdcab44de9a8f06ab49de5ab9387050}{
\index{RIB@{RIB}!lookup\_\-route@{lookup\_\-route}}
\index{lookup\_\-route@{lookup\_\-route}!RIB@{RIB}}
\subsubsection[{lookup\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ const A \& {\bf RIB}$<$ A $>$::lookup\_\-route (
\begin{DoxyParamCaption}
\item[{const A \&}]{lookupaddr}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_a3cdcab44de9a8f06ab49de5ab9387050}


Lookup an address in \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} to determine \hyperlink{protocolthe-p}{the} nexthop router to which packets for this address will be forwarded. 


\begin{DoxyParams}{Parameters}
{\em lookupaddr} & \hyperlink{protocolthe-p}{the} address to be looked up. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to address of next hop for lookupaddr if available, otherwise A::ZERO(). 
\end{DoxyReturn}
\hypertarget{classRIB_a6a6ba6077dd738e8b1cd958c810c96cb}{
\index{RIB@{RIB}!new\_\-origin\_\-table@{new\_\-origin\_\-table}}
\index{new\_\-origin\_\-table@{new\_\-origin\_\-table}!RIB@{RIB}}
\subsubsection[{new\_\-origin\_\-table}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf RIB}$<$ A $>$::new\_\-origin\_\-table (
\begin{DoxyParamCaption}
\item[{const string \&}]{tablename, }
\item[{const string \&}]{target\_\-class, }
\item[{const string \&}]{target\_\-instance, }
\item[{uint32\_\-t}]{admin\_\-distance, }
\item[{ProtocolType}]{protocol\_\-type}
\end{DoxyParamCaption}
)}}
\label{classRIB_a6a6ba6077dd738e8b1cd958c810c96cb}


Add a new \hyperlink{classOriginTable}{OriginTable}. 

Use is deprecated, except in test suites.

\begin{DoxySeeAlso}{See also}
\hyperlink{classOriginTable}{OriginTable} 
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em tablename} & human-\/readable name for this table to help in debugging. \\
\hline
{\em target\_\-class} & \hyperlink{protocolthe-p}{the} XRL target class of \hyperlink{protocolthe-p}{the} routing protocol that will supply routes to this \hyperlink{classOriginTable}{OriginTable}. \\
\hline
{\em target\_\-instance} & \hyperlink{protocolthe-p}{the} XRL target instance of \hyperlink{protocolthe-p}{the} routing protocol that will supply routes to this \hyperlink{classOriginTable}{OriginTable}. \\
\hline
{\em admin\_\-distance} & default administrative distance to be applied to routes that enter \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} through this \hyperlink{classOriginTable}{OriginTable}. \\
\hline
{\em protocol\_\-type} & \hyperlink{protocolthe-p}{the} routing protocol type (ProtocolType). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_a6a2609516000033adb8e3244637582ac}{
\index{RIB@{RIB}!new\_\-vif@{new\_\-vif}}
\index{new\_\-vif@{new\_\-vif}!RIB@{RIB}}
\subsubsection[{new\_\-vif}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf RIB}$<$ A $>$::new\_\-vif (
\begin{DoxyParamCaption}
\item[{const string \&}]{vifname, }
\item[{const {\bf Vif} \&}]{vif}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_a6a2609516000033adb8e3244637582ac}


Inform \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} about \hyperlink{protocolthe-p}{the} existence of a Virtual Interface. 

Note that it is an error to add twice a vif with \hyperlink{protocolthe-p}{the} same vifname.

\begin{DoxySeeAlso}{See also}
\hyperlink{classVif}{Vif} 
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em vifname} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} VIF, as understood by \hyperlink{protocolthe-p}{the} FEA. \\
\hline
{\em vif} & \hyperlink{classVif}{Vif} class instance giving \hyperlink{protocolthe-p}{the} information about this vif. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_a5754893aaeb5868d428878b0ef9a2c43}{
\index{RIB@{RIB}!registered\_\-protocol\_\-names@{registered\_\-protocol\_\-names}}
\index{registered\_\-protocol\_\-names@{registered\_\-protocol\_\-names}!RIB@{RIB}}
\subsubsection[{registered\_\-protocol\_\-names}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ list$<$ string $>$ {\bf RIB}$<$ A $>$::registered\_\-protocol\_\-names (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classRIB_a5754893aaeb5868d428878b0ef9a2c43}


Get \hyperlink{protocolthe-p}{the} list with \hyperlink{protocolthe-p}{the} registered protocol names. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} list with \hyperlink{protocolthe-p}{the} registered protocol names. 
\end{DoxyReturn}
\hypertarget{classRIB_a922a2f5ab8a12e148ccc76be0af277cf}{
\index{RIB@{RIB}!remove\_\-table@{remove\_\-table}}
\index{remove\_\-table@{remove\_\-table}!RIB@{RIB}}
\subsubsection[{remove\_\-table}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf RIB}$<$ A $>$::remove\_\-table (
\begin{DoxyParamCaption}
\item[{const string \&}]{tablename}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, private\mbox{]}}}}
\label{classRIB_a922a2f5ab8a12e148ccc76be0af277cf}


Remove table from \hyperlink{classRIB}{RIB}, but don't do any unplumbing. 

The table is not deleted by this.


\begin{DoxyParams}{Parameters}
{\em tablename} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} table to be removed. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_ab81972c9baf72dc7541033d4e9afca25}{
\index{RIB@{RIB}!replace\_\-route@{replace\_\-route}}
\index{replace\_\-route@{replace\_\-route}!RIB@{RIB}}
\subsubsection[{replace\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ int {\bf RIB}$<$ A $>$::replace\_\-route (
\begin{DoxyParamCaption}
\item[{const string \&}]{tablename, }
\item[{const {\bf IPNet}$<$ A $>$ \&}]{net, }
\item[{const A \&}]{nexthop\_\-addr, }
\item[{const string \&}]{ifname, }
\item[{const string \&}]{vifname, }
\item[{uint32\_\-t}]{metric, }
\item[{const {\bf PolicyTags} \&}]{policytags}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_ab81972c9baf72dc7541033d4e9afca25}


Replace an existing route via \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} called tablename. 


\begin{DoxyParams}{Parameters}
{\em tablename} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} in which \hyperlink{protocolthe-p}{the} route should be replaced. \\
\hline
{\em net} & \hyperlink{protocolthe-p}{the} subnet (address and prefix length) of \hyperlink{protocolthe-p}{the} route. \\
\hline
{\em nexthop\_\-addr} & \hyperlink{protocolthe-p}{the} new nexthop that packets destined for net should be forwarded to. \\
\hline
{\em ifname} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} physical interface toward \hyperlink{protocolthe-p}{the} destination. If an empty string \hyperlink{protocolthe-p}{the} interface will be chosen by \hyperlink{classRIB}{RIB}. \\
\hline
{\em vifname} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} virtual interface toward \hyperlink{protocolthe-p}{the} destination. If an empty string \hyperlink{protocolthe-p}{the} interface will be chosen by \hyperlink{classRIB}{RIB}. \\
\hline
{\em metric} & \hyperlink{protocolthe-p}{the} new routing protocol metric associated with this \\
\hline
{\em policytags} & \hyperlink{protocolthe-p}{the} policy-\/tags for this route. route. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_aaf000b43ebf7f162e1015bdbcc979aa7}{
\index{RIB@{RIB}!route\_\-deregister@{route\_\-deregister}}
\index{route\_\-deregister@{route\_\-deregister}!RIB@{RIB}}
\subsubsection[{route\_\-deregister}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ int {\bf RIB}$<$ A $>$::route\_\-deregister (
\begin{DoxyParamCaption}
\item[{const {\bf IPNet}$<$ A $>$ \&}]{subnet, }
\item[{const string \&}]{module}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_aaf000b43ebf7f162e1015bdbcc979aa7}


De-\/register interest in being notified about all changes to routing information for a particular address. 

\begin{DoxySeeAlso}{See also}
\hyperlink{classRIB_a5e5e89b06837f910ec8a56b232589f78}{RIB$<$A$>$::route\_\-register}
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em lookupaddr} & \hyperlink{protocolthe-p}{the} address to de-\/register interest in. \\
\hline
{\em module} & \hyperlink{protocolthe-p}{the} XRL module name to which notifications of changes should no longer be sent. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_a5e5e89b06837f910ec8a56b232589f78}{
\index{RIB@{RIB}!route\_\-register@{route\_\-register}}
\index{route\_\-register@{route\_\-register}!RIB@{RIB}}
\subsubsection[{route\_\-register}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ {\bf RouteRegister}$<$ A $>$ $\ast$ {\bf RIB}$<$ A $>$::route\_\-register (
\begin{DoxyParamCaption}
\item[{const A \&}]{lookupaddr, }
\item[{const string \&}]{module}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_a5e5e89b06837f910ec8a56b232589f78}


Register interest in being notified about all changes to routing information that would affect traffic destined for a particular address. 


\begin{DoxyParams}{Parameters}
{\em lookupaddr} & \hyperlink{protocolthe-p}{the} address to register interest in. \\
\hline
{\em module} & \hyperlink{protocolthe-p}{the} XRL module name to which notifications of changes should be sent. \\
\hline
\end{DoxyParams}
\hypertarget{classRIB_a0a98fbcf548ce08537895fb70be31133}{
\index{RIB@{RIB}!set\_\-protocol\_\-admin\_\-distance@{set\_\-protocol\_\-admin\_\-distance}}
\index{set\_\-protocol\_\-admin\_\-distance@{set\_\-protocol\_\-admin\_\-distance}!RIB@{RIB}}
\subsubsection[{set\_\-protocol\_\-admin\_\-distance}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf RIB}$<$ A $>$::set\_\-protocol\_\-admin\_\-distance (
\begin{DoxyParamCaption}
\item[{const string \&}]{protocol\_\-name, }
\item[{const uint32\_\-t \&}]{admin\_\-distance}
\end{DoxyParamCaption}
)}}
\label{classRIB_a0a98fbcf548ce08537895fb70be31133}


Set \hyperlink{protocolthe-p}{the} admin distance associated with a routing protocol. 


\begin{DoxyParams}{Parameters}
{\em protocol\_\-name} & \hyperlink{protocolthe-p}{the} canonical name of a routing protocol, in lower case. Eg \char`\"{}ospf\char`\"{}, \char`\"{}ibgp\char`\"{}, etc. \\
\hline
{\em admin\_\-distance} & \hyperlink{protocolthe-p}{the} admin distance to set. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_a667679d0775181b9180ba906d60bce53}{
\index{RIB@{RIB}!set\_\-vif\_\-flags@{set\_\-vif\_\-flags}}
\index{set\_\-vif\_\-flags@{set\_\-vif\_\-flags}!RIB@{RIB}}
\subsubsection[{set\_\-vif\_\-flags}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf RIB}$<$ A $>$::set\_\-vif\_\-flags (
\begin{DoxyParamCaption}
\item[{const string \&}]{vifname, }
\item[{bool}]{is\_\-p2p, }
\item[{bool}]{is\_\-loopback, }
\item[{bool}]{is\_\-multicast, }
\item[{bool}]{is\_\-broadcast, }
\item[{bool}]{is\_\-up, }
\item[{uint32\_\-t}]{mtu}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_a667679d0775181b9180ba906d60bce53}


Set \hyperlink{protocolthe-p}{the} vif flags of a configured vif. 


\begin{DoxyParams}{Parameters}
{\em vifname} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} vif. \\
\hline
{\em is\_\-pim\_\-register} & true if \hyperlink{protocolthe-p}{the} vif is a PIM Register interface. \\
\hline
{\em is\_\-p2p} & true if \hyperlink{protocolthe-p}{the} vif is point-\/to-\/point interface. \\
\hline
{\em is\_\-loopback} & true if \hyperlink{protocolthe-p}{the} vif is a loopback interface. \\
\hline
{\em is\_\-multicast} & true if \hyperlink{protocolthe-p}{the} vif is multicast capable. \\
\hline
{\em is\_\-broadcast} & true if \hyperlink{protocolthe-p}{the} vif is broadcast capable. \\
\hline
{\em is\_\-up} & true if \hyperlink{protocolthe-p}{the} underlying vif is UP. \\
\hline
{\em mtu} & \hyperlink{protocolthe-p}{the} MTU of \hyperlink{protocolthe-p}{the} vif. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRIB_ab5fda3db01137ca7dccd249df97425f6}{
\index{RIB@{RIB}!target\_\-death@{target\_\-death}}
\index{target\_\-death@{target\_\-death}!RIB@{RIB}}
\subsubsection[{target\_\-death}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ void {\bf RIB}$<$ A $>$::target\_\-death (
\begin{DoxyParamCaption}
\item[{const string \&}]{target\_\-class, }
\item[{const string \&}]{target\_\-instance}
\end{DoxyParamCaption}
)}}
\label{classRIB_ab5fda3db01137ca7dccd249df97425f6}


An XRL Target died. 

We need to check if it's a routing protocol, and if it was, clean up after it.


\begin{DoxyParams}{Parameters}
{\em target\_\-class} & \hyperlink{protocolthe-p}{the} XRL Class of \hyperlink{protocolthe-p}{the} target that died. \\
\hline
{\em target\_\-instance} & \hyperlink{protocolthe-p}{the} XRL Class Instance of \hyperlink{protocolthe-p}{the} target that died. \\
\hline
\end{DoxyParams}
\hypertarget{classRIB_a6c4a8f31f5db0d126b859500bf7c9fd4}{
\index{RIB@{RIB}!track\_\-back@{track\_\-back}}
\index{track\_\-back@{track\_\-back}!RIB@{RIB}}
\subsubsection[{track\_\-back}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ {\bf RouteTable}$<$ A $>$ $\ast$ {\bf RIB}$<$ A $>$::track\_\-back (
\begin{DoxyParamCaption}
\item[{{\bf RouteTable}$<$ A $>$ $\ast$}]{rt, }
\item[{int}]{typemask}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classRIB_a6c4a8f31f5db0d126b859500bf7c9fd4}


track\_\-back trough \hyperlink{protocolthe-p}{the} RouteTables' parent pointers to find \hyperlink{protocolthe-p}{the} last (i.e, nearest \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable}) table that matches \hyperlink{protocolthe-p}{the} mask in typemask. 

If \hyperlink{protocolthe-p}{the} table given by rt doesn't match \hyperlink{protocolthe-p}{the} mask, return it anyway. If a table has more than one parent, then this is an error.


\begin{DoxyParams}{Parameters}
{\em rt} & \hyperlink{protocolthe-p}{the} routing table to start with. \\
\hline
{\em typemask} & \hyperlink{protocolthe-p}{the} bitwise-\/or of \hyperlink{protocolthe-p}{the} routing table types that we may track back through. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} last matching table, or rt if rt itself doesn't match. 
\end{DoxyReturn}
\hypertarget{classRIB_a31cef02026718e73ea2cb720d1490d0a}{
\index{RIB@{RIB}!track\_\-forward@{track\_\-forward}}
\index{track\_\-forward@{track\_\-forward}!RIB@{RIB}}
\subsubsection[{track\_\-forward}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ {\bf RouteTable}$<$ A $>$ $\ast$ {\bf RIB}$<$ A $>$::track\_\-forward (
\begin{DoxyParamCaption}
\item[{{\bf RouteTable}$<$ A $>$ $\ast$}]{rt, }
\item[{int}]{typemask}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classRIB_a31cef02026718e73ea2cb720d1490d0a}


track\_\-forward trough \hyperlink{protocolthe-p}{the} RouteTables' child pointers to find \hyperlink{protocolthe-p}{the} last able that matches \hyperlink{protocolthe-p}{the} mask in typemask. 

Unlike track\_\-back, if rt doesn't match, but \hyperlink{protocolthe-p}{the} next does, \hyperlink{protocolthe-p}{the} track forward anyway.


\begin{DoxyParams}{Parameters}
{\em rt} & \hyperlink{protocolthe-p}{the} routing table to start with. \\
\hline
{\em typemask} & \hyperlink{protocolthe-p}{the} bitwise-\/or of \hyperlink{protocolthe-p}{the} routing table types that we may track forward through. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} last matching table. 
\end{DoxyReturn}
\hypertarget{classRIB_afdbcb3609b125c9531348b8cc1dd47d0}{
\index{RIB@{RIB}!verify\_\-route@{verify\_\-route}}
\index{verify\_\-route@{verify\_\-route}!RIB@{RIB}}
\subsubsection[{verify\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ int {\bf RIB}$<$ A $>$::verify\_\-route (
\begin{DoxyParamCaption}
\item[{const A \&}]{lookupaddr, }
\item[{const string \&}]{ifname, }
\item[{const A \&}]{nexthop\_\-addr, }
\item[{uint32\_\-t}]{metric, }
\item[{RibVerifyType}]{matchtype}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classRIB_afdbcb3609b125c9531348b8cc1dd47d0}


Verify \hyperlink{protocolthe-p}{the} result of a route lookup in \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} matches \hyperlink{protocolthe-p}{the} parameters we expect. 

Intended for testing purposes only.


\begin{DoxyParams}{Parameters}
{\em lookupaddr} & \hyperlink{protocolthe-p}{the} destination to be verified. \\
\hline
{\em nexthop\_\-addr} & \hyperlink{protocolthe-p}{the} expected next hop address. \\
\hline
{\em ifname} & \hyperlink{protocolthe-p}{the} expected interface. \\
\hline
{\em metric} & \hyperlink{protocolthe-p}{the} expected routing protocol metric. \\
\hline
{\em type} & \hyperlink{protocolthe-p}{the} expected type of match.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}


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