\hypertarget{classHelloPacket}{
\section{HelloPacket Class Reference}
\label{classHelloPacket}\index{HelloPacket@{HelloPacket}}
}


Hello packet.  




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

Inheritance diagram for HelloPacket:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classHelloPacket}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classHelloPacket_a5abacf1d0865ed81bf81e326c2535b53}{
{\bfseries HelloPacket} (\hyperlink{structOspfTypes_a60eb031df0c10af753789ae76b185ec2}{OspfTypes::Version} version)}
\label{classHelloPacket_a5abacf1d0865ed81bf81e326c2535b53}

\item 
\hyperlink{structOspfTypes_abe52a1f48e880751028d473f6a9f780d}{OspfTypes::Type} \hyperlink{classHelloPacket_affb0bf4c17eacca50dca86c74a2bd78c}{get\_\-type} () const 
\begin{DoxyCompactList}\small\item\em It is \hyperlink{protocolthe-p}{the} responsibilty of \hyperlink{protocolthe-p}{the} derived type to return this information. \item\end{DoxyCompactList}\item 
\hyperlink{classPacket}{Packet} $\ast$ \hyperlink{classHelloPacket_a7e952641e439a304f701e289a5f42cf4}{decode} (uint8\_\-t $\ast$ptr, size\_\-t len) const   throw (InvalidPacket)
\begin{DoxyCompactList}\small\item\em Decode \hyperlink{protocolthe-p}{the} packet. \item\end{DoxyCompactList}\item 
bool \hyperlink{classHelloPacket_ab68d6c757c2d62ccca62b3a9cd45efa2}{encode} (vector$<$ uint8\_\-t $>$ \&pkt)
\begin{DoxyCompactList}\small\item\em Encode \hyperlink{protocolthe-p}{the} packet. \item\end{DoxyCompactList}\item 
\hypertarget{classHelloPacket_aa3a03f10ea535c70c7988874617715b8}{
void {\bfseries set\_\-network\_\-mask} (uint32\_\-t network\_\-mask)}
\label{classHelloPacket_aa3a03f10ea535c70c7988874617715b8}

\item 
\hypertarget{classHelloPacket_a843896f13fa4d638d371d8e0ac5b2a19}{
uint32\_\-t {\bfseries get\_\-network\_\-mask} () const }
\label{classHelloPacket_a843896f13fa4d638d371d8e0ac5b2a19}

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

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

\item 
\hypertarget{classHelloPacket_aae54cb558b13172325d9493e50095ba8}{
void {\bfseries set\_\-hello\_\-interval} (uint16\_\-t hello\_\-interval)}
\label{classHelloPacket_aae54cb558b13172325d9493e50095ba8}

\item 
\hypertarget{classHelloPacket_a14f39cafd8c4e99a459e5565e675449d}{
uint16\_\-t {\bfseries get\_\-hello\_\-interval} () const }
\label{classHelloPacket_a14f39cafd8c4e99a459e5565e675449d}

\item 
\hypertarget{classHelloPacket_aeb90d803bc55d3fd8f8dcfa8141af75e}{
void {\bfseries set\_\-options} (uint32\_\-t options)}
\label{classHelloPacket_aeb90d803bc55d3fd8f8dcfa8141af75e}

\item 
\hypertarget{classHelloPacket_afea21e24373fd6164ba5c0a0cdae5ff0}{
uint32\_\-t {\bfseries get\_\-options} () const }
\label{classHelloPacket_afea21e24373fd6164ba5c0a0cdae5ff0}

\item 
\hypertarget{classHelloPacket_a76d89d5f570694e55d7f93d79c83f84e}{
void {\bfseries set\_\-router\_\-priority} (uint8\_\-t router\_\-priority)}
\label{classHelloPacket_a76d89d5f570694e55d7f93d79c83f84e}

\item 
\hypertarget{classHelloPacket_ab78b7a932eba3a02d15dd6d0b70986a3}{
uint8\_\-t {\bfseries get\_\-router\_\-priority} () const }
\label{classHelloPacket_ab78b7a932eba3a02d15dd6d0b70986a3}

\item 
\hypertarget{classHelloPacket_a0d56945b2acf700a27089d3ecd25230a}{
void {\bfseries set\_\-router\_\-dead\_\-interval} (uint32\_\-t router\_\-dead\_\-interval)}
\label{classHelloPacket_a0d56945b2acf700a27089d3ecd25230a}

\item 
\hypertarget{classHelloPacket_abb11bf9688c497a7de3900606691f00e}{
uint32\_\-t {\bfseries get\_\-router\_\-dead\_\-interval} () const }
\label{classHelloPacket_abb11bf9688c497a7de3900606691f00e}

\item 
\hypertarget{classHelloPacket_a2600a7353910a229da718ab8ed06dd6c}{
void {\bfseries set\_\-designated\_\-router} (\hyperlink{structOspfTypes_a8fc36f0cbcee50cfdb0d10b192aaa53a}{OspfTypes::RouterID} dr)}
\label{classHelloPacket_a2600a7353910a229da718ab8ed06dd6c}

\item 
\hypertarget{classHelloPacket_a69e7c892359ef834c7d272c02d7251c8}{
\hyperlink{structOspfTypes_a8fc36f0cbcee50cfdb0d10b192aaa53a}{OspfTypes::RouterID} {\bfseries get\_\-designated\_\-router} () const }
\label{classHelloPacket_a69e7c892359ef834c7d272c02d7251c8}

\item 
\hypertarget{classHelloPacket_aefd5c4e5dbd02a9e57c842bbfe26c8b7}{
void {\bfseries set\_\-backup\_\-designated\_\-router} (\hyperlink{structOspfTypes_a8fc36f0cbcee50cfdb0d10b192aaa53a}{OspfTypes::RouterID} bdr)}
\label{classHelloPacket_aefd5c4e5dbd02a9e57c842bbfe26c8b7}

\item 
\hypertarget{classHelloPacket_add582ad8ad0301f8a84f44a0e1489305}{
\hyperlink{structOspfTypes_a8fc36f0cbcee50cfdb0d10b192aaa53a}{OspfTypes::RouterID} {\bfseries get\_\-backup\_\-designated\_\-router} () const }
\label{classHelloPacket_add582ad8ad0301f8a84f44a0e1489305}

\item 
\hypertarget{classHelloPacket_a35913b7d8639e7e525d688cbbdb27377}{
list$<$ \hyperlink{structOspfTypes_a8fc36f0cbcee50cfdb0d10b192aaa53a}{OspfTypes::RouterID} $>$ \& {\bfseries get\_\-neighbours} ()}
\label{classHelloPacket_a35913b7d8639e7e525d688cbbdb27377}

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

\begin{DoxyCompactList}\small\item\em Generate a printable representation of \hyperlink{protocolthe-p}{the} packet. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classHelloPacket_a99b53b664bbc9603f056261efdcda319}{
static const size\_\-t {\bfseries MINIMUM\_\-LENGTH} = 20}
\label{classHelloPacket_a99b53b664bbc9603f056261efdcda319}

\item 
\hypertarget{classHelloPacket_aa193f936ee22792c297a26f53bf8234a}{
static const size\_\-t {\bfseries DESIGNATED\_\-ROUTER\_\-OFFSET} = 12}
\label{classHelloPacket_aa193f936ee22792c297a26f53bf8234a}

\item 
\hypertarget{classHelloPacket_ad724877cf5aa6e16cc67bf75fd66591d}{
static const size\_\-t {\bfseries BACKUP\_\-DESIGNATED\_\-ROUTER\_\-OFFSET} = 16}
\label{classHelloPacket_ad724877cf5aa6e16cc67bf75fd66591d}

\item 
\hypertarget{classHelloPacket_a462bd2926bf0cf8d02825335cc8f7412}{
static const size\_\-t {\bfseries NETWORK\_\-MASK\_\-OFFSET} = 0}
\label{classHelloPacket_a462bd2926bf0cf8d02825335cc8f7412}

\item 
\hypertarget{classHelloPacket_ae53eb5cf86fad74b1d30c2e22618d296}{
static const size\_\-t {\bfseries HELLO\_\-INTERVAL\_\-V2\_\-OFFSET} = 4}
\label{classHelloPacket_ae53eb5cf86fad74b1d30c2e22618d296}

\item 
\hypertarget{classHelloPacket_a413ea7b4d1edc4c13f01ac0c07f1d3c0}{
static const size\_\-t {\bfseries OPTIONS\_\-V2\_\-OFFSET} = 6}
\label{classHelloPacket_a413ea7b4d1edc4c13f01ac0c07f1d3c0}

\item 
\hypertarget{classHelloPacket_a4fb8ff6bc84f4b327108c3ebee686c0d}{
static const size\_\-t {\bfseries ROUTER\_\-PRIORITY\_\-V2\_\-OFFSET} = 7}
\label{classHelloPacket_a4fb8ff6bc84f4b327108c3ebee686c0d}

\item 
\hypertarget{classHelloPacket_a8f1acb71559c72c6939815b49d9a9adc}{
static const size\_\-t {\bfseries ROUTER\_\-DEAD\_\-INTERVAL\_\-V2\_\-OFFSET} = 8}
\label{classHelloPacket_a8f1acb71559c72c6939815b49d9a9adc}

\item 
\hypertarget{classHelloPacket_a6fbb38d7f66e91ea54e920e9ca4d3203}{
static const size\_\-t {\bfseries INTERFACE\_\-ID\_\-OFFSET} = 0}
\label{classHelloPacket_a6fbb38d7f66e91ea54e920e9ca4d3203}

\item 
\hypertarget{classHelloPacket_a77194ed04e917e5d08982094ef441b2e}{
static const size\_\-t {\bfseries ROUTER\_\-PRIORITY\_\-V3\_\-OFFSET} = 4}
\label{classHelloPacket_a77194ed04e917e5d08982094ef441b2e}

\item 
\hypertarget{classHelloPacket_a4141ae0298abab77571a8c853dfc2fd7}{
static const size\_\-t {\bfseries OPTIONS\_\-V3\_\-OFFSET} = 4}
\label{classHelloPacket_a4141ae0298abab77571a8c853dfc2fd7}

\item 
\hypertarget{classHelloPacket_a2b989066d036e9d1bf9f3030d8e69752}{
static const size\_\-t {\bfseries HELLO\_\-INTERVAL\_\-V3\_\-OFFSET} = 8}
\label{classHelloPacket_a2b989066d036e9d1bf9f3030d8e69752}

\item 
\hypertarget{classHelloPacket_afcfa8780aed0d55bfb4d21e4153966f8}{
static const size\_\-t {\bfseries ROUTER\_\-DEAD\_\-INTERVAL\_\-V3\_\-OFFSET} = 10}
\label{classHelloPacket_afcfa8780aed0d55bfb4d21e4153966f8}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classHelloPacket_a3b29d2ddc76d3b7bde7ba6bb51a085c3}{
uint32\_\-t {\bfseries \_\-network\_\-mask}}
\label{classHelloPacket_a3b29d2ddc76d3b7bde7ba6bb51a085c3}

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

\item 
\hypertarget{classHelloPacket_a7b6c23dc0e161ab0033773a3582d9895}{
uint16\_\-t {\bfseries \_\-hello\_\-interval}}
\label{classHelloPacket_a7b6c23dc0e161ab0033773a3582d9895}

\item 
\hypertarget{classHelloPacket_acf9f425e167ad67e8e458ede2c7fe880}{
uint32\_\-t {\bfseries \_\-options}}
\label{classHelloPacket_acf9f425e167ad67e8e458ede2c7fe880}

\item 
\hypertarget{classHelloPacket_a0c896dca065eda5400b9c1b07687c509}{
uint8\_\-t {\bfseries \_\-router\_\-priority}}
\label{classHelloPacket_a0c896dca065eda5400b9c1b07687c509}

\item 
\hypertarget{classHelloPacket_a73e2301a9bb0d2d685695e755168313d}{
uint32\_\-t {\bfseries \_\-router\_\-dead\_\-interval}}
\label{classHelloPacket_a73e2301a9bb0d2d685695e755168313d}

\item 
\hypertarget{classHelloPacket_a077b8ae95e109330d1fbe3cbbdb329aa}{
\hyperlink{structOspfTypes_a8fc36f0cbcee50cfdb0d10b192aaa53a}{OspfTypes::RouterID} {\bfseries \_\-dr}}
\label{classHelloPacket_a077b8ae95e109330d1fbe3cbbdb329aa}

\item 
\hypertarget{classHelloPacket_a97cc2ba3056649888b40fb5e17ca153d}{
\hyperlink{structOspfTypes_a8fc36f0cbcee50cfdb0d10b192aaa53a}{OspfTypes::RouterID} {\bfseries \_\-bdr}}
\label{classHelloPacket_a97cc2ba3056649888b40fb5e17ca153d}

\item 
\hypertarget{classHelloPacket_a3e34b18685cfec903ec1447a620751de}{
list$<$ \hyperlink{structOspfTypes_a8fc36f0cbcee50cfdb0d10b192aaa53a}{OspfTypes::RouterID} $>$ {\bfseries \_\-neighbours}}
\label{classHelloPacket_a3e34b18685cfec903ec1447a620751de}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Hello packet. 

\subsection{Member Function Documentation}
\hypertarget{classHelloPacket_a7e952641e439a304f701e289a5f42cf4}{
\index{HelloPacket@{HelloPacket}!decode@{decode}}
\index{decode@{decode}!HelloPacket@{HelloPacket}}
\subsubsection[{decode}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Packet} $\ast$ HelloPacket::decode (
\begin{DoxyParamCaption}
\item[{uint8\_\-t $\ast$}]{ptr, }
\item[{size\_\-t}]{len}
\end{DoxyParamCaption}
) const  throw ({\bf InvalidPacket})\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classHelloPacket_a7e952641e439a304f701e289a5f42cf4}


Decode \hyperlink{protocolthe-p}{the} packet. 

The returned packet must be free'd. 

Implements \hyperlink{classPacket_af6b945f661691c93345e93bd3d01fd2d}{Packet}.

\hypertarget{classHelloPacket_ab68d6c757c2d62ccca62b3a9cd45efa2}{
\index{HelloPacket@{HelloPacket}!encode@{encode}}
\index{encode@{encode}!HelloPacket@{HelloPacket}}
\subsubsection[{encode}]{\setlength{\rightskip}{0pt plus 5cm}bool HelloPacket::encode (
\begin{DoxyParamCaption}
\item[{vector$<$ uint8\_\-t $>$ \&}]{pkt}
\end{DoxyParamCaption}
)}}
\label{classHelloPacket_ab68d6c757c2d62ccca62b3a9cd45efa2}


Encode \hyperlink{protocolthe-p}{the} packet. 


\begin{DoxyParams}{Parameters}
{\em pkt} & vector into which \hyperlink{protocolthe-p}{the} packet should be placed. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} encoding succeeded. 
\end{DoxyReturn}


Reimplemented from \hyperlink{classPacket_ab13870adf8a96f499581589f1d1463ce}{Packet}.

\hypertarget{classHelloPacket_affb0bf4c17eacca50dca86c74a2bd78c}{
\index{HelloPacket@{HelloPacket}!get\_\-type@{get\_\-type}}
\index{get\_\-type@{get\_\-type}!HelloPacket@{HelloPacket}}
\subsubsection[{get\_\-type}]{\setlength{\rightskip}{0pt plus 5cm}{\bf OspfTypes::Type} HelloPacket::get\_\-type (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classHelloPacket_affb0bf4c17eacca50dca86c74a2bd78c}


It is \hyperlink{protocolthe-p}{the} responsibilty of \hyperlink{protocolthe-p}{the} derived type to return this information. 

\begin{DoxyReturn}{Returns}
The type this packet represents. 
\end{DoxyReturn}


Implements \hyperlink{classPacket_aa0f90dc35cd40f34f6eac3a7cdb8d69b}{Packet}.



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