\hypertarget{classRedistTable}{
\section{RedistTable$<$ A $>$ Class Template Reference}
\label{classRedistTable}\index{RedistTable@{RedistTable}}
}


\hyperlink{classRouteTable}{RouteTable} used to redistribute routes.  




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

Inheritance diagram for RedistTable$<$ A $>$:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classRedistTable}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRedistTable_aa36a8e6fecb921bceb1f8ef4be605162}{
typedef set$<$ \hyperlink{classIPNet}{IPNet}$<$ A $>$, \hyperlink{structRedistNetCmp}{RedistNetCmp}$<$ A $>$ $>$ {\bfseries RouteIndex}}
\label{classRedistTable_aa36a8e6fecb921bceb1f8ef4be605162}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classRedistTable_ab7eea13642a4ffad658a7b297b9f35ec}{RedistTable} (const string \&tablename, \hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$from\_\-table)
\begin{DoxyCompactList}\small\item\em Constructor. \item\end{DoxyCompactList}\item 
\hyperlink{classRedistTable_a842fb7fbc5d6e523826b0278a4ff6ba2}{$\sim$RedistTable} ()
\begin{DoxyCompactList}\small\item\em Destructor. \item\end{DoxyCompactList}\item 
\hypertarget{classRedistTable_afc78d314b26b969057090fc9e1899756}{
void \hyperlink{classRedistTable_afc78d314b26b969057090fc9e1899756}{add\_\-redistributor} (\hyperlink{classRedistributor}{Redistributor}$<$ A $>$ $\ast$r)}
\label{classRedistTable_afc78d314b26b969057090fc9e1899756}

\begin{DoxyCompactList}\small\item\em Add a redistributor to announce existing routes and future updates to. \item\end{DoxyCompactList}\item 
\hypertarget{classRedistTable_aaa3e7d3a3bc976c9cb2112c6e7c47629}{
void \hyperlink{classRedistTable_aaa3e7d3a3bc976c9cb2112c6e7c47629}{remove\_\-redistributor} (\hyperlink{classRedistributor}{Redistributor}$<$ A $>$ $\ast$r)}
\label{classRedistTable_aaa3e7d3a3bc976c9cb2112c6e7c47629}

\begin{DoxyCompactList}\small\item\em Remove a redistributor. \item\end{DoxyCompactList}\item 
\hypertarget{classRedistTable_abbc74540c59d85bdb72fa9541f3f49cd}{
\hyperlink{classRedistributor}{Redistributor}$<$ A $>$ $\ast$ \hyperlink{classRedistTable_abbc74540c59d85bdb72fa9541f3f49cd}{redistributor} (const string \&name)}
\label{classRedistTable_abbc74540c59d85bdb72fa9541f3f49cd}

\begin{DoxyCompactList}\small\item\em Find redistributor with given name attribute. \item\end{DoxyCompactList}\item 
\hypertarget{classRedistTable_a0acb4a625d93ec0d8bbb17aae5a75344}{
int {\bfseries add\_\-route} (const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ \&route, \hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$caller)}
\label{classRedistTable_a0acb4a625d93ec0d8bbb17aae5a75344}

\item 
\hypertarget{classRedistTable_a2390739b243002ae25668de713c833ff}{
int {\bfseries delete\_\-route} (const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ $\ast$route, \hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$caller)}
\label{classRedistTable_a2390739b243002ae25668de713c833ff}

\item 
\hypertarget{classRedistTable_ad2af1fac601c8ea868d5b63b00539ca0}{
const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ $\ast$ {\bfseries lookup\_\-route} (const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&net) const }
\label{classRedistTable_ad2af1fac601c8ea868d5b63b00539ca0}

\item 
\hypertarget{classRedistTable_af4c22e41beaed06deeecd33c3e055a83}{
const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ $\ast$ {\bfseries lookup\_\-route} (const A \&addr) const }
\label{classRedistTable_af4c22e41beaed06deeecd33c3e055a83}

\item 
\hypertarget{classRedistTable_ae65b3494b3c97e7046923a85b4c231cf}{
\hyperlink{classRouteRange}{RouteRange}$<$ A $>$ $\ast$ {\bfseries lookup\_\-route\_\-range} (const A \&addr) const }
\label{classRedistTable_ae65b3494b3c97e7046923a85b4c231cf}

\item 
\hypertarget{classRedistTable_ac2e0c9f50bab6470889e0942751ae54e}{
TableType {\bfseries type} () const }
\label{classRedistTable_ac2e0c9f50bab6470889e0942751ae54e}

\item 
\hypertarget{classRedistTable_a03bea43226fec039a565f38cc25e86ef}{
\hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$ {\bfseries parent} ()}
\label{classRedistTable_a03bea43226fec039a565f38cc25e86ef}

\item 
\hypertarget{classRedistTable_a1bc6169294157a79523611f749792e7b}{
void {\bfseries replumb} (\hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$old\_\-parent, \hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$new\_\-parent)}
\label{classRedistTable_a1bc6169294157a79523611f749792e7b}

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

\item 
\hypertarget{classRedistTable_a82f5b64ccf11ee4c90b8f37d29f8bcf4}{
const RouteIndex \& \hyperlink{classRedistTable_a82f5b64ccf11ee4c90b8f37d29f8bcf4}{route\_\-index} () const }
\label{classRedistTable_a82f5b64ccf11ee4c90b8f37d29f8bcf4}

\begin{DoxyCompactList}\small\item\em Get nets of live routes seen by \hyperlink{classRedistTable}{RedistTable} since it was instantiated. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRedistTable_a2412624b1c476de6af58ab1e6ba5f887}{
\hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$ {\bfseries \_\-parent}}
\label{classRedistTable_a2412624b1c476de6af58ab1e6ba5f887}

\item 
\hypertarget{classRedistTable_ab341ea53e28cda0b38789ad88c2a6910}{
RouteIndex {\bfseries \_\-rt\_\-index}}
\label{classRedistTable_ab341ea53e28cda0b38789ad88c2a6910}

\item 
\hypertarget{classRedistTable_a3dccc2aa1288ccd6f1800f04f5a7d5af}{
list$<$ \hyperlink{classRedistributor}{Redistributor}$<$ A $>$ $\ast$ $>$ {\bfseries \_\-outputs}}
\label{classRedistTable_a3dccc2aa1288ccd6f1800f04f5a7d5af}

\end{DoxyCompactItemize}


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

\hyperlink{classRouteTable}{RouteTable} used to redistribute routes. The \hyperlink{classRedistTable}{RedistTable} is used to redistribute routes from a routing table back out to a routing protocol. For example, when you want to redistribute BGP routes into OSPF.

For most operations \hyperlink{protocolthe-p}{the} \hyperlink{classRedistTable}{RedistTable} is essentially a passthrough. It keeps track of nets it hears add and deletes for so when route \hyperlink{classRedistributor}{Redistributor} objects are added to \hyperlink{protocolthe-p}{the} \hyperlink{classRedistTable}{RedistTable} they can announce \hyperlink{protocolthe-p}{the} existing routes at startup.

Design note: \hyperlink{classRedistTable}{RedistTable} uses a set of IPNet's to cache routes -\/ this should be route entry pointers with an appropriate comparitor (not pointer value based). 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classRedistTable_ab7eea13642a4ffad658a7b297b9f35ec}{
\index{RedistTable@{RedistTable}!RedistTable@{RedistTable}}
\index{RedistTable@{RedistTable}!RedistTable@{RedistTable}}
\subsubsection[{RedistTable}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ {\bf RedistTable}$<$ A $>$::{\bf RedistTable} (
\begin{DoxyParamCaption}
\item[{const string \&}]{tablename, }
\item[{{\bf RouteTable}$<$ A $>$ $\ast$}]{from\_\-table}
\end{DoxyParamCaption}
)}}
\label{classRedistTable_ab7eea13642a4ffad658a7b297b9f35ec}


Constructor. 

Plumbs \hyperlink{classRedistTable}{RedistTable} in \hyperlink{classRIB}{RIB} graph after from\_\-table.


\begin{DoxyParams}{Parameters}
{\em from\_\-table} & table to redistribute routes from. \\
\hline
\end{DoxyParams}
\hypertarget{classRedistTable_a842fb7fbc5d6e523826b0278a4ff6ba2}{
\index{RedistTable@{RedistTable}!$\sim$RedistTable@{$\sim$RedistTable}}
\index{$\sim$RedistTable@{$\sim$RedistTable}!RedistTable@{RedistTable}}
\subsubsection[{$\sim$RedistTable}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ {\bf RedistTable}$<$ A $>$::$\sim${\bf RedistTable} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classRedistTable_a842fb7fbc5d6e523826b0278a4ff6ba2}


Destructor. 

Unplumbs table and deletes \hyperlink{classRedistributor}{Redistributor} object instances previously added with add\_\-redistributor and not previously removed with remove\_\-redistributor. 

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}
