\hypertarget{classEmulateSubnetHops}{
\section{EmulateSubnetHops Class Reference}
\label{classEmulateSubnetHops}\index{EmulateSubnetHops@{EmulateSubnetHops}}
}


Bind together a set of \hyperlink{classIO}{IO} classes like \hyperlink{classEmulateSubnet}{EmulateSubnet}, however, in this case, any OLSR protocol messages which flow through this entity have their hopcount and TTL decremented by a given integer.  




{\ttfamily \#include $<$emulate\_\-net.hh$>$}

Inheritance diagram for EmulateSubnetHops:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classEmulateSubnetHops}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classEmulateSubnetHops_a34d5f348d2d9cd6aeb8b74c150f7990e}{
{\bfseries EmulateSubnetHops} (\hyperlink{classTestInfo}{TestInfo} \&info, \hyperlink{classEventLoop}{EventLoop} \&eventloop, uint8\_\-t hopdelta=1, uint8\_\-t maxlinks=2)}
\label{classEmulateSubnetHops_a34d5f348d2d9cd6aeb8b74c150f7990e}

\item 
\hypertarget{classEmulateSubnetHops_a6ed5fad875c8f1713b16463c63c68ef6}{
uint8\_\-t {\bfseries hopdelta} () const }
\label{classEmulateSubnetHops_a6ed5fad875c8f1713b16463c63c68ef6}

\item 
\hypertarget{classEmulateSubnetHops_a40b5c3028d96f06ab2b0e5e4af24303c}{
size\_\-t {\bfseries empty\_\-pkt\_\-drops} () const }
\label{classEmulateSubnetHops_a40b5c3028d96f06ab2b0e5e4af24303c}

\item 
\hypertarget{classEmulateSubnetHops_abddfdd2bbada261a99cb79310366a6a6}{
size\_\-t {\bfseries ttl\_\-msg\_\-drops} () const }
\label{classEmulateSubnetHops_abddfdd2bbada261a99cb79310366a6a6}

\item 
\hypertarget{classEmulateSubnetHops_a72a345b631003fd7db0fc349bc9382d1}{
void \hyperlink{classEmulateSubnetHops_a72a345b631003fd7db0fc349bc9382d1}{bind\_\-interface} (const string \&instance, const string \&interface, const string \&vif, const \hyperlink{classIPv4}{IPv4} \&listen\_\-addr, const uint16\_\-t listen\_\-port, \hyperlink{classDebugIO}{DebugIO} \&io)}
\label{classEmulateSubnetHops_a72a345b631003fd7db0fc349bc9382d1}

\begin{DoxyCompactList}\small\item\em When used to simulate a cloud, enforce any limit on \hyperlink{protocolthe-p}{the} number of links connected to that cloud by using a run-\/time assertion. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classEmulateSubnetHops_a98f632767af140c5ca0041e93a97f247}{forward} (\hyperlink{classEmulateSubnet_1_1Frame}{Frame} frame)
\begin{DoxyCompactList}\small\item\em Forward \hyperlink{protocolthe-p}{the} given OLSR frame, however, decrement \hyperlink{protocolthe-p}{the} hop counts in \hyperlink{protocolthe-p}{the} \hyperlink{classPacket}{Packet} and in any contained Messages. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classEmulateSubnetHops_a5ce20c448e07f0061d028c7e045ca5f9}{
\hyperlink{classMessageDecoder}{MessageDecoder} {\bfseries \_\-md}}
\label{classEmulateSubnetHops_a5ce20c448e07f0061d028c7e045ca5f9}

\item 
\hypertarget{classEmulateSubnetHops_a04a3c5e8e0a92ddfa95bb3a1a97a2f69}{
uint8\_\-t {\bfseries \_\-hopdelta}}
\label{classEmulateSubnetHops_a04a3c5e8e0a92ddfa95bb3a1a97a2f69}

\item 
\hypertarget{classEmulateSubnetHops_a5a5a34c6e5801023db477631079d29a9}{
uint8\_\-t {\bfseries \_\-maxlinks}}
\label{classEmulateSubnetHops_a5a5a34c6e5801023db477631079d29a9}

\item 
\hypertarget{classEmulateSubnetHops_af77ee1498b850e0d5c29c1876a68994c}{
size\_\-t {\bfseries \_\-empty\_\-pkt\_\-drops}}
\label{classEmulateSubnetHops_af77ee1498b850e0d5c29c1876a68994c}

\item 
\hypertarget{classEmulateSubnetHops_a929880f7eb33ebfca736cb3dfe96ad11}{
size\_\-t {\bfseries \_\-ttl\_\-msg\_\-drops}}
\label{classEmulateSubnetHops_a929880f7eb33ebfca736cb3dfe96ad11}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Bind together a set of \hyperlink{classIO}{IO} classes like \hyperlink{classEmulateSubnet}{EmulateSubnet}, however, in this case, any OLSR protocol messages which flow through this entity have their hopcount and TTL decremented by a given integer. TODO: Simulate ETX-\/measurable loss on link. For this we need only drop HELLO messages to create a situation where \hyperlink{protocolthe-p}{the} measured ETX for \hyperlink{protocolthe-p}{the} link will increase. 

\subsection{Member Function Documentation}
\hypertarget{classEmulateSubnetHops_a98f632767af140c5ca0041e93a97f247}{
\index{EmulateSubnetHops@{EmulateSubnetHops}!forward@{forward}}
\index{forward@{forward}!EmulateSubnetHops@{EmulateSubnetHops}}
\subsubsection[{forward}]{\setlength{\rightskip}{0pt plus 5cm}void EmulateSubnetHops::forward (
\begin{DoxyParamCaption}
\item[{{\bf Frame}}]{frame}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected, virtual\mbox{]}}}}
\label{classEmulateSubnetHops_a98f632767af140c5ca0041e93a97f247}


Forward \hyperlink{protocolthe-p}{the} given OLSR frame, however, decrement \hyperlink{protocolthe-p}{the} hop counts in \hyperlink{protocolthe-p}{the} \hyperlink{classPacket}{Packet} and in any contained Messages. 

Note that duplicate packet detection is NOT performed; it is always assumed that \hyperlink{protocolthe-p}{the} given frame will be forwarded in either direction. 

Reimplemented from \hyperlink{classEmulateSubnet}{EmulateSubnet$<$ A $>$}.



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