\hypertarget{classExternalRoute}{
\section{ExternalRoute Class Reference}
\label{classExternalRoute}\index{ExternalRoute@{ExternalRoute}}
}


Class representing an external route entry, either learned or originated in \hyperlink{protocolthe-p}{the} OLSRv1 HNA sub-\/protocol.  




{\ttfamily \#include $<$external.hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classExternalRoute_ab3faf1716328c529a8b87a9c36af784d}{
\hyperlink{classExternalRoute_ab3faf1716328c529a8b87a9c36af784d}{ExternalRoute} (\hyperlink{classExternalRoutes}{ExternalRoutes} \&parent, \hyperlink{classEventLoop}{EventLoop} \&ev, const \hyperlink{structOlsrTypes_a8f9558c89c7067886dac838b22385ad9}{OlsrTypes::ExternalID} erid, const \hyperlink{classIPNet}{IPv4Net} \&dest, const \hyperlink{classIPv4}{IPv4} \&lasthop, const uint16\_\-t distance, const \hyperlink{classTimeVal}{TimeVal} \&expiry\_\-time)}
\label{classExternalRoute_ab3faf1716328c529a8b87a9c36af784d}

\begin{DoxyCompactList}\small\item\em Constructor for a external route learned from another OLSR peer. \item\end{DoxyCompactList}\item 
\hypertarget{classExternalRoute_a49b9f8f3f08c7af0580fef4693572fe2}{
\hyperlink{classExternalRoute_a49b9f8f3f08c7af0580fef4693572fe2}{ExternalRoute} (\hyperlink{classExternalRoutes}{ExternalRoutes} \&parent, \hyperlink{classEventLoop}{EventLoop} \&ev, const \hyperlink{structOlsrTypes_a8f9558c89c7067886dac838b22385ad9}{OlsrTypes::ExternalID} erid, const \hyperlink{classIPNet}{IPv4Net} \&dest)}
\label{classExternalRoute_a49b9f8f3f08c7af0580fef4693572fe2}

\begin{DoxyCompactList}\small\item\em Constructor for a external route originated by this node. \item\end{DoxyCompactList}\item 
\hyperlink{structOlsrTypes_a8f9558c89c7067886dac838b22385ad9}{OlsrTypes::ExternalID} \hyperlink{classExternalRoute_ab0ca65ae7ddbb11901281ecc2377f39b}{id} () const 
\item 
bool \hyperlink{classExternalRoute_ac4d348cd6e20921bdb68571828d788d8}{is\_\-self\_\-originated} () const 
\item 
\hyperlink{classIPNet}{IPv4Net} \hyperlink{classExternalRoute_a97352a7cd42bb24ad76320c3a6f29a3e}{dest} () const 
\item 
\hyperlink{classIPv4}{IPv4} \hyperlink{classExternalRoute_aa582728ae134b8683592577e70f6c859}{lasthop} () const 
\item 
uint16\_\-t \hyperlink{classExternalRoute_a6b6fc4983656e9c91d53b4dc6cf15cf4}{distance} () const 
\item 
\hypertarget{classExternalRoute_a6a378b29a8ae9c7b30481a426328b084}{
void \hyperlink{classExternalRoute_a6a378b29a8ae9c7b30481a426328b084}{set\_\-distance} (const uint16\_\-t distance)}
\label{classExternalRoute_a6a378b29a8ae9c7b30481a426328b084}

\begin{DoxyCompactList}\small\item\em Update \hyperlink{protocolthe-p}{the} distance in hops between this node and \hyperlink{protocolthe-p}{the} last hop. \item\end{DoxyCompactList}\item 
\hyperlink{classTimeVal}{TimeVal} \hyperlink{classExternalRoute_ad97171562132965dbf28ec60f84e77b9}{time\_\-remaining} () const 
\item 
void \hyperlink{classExternalRoute_a7cf48175dbf4785499db03e748e1ebdf}{update\_\-timer} (const \hyperlink{classTimeVal}{TimeVal} \&expiry\_\-time)
\begin{DoxyCompactList}\small\item\em Schedule or re-\/schedule \hyperlink{protocolthe-p}{the} expiry timer on this route entry. \item\end{DoxyCompactList}\item 
\hypertarget{classExternalRoute_a9c03acbef942a2985e861922fbd1e55d}{
void \hyperlink{classExternalRoute_a9c03acbef942a2985e861922fbd1e55d}{event\_\-expired} ()}
\label{classExternalRoute_a9c03acbef942a2985e861922fbd1e55d}

\begin{DoxyCompactList}\small\item\em Callback method to: request that \hyperlink{protocolthe-p}{the} parent delete this HNA derived external route, as it has now expired. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classExternalRoute_a8d61008afe95303273447349152c814f}{
\hyperlink{classExternalRoutes}{ExternalRoutes} \& {\bfseries \_\-parent}}
\label{classExternalRoute_a8d61008afe95303273447349152c814f}

\item 
\hypertarget{classExternalRoute_a08534586df015c98289528614561106e}{
\hyperlink{classEventLoop}{EventLoop} \& {\bfseries \_\-eventloop}}
\label{classExternalRoute_a08534586df015c98289528614561106e}

\item 
\hypertarget{classExternalRoute_ad0479c3c4246e1489a5baa455d4e0edd}{
\hyperlink{structOlsrTypes_a8f9558c89c7067886dac838b22385ad9}{OlsrTypes::ExternalID} {\bfseries \_\-id}}
\label{classExternalRoute_ad0479c3c4246e1489a5baa455d4e0edd}

\item 
\hypertarget{classExternalRoute_a96f816f79687b4e424f8bcabaf13f735}{
bool \hyperlink{classExternalRoute_a96f816f79687b4e424f8bcabaf13f735}{\_\-is\_\-self\_\-originated}}
\label{classExternalRoute_a96f816f79687b4e424f8bcabaf13f735}

\begin{DoxyCompactList}\small\item\em true if this \hyperlink{classExternalRoute}{ExternalRoute} is being originated by this node and was not learned from another node, otherwise false. \item\end{DoxyCompactList}\item 
\hypertarget{classExternalRoute_a02096cd9e8b6b069b920873bc6683277}{
\hyperlink{classIPNet}{IPv4Net} \hyperlink{classExternalRoute_a02096cd9e8b6b069b920873bc6683277}{\_\-dest}}
\label{classExternalRoute_a02096cd9e8b6b069b920873bc6683277}

\begin{DoxyCompactList}\small\item\em The A\_\-network\_\-addr/A\_\-netmask protocol variable. \item\end{DoxyCompactList}\item 
\hypertarget{classExternalRoute_a5ce3234b305d9bb4278b19ed187a899d}{
\hyperlink{classIPv4}{IPv4} \hyperlink{classExternalRoute_a5ce3234b305d9bb4278b19ed187a899d}{\_\-lasthop}}
\label{classExternalRoute_a5ce3234b305d9bb4278b19ed187a899d}

\begin{DoxyCompactList}\small\item\em The A\_\-gateway\_\-addr protocol variable. \item\end{DoxyCompactList}\item 
\hypertarget{classExternalRoute_a4adb8635842e898787dd7dd98335fba2}{
\hyperlink{classXorpTimer}{XorpTimer} \hyperlink{classExternalRoute_a4adb8635842e898787dd7dd98335fba2}{\_\-expiry\_\-timer}}
\label{classExternalRoute_a4adb8635842e898787dd7dd98335fba2}

\begin{DoxyCompactList}\small\item\em The A\_\-time protocol variable. \item\end{DoxyCompactList}\item 
\hypertarget{classExternalRoute_a2880713597da52f361d1d7a5686c65ba}{
uint16\_\-t \hyperlink{classExternalRoute_a2880713597da52f361d1d7a5686c65ba}{\_\-distance}}
\label{classExternalRoute_a2880713597da52f361d1d7a5686c65ba}

\begin{DoxyCompactList}\small\item\em The number of hops recorded between this node and \hyperlink{protocolthe-p}{the} lasthop, as seen in \hyperlink{protocolthe-p}{the} most recent HNA message containing this prefix. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Class representing an external route entry, either learned or originated in \hyperlink{protocolthe-p}{the} OLSRv1 HNA sub-\/protocol. 

\subsection{Member Function Documentation}
\hypertarget{classExternalRoute_a97352a7cd42bb24ad76320c3a6f29a3e}{
\index{ExternalRoute@{ExternalRoute}!dest@{dest}}
\index{dest@{dest}!ExternalRoute@{ExternalRoute}}
\subsubsection[{dest}]{\setlength{\rightskip}{0pt plus 5cm}{\bf IPv4Net} ExternalRoute::dest (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classExternalRoute_a97352a7cd42bb24ad76320c3a6f29a3e}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} destination of this route. 
\end{DoxyReturn}
\hypertarget{classExternalRoute_a6b6fc4983656e9c91d53b4dc6cf15cf4}{
\index{ExternalRoute@{ExternalRoute}!distance@{distance}}
\index{distance@{distance}!ExternalRoute@{ExternalRoute}}
\subsubsection[{distance}]{\setlength{\rightskip}{0pt plus 5cm}uint16\_\-t ExternalRoute::distance (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classExternalRoute_a6b6fc4983656e9c91d53b4dc6cf15cf4}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} number of hops between this node and \hyperlink{protocolthe-p}{the} last hop. 
\end{DoxyReturn}
\hypertarget{classExternalRoute_ab0ca65ae7ddbb11901281ecc2377f39b}{
\index{ExternalRoute@{ExternalRoute}!id@{id}}
\index{id@{id}!ExternalRoute@{ExternalRoute}}
\subsubsection[{id}]{\setlength{\rightskip}{0pt plus 5cm}{\bf OlsrTypes::ExternalID} ExternalRoute::id (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classExternalRoute_ab0ca65ae7ddbb11901281ecc2377f39b}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} ID of \hyperlink{protocolthe-p}{the} external route. 
\end{DoxyReturn}
\hypertarget{classExternalRoute_ac4d348cd6e20921bdb68571828d788d8}{
\index{ExternalRoute@{ExternalRoute}!is\_\-self\_\-originated@{is\_\-self\_\-originated}}
\index{is\_\-self\_\-originated@{is\_\-self\_\-originated}!ExternalRoute@{ExternalRoute}}
\subsubsection[{is\_\-self\_\-originated}]{\setlength{\rightskip}{0pt plus 5cm}bool ExternalRoute::is\_\-self\_\-originated (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classExternalRoute_ac4d348cd6e20921bdb68571828d788d8}
\begin{DoxyReturn}{Returns}
true if we are \hyperlink{protocolthe-p}{the} node which originated this route. 
\end{DoxyReturn}
\hypertarget{classExternalRoute_aa582728ae134b8683592577e70f6c859}{
\index{ExternalRoute@{ExternalRoute}!lasthop@{lasthop}}
\index{lasthop@{lasthop}!ExternalRoute@{ExternalRoute}}
\subsubsection[{lasthop}]{\setlength{\rightskip}{0pt plus 5cm}{\bf IPv4} ExternalRoute::lasthop (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classExternalRoute_aa582728ae134b8683592577e70f6c859}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} node in \hyperlink{protocolthe-p}{the} OLSR topology which advertised \hyperlink{protocolthe-p}{the} destination which this route points to. 
\end{DoxyReturn}
\hypertarget{classExternalRoute_ad97171562132965dbf28ec60f84e77b9}{
\index{ExternalRoute@{ExternalRoute}!time\_\-remaining@{time\_\-remaining}}
\index{time\_\-remaining@{time\_\-remaining}!ExternalRoute@{ExternalRoute}}
\subsubsection[{time\_\-remaining}]{\setlength{\rightskip}{0pt plus 5cm}{\bf TimeVal} ExternalRoute::time\_\-remaining (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classExternalRoute_ad97171562132965dbf28ec60f84e77b9}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} amount of time remaining until this HNA entry expires. 
\end{DoxyReturn}
\hypertarget{classExternalRoute_a7cf48175dbf4785499db03e748e1ebdf}{
\index{ExternalRoute@{ExternalRoute}!update\_\-timer@{update\_\-timer}}
\index{update\_\-timer@{update\_\-timer}!ExternalRoute@{ExternalRoute}}
\subsubsection[{update\_\-timer}]{\setlength{\rightskip}{0pt plus 5cm}void ExternalRoute::update\_\-timer (
\begin{DoxyParamCaption}
\item[{const {\bf TimeVal} \&}]{expiry\_\-time}
\end{DoxyParamCaption}
)}}
\label{classExternalRoute_a7cf48175dbf4785499db03e748e1ebdf}


Schedule or re-\/schedule \hyperlink{protocolthe-p}{the} expiry timer on this route entry. 


\begin{DoxyParams}{Parameters}
{\em expiry\_\-time} & The new expiry time of \hyperlink{protocolthe-p}{the} route entry. \\
\hline
\end{DoxyParams}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/contrib/olsr/external.hh\item 
/home/greearb/git/xorp.ct.github/xorp/contrib/olsr/external.cc\end{DoxyCompactItemize}
