\hypertarget{classRouteRedistributor}{
\section{RouteRedistributor$<$ A $>$ Class Template Reference}
\label{classRouteRedistributor}\index{RouteRedistributor@{RouteRedistributor}}
}


\hyperlink{classStore}{Store} for redistributed routes.  




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

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

\item 
\hypertarget{classRouteRedistributor_adf6c4143b3c1c6f22ec4211b261c9113}{
typedef \hyperlink{classIPNet}{IPNet}$<$ A $>$ {\bfseries Net}}
\label{classRouteRedistributor_adf6c4143b3c1c6f22ec4211b261c9113}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classRouteRedistributor_a24798b4ecde329a0406f20567ad02b14}{RouteRedistributor} (\hyperlink{classRouteDB}{RouteDB}$<$ A $>$ \&route\_\-db)
\begin{DoxyCompactList}\small\item\em Constructor for \hyperlink{classRouteRedistributor}{RouteRedistributor}. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRouteRedistributor_aa4e7e3c4b1ee0404fd07fb08cb8fdd26}{add\_\-route} (const \hyperlink{classIPNet}{Net} \&net, const Addr \&nexthop, const string \&ifname, const string \&vifname, uint16\_\-t cost, uint16\_\-t tag, const \hyperlink{classPolicyTags}{PolicyTags} \&policytags)
\begin{DoxyCompactList}\small\item\em Add a route to be redistributed with specific cost and tag values. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRouteRedistributor_ad71658927ebf881203e7da4698812963}{expire\_\-route} (const \hyperlink{classIPNet}{Net} \&net)
\begin{DoxyCompactList}\small\item\em Trigger route expiry. \item\end{DoxyCompactList}\item 
uint32\_\-t \hyperlink{classRouteRedistributor_af807e736ae4e6360dda8d9b94e6e37e1}{route\_\-count} () const 
\begin{DoxyCompactList}\small\item\em Accessor. \item\end{DoxyCompactList}\item 
void \hyperlink{classRouteRedistributor_a96cbc7c59e03fe055cb01e52cbb38d18}{withdraw\_\-routes} ()
\begin{DoxyCompactList}\small\item\em Withdraw routes. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRouteRedistributor_a8870ac40524482ab6a4a31835ea85714}{withdrawing\_\-routes} () const 
\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRouteRedistributor_a4f3c702ba5de7403628f02cbf64ed3f5}{
\hyperlink{classRouteDB}{RouteDB}$<$ A $>$ \& {\bfseries \_\-route\_\-db}}
\label{classRouteRedistributor_a4f3c702ba5de7403628f02cbf64ed3f5}

\item 
\hypertarget{classRouteRedistributor_a8c385dfcbf6ee7da57a12dd597efed20}{
\hyperlink{classRedistRouteOrigin}{RedistRouteOrigin}$<$ A $>$ $\ast$ {\bfseries \_\-rt\_\-origin}}
\label{classRouteRedistributor_a8c385dfcbf6ee7da57a12dd597efed20}

\item 
\hypertarget{classRouteRedistributor_aa5b3f77403a8eb6fa4414c6728579dff}{
\hyperlink{classRouteWalker}{RouteWalker}$<$ A $>$ $\ast$ {\bfseries \_\-wdrawer}}
\label{classRouteRedistributor_aa5b3f77403a8eb6fa4414c6728579dff}

\item 
\hypertarget{classRouteRedistributor_a5cedf5f402ac4153ffea9df9e41da110}{
\hyperlink{classXorpTimer}{XorpTimer} {\bfseries \_\-wtimer}}
\label{classRouteRedistributor_a5cedf5f402ac4153ffea9df9e41da110}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{classRouteRedistributor_a7476b64da2b3c2b633dcfa3c270638a9}{withdraw\_\-batch} ()
\begin{DoxyCompactList}\small\item\em Periodic timer callback for withdrawing a batch of routes. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


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

\hyperlink{classStore}{Store} for redistributed routes. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classRouteRedistributor_a24798b4ecde329a0406f20567ad02b14}{
\index{RouteRedistributor@{RouteRedistributor}!RouteRedistributor@{RouteRedistributor}}
\index{RouteRedistributor@{RouteRedistributor}!RouteRedistributor@{RouteRedistributor}}
\subsubsection[{RouteRedistributor}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ {\bf RouteRedistributor}$<$ A $>$::{\bf RouteRedistributor} (
\begin{DoxyParamCaption}
\item[{{\bf RouteDB}$<$ A $>$ \&}]{route\_\-db}
\end{DoxyParamCaption}
)}}
\label{classRouteRedistributor_a24798b4ecde329a0406f20567ad02b14}


Constructor for \hyperlink{classRouteRedistributor}{RouteRedistributor}. 


\begin{DoxyParams}{Parameters}
{\em route\_\-db} & \hyperlink{protocolthe-p}{the} route database to add and expire routes in. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classRouteRedistributor_aa4e7e3c4b1ee0404fd07fb08cb8fdd26}{
\index{RouteRedistributor@{RouteRedistributor}!add\_\-route@{add\_\-route}}
\index{add\_\-route@{add\_\-route}!RouteRedistributor@{RouteRedistributor}}
\subsubsection[{add\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ bool {\bf RouteRedistributor}$<$ A $>$::add\_\-route (
\begin{DoxyParamCaption}
\item[{const {\bf Net} \&}]{net, }
\item[{const Addr \&}]{nexthop, }
\item[{const string \&}]{ifname, }
\item[{const string \&}]{vifname, }
\item[{uint16\_\-t}]{cost, }
\item[{uint16\_\-t}]{tag, }
\item[{const {\bf PolicyTags} \&}]{policytags}
\end{DoxyParamCaption}
)}}
\label{classRouteRedistributor_aa4e7e3c4b1ee0404fd07fb08cb8fdd26}


Add a route to be redistributed with specific cost and tag values. 


\begin{DoxyParams}{Parameters}
{\em net} & network described by route. \\
\hline
{\em nexthop} & router capable of forwarding route. \\
\hline
{\em ifname} & \hyperlink{protocolthe-p}{the} corresponding interface name toward \hyperlink{protocolthe-p}{the} destination. \\
\hline
{\em vifname} & \hyperlink{protocolthe-p}{the} corresponding vif name toward \hyperlink{protocolthe-p}{the} destination. \\
\hline
{\em policytags} & policy-\/tags associated with route.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success, false if route could not be added to \hyperlink{protocolthe-p}{the} RouteDatabase. Failure may occur if route already exists or a lower cost route exists. 
\end{DoxyReturn}
\hypertarget{classRouteRedistributor_ad71658927ebf881203e7da4698812963}{
\index{RouteRedistributor@{RouteRedistributor}!expire\_\-route@{expire\_\-route}}
\index{expire\_\-route@{expire\_\-route}!RouteRedistributor@{RouteRedistributor}}
\subsubsection[{expire\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ bool {\bf RouteRedistributor}$<$ A $>$::expire\_\-route (
\begin{DoxyParamCaption}
\item[{const {\bf Net} \&}]{net}
\end{DoxyParamCaption}
)}}
\label{classRouteRedistributor_ad71658927ebf881203e7da4698812963}


Trigger route expiry. 


\begin{DoxyParams}{Parameters}
{\em network} & described by route.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success, false if route did not come from this \hyperlink{classRouteRedistributor}{RouteRedistributor} instance. 
\end{DoxyReturn}
\hypertarget{classRouteRedistributor_af807e736ae4e6360dda8d9b94e6e37e1}{
\index{RouteRedistributor@{RouteRedistributor}!route\_\-count@{route\_\-count}}
\index{route\_\-count@{route\_\-count}!RouteRedistributor@{RouteRedistributor}}
\subsubsection[{route\_\-count}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ uint32\_\-t {\bf RouteRedistributor}$<$ A $>$::route\_\-count (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classRouteRedistributor_af807e736ae4e6360dda8d9b94e6e37e1}


Accessor. 

\begin{DoxyReturn}{Returns}
number of routes 
\end{DoxyReturn}
\hypertarget{classRouteRedistributor_a7476b64da2b3c2b633dcfa3c270638a9}{
\index{RouteRedistributor@{RouteRedistributor}!withdraw\_\-batch@{withdraw\_\-batch}}
\index{withdraw\_\-batch@{withdraw\_\-batch}!RouteRedistributor@{RouteRedistributor}}
\subsubsection[{withdraw\_\-batch}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ bool {\bf RouteRedistributor}$<$ A $>$::withdraw\_\-batch (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classRouteRedistributor_a7476b64da2b3c2b633dcfa3c270638a9}


Periodic timer callback for withdrawing a batch of routes. 

The timer is triggered by \hyperlink{classRouteRedistributor_a96cbc7c59e03fe055cb01e52cbb38d18}{withdraw\_\-routes()}. \hypertarget{classRouteRedistributor_a96cbc7c59e03fe055cb01e52cbb38d18}{
\index{RouteRedistributor@{RouteRedistributor}!withdraw\_\-routes@{withdraw\_\-routes}}
\index{withdraw\_\-routes@{withdraw\_\-routes}!RouteRedistributor@{RouteRedistributor}}
\subsubsection[{withdraw\_\-routes}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ void {\bf RouteRedistributor}$<$ A $>$::withdraw\_\-routes (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classRouteRedistributor_a96cbc7c59e03fe055cb01e52cbb38d18}


Withdraw routes. 

Triggers a walking of associated routes and their expiration from \hyperlink{protocolthe-p}{the} RIP route database. \hypertarget{classRouteRedistributor_a8870ac40524482ab6a4a31835ea85714}{
\index{RouteRedistributor@{RouteRedistributor}!withdrawing\_\-routes@{withdrawing\_\-routes}}
\index{withdrawing\_\-routes@{withdrawing\_\-routes}!RouteRedistributor@{RouteRedistributor}}
\subsubsection[{withdrawing\_\-routes}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ bool {\bf RouteRedistributor}$<$ A $>$::withdrawing\_\-routes (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classRouteRedistributor_a8870ac40524482ab6a4a31835ea85714}
\begin{DoxyReturn}{Returns}
true if actively withdrawing routes, false otherwise. 
\end{DoxyReturn}


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