\hypertarget{classRouterLink}{
\section{RouterLink Class Reference}
\label{classRouterLink}\index{RouterLink@{RouterLink}}
}


Defines a link/interface, carried in a \hyperlink{classRouterLsa}{RouterLsa}.  




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

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum {\bfseries Type} \{ {\bfseries p2p} =  1, 
{\bfseries transit} =  2, 
{\bfseries stub} =  3, 
{\bfseries vlink} =  4
 \}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRouterLink_afe8d8d9e03f78d5196a6d4071be9738f}{
{\bfseries RouterLink} (\hyperlink{structOspfTypes_a60eb031df0c10af753789ae76b185ec2}{OspfTypes::Version} version)}
\label{classRouterLink_afe8d8d9e03f78d5196a6d4071be9738f}

\item 
\hypertarget{classRouterLink_a048d5e5f20407ba8d857844199425b2d}{
{\bfseries RouterLink} (const \hyperlink{classRouterLink}{RouterLink} \&rhs)}
\label{classRouterLink_a048d5e5f20407ba8d857844199425b2d}

\item 
\hypertarget{classRouterLink_af2d51051237a869c079495e33adb2232}{
\hyperlink{classRouterLink}{RouterLink} {\bfseries operator=} (const \hyperlink{classRouterLink}{RouterLink} \&rhs)}
\label{classRouterLink_af2d51051237a869c079495e33adb2232}

\item 
\hypertarget{classRouterLink_a39e57d171f7cf9f8fdf9d462f245cf01}{
void {\bfseries copy} (const \hyperlink{classRouterLink}{RouterLink} \&rhs)}
\label{classRouterLink_a39e57d171f7cf9f8fdf9d462f245cf01}

\item 
\hypertarget{classRouterLink_a5534d19fc67ac09fbc20b0df7fdf9f49}{
bool {\bfseries operator==} (const \hyperlink{classRouterLink}{RouterLink} \&rhs)}
\label{classRouterLink_a5534d19fc67ac09fbc20b0df7fdf9f49}

\item 
size\_\-t \hyperlink{classRouterLink_a4f2993e117fd41f76743d47bc2ea27b6}{length} () const 
\item 
\hyperlink{classRouterLink}{RouterLink} \hyperlink{classRouterLink_a4e3b844b5baf5cf13a167d0b745ff5ca}{decode} (uint8\_\-t $\ast$ptr, size\_\-t \&len) const   throw (InvalidPacket)
\begin{DoxyCompactList}\small\item\em Decode a \hyperlink{classRouterLink}{RouterLink}. \item\end{DoxyCompactList}\item 
size\_\-t \hyperlink{classRouterLink_ae69c09be426831278701e869ecf5dc54}{copy\_\-out} (uint8\_\-t $\ast$to\_\-uint8) const 
\begin{DoxyCompactList}\small\item\em Copy a wire format representation to \hyperlink{protocolthe-p}{the} pointer provided. \item\end{DoxyCompactList}\item 
\hypertarget{classRouterLink_a259010e786809677b7ad33555d7d4d4b}{
\hyperlink{structOspfTypes_a60eb031df0c10af753789ae76b185ec2}{OspfTypes::Version} {\bfseries get\_\-version} () const }
\label{classRouterLink_a259010e786809677b7ad33555d7d4d4b}

\item 
\hypertarget{classRouterLink_aac0f037586e5f181ed2e4d4281d5892d}{
void {\bfseries set\_\-type} (Type t)}
\label{classRouterLink_aac0f037586e5f181ed2e4d4281d5892d}

\item 
\hypertarget{classRouterLink_ad615070fa9bd51a680763e92512e2a78}{
Type {\bfseries get\_\-type} () const }
\label{classRouterLink_ad615070fa9bd51a680763e92512e2a78}

\item 
\hypertarget{classRouterLink_aa132c66f385cd9e26a5b021fb9f34373}{
void {\bfseries set\_\-metric} (uint16\_\-t metric)}
\label{classRouterLink_aa132c66f385cd9e26a5b021fb9f34373}

\item 
\hypertarget{classRouterLink_a43bc79a38bf395ead9f1aa2627ea1275}{
uint16\_\-t {\bfseries get\_\-metric} () const }
\label{classRouterLink_a43bc79a38bf395ead9f1aa2627ea1275}

\item 
\hypertarget{classRouterLink_a487e74be1f862ac036b1d10e2bc4a337}{
void {\bfseries set\_\-link\_\-id} (uint32\_\-t link\_\-id)}
\label{classRouterLink_a487e74be1f862ac036b1d10e2bc4a337}

\item 
\hypertarget{classRouterLink_ab3d6d5ffe94b0d8de4482b4cc7dc6a31}{
uint32\_\-t {\bfseries get\_\-link\_\-id} () const }
\label{classRouterLink_ab3d6d5ffe94b0d8de4482b4cc7dc6a31}

\item 
\hypertarget{classRouterLink_add05a297568f000af823ffa8bd7e9860}{
void {\bfseries set\_\-link\_\-data} (uint32\_\-t link\_\-data)}
\label{classRouterLink_add05a297568f000af823ffa8bd7e9860}

\item 
\hypertarget{classRouterLink_a7bd372074bc0776a0138c0c951e5702f}{
uint32\_\-t {\bfseries get\_\-link\_\-data} () const }
\label{classRouterLink_a7bd372074bc0776a0138c0c951e5702f}

\item 
\hypertarget{classRouterLink_a0d9b51972b13be49092acb59a370b2c2}{
void {\bfseries set\_\-interface\_\-id} (uint32\_\-t interface\_\-id)}
\label{classRouterLink_a0d9b51972b13be49092acb59a370b2c2}

\item 
\hypertarget{classRouterLink_a1e7caf29f374156a380d307888f853a4}{
uint32\_\-t {\bfseries get\_\-interface\_\-id} () const }
\label{classRouterLink_a1e7caf29f374156a380d307888f853a4}

\item 
\hypertarget{classRouterLink_aec15c182a45e6c236256a77f69c1790e}{
void {\bfseries set\_\-neighbour\_\-interface\_\-id} (uint32\_\-t neighbour\_\-interface\_\-id)}
\label{classRouterLink_aec15c182a45e6c236256a77f69c1790e}

\item 
\hypertarget{classRouterLink_a413ef5c6392e02624657b5d99d9d302a}{
uint32\_\-t {\bfseries get\_\-neighbour\_\-interface\_\-id} () const }
\label{classRouterLink_a413ef5c6392e02624657b5d99d9d302a}

\item 
\hypertarget{classRouterLink_a7a2ab1010e37e89d5069c0ee9c0f5efb}{
void {\bfseries set\_\-neighbour\_\-router\_\-id} (uint32\_\-t neighbour\_\-router\_\-id)}
\label{classRouterLink_a7a2ab1010e37e89d5069c0ee9c0f5efb}

\item 
\hypertarget{classRouterLink_ae60b5b44fdd99750abddca7f72759da7}{
uint32\_\-t {\bfseries get\_\-neighbour\_\-router\_\-id} () const }
\label{classRouterLink_ae60b5b44fdd99750abddca7f72759da7}

\item 
\hypertarget{classRouterLink_a5a81a90a63beb9f21abb3ac8e3c108b4}{
string \hyperlink{classRouterLink_a5a81a90a63beb9f21abb3ac8e3c108b4}{str} () const }
\label{classRouterLink_a5a81a90a63beb9f21abb3ac8e3c108b4}

\begin{DoxyCompactList}\small\item\em Generate a printable representation of \hyperlink{protocolthe-p}{the} header. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRouterLink_ab0fff4260b90bdf55986b3860fa05839}{
const \hyperlink{structOspfTypes_a60eb031df0c10af753789ae76b185ec2}{OspfTypes::Version} {\bfseries \_\-version}}
\label{classRouterLink_ab0fff4260b90bdf55986b3860fa05839}

\item 
\hypertarget{classRouterLink_a44e4e8a3d9e346b5cc43fe614209ba72}{
Type {\bfseries \_\-type}}
\label{classRouterLink_a44e4e8a3d9e346b5cc43fe614209ba72}

\item 
\hypertarget{classRouterLink_a30fd1815627189c13324c153826b4742}{
uint16\_\-t {\bfseries \_\-metric}}
\label{classRouterLink_a30fd1815627189c13324c153826b4742}

\item 
\hypertarget{classRouterLink_a7435d9773f568a7800ccd66a21579b8e}{
uint32\_\-t {\bfseries \_\-link\_\-id}}
\label{classRouterLink_a7435d9773f568a7800ccd66a21579b8e}

\item 
\hypertarget{classRouterLink_ae134ca5086dca2e9ab9168ea464b0f55}{
uint32\_\-t {\bfseries \_\-link\_\-data}}
\label{classRouterLink_ae134ca5086dca2e9ab9168ea464b0f55}

\item 
\hypertarget{classRouterLink_a2c1977c18ba3fc23110db6729fea8b7c}{
uint32\_\-t {\bfseries \_\-interface\_\-id}}
\label{classRouterLink_a2c1977c18ba3fc23110db6729fea8b7c}

\item 
\hypertarget{classRouterLink_ae2db8246557172e3aac5780cc09a7c9a}{
uint32\_\-t {\bfseries \_\-neighbour\_\-interface\_\-id}}
\label{classRouterLink_ae2db8246557172e3aac5780cc09a7c9a}

\item 
\hypertarget{classRouterLink_a9e00226e2581a041efd9125b1e59b821}{
uint32\_\-t {\bfseries \_\-neighbour\_\-router\_\-id}}
\label{classRouterLink_a9e00226e2581a041efd9125b1e59b821}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Defines a link/interface, carried in a \hyperlink{classRouterLsa}{RouterLsa}. 

\subsection{Member Function Documentation}
\hypertarget{classRouterLink_ae69c09be426831278701e869ecf5dc54}{
\index{RouterLink@{RouterLink}!copy\_\-out@{copy\_\-out}}
\index{copy\_\-out@{copy\_\-out}!RouterLink@{RouterLink}}
\subsubsection[{copy\_\-out}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t RouterLink::copy\_\-out (
\begin{DoxyParamCaption}
\item[{uint8\_\-t $\ast$}]{to\_\-uint8}
\end{DoxyParamCaption}
) const}}
\label{classRouterLink_ae69c09be426831278701e869ecf5dc54}


Copy a wire format representation to \hyperlink{protocolthe-p}{the} pointer provided. 

The caller should have called \hyperlink{classRouterLink_a4f2993e117fd41f76743d47bc2ea27b6}{length()} to pre-\/allocate \hyperlink{protocolthe-p}{the} space required.

\hyperlink{classRouterLink_a4f2993e117fd41f76743d47bc2ea27b6}{length()} should be called by \hyperlink{protocolthe-p}{the} caller to verify enough space is available. \begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} number of bytes written. 
\end{DoxyReturn}
\hypertarget{classRouterLink_a4e3b844b5baf5cf13a167d0b745ff5ca}{
\index{RouterLink@{RouterLink}!decode@{decode}}
\index{decode@{decode}!RouterLink@{RouterLink}}
\subsubsection[{decode}]{\setlength{\rightskip}{0pt plus 5cm}{\bf RouterLink} RouterLink::decode (
\begin{DoxyParamCaption}
\item[{uint8\_\-t $\ast$}]{ptr, }
\item[{size\_\-t \&}]{len}
\end{DoxyParamCaption}
) const  throw ({\bf InvalidPacket})}}
\label{classRouterLink_a4e3b844b5baf5cf13a167d0b745ff5ca}


Decode a \hyperlink{classRouterLink}{RouterLink}. 


\begin{DoxyParams}{Parameters}
{\em buf} & pointer to buffer. \\
\hline
{\em len} & length of \hyperlink{protocolthe-p}{the} buffer on input set to \hyperlink{protocolthe-p}{the} number of bytes consumed on output.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A \hyperlink{classRouterLink}{RouterLink}. 
\end{DoxyReturn}
\hypertarget{classRouterLink_a4f2993e117fd41f76743d47bc2ea27b6}{
\index{RouterLink@{RouterLink}!length@{length}}
\index{length@{length}!RouterLink@{RouterLink}}
\subsubsection[{length}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t RouterLink::length (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classRouterLink_a4f2993e117fd41f76743d47bc2ea27b6}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} number of bytes \hyperlink{protocolthe-p}{the} encoded data will occupy. 
\end{DoxyReturn}


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