\hypertarget{classXrlRibNotifier}{
\section{XrlRibNotifier$<$ A $>$ Class Template Reference}
\label{classXrlRibNotifier}\index{XrlRibNotifier@{XrlRibNotifier}}
}


Class to send RIP updates to \hyperlink{classRIB}{RIB} process.  




{\ttfamily \#include $<$xrl\_\-rib\_\-notifier.hh$>$}

Inheritance diagram for XrlRibNotifier$<$ A $>$:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classXrlRibNotifier}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlRibNotifier_a597e4cb612ebd508daca66145812979f}{
typedef \hyperlink{classRibNotifierBase}{RibNotifierBase}$<$ A $>$ {\bfseries Super}}
\label{classXrlRibNotifier_a597e4cb612ebd508daca66145812979f}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlRibNotifier_a3e78cee16e5b0e59819662749f86556d}{
\hyperlink{classXrlRibNotifier_a3e78cee16e5b0e59819662749f86556d}{XrlRibNotifier} (\hyperlink{classEventLoop}{EventLoop} \&e, \hyperlink{classUpdateQueue}{UpdateQueue}$<$ A $>$ \&uq, \hyperlink{classXrlRouter}{XrlRouter} \&xr, uint32\_\-t max\_\-inflight=DEFAULT\_\-INFLIGHT, uint32\_\-t poll\_\-ms=Super::DEFAULT\_\-POLL\_\-MS)}
\label{classXrlRibNotifier_a3e78cee16e5b0e59819662749f86556d}

\begin{DoxyCompactList}\small\item\em Constructor. \item\end{DoxyCompactList}\item 
\hyperlink{classXrlRibNotifier_a7f23424eff3420186ee8987e793e0811}{XrlRibNotifier} (\hyperlink{classEventLoop}{EventLoop} \&e, \hyperlink{classUpdateQueue}{UpdateQueue}$<$ A $>$ \&uq, \hyperlink{classXrlSender}{XrlSender} \&xs, const string \&class\_\-name, const string \&intance\_\-name, uint32\_\-t max\_\-inflight=DEFAULT\_\-INFLIGHT, uint32\_\-t poll\_\-ms=Super::DEFAULT\_\-POLL\_\-MS)
\begin{DoxyCompactList}\small\item\em Constructor taking an \hyperlink{classXrlSender}{XrlSender}, a class name, and an instance name as arguments. \item\end{DoxyCompactList}\item 
int \hyperlink{classXrlRibNotifier_a078d989a14f8836472ee9af87549a6c0}{startup} ()
\begin{DoxyCompactList}\small\item\em Request \hyperlink{classRIB}{RIB} instantiates a RIP routing table and once instantiated start passing route updates to \hyperlink{classRIB}{RIB}. \item\end{DoxyCompactList}\item 
int \hyperlink{classXrlRibNotifier_ad53640a83918a48a923cfd9856dfc412}{shutdown} ()
\begin{DoxyCompactList}\small\item\em Stop forwarding route updates to \hyperlink{classRIB}{RIB} and request \hyperlink{classRIB}{RIB} unregisters RIP routing table. \item\end{DoxyCompactList}\item 
\hypertarget{classXrlRibNotifier_ae2440edf6f3eb1621bb25660d76e22a9}{
uint32\_\-t \hyperlink{classXrlRibNotifier_ae2440edf6f3eb1621bb25660d76e22a9}{xrls\_\-inflight} () const }
\label{classXrlRibNotifier_ae2440edf6f3eb1621bb25660d76e22a9}

\begin{DoxyCompactList}\small\item\em Accessor returning \hyperlink{protocolthe-p}{the} current number of Xrls inflight. \item\end{DoxyCompactList}\item 
\hypertarget{classXrlRibNotifier_a6bb5243b41fbd272691501bb4addc968}{
uint32\_\-t \hyperlink{classXrlRibNotifier_a6bb5243b41fbd272691501bb4addc968}{max\_\-xrls\_\-inflight} () const }
\label{classXrlRibNotifier_a6bb5243b41fbd272691501bb4addc968}

\begin{DoxyCompactList}\small\item\em Accessor returning \hyperlink{protocolthe-p}{the} maximum number of Xrls inflight. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlRibNotifier_af0f67739f69002384481f9131e05a010}{
static const uint32\_\-t {\bfseries DEFAULT\_\-INFLIGHT} = 20}
\label{classXrlRibNotifier_af0f67739f69002384481f9131e05a010}

\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlRibNotifier_a7681c4b63db40d81c8774b6e5db4903d}{
void {\bfseries updates\_\-available} ()}
\label{classXrlRibNotifier_a7681c4b63db40d81c8774b6e5db4903d}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlRibNotifier_a0e24eb9ca3d9c395f3d264dbe6563300}{
\hyperlink{classXrlSender}{XrlSender} \& {\bfseries \_\-xs}}
\label{classXrlRibNotifier_a0e24eb9ca3d9c395f3d264dbe6563300}

\item 
\hypertarget{classXrlRibNotifier_aadb02015ff03eda9c00efa4d4a193252}{
string {\bfseries \_\-cname}}
\label{classXrlRibNotifier_aadb02015ff03eda9c00efa4d4a193252}

\item 
\hypertarget{classXrlRibNotifier_a8744e084edd6df5c80ed0714cb523362}{
string {\bfseries \_\-iname}}
\label{classXrlRibNotifier_a8744e084edd6df5c80ed0714cb523362}

\item 
\hypertarget{classXrlRibNotifier_a162f4b158924633a66f994d29b311a66}{
const uint32\_\-t {\bfseries \_\-max\_\-inflight}}
\label{classXrlRibNotifier_a162f4b158924633a66f994d29b311a66}

\item 
\hypertarget{classXrlRibNotifier_a3dc2fac68aff1dc61258413ab6cc92ed}{
uint32\_\-t {\bfseries \_\-inflight}}
\label{classXrlRibNotifier_a3dc2fac68aff1dc61258413ab6cc92ed}

\item 
\hypertarget{classXrlRibNotifier_a3e961b55fcaa0fa4091c49e8df357d5b}{
set$<$ \hyperlink{classIPNet}{IPNet}$<$ A $>$ $>$ {\bfseries \_\-ribnets}}
\label{classXrlRibNotifier_a3e961b55fcaa0fa4091c49e8df357d5b}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlRibNotifier_a72617555f293ee47ae48219e94d9e618}{
void {\bfseries add\_\-igp\_\-cb} (const \hyperlink{classXrlError}{XrlError} \&e)}
\label{classXrlRibNotifier_a72617555f293ee47ae48219e94d9e618}

\item 
\hypertarget{classXrlRibNotifier_ac8e2bae9d72f03d28352e2cf36720cfd}{
void {\bfseries delete\_\-igp\_\-cb} (const \hyperlink{classXrlError}{XrlError} \&e)}
\label{classXrlRibNotifier_ac8e2bae9d72f03d28352e2cf36720cfd}

\item 
\hypertarget{classXrlRibNotifier_a380f7f3db68179a47cd7250970149246}{
void {\bfseries send\_\-add\_\-route} (const \hyperlink{classRouteEntry}{RouteEntry}$<$ A $>$ \&re)}
\label{classXrlRibNotifier_a380f7f3db68179a47cd7250970149246}

\item 
\hypertarget{classXrlRibNotifier_adfca96057f076a13d9d118a285de8c71}{
void {\bfseries send\_\-delete\_\-route} (const \hyperlink{classRouteEntry}{RouteEntry}$<$ A $>$ \&re)}
\label{classXrlRibNotifier_adfca96057f076a13d9d118a285de8c71}

\item 
\hypertarget{classXrlRibNotifier_a5e83b2acf46ed998bb5630e1130e7b01}{
void {\bfseries send\_\-route\_\-cb} (const \hyperlink{classXrlError}{XrlError} \&e)}
\label{classXrlRibNotifier_a5e83b2acf46ed998bb5630e1130e7b01}

\item 
\hypertarget{classXrlRibNotifier_a979b679752a5014ca01683eb3b1d61f6}{
void {\bfseries incr\_\-inflight} ()}
\label{classXrlRibNotifier_a979b679752a5014ca01683eb3b1d61f6}

\item 
\hypertarget{classXrlRibNotifier_a5624c8881586a02b9cdf13529bf40e2e}{
void {\bfseries decr\_\-inflight} ()}
\label{classXrlRibNotifier_a5624c8881586a02b9cdf13529bf40e2e}

\end{DoxyCompactItemize}


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

Class to send RIP updates to \hyperlink{classRIB}{RIB} process. This class periodically checks \hyperlink{protocolthe-p}{the} \hyperlink{classUpdateQueue}{UpdateQueue} for updates and sends them to \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. Once an instance has been created, \hyperlink{protocolthe-p}{the} \hyperlink{classXrlRibNotifier_a078d989a14f8836472ee9af87549a6c0}{startup()} method should be called to register a routing table for RIP and begin checking for updates. Before being destructed, \hyperlink{classXrlRibNotifier_ad53640a83918a48a923cfd9856dfc412}{shutdown()} should be called to remove \hyperlink{protocolthe-p}{the} RIP routing table from \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}.

The \hyperlink{classXrlRibNotifier}{XrlRibNotifier} may be in one of several states enumerated by RunStatus. Before \hyperlink{classXrlRibNotifier_a078d989a14f8836472ee9af87549a6c0}{startup()}, an instances state is SERVICE\_\-READY. Then when startup is called it transitions into INSTALLING\_\-RIP\_\-TABLE and transitions into SERVICE\_\-RUNNING. When in SERVICE\_\-RUNNING state updates are sent to \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. When \hyperlink{classXrlRibNotifier_ad53640a83918a48a923cfd9856dfc412}{shutdown()} is called it enters UNINSTALLING\_\-RIP\_\-TABLE before entering SERVICE\_\-SHUTDOWN. At any time it may fall into state SERVICE\_\-FAILED if communication with \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB} fails. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classXrlRibNotifier_a7f23424eff3420186ee8987e793e0811}{
\index{XrlRibNotifier@{XrlRibNotifier}!XrlRibNotifier@{XrlRibNotifier}}
\index{XrlRibNotifier@{XrlRibNotifier}!XrlRibNotifier@{XrlRibNotifier}}
\subsubsection[{XrlRibNotifier}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ {\bf XrlRibNotifier}$<$ A $>$::{\bf XrlRibNotifier} (
\begin{DoxyParamCaption}
\item[{{\bf EventLoop} \&}]{e, }
\item[{{\bf UpdateQueue}$<$ A $>$ \&}]{uq, }
\item[{{\bf XrlSender} \&}]{xs, }
\item[{const string \&}]{class\_\-name, }
\item[{const string \&}]{intance\_\-name, }
\item[{uint32\_\-t}]{max\_\-inflight = {\ttfamily DEFAULT\_\-INFLIGHT}, }
\item[{uint32\_\-t}]{poll\_\-ms = {\ttfamily Super::DEFAULT\_\-POLL\_\-MS}}
\end{DoxyParamCaption}
)}}
\label{classXrlRibNotifier_a7f23424eff3420186ee8987e793e0811}


Constructor taking an \hyperlink{classXrlSender}{XrlSender}, a class name, and an instance name as arguments. 

These arguments are broken out for debugging instances, ie a fake \hyperlink{classXrlSender}{XrlSender} can be used to test behaviour of this class. 

\subsection{Member Function Documentation}
\hypertarget{classXrlRibNotifier_ad53640a83918a48a923cfd9856dfc412}{
\index{XrlRibNotifier@{XrlRibNotifier}!shutdown@{shutdown}}
\index{shutdown@{shutdown}!XrlRibNotifier@{XrlRibNotifier}}
\subsubsection[{shutdown}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf XrlRibNotifier}$<$ A $>$::shutdown (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classXrlRibNotifier_ad53640a83918a48a923cfd9856dfc412}


Stop forwarding route updates to \hyperlink{classRIB}{RIB} and request \hyperlink{classRIB}{RIB} unregisters RIP routing table. 

\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}


Implements \hyperlink{classServiceBase_a6ad34506fd5a446d5667abcb2e1b593b}{ServiceBase}.

\hypertarget{classXrlRibNotifier_a078d989a14f8836472ee9af87549a6c0}{
\index{XrlRibNotifier@{XrlRibNotifier}!startup@{startup}}
\index{startup@{startup}!XrlRibNotifier@{XrlRibNotifier}}
\subsubsection[{startup}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ int {\bf XrlRibNotifier}$<$ A $>$::startup (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classXrlRibNotifier_a078d989a14f8836472ee9af87549a6c0}


Request \hyperlink{classRIB}{RIB} instantiates a RIP routing table and once instantiated start passing route updates to \hyperlink{classRIB}{RIB}. 

\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}


Implements \hyperlink{classServiceBase_a791755872b2056ddd82a2f00904c7d2b}{ServiceBase}.



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