\hypertarget{classLinks}{
\section{Links Class Reference}
\label{classLinks}\index{Links@{Links}}
}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structLinks_1_1LinkTuple}{LinkTuple}
\begin{DoxyCompactList}\small\item\em A structure describing an emulated link between two nodes. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classLinks_aa396b5951fcda80d8b7d0259854850f2}{
{\bfseries Links} (\hyperlink{classSimulator}{Simulator} $\ast$r, \hyperlink{classEventLoop}{EventLoop} \&ev, \hyperlink{classNodes}{Nodes} $\ast$n)}
\label{classLinks_aa396b5951fcda80d8b7d0259854850f2}

\item 
bool \hyperlink{classLinks_a565fc36732c2befe2c13bc429d9b324d}{add\_\-link} (const \hyperlink{classIPv4}{IPv4} \&left\_\-addr, const \hyperlink{classIPv4}{IPv4} \&right\_\-addr)  throw (NoSuchAddress)
\begin{DoxyCompactList}\small\item\em Add a link between two OLSR instances, given their addresses. \item\end{DoxyCompactList}\item 
bool \hyperlink{classLinks_a7ea39430c84f2debfa1f9cc130a643a4}{remove\_\-link} (const \hyperlink{classIPv4}{IPv4} \&left\_\-addr, const \hyperlink{classIPv4}{IPv4} \&right\_\-addr)  throw (NoSuchAddress)
\begin{DoxyCompactList}\small\item\em Remove a link between two OLSR instances, given their addresses. \item\end{DoxyCompactList}\item 
size\_\-t \hyperlink{classLinks_a6a0be32241bf931367076ba61a44f69e}{remove\_\-all\_\-links} ()
\begin{DoxyCompactList}\small\item\em Remove all links in \hyperlink{protocolthe-p}{the} topology, without removing \hyperlink{protocolthe-p}{the} nodes. \item\end{DoxyCompactList}\item 
void \hyperlink{classLinks_a16144364d46eee50c80468ed783f4460}{purge\_\-link\_\-tuple} (\hyperlink{structLinks_1_1LinkTuple}{LinkTuple} \&lt, const \hyperlink{classIPv4}{IPv4} \&left\_\-addr, const \hyperlink{classIPv4}{IPv4} \&right\_\-addr)
\begin{DoxyCompactList}\small\item\em Purge a link given a reference to it. \item\end{DoxyCompactList}\item 
bool \hyperlink{classLinks_a0462eb9b555cf8fe426c0ba95d588c4f}{remove\_\-all\_\-links\_\-for\_\-addr} (const \hyperlink{classIPv4}{IPv4} \&link\_\-addr)  throw (NoSuchAddress)
\begin{DoxyCompactList}\small\item\em Given \hyperlink{protocolthe-p}{the} interface address of an OLSR node, remove all links referencing that interface and destroy them. \item\end{DoxyCompactList}\item 
\hypertarget{classLinks_af228bb477e4135af8a9dd022fe408694}{
\hyperlink{classSimulator}{Simulator} $\ast$ {\bfseries parent} ()}
\label{classLinks_af228bb477e4135af8a9dd022fe408694}

\item 
\hypertarget{classLinks_a61bda51af32014133bcb439a88bdf72b}{
\hyperlink{classEventLoop}{EventLoop} \& {\bfseries eventloop} ()}
\label{classLinks_a61bda51af32014133bcb439a88bdf72b}

\item 
\hypertarget{classLinks_ab3f3f8c2d9b55b5682e81923c851d6ff}{
\hyperlink{classNodes}{Nodes} $\ast$ {\bfseries nodes} ()}
\label{classLinks_ab3f3f8c2d9b55b5682e81923c851d6ff}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classLinks_a424a28515a2e47bedb97840d200ed538}{
\hyperlink{classSimulator}{Simulator} $\ast$ {\bfseries \_\-parent}}
\label{classLinks_a424a28515a2e47bedb97840d200ed538}

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

\item 
\hypertarget{classLinks_a48858fbd324d1f706b110cc0b8e1d24c}{
\hyperlink{classNodes}{Nodes} $\ast$ {\bfseries \_\-nodes}}
\label{classLinks_a48858fbd324d1f706b110cc0b8e1d24c}

\item 
\hypertarget{classLinks_a02267e4e87c478940418a717cda2ee0c}{
multimap$<$ pair$<$ \hyperlink{classIPv4}{IPv4}, \hyperlink{classIPv4}{IPv4} $>$, \hyperlink{structLinks_1_1LinkTuple}{LinkTuple} $>$ {\bfseries \_\-links}}
\label{classLinks_a02267e4e87c478940418a717cda2ee0c}

\end{DoxyCompactItemize}


\subsection{Member Function Documentation}
\hypertarget{classLinks_a565fc36732c2befe2c13bc429d9b324d}{
\index{Links@{Links}!add\_\-link@{add\_\-link}}
\index{add\_\-link@{add\_\-link}!Links@{Links}}
\subsubsection[{add\_\-link}]{\setlength{\rightskip}{0pt plus 5cm}bool Links::add\_\-link (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4} \&}]{left\_\-addr, }
\item[{const {\bf IPv4} \&}]{right\_\-addr}
\end{DoxyParamCaption}
)  throw ({\bf NoSuchAddress})}}
\label{classLinks_a565fc36732c2befe2c13bc429d9b324d}


Add a link between two OLSR instances, given their addresses. 

If no previously created link exists, a new instance of \hyperlink{classEmulateSubnet}{EmulateSubnet} is created. The link local broadcast address is always assumed to be 255.255.255.255 on \hyperlink{protocolthe-p}{the} link.


\begin{DoxyParams}{Parameters}
{\em left\_\-addr} & The OLSR interface address of \hyperlink{protocolthe-p}{the} left hand node. \\
\hline
{\em right\_\-addr} & The OLSR interface address of \hyperlink{protocolthe-p}{the} right hand node. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} link was successfully created, otherwise false. 
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em \hyperlink{classNoSuchAddress}{NoSuchAddress}} & if neither address exists. \\
\hline
\end{DoxyExceptions}
\hypertarget{classLinks_a16144364d46eee50c80468ed783f4460}{
\index{Links@{Links}!purge\_\-link\_\-tuple@{purge\_\-link\_\-tuple}}
\index{purge\_\-link\_\-tuple@{purge\_\-link\_\-tuple}!Links@{Links}}
\subsubsection[{purge\_\-link\_\-tuple}]{\setlength{\rightskip}{0pt plus 5cm}void Links::purge\_\-link\_\-tuple (
\begin{DoxyParamCaption}
\item[{{\bf LinkTuple} \&}]{lt, }
\item[{const {\bf IPv4} \&}]{left\_\-addr, }
\item[{const {\bf IPv4} \&}]{right\_\-addr}
\end{DoxyParamCaption}
)}}
\label{classLinks_a16144364d46eee50c80468ed783f4460}


Purge a link given a reference to it. 


\begin{DoxyParams}{Parameters}
{\em lt} & reference to a \hyperlink{structLinks_1_1LinkTuple}{LinkTuple}. \\
\hline
{\em left\_\-addr} & The OLSR interface address of \hyperlink{protocolthe-p}{the} left hand node. \\
\hline
{\em right\_\-addr} & The OLSR interface address of \hyperlink{protocolthe-p}{the} right hand node. \\
\hline
\end{DoxyParams}
\hypertarget{classLinks_a6a0be32241bf931367076ba61a44f69e}{
\index{Links@{Links}!remove\_\-all\_\-links@{remove\_\-all\_\-links}}
\index{remove\_\-all\_\-links@{remove\_\-all\_\-links}!Links@{Links}}
\subsubsection[{remove\_\-all\_\-links}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t Links::remove\_\-all\_\-links (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classLinks_a6a0be32241bf931367076ba61a44f69e}


Remove all links in \hyperlink{protocolthe-p}{the} topology, without removing \hyperlink{protocolthe-p}{the} nodes. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} number of links removed. 
\end{DoxyReturn}
\hypertarget{classLinks_a0462eb9b555cf8fe426c0ba95d588c4f}{
\index{Links@{Links}!remove\_\-all\_\-links\_\-for\_\-addr@{remove\_\-all\_\-links\_\-for\_\-addr}}
\index{remove\_\-all\_\-links\_\-for\_\-addr@{remove\_\-all\_\-links\_\-for\_\-addr}!Links@{Links}}
\subsubsection[{remove\_\-all\_\-links\_\-for\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}bool Links::remove\_\-all\_\-links\_\-for\_\-addr (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4} \&}]{link\_\-addr}
\end{DoxyParamCaption}
)  throw ({\bf NoSuchAddress})}}
\label{classLinks_a0462eb9b555cf8fe426c0ba95d588c4f}


Given \hyperlink{protocolthe-p}{the} interface address of an OLSR node, remove all links referencing that interface and destroy them. 


\begin{DoxyParams}{Parameters}
{\em left\_\-addr} & The OLSR interface address of \hyperlink{protocolthe-p}{the} left hand node. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} link was successfully created, otherwise false. 
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em \hyperlink{classNoSuchAddress}{NoSuchAddress}} & if link\_\-addr does not exist. \\
\hline
\end{DoxyExceptions}
\hypertarget{classLinks_a7ea39430c84f2debfa1f9cc130a643a4}{
\index{Links@{Links}!remove\_\-link@{remove\_\-link}}
\index{remove\_\-link@{remove\_\-link}!Links@{Links}}
\subsubsection[{remove\_\-link}]{\setlength{\rightskip}{0pt plus 5cm}bool Links::remove\_\-link (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4} \&}]{left\_\-addr, }
\item[{const {\bf IPv4} \&}]{right\_\-addr}
\end{DoxyParamCaption}
)  throw ({\bf NoSuchAddress})}}
\label{classLinks_a7ea39430c84f2debfa1f9cc130a643a4}


Remove a link between two OLSR instances, given their addresses. 


\begin{DoxyParams}{Parameters}
{\em left\_\-addr} & The OLSR interface address of \hyperlink{protocolthe-p}{the} left hand node. \\
\hline
{\em right\_\-addr} & The OLSR interface address of \hyperlink{protocolthe-p}{the} right hand node. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} link was successfully remove, otherwise false. 
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em \hyperlink{classNoSuchAddress}{NoSuchAddress}} & if neither address exists. \\
\hline
\end{DoxyExceptions}


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