\hypertarget{classRouteEntryOrigin}{
\section{RouteEntryOrigin$<$ A $>$ Class Template Reference}
\label{classRouteEntryOrigin}\index{RouteEntryOrigin@{RouteEntryOrigin}}
}


Base class for originators of RIP route entires.  




{\ttfamily \#include $<$route\_\-entry.hh$>$}

Inheritance diagram for RouteEntryOrigin$<$ A $>$:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classRouteEntryOrigin}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structRouteEntryOrigin_1_1RouteEntryStore}{RouteEntryStore}
\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRouteEntryOrigin_acf6f01f5508e9c5b122926293acd2b7b}{
typedef \hyperlink{classRouteEntry}{RouteEntry}$<$ A $>$ {\bfseries Route}}
\label{classRouteEntryOrigin_acf6f01f5508e9c5b122926293acd2b7b}

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

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRouteEntryOrigin_afdd63171c9b203b8b5104abf0482c0b9}{
{\bfseries RouteEntryOrigin} (bool is\_\-rib\_\-origin)}
\label{classRouteEntryOrigin_afdd63171c9b203b8b5104abf0482c0b9}

\item 
bool \hyperlink{classRouteEntryOrigin_a020e584ca97b97f0f0d7de6c8cf0c615}{is\_\-rib\_\-origin} () const 
\begin{DoxyCompactList}\small\item\em Test if \hyperlink{classRIB}{RIB} is \hyperlink{protocolthe-p}{the} originator. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRouteEntryOrigin_ab4ab26ca4d52b5cb3e7de4f0e30e78d3}{associate} (\hyperlink{classRouteEntry}{Route} $\ast$r)
\begin{DoxyCompactList}\small\item\em Associate route with this \hyperlink{classRouteEntryOrigin}{RouteEntryOrigin}. \item\end{DoxyCompactList}\item 
bool \hyperlink{classRouteEntryOrigin_aa07a12583dee29dd776ccad392bf5ea2}{dissociate} (\hyperlink{classRouteEntry}{Route} $\ast$r)
\begin{DoxyCompactList}\small\item\em Dissociate route from this \hyperlink{classRouteEntryOrigin}{RouteEntryOrigin}. \item\end{DoxyCompactList}\item 
\hyperlink{classRouteEntry}{Route} $\ast$ \hyperlink{classRouteEntryOrigin_a323505c759bb6898ad44b49f5e44bc13}{find\_\-route} (const \hyperlink{classIPNet}{Net} \&n) const 
\begin{DoxyCompactList}\small\item\em Find route if RouteOrigin has a route for given network. \item\end{DoxyCompactList}\item 
uint32\_\-t \hyperlink{classRouteEntryOrigin_acbe956ddc6ceff40707320f2d99ae54d}{route\_\-count} () const 
\item 
\hypertarget{classRouteEntryOrigin_aaf296fa3c92be4a0a8cd0bd5ab96b36b}{
void \hyperlink{classRouteEntryOrigin_aaf296fa3c92be4a0a8cd0bd5ab96b36b}{clear} ()}
\label{classRouteEntryOrigin_aaf296fa3c92be4a0a8cd0bd5ab96b36b}

\begin{DoxyCompactList}\small\item\em Clear/remove all routes associated with this \hyperlink{classRouteEntryOrigin}{RouteEntryOrigin}. \item\end{DoxyCompactList}\item 
\hypertarget{classRouteEntryOrigin_aa1483c010707db73887564e2b24735dd}{
void \hyperlink{classRouteEntryOrigin_aa1483c010707db73887564e2b24735dd}{dump\_\-routes} (vector$<$ const \hyperlink{classRouteEntry}{Route} $\ast$ $>$ \&routes) const }
\label{classRouteEntryOrigin_aa1483c010707db73887564e2b24735dd}

\begin{DoxyCompactList}\small\item\em Dump associated routes into a vector (debugging use only). \item\end{DoxyCompactList}\item 
virtual uint32\_\-t \hyperlink{classRouteEntryOrigin_aebd3e3b39e314d4394632b4f0b2cbe84}{expiry\_\-secs} () const =0
\begin{DoxyCompactList}\small\item\em Retrieve number of seconds before routes associated with this \hyperlink{classRouteEntryOrigin}{RouteEntryOrigin} should be marked as expired. \item\end{DoxyCompactList}\item 
\hypertarget{classRouteEntryOrigin_a61d3e3bf53c928b304d6c7f3ed99d929}{
virtual uint32\_\-t \hyperlink{classRouteEntryOrigin_a61d3e3bf53c928b304d6c7f3ed99d929}{deletion\_\-secs} () const =0}
\label{classRouteEntryOrigin_a61d3e3bf53c928b304d6c7f3ed99d929}

\begin{DoxyCompactList}\small\item\em Retrieve number of seconds before route should be deleted after expiry. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRouteEntryOrigin_a98b8d0e2ba5b08e2ae162005abdcac6e}{
struct \hyperlink{structRouteEntryOrigin_1_1RouteEntryStore}{RouteEntryStore} $\ast$ {\bfseries \_\-rtstore}}
\label{classRouteEntryOrigin_a98b8d0e2ba5b08e2ae162005abdcac6e}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRouteEntryOrigin_ae88728a3c71b6a1a4f545aea7c886f2b}{
bool {\bfseries \_\-is\_\-rib\_\-origin}}
\label{classRouteEntryOrigin_ae88728a3c71b6a1a4f545aea7c886f2b}

\end{DoxyCompactItemize}


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

Base class for originators of RIP route entires. This class is used for storing RIPv2 and RIPng route entries. It is a template class taking an address family type as a template argument. Only \hyperlink{classIPv4}{IPv4} and \hyperlink{classIPv6}{IPv6} types may be supplied. 

\subsection{Member Function Documentation}
\hypertarget{classRouteEntryOrigin_ab4ab26ca4d52b5cb3e7de4f0e30e78d3}{
\index{RouteEntryOrigin@{RouteEntryOrigin}!associate@{associate}}
\index{associate@{associate}!RouteEntryOrigin@{RouteEntryOrigin}}
\subsubsection[{associate}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ bool {\bf RouteEntryOrigin}$<$ A $>$::associate (
\begin{DoxyParamCaption}
\item[{{\bf Route} $\ast$}]{r}
\end{DoxyParamCaption}
)}}
\label{classRouteEntryOrigin_ab4ab26ca4d52b5cb3e7de4f0e30e78d3}


Associate route with this \hyperlink{classRouteEntryOrigin}{RouteEntryOrigin}. 


\begin{DoxyParams}{Parameters}
{\em r} & route to be stored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success, false if route is already associated. 
\end{DoxyReturn}
\hypertarget{classRouteEntryOrigin_aa07a12583dee29dd776ccad392bf5ea2}{
\index{RouteEntryOrigin@{RouteEntryOrigin}!dissociate@{dissociate}}
\index{dissociate@{dissociate}!RouteEntryOrigin@{RouteEntryOrigin}}
\subsubsection[{dissociate}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ bool {\bf RouteEntryOrigin}$<$ A $>$::dissociate (
\begin{DoxyParamCaption}
\item[{{\bf Route} $\ast$}]{r}
\end{DoxyParamCaption}
)}}
\label{classRouteEntryOrigin_aa07a12583dee29dd776ccad392bf5ea2}


Dissociate route from this \hyperlink{classRouteEntryOrigin}{RouteEntryOrigin}. 


\begin{DoxyParams}{Parameters}
{\em r} & route to be dissociated. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success, false if route is not associated. 
\end{DoxyReturn}
\hypertarget{classRouteEntryOrigin_aebd3e3b39e314d4394632b4f0b2cbe84}{
\index{RouteEntryOrigin@{RouteEntryOrigin}!expiry\_\-secs@{expiry\_\-secs}}
\index{expiry\_\-secs@{expiry\_\-secs}!RouteEntryOrigin@{RouteEntryOrigin}}
\subsubsection[{expiry\_\-secs}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ virtual uint32\_\-t {\bf RouteEntryOrigin}$<$ A $>$::expiry\_\-secs (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classRouteEntryOrigin_aebd3e3b39e314d4394632b4f0b2cbe84}


Retrieve number of seconds before routes associated with this \hyperlink{classRouteEntryOrigin}{RouteEntryOrigin} should be marked as expired. 

A return value of 0 indicates routes are of infinite duration, eg static routes. 

Implemented in \hyperlink{classPeerRoutes_a149736438af9c10e0c490faeefce8530}{PeerRoutes$<$ A $>$}, \hyperlink{classPeer_a84c66164cc090fab7132f7910ccaaca8}{Peer$<$ A $>$}, \hyperlink{classRedistRouteOrigin_a20e3c64a4e19013ea457ecff93c33c10}{RedistRouteOrigin$<$ A $>$}, \hyperlink{classPeer_a84c66164cc090fab7132f7910ccaaca8}{Peer$<$ IPv4 $>$}, \hyperlink{classPeerRoutes_a149736438af9c10e0c490faeefce8530}{PeerRoutes$<$ IPv4 $>$}, \hyperlink{classRedistRouteOrigin_a20e3c64a4e19013ea457ecff93c33c10}{RedistRouteOrigin$<$ IPv6 $>$}, and \hyperlink{classRedistRouteOrigin_a20e3c64a4e19013ea457ecff93c33c10}{RedistRouteOrigin$<$ IPv4 $>$}.

\hypertarget{classRouteEntryOrigin_a323505c759bb6898ad44b49f5e44bc13}{
\index{RouteEntryOrigin@{RouteEntryOrigin}!find\_\-route@{find\_\-route}}
\index{find\_\-route@{find\_\-route}!RouteEntryOrigin@{RouteEntryOrigin}}
\subsubsection[{find\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ {\bf RouteEntry}$<$ A $>$ $\ast$ {\bf RouteEntryOrigin}$<$ A $>$::find\_\-route (
\begin{DoxyParamCaption}
\item[{const {\bf Net} \&}]{n}
\end{DoxyParamCaption}
) const}}
\label{classRouteEntryOrigin_a323505c759bb6898ad44b49f5e44bc13}


Find route if RouteOrigin has a route for given network. 


\begin{DoxyParams}{Parameters}
{\em n} & network. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if entry exists in store, false otherwise. 
\end{DoxyReturn}
\hypertarget{classRouteEntryOrigin_a020e584ca97b97f0f0d7de6c8cf0c615}{
\index{RouteEntryOrigin@{RouteEntryOrigin}!is\_\-rib\_\-origin@{is\_\-rib\_\-origin}}
\index{is\_\-rib\_\-origin@{is\_\-rib\_\-origin}!RouteEntryOrigin@{RouteEntryOrigin}}
\subsubsection[{is\_\-rib\_\-origin}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ bool {\bf RouteEntryOrigin}$<$ A $>$::is\_\-rib\_\-origin (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRouteEntryOrigin_a020e584ca97b97f0f0d7de6c8cf0c615}


Test if \hyperlink{classRIB}{RIB} is \hyperlink{protocolthe-p}{the} originator. 

\begin{DoxyReturn}{Returns}
true if \hyperlink{classRIB}{RIB} is \hyperlink{protocolthe-p}{the} originator, otherwise false. 
\end{DoxyReturn}
\hypertarget{classRouteEntryOrigin_acbe956ddc6ceff40707320f2d99ae54d}{
\index{RouteEntryOrigin@{RouteEntryOrigin}!route\_\-count@{route\_\-count}}
\index{route\_\-count@{route\_\-count}!RouteEntryOrigin@{RouteEntryOrigin}}
\subsubsection[{route\_\-count}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ uint32\_\-t {\bf RouteEntryOrigin}$<$ A $>$::route\_\-count (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classRouteEntryOrigin_acbe956ddc6ceff40707320f2d99ae54d}
\begin{DoxyReturn}{Returns}
number of routes associated with this \hyperlink{classRouteEntryOrigin}{RouteEntryOrigin}. 
\end{DoxyReturn}


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