\hypertarget{classRouteManager}{
\section{RouteManager Class Reference}
\label{classRouteManager}\index{RouteManager@{RouteManager}}
}


\hyperlink{classRouting}{Routing} table manager.  




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

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRouteManager_aaa12e7b95b59aa054f7d60e66d6453b7}{
{\bfseries RouteManager} (\hyperlink{classOlsr}{Olsr} \&olsr, \hyperlink{classEventLoop}{EventLoop} \&eventloop, \hyperlink{classFaceManager}{FaceManager} $\ast$fm, \hyperlink{classNeighborhood}{Neighborhood} $\ast$nh, \hyperlink{classTopologyManager}{TopologyManager} $\ast$tm, \hyperlink{classExternalRoutes}{ExternalRoutes} $\ast$er)}
\label{classRouteManager_aaa12e7b95b59aa054f7d60e66d6453b7}

\item 
\hypertarget{classRouteManager_af082c1573d4c659cfbf701ffc407f68b}{
void \hyperlink{classRouteManager_af082c1573d4c659cfbf701ffc407f68b}{schedule\_\-route\_\-update} ()}
\label{classRouteManager_af082c1573d4c659cfbf701ffc407f68b}

\begin{DoxyCompactList}\small\item\em Schedule a recalculation of \hyperlink{protocolthe-p}{the} entire routing table. \item\end{DoxyCompactList}\item 
\hypertarget{classRouteManager_af0ee8906ca53025e18c113899e54fbd0}{
void \hyperlink{classRouteManager_af0ee8906ca53025e18c113899e54fbd0}{schedule\_\-external\_\-route\_\-update} ()}
\label{classRouteManager_af0ee8906ca53025e18c113899e54fbd0}

\begin{DoxyCompactList}\small\item\em Schedule a recalculation of external routes. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRouteManager_a3e672b0ae470eba6919af78a64c8b8e1}{add\_\-onehop\_\-link} (const \hyperlink{classLogicalLink}{LogicalLink} $\ast$l, const \hyperlink{classNeighbor}{Neighbor} $\ast$n)
\begin{DoxyCompactList}\small\item\em Add a link to a one-\/hop neighbor to \hyperlink{protocolthe-p}{the} SPT. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRouteManager_ac010df962219829048e7a9738a24f520}{add\_\-twohop\_\-link} (const \hyperlink{classNeighbor}{Neighbor} $\ast$n, const \hyperlink{classTwoHopLink}{TwoHopLink} $\ast$l2, const \hyperlink{classTwoHopNeighbor}{TwoHopNeighbor} $\ast$n2)
\begin{DoxyCompactList}\small\item\em Add a two-\/hop link and neighbor to \hyperlink{protocolthe-p}{the} SPT. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRouteManager_a520e10b1c6ed6152e87c063cbed427cc}{add\_\-tc\_\-link} (const \hyperlink{classTopologyEntry}{TopologyEntry} $\ast$tc)
\begin{DoxyCompactList}\small\item\em Add a TC-\/derived link and neighbor to \hyperlink{protocolthe-p}{the} SPT. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRouteManager_aa60ecc7735caf42ab7603f15963d1ead}{add\_\-hna\_\-route} (const \hyperlink{classIPNet}{IPv4Net} \&dest, const \hyperlink{classIPv4}{IPv4} \&lasthop, const uint16\_\-t distance)
\begin{DoxyCompactList}\small\item\em Add an external route, possibly HNA derived, to \hyperlink{protocolthe-p}{the} current trie. \item\end{DoxyCompactList}\item 
\hypertarget{classRouteManager_ac0f888218d7a8b2a52e705f50cb7377f}{
void \hyperlink{classRouteManager_ac0f888218d7a8b2a52e705f50cb7377f}{push\_\-routes} ()}
\label{classRouteManager_ac0f888218d7a8b2a52e705f50cb7377f}

\begin{DoxyCompactList}\small\item\em Backend method to: push all \hyperlink{protocolthe-p}{the} routes through \hyperlink{protocolthe-p}{the} policy filters whenever they are updated. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classRouteManager_a090bf0179240ff8ddaf4a213a916e660}{recompute\_\-all\_\-routes} ()
\begin{DoxyCompactList}\small\item\em Recompute \hyperlink{protocolthe-p}{the} OLSR domain portion of \hyperlink{protocolthe-p}{the} routing table. \item\end{DoxyCompactList}\item 
\hypertarget{classRouteManager_a3588a8f613673022b25608fa3370632d}{
\hyperlink{classVertex}{Vertex} {\bfseries make\_\-origin\_\-vertex} ()}
\label{classRouteManager_a3588a8f613673022b25608fa3370632d}

\item 
void \hyperlink{classRouteManager_a5dfb952457726acb66c3f9c78a2b5c6a}{begin} ()
\begin{DoxyCompactList}\small\item\em Begin \hyperlink{protocolthe-p}{the} route computation transaction. \item\end{DoxyCompactList}\item 
void \hyperlink{classRouteManager_a430fb7d0d4fd51cef45dec886a3ab64a}{end} ()
\begin{DoxyCompactList}\small\item\em End \hyperlink{protocolthe-p}{the} route computation transaction. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRouteManager_afe9a45de661126f986e6b2de3bec7033}{add\_\-entry} (const \hyperlink{classIPNet}{IPv4Net} \&net, const \hyperlink{classRouteEntry}{RouteEntry} \&rt)
\begin{DoxyCompactList}\small\item\em Internal method to: Add a route entry to \hyperlink{protocolthe-p}{the} current internal trie. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRouteManager_a1f6cd2ddac2771bdf0be1761333a00a1}{delete\_\-entry} (const \hyperlink{classIPNet}{IPv4Net} \&net, const \hyperlink{classRouteEntry}{RouteEntry} \&rt)
\begin{DoxyCompactList}\small\item\em Internal method to: Delete a route entry from \hyperlink{protocolthe-p}{the} current internal trie. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRouteManager_ac729a95a502c9f1fc7b46da76f55949a}{replace\_\-entry} (const \hyperlink{classIPNet}{IPv4Net} \&net, const \hyperlink{classRouteEntry}{RouteEntry} \&rt, const \hyperlink{classRouteEntry}{RouteEntry} \&previous\_\-rt)
\begin{DoxyCompactList}\small\item\em Internal method to: Replace a route entry in \hyperlink{protocolthe-p}{the} current internal trie. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRouteManager_a5f344240870866e1edac0eda95810884}{add\_\-route} (\hyperlink{classIPNet}{IPv4Net} net, \hyperlink{classIPv4}{IPv4} nexthop, uint32\_\-t metric, \hyperlink{classRouteEntry}{RouteEntry} \&rt)
\begin{DoxyCompactList}\small\item\em Backend method to: add a route to \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} with policy filtering. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRouteManager_af4b3fe6778f13f530e86fd026b171dfe}{delete\_\-route} (const \hyperlink{classIPNet}{IPv4Net} \&net, const \hyperlink{classRouteEntry}{RouteEntry} \&rt)
\begin{DoxyCompactList}\small\item\em Backend method to: withdraw a route from \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRouteManager_a8edd70cb11a48891065c92a52dc78372}{replace\_\-route} (\hyperlink{classIPNet}{IPv4Net} net, \hyperlink{classIPv4}{IPv4} nexthop, uint32\_\-t metric, \hyperlink{classRouteEntry}{RouteEntry} \&rt, \hyperlink{classRouteEntry}{RouteEntry} \&previous\_\-rt)
\begin{DoxyCompactList}\small\item\em Backend method to: replace a route that has been sent to \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRouteManager_af1fe6570044e8caf0f84f0da46899f6d}{do\_\-filtering} (\hyperlink{classIPNet}{IPv4Net} \&net, \hyperlink{classIPv4}{IPv4} \&nexthop, uint32\_\-t \&metric, \hyperlink{classRouteEntry}{RouteEntry} \&rt, \hyperlink{classPolicyTags}{PolicyTags} \&policytags)
\begin{DoxyCompactList}\small\item\em Backend method to: perform policy filtering when a route may be plumbed to \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRouteManager_a1bd3fa94fd994cdf9404bd41482199f9}{
\hyperlink{classOlsr}{Olsr} \& {\bfseries \_\-olsr}}
\label{classRouteManager_a1bd3fa94fd994cdf9404bd41482199f9}

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

\item 
\hypertarget{classRouteManager_a6c238bc850e2acd7f61133323c0c810f}{
\hyperlink{classFaceManager}{FaceManager} $\ast$ {\bfseries \_\-fm}}
\label{classRouteManager_a6c238bc850e2acd7f61133323c0c810f}

\item 
\hypertarget{classRouteManager_aa8ba3bc902d97f142460f8dcde2a98c4}{
\hyperlink{classNeighborhood}{Neighborhood} $\ast$ {\bfseries \_\-nh}}
\label{classRouteManager_aa8ba3bc902d97f142460f8dcde2a98c4}

\item 
\hypertarget{classRouteManager_aa37c91e3e95e30aa38e15b89e8b73140}{
\hyperlink{classTopologyManager}{TopologyManager} $\ast$ {\bfseries \_\-tm}}
\label{classRouteManager_aa37c91e3e95e30aa38e15b89e8b73140}

\item 
\hypertarget{classRouteManager_a5a697df1db02a968cefb3888bd7d3f71}{
\hyperlink{classExternalRoutes}{ExternalRoutes} $\ast$ {\bfseries \_\-er}}
\label{classRouteManager_a5a697df1db02a968cefb3888bd7d3f71}

\item 
\hypertarget{classRouteManager_a343d14b3ee0ca327299e72a1ff3d9ce3}{
\hyperlink{classSpt}{Spt}$<$ \hyperlink{classVertex}{Vertex} $>$ {\bfseries \_\-spt}}
\label{classRouteManager_a343d14b3ee0ca327299e72a1ff3d9ce3}

\item 
\hypertarget{classRouteManager_a940d1568fa043521e0ef256d67fb01b2}{
\hyperlink{classVertex}{Vertex} {\bfseries \_\-origin}}
\label{classRouteManager_a940d1568fa043521e0ef256d67fb01b2}

\item 
\hypertarget{classRouteManager_a5774aab7803aa18c258ac37e952492b4}{
bool {\bfseries \_\-in\_\-transaction}}
\label{classRouteManager_a5774aab7803aa18c258ac37e952492b4}

\item 
\hypertarget{classRouteManager_a59218432835f7f1e23ab7f26ac696edc}{
\hyperlink{classXorpTask}{XorpTask} {\bfseries \_\-route\_\-update\_\-task}}
\label{classRouteManager_a59218432835f7f1e23ab7f26ac696edc}

\item 
\hypertarget{classRouteManager_ac1b098f4bc7ca0ecaf70dca661398aab}{
\hyperlink{classTrie}{Trie}$<$ \hyperlink{classIPv4}{IPv4}, \hyperlink{classRouteEntry}{RouteEntry} $>$ $\ast$ {\bfseries \_\-current}}
\label{classRouteManager_ac1b098f4bc7ca0ecaf70dca661398aab}

\item 
\hypertarget{classRouteManager_adac5f16518030dd066ea1766c4ff7172}{
\hyperlink{classTrie}{Trie}$<$ \hyperlink{classIPv4}{IPv4}, \hyperlink{classRouteEntry}{RouteEntry} $>$ $\ast$ {\bfseries \_\-previous}}
\label{classRouteManager_adac5f16518030dd066ea1766c4ff7172}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hyperlink{classRouting}{Routing} table manager. Performs incremental and/or deferred update of \hyperlink{protocolthe-p}{the} OLSR routing table for \hyperlink{protocolthe-p}{the} domain which this routing process interacts with.

Whilst incremental updates are possible, \hyperlink{protocolthe-p}{the} code does not currently do this because \hyperlink{protocolthe-p}{the} incremental shortest-\/path-\/tree code does not yet support incremental updates. The interface is however written with this in mind as it may turn out to offer faster convergence for link-\/state MANET protocols like OLSR.

Classes which produce artifacts for \hyperlink{classRouteManager}{RouteManager} to turn into routes therefore call \hyperlink{classRouteManager_af082c1573d4c659cfbf701ffc407f68b}{schedule\_\-route\_\-update()} whenever their state changes. \hyperlink{classRouteManager}{RouteManager} will call them back. We do not use polymorphism for this as \hyperlink{protocolthe-p}{the} relationships do not significantly change. 

\subsection{Member Function Documentation}
\hypertarget{classRouteManager_afe9a45de661126f986e6b2de3bec7033}{
\index{RouteManager@{RouteManager}!add\_\-entry@{add\_\-entry}}
\index{add\_\-entry@{add\_\-entry}!RouteManager@{RouteManager}}
\subsubsection[{add\_\-entry}]{\setlength{\rightskip}{0pt plus 5cm}bool RouteManager::add\_\-entry (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4Net} \&}]{net, }
\item[{const {\bf RouteEntry} \&}]{rt}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classRouteManager_afe9a45de661126f986e6b2de3bec7033}


Internal method to: Add a route entry to \hyperlink{protocolthe-p}{the} current internal trie. 


\begin{DoxyParams}{Parameters}
{\em net} & \hyperlink{protocolthe-p}{the} destination prefix. \\
\hline
{\em rt} & \hyperlink{protocolthe-p}{the} entry to add. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} entry was added OK. 
\end{DoxyReturn}
\hypertarget{classRouteManager_aa60ecc7735caf42ab7603f15963d1ead}{
\index{RouteManager@{RouteManager}!add\_\-hna\_\-route@{add\_\-hna\_\-route}}
\index{add\_\-hna\_\-route@{add\_\-hna\_\-route}!RouteManager@{RouteManager}}
\subsubsection[{add\_\-hna\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}bool RouteManager::add\_\-hna\_\-route (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4Net} \&}]{dest, }
\item[{const {\bf IPv4} \&}]{lasthop, }
\item[{const uint16\_\-t}]{distance}
\end{DoxyParamCaption}
)}}
\label{classRouteManager_aa60ecc7735caf42ab7603f15963d1ead}


Add an external route, possibly HNA derived, to \hyperlink{protocolthe-p}{the} current trie. 

Section 12: Non-\/OLSR Interfaces. The metric of an HNA route in RFC-\/compliant OLSR is identical to that of its last-\/hop. If \hyperlink{protocolthe-p}{the} origin of \hyperlink{protocolthe-p}{the} HNA route is not reachable in \hyperlink{protocolthe-p}{the} OLSR SPT, \hyperlink{protocolthe-p}{the} HNA route will be rejected; see NOTES.


\begin{DoxyParams}{Parameters}
{\em dest} & \hyperlink{protocolthe-p}{the} destination prefix. \\
\hline
{\em lasthop} & \hyperlink{protocolthe-p}{the} last hop advertising \\
\hline
{\em dest} & Note: This is a main address, not an interface address. \\
\hline
{\em distance} & \hyperlink{protocolthe-p}{the} number of OLSR hops to \\
\hline
{\em lasthop} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} route was added OK. 
\end{DoxyReturn}
\hypertarget{classRouteManager_a3e672b0ae470eba6919af78a64c8b8e1}{
\index{RouteManager@{RouteManager}!add\_\-onehop\_\-link@{add\_\-onehop\_\-link}}
\index{add\_\-onehop\_\-link@{add\_\-onehop\_\-link}!RouteManager@{RouteManager}}
\subsubsection[{add\_\-onehop\_\-link}]{\setlength{\rightskip}{0pt plus 5cm}bool RouteManager::add\_\-onehop\_\-link (
\begin{DoxyParamCaption}
\item[{const {\bf LogicalLink} $\ast$}]{l, }
\item[{const {\bf Neighbor} $\ast$}]{n}
\end{DoxyParamCaption}
)}}
\label{classRouteManager_a3e672b0ae470eba6919af78a64c8b8e1}


Add a link to a one-\/hop neighbor to \hyperlink{protocolthe-p}{the} SPT. 

Given a link at radius 1 in \hyperlink{protocolthe-p}{the} routing graph from this node, add its endpoint node and \hyperlink{protocolthe-p}{the} edge to \hyperlink{protocolthe-p}{the} SPT graph.

TODO: Bias for MPRs and willingness correctly.


\begin{DoxyParams}{Parameters}
{\em l} & pointer to a link between \hyperlink{protocolthe-p}{the} origin and \hyperlink{protocolthe-p}{the} \hyperlink{classNeighbor}{Neighbor} n. \\
\hline
{\em n} & pointer to \hyperlink{protocolthe-p}{the} \hyperlink{classNeighbor}{Neighbor} n. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} link was added OK. 
\end{DoxyReturn}
\hypertarget{classRouteManager_a5f344240870866e1edac0eda95810884}{
\index{RouteManager@{RouteManager}!add\_\-route@{add\_\-route}}
\index{add\_\-route@{add\_\-route}!RouteManager@{RouteManager}}
\subsubsection[{add\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}bool RouteManager::add\_\-route (
\begin{DoxyParamCaption}
\item[{{\bf IPv4Net}}]{net, }
\item[{{\bf IPv4}}]{nexthop, }
\item[{uint32\_\-t}]{metric, }
\item[{{\bf RouteEntry} \&}]{rt}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classRouteManager_a5f344240870866e1edac0eda95810884}


Backend method to: add a route to \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} with policy filtering. 


\begin{DoxyParams}{Parameters}
{\em net} & \hyperlink{protocolthe-p}{the} destination prefix. \\
\hline
{\em nexthop} & \hyperlink{protocolthe-p}{the} next-\/hop. \\
\hline
{\em metric} & \hyperlink{protocolthe-p}{the} computed metric of \hyperlink{protocolthe-p}{the} route. \\
\hline
{\em rt} & \hyperlink{protocolthe-p}{the} route entry to add, containing all other fields. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} route was added to \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} OK, otherwise false. 
\end{DoxyReturn}
\hypertarget{classRouteManager_a520e10b1c6ed6152e87c063cbed427cc}{
\index{RouteManager@{RouteManager}!add\_\-tc\_\-link@{add\_\-tc\_\-link}}
\index{add\_\-tc\_\-link@{add\_\-tc\_\-link}!RouteManager@{RouteManager}}
\subsubsection[{add\_\-tc\_\-link}]{\setlength{\rightskip}{0pt plus 5cm}bool RouteManager::add\_\-tc\_\-link (
\begin{DoxyParamCaption}
\item[{const {\bf TopologyEntry} $\ast$}]{tc}
\end{DoxyParamCaption}
)}}
\label{classRouteManager_a520e10b1c6ed6152e87c063cbed427cc}


Add a TC-\/derived link and neighbor to \hyperlink{protocolthe-p}{the} SPT. 

Given a link at radius $>$ 2 in \hyperlink{protocolthe-p}{the} routing graph from \hyperlink{protocolthe-p}{the} origin, add its far endpoint nodes and \hyperlink{protocolthe-p}{the} edge to \hyperlink{protocolthe-p}{the} SPT graph. In \hyperlink{protocolthe-p}{the} absence of ETX measurements, \hyperlink{protocolthe-p}{the} only possible cost for a TC link which we can infer from link state is 1 (just \hyperlink{protocolthe-p}{the} hop), and this is what we get from \hyperlink{classTopologyManager}{TopologyManager}.


\begin{DoxyParams}{Parameters}
{\em tc} & The topology entry being considered for SPT add. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if a link and vertex for \hyperlink{protocolthe-p}{the} far endpoint was added to \hyperlink{protocolthe-p}{the} SPT, otherwise false. 
\end{DoxyReturn}
\hypertarget{classRouteManager_ac010df962219829048e7a9738a24f520}{
\index{RouteManager@{RouteManager}!add\_\-twohop\_\-link@{add\_\-twohop\_\-link}}
\index{add\_\-twohop\_\-link@{add\_\-twohop\_\-link}!RouteManager@{RouteManager}}
\subsubsection[{add\_\-twohop\_\-link}]{\setlength{\rightskip}{0pt plus 5cm}bool RouteManager::add\_\-twohop\_\-link (
\begin{DoxyParamCaption}
\item[{const {\bf Neighbor} $\ast$}]{n, }
\item[{const {\bf TwoHopLink} $\ast$}]{l2, }
\item[{const {\bf TwoHopNeighbor} $\ast$}]{n2}
\end{DoxyParamCaption}
)}}
\label{classRouteManager_ac010df962219829048e7a9738a24f520}


Add a two-\/hop link and neighbor to \hyperlink{protocolthe-p}{the} SPT. 

Given a link at radius 2 in \hyperlink{protocolthe-p}{the} routing graph from \hyperlink{protocolthe-p}{the} origin, add its endpoint nodes and \hyperlink{protocolthe-p}{the} edge to \hyperlink{protocolthe-p}{the} SPT graph.

In \hyperlink{protocolthe-p}{the} absence of ETX measurements, \hyperlink{protocolthe-p}{the} only possible cost for a 2-\/hop link which we can infer from link state is 1 (just \hyperlink{protocolthe-p}{the} hop), and this is what we get from \hyperlink{classNeighborhood}{Neighborhood}.


\begin{DoxyParams}{Parameters}
{\em n} & pointer to \hyperlink{protocolthe-p}{the} \hyperlink{classNeighbor}{Neighbor} n, which must already have been added to \hyperlink{protocolthe-p}{the} SPT graph. \\
\hline
{\em l2} & pointer to a link between \hyperlink{classNeighbor}{Neighbor} n and \hyperlink{classTwoHopNeighbor}{TwoHopNeighbor} n2. \\
\hline
{\em n2} & pointer to a \hyperlink{classTwoHopNeighbor}{TwoHopNeighbor}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} two-\/hop link was added OK. 
\end{DoxyReturn}
\hypertarget{classRouteManager_a5dfb952457726acb66c3f9c78a2b5c6a}{
\index{RouteManager@{RouteManager}!begin@{begin}}
\index{begin@{begin}!RouteManager@{RouteManager}}
\subsubsection[{begin}]{\setlength{\rightskip}{0pt plus 5cm}void RouteManager::begin (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classRouteManager_a5dfb952457726acb66c3f9c78a2b5c6a}


Begin \hyperlink{protocolthe-p}{the} route computation transaction. 

This must be called before any routes are recomputed, to take snapshots of \hyperlink{protocolthe-p}{the} state which is present in \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. \hypertarget{classRouteManager_a1f6cd2ddac2771bdf0be1761333a00a1}{
\index{RouteManager@{RouteManager}!delete\_\-entry@{delete\_\-entry}}
\index{delete\_\-entry@{delete\_\-entry}!RouteManager@{RouteManager}}
\subsubsection[{delete\_\-entry}]{\setlength{\rightskip}{0pt plus 5cm}bool RouteManager::delete\_\-entry (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4Net} \&}]{net, }
\item[{const {\bf RouteEntry} \&}]{rt}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classRouteManager_a1f6cd2ddac2771bdf0be1761333a00a1}


Internal method to: Delete a route entry from \hyperlink{protocolthe-p}{the} current internal trie. 


\begin{DoxyParams}{Parameters}
{\em net} & \hyperlink{protocolthe-p}{the} destination prefix. \\
\hline
{\em rt} & \hyperlink{protocolthe-p}{the} entry to delete. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} entry was deleted OK. 
\end{DoxyReturn}
\hypertarget{classRouteManager_af4b3fe6778f13f530e86fd026b171dfe}{
\index{RouteManager@{RouteManager}!delete\_\-route@{delete\_\-route}}
\index{delete\_\-route@{delete\_\-route}!RouteManager@{RouteManager}}
\subsubsection[{delete\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}bool RouteManager::delete\_\-route (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4Net} \&}]{net, }
\item[{const {\bf RouteEntry} \&}]{rt}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classRouteManager_af4b3fe6778f13f530e86fd026b171dfe}


Backend method to: withdraw a route from \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. 


\begin{DoxyParams}{Parameters}
{\em net} & \hyperlink{protocolthe-p}{the} destination prefix. \\
\hline
{\em rt} & \hyperlink{protocolthe-p}{the} route entry to delete, containing all other fields. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} route was withdrawn from \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} OK, otherwise false. 
\end{DoxyReturn}
\hypertarget{classRouteManager_af1fe6570044e8caf0f84f0da46899f6d}{
\index{RouteManager@{RouteManager}!do\_\-filtering@{do\_\-filtering}}
\index{do\_\-filtering@{do\_\-filtering}!RouteManager@{RouteManager}}
\subsubsection[{do\_\-filtering}]{\setlength{\rightskip}{0pt plus 5cm}bool RouteManager::do\_\-filtering (
\begin{DoxyParamCaption}
\item[{{\bf IPv4Net} \&}]{net, }
\item[{{\bf IPv4} \&}]{nexthop, }
\item[{uint32\_\-t \&}]{metric, }
\item[{{\bf RouteEntry} \&}]{rt, }
\item[{{\bf PolicyTags} \&}]{policytags}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classRouteManager_af1fe6570044e8caf0f84f0da46899f6d}


Backend method to: perform policy filtering when a route may be plumbed to \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. 

May not be declared const; policy may modify fields.


\begin{DoxyParams}{Parameters}
{\em net} & \hyperlink{protocolthe-p}{the} destination prefix. \\
\hline
{\em nexthop} & \hyperlink{protocolthe-p}{the} next-\/hop. \\
\hline
{\em metric} & \hyperlink{protocolthe-p}{the} metric. \\
\hline
{\em rt} & \hyperlink{protocolthe-p}{the} route entry to filter, containing all other fields. \\
\hline
{\em policytags} & \hyperlink{protocolthe-p}{the} tags presented to us by \hyperlink{protocolthe-p}{the} policy engine. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} route was accepted by \hyperlink{protocolthe-p}{the} policy engine, otherwise false if any error occurred. 
\end{DoxyReturn}
\hypertarget{classRouteManager_a430fb7d0d4fd51cef45dec886a3ab64a}{
\index{RouteManager@{RouteManager}!end@{end}}
\index{end@{end}!RouteManager@{RouteManager}}
\subsubsection[{end}]{\setlength{\rightskip}{0pt plus 5cm}void RouteManager::end (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classRouteManager_a430fb7d0d4fd51cef45dec886a3ab64a}


End \hyperlink{protocolthe-p}{the} route computation transaction. 

This must be called after all routes are recomputed in order for them to propagate to \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. \hypertarget{classRouteManager_a090bf0179240ff8ddaf4a213a916e660}{
\index{RouteManager@{RouteManager}!recompute\_\-all\_\-routes@{recompute\_\-all\_\-routes}}
\index{recompute\_\-all\_\-routes@{recompute\_\-all\_\-routes}!RouteManager@{RouteManager}}
\subsubsection[{recompute\_\-all\_\-routes}]{\setlength{\rightskip}{0pt plus 5cm}void RouteManager::recompute\_\-all\_\-routes (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classRouteManager_a090bf0179240ff8ddaf4a213a916e660}


Recompute \hyperlink{protocolthe-p}{the} OLSR domain portion of \hyperlink{protocolthe-p}{the} routing table. 

Until incremental computation is implemented, we perform \hyperlink{protocolthe-p}{the} SPT computation fully every time a recomputation is triggered. Producers of routes call us back to populate \hyperlink{protocolthe-p}{the} graph. \hypertarget{classRouteManager_ac729a95a502c9f1fc7b46da76f55949a}{
\index{RouteManager@{RouteManager}!replace\_\-entry@{replace\_\-entry}}
\index{replace\_\-entry@{replace\_\-entry}!RouteManager@{RouteManager}}
\subsubsection[{replace\_\-entry}]{\setlength{\rightskip}{0pt plus 5cm}bool RouteManager::replace\_\-entry (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4Net} \&}]{net, }
\item[{const {\bf RouteEntry} \&}]{rt, }
\item[{const {\bf RouteEntry} \&}]{previous\_\-rt}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classRouteManager_ac729a95a502c9f1fc7b46da76f55949a}


Internal method to: Replace a route entry in \hyperlink{protocolthe-p}{the} current internal trie. 


\begin{DoxyParams}{Parameters}
{\em net} & \hyperlink{protocolthe-p}{the} destination prefix. \\
\hline
{\em rt} & \hyperlink{protocolthe-p}{the} new route entry which replaces \\
\hline
{\em previous\_\-rt} & \\
\hline
{\em previous\_\-rt} & \hyperlink{protocolthe-p}{the} entry to replace. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} entry was replaced OK. 
\end{DoxyReturn}
\hypertarget{classRouteManager_a8edd70cb11a48891065c92a52dc78372}{
\index{RouteManager@{RouteManager}!replace\_\-route@{replace\_\-route}}
\index{replace\_\-route@{replace\_\-route}!RouteManager@{RouteManager}}
\subsubsection[{replace\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}bool RouteManager::replace\_\-route (
\begin{DoxyParamCaption}
\item[{{\bf IPv4Net}}]{net, }
\item[{{\bf IPv4}}]{nexthop, }
\item[{uint32\_\-t}]{metric, }
\item[{{\bf RouteEntry} \&}]{rt, }
\item[{{\bf RouteEntry} \&}]{previous\_\-rt}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classRouteManager_a8edd70cb11a48891065c92a52dc78372}


Backend method to: replace a route that has been sent to \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. 


\begin{DoxyParams}{Parameters}
{\em net} & \hyperlink{protocolthe-p}{the} destination prefix. \\
\hline
{\em nexthop} & \hyperlink{protocolthe-p}{the} new next-\/hop. \\
\hline
{\em metric} & \hyperlink{protocolthe-p}{the} new computed metric of \hyperlink{protocolthe-p}{the} route. \\
\hline
{\em rt} & \hyperlink{protocolthe-p}{the} route entry to add, containing all other fields. \\
\hline
{\em previous\_\-rt} & \hyperlink{protocolthe-p}{the} route entry to replace. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} route was replaced in \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} OK, otherwise false. 
\end{DoxyReturn}


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