\hypertarget{classRedistributor}{
\section{Redistributor$<$ A $>$ Class Template Reference}
\label{classRedistributor}\index{Redistributor@{Redistributor}}
}


Controller class that takes routes from \hyperlink{classRedistTable}{RedistTable} and passes them on via \hyperlink{classRedistOutput}{RedistOutput}.  




{\ttfamily \#include $<$rt\_\-tab\_\-redist.hh$>$}

Inheritance diagram for Redistributor$<$ A $>$:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classRedistributor}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classRedistributor_1_1OutputEventInterface}{OutputEventInterface}
\item 
class \hyperlink{classRedistributor_1_1RedistEventInterface}{RedistEventInterface}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRedistributor_adcd06b16117ddce9c2568edcec900a51}{
{\bfseries Redistributor} (\hyperlink{classEventLoop}{EventLoop} \&e, const string \&name)}
\label{classRedistributor_adcd06b16117ddce9c2568edcec900a51}

\item 
\hypertarget{classRedistributor_a57458a1a53a1668a44a3667f65ff93ff}{
const string \& {\bfseries name} () const }
\label{classRedistributor_a57458a1a53a1668a44a3667f65ff93ff}

\item 
\hypertarget{classRedistributor_adba727c8c09c4110f2889712f2f283d8}{
void {\bfseries set\_\-redist\_\-table} (\hyperlink{classRedistTable}{RedistTable}$<$ A $>$ $\ast$rt)}
\label{classRedistributor_adba727c8c09c4110f2889712f2f283d8}

\item 
void \hyperlink{classRedistributor_a15463a010bc246febe6f1e2d0553b3ec}{set\_\-output} (\hyperlink{classRedistOutput}{RedistOutput}$<$ A $>$ $\ast$output)
\begin{DoxyCompactList}\small\item\em Bind \hyperlink{classRedistOutput}{RedistOutput} to \hyperlink{classRedistributor}{Redistributor} instance. \item\end{DoxyCompactList}\item 
void \hyperlink{classRedistributor_aa0238a57a37c52a8bfd18001be5d253d}{set\_\-policy} (\hyperlink{classRedistPolicy}{RedistPolicy}$<$ A $>$ $\ast$policy)
\begin{DoxyCompactList}\small\item\em Bind policy object to \hyperlink{classRedistributor}{Redistributor} instance. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRedistributor_a11c75871ab826a8242e1455a4c3e7cbc}{policy\_\-accepts} (const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ \&ipr) const 
\begin{DoxyCompactList}\small\item\em Determine if policy accepts updates to route. \item\end{DoxyCompactList}\item 
\hypertarget{classRedistributor_a46cae2713fc74519ad40a6ee2d4c1d42}{
\hyperlink{classRedistributor_1_1RedistEventInterface}{RedistEventInterface} \& \hyperlink{classRedistributor_a46cae2713fc74519ad40a6ee2d4c1d42}{redist\_\-event} ()}
\label{classRedistributor_a46cae2713fc74519ad40a6ee2d4c1d42}

\begin{DoxyCompactList}\small\item\em Method available to instances of \hyperlink{classRedistTable}{RedistTable} to announce events to \hyperlink{protocolthe-p}{the} \hyperlink{classRedistributor}{Redistributor} instance. \item\end{DoxyCompactList}\item 
\hypertarget{classRedistributor_aa7a7b41f5832cf403dd8eba54a22289b}{
\hyperlink{classRedistributor_1_1OutputEventInterface}{OutputEventInterface} \& \hyperlink{classRedistributor_aa7a7b41f5832cf403dd8eba54a22289b}{output\_\-event} ()}
\label{classRedistributor_aa7a7b41f5832cf403dd8eba54a22289b}

\begin{DoxyCompactList}\small\item\em Method available to instances of \hyperlink{classRedistOutput}{RedistOutput} to announce transport events to \hyperlink{protocolthe-p}{the} \hyperlink{classRedistributor}{Redistributor} instance. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRedistributor_a8bdc32202f996e7621cea5c3e3aebd46}{dumping} () const 
\begin{DoxyCompactList}\small\item\em Indicate dump status. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRedistributor_a6fc4cd1f89c004be6fa0eb9a4cd5cfaf}{
void \hyperlink{classRedistributor_a6fc4cd1f89c004be6fa0eb9a4cd5cfaf}{start\_\-dump} ()}
\label{classRedistributor_a6fc4cd1f89c004be6fa0eb9a4cd5cfaf}

\begin{DoxyCompactList}\small\item\em Start initial route dump when a \hyperlink{classRedistTable}{RedistTable} is associated with instance through set\_\-redist\_\-table(). \item\end{DoxyCompactList}\item 
\hypertarget{classRedistributor_a96f8810fa678d6500aeb93a92ade1ea2}{
void {\bfseries finish\_\-dump} ()}
\label{classRedistributor_a96f8810fa678d6500aeb93a92ade1ea2}

\item 
\hypertarget{classRedistributor_abe7781bfc546d1dd18f64ff43b37c4a7}{
void {\bfseries schedule\_\-dump\_\-timer} ()}
\label{classRedistributor_abe7781bfc546d1dd18f64ff43b37c4a7}

\item 
\hypertarget{classRedistributor_abaa79165a0806e2421fed1008483c9dc}{
void {\bfseries unschedule\_\-dump\_\-timer} ()}
\label{classRedistributor_abaa79165a0806e2421fed1008483c9dc}

\item 
\hypertarget{classRedistributor_a04447f7def86df99a425f93ff3acbece}{
void {\bfseries dump\_\-a\_\-route} ()}
\label{classRedistributor_a04447f7def86df99a425f93ff3acbece}

\item 
\hypertarget{classRedistributor_a899e64a1da26569f00b6ae84fc8b1b19}{
const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \& {\bfseries last\_\-dumped\_\-net} () const }
\label{classRedistributor_a899e64a1da26569f00b6ae84fc8b1b19}

\item 
\hypertarget{classRedistributor_a53e3a841b4ed3edc837a680f5aa6c6f0}{
\hyperlink{classRedistTable}{RedistTable}$<$ A $>$ $\ast$ {\bfseries redist\_\-table} ()}
\label{classRedistributor_a53e3a841b4ed3edc837a680f5aa6c6f0}

\item 
\hypertarget{classRedistributor_a72f11a829d58b9058e8e9d418d79f200}{
\hyperlink{classRedistOutput}{RedistOutput}$<$ A $>$ $\ast$ {\bfseries output} ()}
\label{classRedistributor_a72f11a829d58b9058e8e9d418d79f200}

\item 
\hypertarget{classRedistributor_a9afbed9559a920da95a8b837ac94c5be}{
{\footnotesize template$<$$>$ }\\const \hyperlink{classIPNet}{IPv4Net} {\bfseries NO\_\-LAST\_\-NET} (IPv4::ALL\_\-ONES(), \hyperlink{classIPv4_a2fcc7149b453424399d1420a0c420a35}{IPv4::ADDR\_\-BITLEN})}
\label{classRedistributor_a9afbed9559a920da95a8b837ac94c5be}

\item 
\hypertarget{classRedistributor_aa29a64b50dbedb2572014ad36b84171b}{
{\footnotesize template$<$$>$ }\\const \hyperlink{classIPNet}{IPv6Net} {\bfseries NO\_\-LAST\_\-NET} (IPv6::ALL\_\-ONES(), \hyperlink{classIPv6_a28004f624b310256c177bd003aa60285}{IPv6::ADDR\_\-BITLEN})}
\label{classRedistributor_aa29a64b50dbedb2572014ad36b84171b}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRedistributor_a0bc975137eda7d20d258a2c0ace635a2}{
\hyperlink{classEventLoop}{EventLoop} \& {\bfseries \_\-e}}
\label{classRedistributor_a0bc975137eda7d20d258a2c0ace635a2}

\item 
\hypertarget{classRedistributor_a390e8f53b40e5e02862500041da0eb85}{
string {\bfseries \_\-name}}
\label{classRedistributor_a390e8f53b40e5e02862500041da0eb85}

\item 
\hypertarget{classRedistributor_ac08621c4523e90db8d4d8f94dfb2262a}{
\hyperlink{classRedistTable}{RedistTable}$<$ A $>$ $\ast$ {\bfseries \_\-table}}
\label{classRedistributor_ac08621c4523e90db8d4d8f94dfb2262a}

\item 
\hypertarget{classRedistributor_a12c52eaa81e7a2544020b32a3349893e}{
\hyperlink{classRedistOutput}{RedistOutput}$<$ A $>$ $\ast$ {\bfseries \_\-output}}
\label{classRedistributor_a12c52eaa81e7a2544020b32a3349893e}

\item 
\hypertarget{classRedistributor_af642dedb7247b76e981368ce84628b7e}{
\hyperlink{classRedistPolicy}{RedistPolicy}$<$ A $>$ $\ast$ {\bfseries \_\-policy}}
\label{classRedistributor_af642dedb7247b76e981368ce84628b7e}

\item 
\hypertarget{classRedistributor_ad5ce83162c982904c8487f8609c013e5}{
\hyperlink{classRedistributor_1_1RedistEventInterface}{RedistEventInterface} {\bfseries \_\-rei}}
\label{classRedistributor_ad5ce83162c982904c8487f8609c013e5}

\item 
\hypertarget{classRedistributor_ad22d5795db15f082377cf1d5b6e22cc2}{
\hyperlink{classRedistributor_1_1OutputEventInterface}{OutputEventInterface} {\bfseries \_\-oei}}
\label{classRedistributor_ad22d5795db15f082377cf1d5b6e22cc2}

\item 
\hypertarget{classRedistributor_a1e257ff2364015e4426617549062070b}{
bool {\bfseries \_\-dumping}}
\label{classRedistributor_a1e257ff2364015e4426617549062070b}

\item 
\hypertarget{classRedistributor_a4ecf034b93247715a6ee6d4eb0f46661}{
bool {\bfseries \_\-blocked}}
\label{classRedistributor_a4ecf034b93247715a6ee6d4eb0f46661}

\item 
\hypertarget{classRedistributor_a250855b270bfaeda4c3800bb8aaefa4b}{
\hyperlink{classIPNet}{IPNet}$<$ A $>$ {\bfseries \_\-last\_\-net}}
\label{classRedistributor_a250855b270bfaeda4c3800bb8aaefa4b}

\item 
\hypertarget{classRedistributor_a37c91dd70d18d85a24a599669ee56316}{
\hyperlink{classXorpTimer}{XorpTimer} {\bfseries \_\-dtimer}}
\label{classRedistributor_a37c91dd70d18d85a24a599669ee56316}

\end{DoxyCompactItemize}
\subsection*{Static Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRedistributor_a3969eb0148ec865e39f52f7a7a74b449}{
static const \hyperlink{classIPNet}{IPNet}$<$ A $>$ {\bfseries NO\_\-LAST\_\-NET}}
\label{classRedistributor_a3969eb0148ec865e39f52f7a7a74b449}

\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRedistributor_ac2c57f60d170bf1764b71b08caa7cac1}{
class {\bfseries RedistEventInterface}}
\label{classRedistributor_ac2c57f60d170bf1764b71b08caa7cac1}

\item 
\hypertarget{classRedistributor_ab890090efe6b40c1bd96a643f79d96d4}{
class {\bfseries OutputEventInterface}}
\label{classRedistributor_ab890090efe6b40c1bd96a643f79d96d4}

\end{DoxyCompactItemize}


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

Controller class that takes routes from \hyperlink{classRedistTable}{RedistTable} and passes them on via \hyperlink{classRedistOutput}{RedistOutput}. Instances of this class are constructed when one routing protocol requests route distribution from another. Instances walk \hyperlink{protocolthe-p}{the} routes available in \hyperlink{protocolthe-p}{the} \hyperlink{classRedistTable}{RedistTable} route index, resolve them, and announce them via \hyperlink{protocolthe-p}{the} \hyperlink{classRedistOutput}{RedistOutput}. Future updates received from \hyperlink{protocolthe-p}{the} \hyperlink{classRedistTable}{RedistTable} are propagated via \hyperlink{protocolthe-p}{the} \hyperlink{classRedistributor}{Redistributor} instances associated with it. 

\subsection{Member Function Documentation}
\hypertarget{classRedistributor_a8bdc32202f996e7621cea5c3e3aebd46}{
\index{Redistributor@{Redistributor}!dumping@{dumping}}
\index{dumping@{dumping}!Redistributor@{Redistributor}}
\subsubsection[{dumping}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ bool {\bf Redistributor}$<$ A $>$::dumping (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRedistributor_a8bdc32202f996e7621cea5c3e3aebd46}


Indicate dump status. 

When \hyperlink{classRedistributor}{Redistributor} is first connected it dumps existing routes to it's \hyperlink{classRedistOutput}{RedistOutput}.

\begin{DoxyReturn}{Returns}
true if route dump is in process, false if route dump is either not started or finished. 
\end{DoxyReturn}
\hypertarget{classRedistributor_a11c75871ab826a8242e1455a4c3e7cbc}{
\index{Redistributor@{Redistributor}!policy\_\-accepts@{policy\_\-accepts}}
\index{policy\_\-accepts@{policy\_\-accepts}!Redistributor@{Redistributor}}
\subsubsection[{policy\_\-accepts}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ bool {\bf Redistributor}$<$ A $>$::policy\_\-accepts (
\begin{DoxyParamCaption}
\item[{const {\bf IPRouteEntry}$<$ A $>$ \&}]{ipr}
\end{DoxyParamCaption}
) const}}
\label{classRedistributor_a11c75871ab826a8242e1455a4c3e7cbc}


Determine if policy accepts updates to route. 

\begin{DoxyReturn}{Returns}
true if associated property accepts update to route or if no policy is enforced, false otherwise. 
\end{DoxyReturn}
\hypertarget{classRedistributor_a15463a010bc246febe6f1e2d0553b3ec}{
\index{Redistributor@{Redistributor}!set\_\-output@{set\_\-output}}
\index{set\_\-output@{set\_\-output}!Redistributor@{Redistributor}}
\subsubsection[{set\_\-output}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ void {\bf Redistributor}$<$ A $>$::set\_\-output (
\begin{DoxyParamCaption}
\item[{{\bf RedistOutput}$<$ A $>$ $\ast$}]{output}
\end{DoxyParamCaption}
)}}
\label{classRedistributor_a15463a010bc246febe6f1e2d0553b3ec}


Bind \hyperlink{classRedistOutput}{RedistOutput} to \hyperlink{classRedistributor}{Redistributor} instance. 

The output should be dynamically allocated with new. When a new redistributor output is set, \hyperlink{protocolthe-p}{the} existing output is removed via delete. The \hyperlink{classRedistOutput}{RedistOutput} is deleted by \hyperlink{protocolthe-p}{the} \hyperlink{classRedistributor}{Redistributor} when \hyperlink{protocolthe-p}{the} \hyperlink{classRedistributor}{Redistributor} is destructed. \hypertarget{classRedistributor_aa0238a57a37c52a8bfd18001be5d253d}{
\index{Redistributor@{Redistributor}!set\_\-policy@{set\_\-policy}}
\index{set\_\-policy@{set\_\-policy}!Redistributor@{Redistributor}}
\subsubsection[{set\_\-policy}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ void {\bf Redistributor}$<$ A $>$::set\_\-policy (
\begin{DoxyParamCaption}
\item[{{\bf RedistPolicy}$<$ A $>$ $\ast$}]{policy}
\end{DoxyParamCaption}
)}}
\label{classRedistributor_aa0238a57a37c52a8bfd18001be5d253d}


Bind policy object to \hyperlink{classRedistributor}{Redistributor} instance. 

The policy should be dynamically allocated with new. When a new policy is set, \hyperlink{protocolthe-p}{the} existing policy is removed via delete. The policy is deleted by \hyperlink{protocolthe-p}{the} \hyperlink{classRedistributor}{Redistributor} when \hyperlink{protocolthe-p}{the} \hyperlink{classRedistributor}{Redistributor} is destructed. 

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