\hypertarget{classRouteRegister}{
\section{RouteRegister$<$ A $>$ Class Template Reference}
\label{classRouteRegister}\index{RouteRegister@{RouteRegister}}
}


\hyperlink{classRouteRegister}{RouteRegister} stores a registration of interest in a subset of a route.  




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

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classRouteRegister_ac8bca4e32d53d3660e142d7533ae5498}{RouteRegister} (const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&valid\_\-subnet, const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ $\ast$route, const \hyperlink{classModuleData}{ModuleData} \&module)
\begin{DoxyCompactList}\small\item\em \hyperlink{classRouteRegister}{RouteRegister} Constructor. \item\end{DoxyCompactList}\item 
\hypertarget{classRouteRegister_a67e8cca6d1953de3b9419966c2e920fc}{
\hyperlink{classRouteRegister_a67e8cca6d1953de3b9419966c2e920fc}{$\sim$RouteRegister} ()}
\label{classRouteRegister_a67e8cca6d1953de3b9419966c2e920fc}

\begin{DoxyCompactList}\small\item\em Destructor. \item\end{DoxyCompactList}\item 
int \hyperlink{classRouteRegister_add6b00c78806176c70dc8f351228d77e}{add\_\-registrant} (const \hyperlink{classModuleData}{ModuleData} \&module)
\begin{DoxyCompactList}\small\item\em add\_\-registrant is called when an additional routing protocol expresses interest in \hyperlink{protocolthe-p}{the} routing information already held by this \hyperlink{classRouteRegister}{RouteRegister} instance. \item\end{DoxyCompactList}\item 
int \hyperlink{classRouteRegister_ab2f8368a0a3497e70261a9164b194e5b}{delete\_\-registrant} (const \hyperlink{classModuleData}{ModuleData} \&module)
\begin{DoxyCompactList}\small\item\em delete\_\-registrant is called when a routing protocol that was previously interested in this \hyperlink{classRouteRegister}{RouteRegister} de-\/registers itself. \item\end{DoxyCompactList}\item 
void \hyperlink{classRouteRegister_a11ddb66062b56ace742a6fbde31a0dca}{mark\_\-modules} () const 
\begin{DoxyCompactList}\small\item\em mark\_\-modules is called when \hyperlink{protocolthe-p}{the} routing information matching this registration changes. \item\end{DoxyCompactList}\item 
int \hyperlink{classRouteRegister_a177d96e22c59b4225a35c86e01647326}{size} () const 
\item 
const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \& \hyperlink{classRouteRegister_a242e5e7ae143989430d9fabf1b32e94d}{valid\_\-subnet} () const 
\item 
const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ $\ast$ \hyperlink{classRouteRegister_a0d38a3a98af6ab43be95ddeadeb4800e}{route} () const 
\item 
list$<$ string $>$ \hyperlink{classRouteRegister_a1b747c9ccf475f47e056f46654a39298}{module\_\-names} () const 
\item 
string \hyperlink{classRouteRegister_a07b3f91327e2f3f6189b09a243fb0f25}{str} () const 
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRouteRegister_a49415964db5f715501d5ff26c57cf7fc}{
map$<$ string, \hyperlink{classModuleData}{ModuleData} $>$ {\bfseries \_\-modules}}
\label{classRouteRegister_a49415964db5f715501d5ff26c57cf7fc}

\item 
\hypertarget{classRouteRegister_a2fdcbb737254797bef301288f9f94f39}{
\hyperlink{classIPNet}{IPNet}$<$ A $>$ {\bfseries \_\-valid\_\-subnet}}
\label{classRouteRegister_a2fdcbb737254797bef301288f9f94f39}

\item 
\hypertarget{classRouteRegister_a55cc647be7627163d7d020bd1bace17f}{
const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ $\ast$ {\bfseries \_\-route}}
\label{classRouteRegister_a55cc647be7627163d7d020bd1bace17f}

\end{DoxyCompactItemize}


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

\hyperlink{classRouteRegister}{RouteRegister} stores a registration of interest in a subset of a route. A \hyperlink{classRouteRegister}{RouteRegister} instance is used to store \hyperlink{protocolthe-p}{the} registration of interest in a route. Suppose there are two overlapping routes: 1.0.0.0/16 and 1.0.1.0/24. Now a routing protocol \char`\"{}bgp\char`\"{} expresses interest in route changes that affect 1.0.0.27, which is routed using 1.0.0.0/16. The relevant \hyperlink{classRouteRegister}{RouteRegister} would then hold: route: route entry for 1.0.0.0/16 valid\_\-subnet: 1.0.0.0/24 moduledata: \{\char`\"{}bgp\char`\"{}\} The valid\_\-subnet is 1.0.0.0/24 because this is \hyperlink{protocolthe-p}{the} largest subset of 1.0.0.0/16 that encompasses 1.0.0.27 and doesn't overlap any other route.

If a subsequent request from routing protocol \char`\"{}pim\char`\"{} were to come along for 1.0.0.54, then this would be stored on \hyperlink{protocolthe-p}{the} same \hyperlink{classRouteRegister}{RouteRegister} instance, but \hyperlink{protocolthe-p}{the} \hyperlink{classModuleData}{ModuleData} would be expanded to include \char`\"{}pim\char`\"{}. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classRouteRegister_ac8bca4e32d53d3660e142d7533ae5498}{
\index{RouteRegister@{RouteRegister}!RouteRegister@{RouteRegister}}
\index{RouteRegister@{RouteRegister}!RouteRegister@{RouteRegister}}
\subsubsection[{RouteRegister}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ {\bf RouteRegister}$<$ A $>$::{\bf RouteRegister} (
\begin{DoxyParamCaption}
\item[{const {\bf IPNet}$<$ A $>$ \&}]{valid\_\-subnet, }
\item[{const {\bf IPRouteEntry}$<$ A $>$ $\ast$}]{route, }
\item[{const {\bf ModuleData} \&}]{module}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRouteRegister_ac8bca4e32d53d3660e142d7533ae5498}


\hyperlink{classRouteRegister}{RouteRegister} Constructor. 


\begin{DoxyParams}{Parameters}
{\em net} & \hyperlink{protocolthe-p}{the} subset of \hyperlink{protocolthe-p}{the} route for which this registration is valid. \\
\hline
{\em route} & \hyperlink{protocolthe-p}{the} route in which interest was registered. \\
\hline
{\em module} & \hyperlink{protocolthe-p}{the} \hyperlink{classModuleData}{ModuleData} instance refering to \hyperlink{protocolthe-p}{the} routing protocol that registered interest. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classRouteRegister_add6b00c78806176c70dc8f351228d77e}{
\index{RouteRegister@{RouteRegister}!add\_\-registrant@{add\_\-registrant}}
\index{add\_\-registrant@{add\_\-registrant}!RouteRegister@{RouteRegister}}
\subsubsection[{add\_\-registrant}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ int {\bf RouteRegister}$<$ A $>$::add\_\-registrant (
\begin{DoxyParamCaption}
\item[{const {\bf ModuleData} \&}]{module}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRouteRegister_add6b00c78806176c70dc8f351228d77e}


add\_\-registrant is called when an additional routing protocol expresses interest in \hyperlink{protocolthe-p}{the} routing information already held by this \hyperlink{classRouteRegister}{RouteRegister} instance. 


\begin{DoxyParams}{Parameters}
{\em module} & \hyperlink{protocolthe-p}{the} \hyperlink{classModuleData}{ModuleData} instance refering to \hyperlink{protocolthe-p}{the} additional routing protocol that just registered interest. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRouteRegister_ab2f8368a0a3497e70261a9164b194e5b}{
\index{RouteRegister@{RouteRegister}!delete\_\-registrant@{delete\_\-registrant}}
\index{delete\_\-registrant@{delete\_\-registrant}!RouteRegister@{RouteRegister}}
\subsubsection[{delete\_\-registrant}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ int {\bf RouteRegister}$<$ A $>$::delete\_\-registrant (
\begin{DoxyParamCaption}
\item[{const {\bf ModuleData} \&}]{module}
\end{DoxyParamCaption}
)}}
\label{classRouteRegister_ab2f8368a0a3497e70261a9164b194e5b}


delete\_\-registrant is called when a routing protocol that was previously interested in this \hyperlink{classRouteRegister}{RouteRegister} de-\/registers itself. 


\begin{DoxyParams}{Parameters}
{\em module} & \hyperlink{protocolthe-p}{the} \hyperlink{classModuleData}{ModuleData} instance of \hyperlink{protocolthe-p}{the} routing protocol that de-\/registered. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classRouteRegister_a11ddb66062b56ace742a6fbde31a0dca}{
\index{RouteRegister@{RouteRegister}!mark\_\-modules@{mark\_\-modules}}
\index{mark\_\-modules@{mark\_\-modules}!RouteRegister@{RouteRegister}}
\subsubsection[{mark\_\-modules}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ void {\bf RouteRegister}$<$ A $>$::mark\_\-modules (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRouteRegister_a11ddb66062b56ace742a6fbde31a0dca}


mark\_\-modules is called when \hyperlink{protocolthe-p}{the} routing information matching this registration changes. 

It marks \hyperlink{protocolthe-p}{the} original instances of \hyperlink{protocolthe-p}{the} \hyperlink{classModuleData}{ModuleData} as needing nitification. \hypertarget{classRouteRegister_a1b747c9ccf475f47e056f46654a39298}{
\index{RouteRegister@{RouteRegister}!module\_\-names@{module\_\-names}}
\index{module\_\-names@{module\_\-names}!RouteRegister@{RouteRegister}}
\subsubsection[{module\_\-names}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ list$<$string$>$ {\bf RouteRegister}$<$ A $>$::module\_\-names (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRouteRegister_a1b747c9ccf475f47e056f46654a39298}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} module names interested in this \hyperlink{classRouteRegister}{RouteRegister} as a list of strings. 
\end{DoxyReturn}
\hypertarget{classRouteRegister_a0d38a3a98af6ab43be95ddeadeb4800e}{
\index{RouteRegister@{RouteRegister}!route@{route}}
\index{route@{route}!RouteRegister@{RouteRegister}}
\subsubsection[{route}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ const {\bf IPRouteEntry}$<$A$>$$\ast$ {\bf RouteRegister}$<$ A $>$::route (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRouteRegister_a0d38a3a98af6ab43be95ddeadeb4800e}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} RouteRegister's route. 
\end{DoxyReturn}
\hypertarget{classRouteRegister_a177d96e22c59b4225a35c86e01647326}{
\index{RouteRegister@{RouteRegister}!size@{size}}
\index{size@{size}!RouteRegister@{RouteRegister}}
\subsubsection[{size}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ int {\bf RouteRegister}$<$ A $>$::size (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRouteRegister_a177d96e22c59b4225a35c86e01647326}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} number of modules interested in this \hyperlink{classRouteRegister}{RouteRegister}. 
\end{DoxyReturn}
\hypertarget{classRouteRegister_a07b3f91327e2f3f6189b09a243fb0f25}{
\index{RouteRegister@{RouteRegister}!str@{str}}
\index{str@{str}!RouteRegister@{RouteRegister}}
\subsubsection[{str}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ string {\bf RouteRegister}$<$ A $>$::str (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classRouteRegister_a07b3f91327e2f3f6189b09a243fb0f25}
\begin{DoxyReturn}{Returns}
this \hyperlink{classRouteRegister}{RouteRegister} as a string for debugging purposes. 
\end{DoxyReturn}
\hypertarget{classRouteRegister_a242e5e7ae143989430d9fabf1b32e94d}{
\index{RouteRegister@{RouteRegister}!valid\_\-subnet@{valid\_\-subnet}}
\index{valid\_\-subnet@{valid\_\-subnet}!RouteRegister@{RouteRegister}}
\subsubsection[{valid\_\-subnet}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ const {\bf IPNet}$<$A$>$\& {\bf RouteRegister}$<$ A $>$::valid\_\-subnet (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRouteRegister_a242e5e7ae143989430d9fabf1b32e94d}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} subnet of this RouteRegister's route for which this registration is valid. 
\end{DoxyReturn}


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