\hypertarget{classLsa__header}{
\section{Lsa\_\-header Class Reference}
\label{classLsa__header}\index{Lsa\_\-header@{Lsa\_\-header}}
}


LSA Header.  




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

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classLsa__header_ad2a665a96e497637be6aa910ed7ac685}{
{\bfseries Lsa\_\-header} (\hyperlink{structOspfTypes_a60eb031df0c10af753789ae76b185ec2}{OspfTypes::Version} version)}
\label{classLsa__header_ad2a665a96e497637be6aa910ed7ac685}

\item 
\hypertarget{classLsa__header_a653792a8ac9711790ee0a842456d59ba}{
{\bfseries Lsa\_\-header} (const \hyperlink{classLsa__header}{Lsa\_\-header} \&rhs)}
\label{classLsa__header_a653792a8ac9711790ee0a842456d59ba}

\item 
\hypertarget{classLsa__header_a7de466a3422a2ee8cc129d8afff7f50a}{
\hyperlink{classLsa__header}{Lsa\_\-header} {\bfseries operator=} (const \hyperlink{classLsa__header}{Lsa\_\-header} \&rhs)}
\label{classLsa__header_a7de466a3422a2ee8cc129d8afff7f50a}

\item 
\hypertarget{classLsa__header_af69c3c829a25484a397ba85331913de0}{
void {\bfseries copy} (const \hyperlink{classLsa__header}{Lsa\_\-header} \&rhs)}
\label{classLsa__header_af69c3c829a25484a397ba85331913de0}

\item 
\hyperlink{classLsa__header}{Lsa\_\-header} \hyperlink{classLsa__header_a11aa288f64004c765875deaf739af72c}{decode} (uint8\_\-t $\ast$ptr) const   throw (InvalidPacket)
\begin{DoxyCompactList}\small\item\em Decode a LSA header and return a LSA header inline not a pointer. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa__header_af64358354c5220b5d35dd4e15e7a5c9b}{
void \hyperlink{classLsa__header_af64358354c5220b5d35dd4e15e7a5c9b}{decode\_\-inline} (uint8\_\-t $\ast$ptr)  throw (InvalidPacket)}
\label{classLsa__header_af64358354c5220b5d35dd4e15e7a5c9b}

\begin{DoxyCompactList}\small\item\em Decode this lsa header in this context. \item\end{DoxyCompactList}\item 
size\_\-t \hyperlink{classLsa__header_ae8720d8748db02f331948d814600a4a5}{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{classLsa__header_a001ca46565ad37c9fd2ec1281290f704}{
\hyperlink{structOspfTypes_a60eb031df0c10af753789ae76b185ec2}{OspfTypes::Version} {\bfseries get\_\-version} () const }
\label{classLsa__header_a001ca46565ad37c9fd2ec1281290f704}

\item 
\hypertarget{classLsa__header_a89a0be8a55ec38f9c40e13acfe846e62}{
void {\bfseries set\_\-ls\_\-age} (uint16\_\-t ls\_\-age)}
\label{classLsa__header_a89a0be8a55ec38f9c40e13acfe846e62}

\item 
\hypertarget{classLsa__header_a6ee48368e5f3d0c50cd267bcbcd3e3c1}{
uint16\_\-t {\bfseries get\_\-ls\_\-age} () const }
\label{classLsa__header_a6ee48368e5f3d0c50cd267bcbcd3e3c1}

\item 
\hypertarget{classLsa__header_ad0f181c60e01507032421fdb5ae8e28b}{
void {\bfseries set\_\-options} (uint8\_\-t options)}
\label{classLsa__header_ad0f181c60e01507032421fdb5ae8e28b}

\item 
\hypertarget{classLsa__header_af1deea07a9f71c09fc9bcb9c7288a80b}{
uint8\_\-t {\bfseries get\_\-options} () const }
\label{classLsa__header_af1deea07a9f71c09fc9bcb9c7288a80b}

\item 
\hypertarget{classLsa__header_a16aa17cf4e4cb2e0f01911b6ec512c54}{
void {\bfseries set\_\-ls\_\-type} (uint16\_\-t ls\_\-type)}
\label{classLsa__header_a16aa17cf4e4cb2e0f01911b6ec512c54}

\item 
\hypertarget{classLsa__header_a463a735cdc8a4f2fee693be49f452bed}{
uint16\_\-t {\bfseries get\_\-ls\_\-type} () const }
\label{classLsa__header_a463a735cdc8a4f2fee693be49f452bed}

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

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

\item 
\hypertarget{classLsa__header_ac812ab659eac840f8ac2397629eb28b4}{
void {\bfseries set\_\-advertising\_\-router} (uint32\_\-t advertising\_\-router)}
\label{classLsa__header_ac812ab659eac840f8ac2397629eb28b4}

\item 
\hypertarget{classLsa__header_a21f7966e4d80c5a73db8a30f8377cc70}{
uint32\_\-t {\bfseries get\_\-advertising\_\-router} () const }
\label{classLsa__header_a21f7966e4d80c5a73db8a30f8377cc70}

\item 
\hypertarget{classLsa__header_a489f21151e2ae7023cbe98f0260c0e84}{
void {\bfseries set\_\-ls\_\-sequence\_\-number} (int32\_\-t ls\_\-sequence\_\-number)}
\label{classLsa__header_a489f21151e2ae7023cbe98f0260c0e84}

\item 
\hypertarget{classLsa__header_a810ff29593ff9af9092451b442716b28}{
int32\_\-t {\bfseries get\_\-ls\_\-sequence\_\-number} () const }
\label{classLsa__header_a810ff29593ff9af9092451b442716b28}

\item 
\hypertarget{classLsa__header_af6c5f031c34f3f503f821392250fb59a}{
void {\bfseries set\_\-ls\_\-checksum} (uint16\_\-t ls\_\-checksum)}
\label{classLsa__header_af6c5f031c34f3f503f821392250fb59a}

\item 
\hypertarget{classLsa__header_a69c998602bf3bf350d4cbb478f0daf30}{
uint16\_\-t {\bfseries get\_\-ls\_\-checksum} () const }
\label{classLsa__header_a69c998602bf3bf350d4cbb478f0daf30}

\item 
\hypertarget{classLsa__header_ac0c0a60335b49bcc157461b84b81fb69}{
void {\bfseries set\_\-length} (uint16\_\-t length)}
\label{classLsa__header_ac0c0a60335b49bcc157461b84b81fb69}

\item 
\hypertarget{classLsa__header_af5badf04224f7435908c0ec99aff4b5c}{
uint16\_\-t {\bfseries get\_\-length} () const }
\label{classLsa__header_af5badf04224f7435908c0ec99aff4b5c}

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

\begin{DoxyCompactList}\small\item\em Generate a printable representation of \hyperlink{protocolthe-p}{the} header. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static size\_\-t \hyperlink{classLsa__header_ae23a3d80e4e404a7ae6a73f6a4822543}{length} ()
\item 
\hypertarget{classLsa__header_aefe5818ffc1fcb53864b363e01788afe}{
static uint16\_\-t \hyperlink{classLsa__header_aefe5818ffc1fcb53864b363e01788afe}{get\_\-lsa\_\-len\_\-from\_\-buffer} (uint8\_\-t $\ast$ptr)}
\label{classLsa__header_aefe5818ffc1fcb53864b363e01788afe}

\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} length of \hyperlink{protocolthe-p}{the} LSA from \hyperlink{protocolthe-p}{the} buffer provided. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classLsa__header_ae1585c98cb001ef5506ee10bdc729181}{
void {\bfseries decode} (\hyperlink{classLsa__header}{Lsa\_\-header} \&header, uint8\_\-t $\ast$ptr) const   throw (InvalidPacket)}
\label{classLsa__header_ae1585c98cb001ef5506ee10bdc729181}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classLsa__header_a864f5e280a36b417297dae4a1560072c}{
\hyperlink{structOspfTypes_a60eb031df0c10af753789ae76b185ec2}{OspfTypes::Version} {\bfseries \_\-version}}
\label{classLsa__header_a864f5e280a36b417297dae4a1560072c}

\item 
\hypertarget{classLsa__header_a1b646a90e32ac7ebcbdb01f2539985d5}{
uint16\_\-t {\bfseries \_\-LS\_\-age}}
\label{classLsa__header_a1b646a90e32ac7ebcbdb01f2539985d5}

\item 
\hypertarget{classLsa__header_a8025396a0bf24f1d6768109d8aa9aa96}{
uint8\_\-t {\bfseries \_\-options}}
\label{classLsa__header_a8025396a0bf24f1d6768109d8aa9aa96}

\item 
\hypertarget{classLsa__header_a99a6ddcad0dea7f1c5a772ce3e081476}{
uint16\_\-t {\bfseries \_\-ls\_\-type}}
\label{classLsa__header_a99a6ddcad0dea7f1c5a772ce3e081476}

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

\item 
\hypertarget{classLsa__header_a370cf6684cc6cfe590f60b434b3101e8}{
uint32\_\-t {\bfseries \_\-advertising\_\-router}}
\label{classLsa__header_a370cf6684cc6cfe590f60b434b3101e8}

\item 
\hypertarget{classLsa__header_ac45eea331e0fc090d414b9befec42d50}{
int32\_\-t {\bfseries \_\-ls\_\-sequence\_\-number}}
\label{classLsa__header_ac45eea331e0fc090d414b9befec42d50}

\item 
\hypertarget{classLsa__header_ae9b503134140760ec9d8778b3ac4010e}{
uint16\_\-t {\bfseries \_\-ls\_\-checksum}}
\label{classLsa__header_ae9b503134140760ec9d8778b3ac4010e}

\item 
\hypertarget{classLsa__header_a244c0a17295c16b60e8b342f921a7ee5}{
uint16\_\-t {\bfseries \_\-length}}
\label{classLsa__header_a244c0a17295c16b60e8b342f921a7ee5}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
LSA Header. Common header for all LSAs. Never store or pass a pointer, just deal with it inline. 

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


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

A LSA header is a fixed length, \hyperlink{protocolthe-p}{the} caller should have allocated enough space by calling \hyperlink{protocolthe-p}{the} \hyperlink{classLsa__header_ae23a3d80e4e404a7ae6a73f6a4822543}{length()} method.

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} number of bytes written. 
\end{DoxyReturn}
\hypertarget{classLsa__header_a11aa288f64004c765875deaf739af72c}{
\index{Lsa\_\-header@{Lsa\_\-header}!decode@{decode}}
\index{decode@{decode}!Lsa_header@{Lsa\_\-header}}
\subsubsection[{decode}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Lsa\_\-header} Lsa\_\-header::decode (
\begin{DoxyParamCaption}
\item[{uint8\_\-t $\ast$}]{ptr}
\end{DoxyParamCaption}
) const  throw ({\bf InvalidPacket})}}
\label{classLsa__header_a11aa288f64004c765875deaf739af72c}


Decode a LSA header and return a LSA header inline not a pointer. 

A LSA header is a fixed length, \hyperlink{protocolthe-p}{the} caller should have allocated enough space by calling \hyperlink{protocolthe-p}{the} \hyperlink{classLsa__header_ae23a3d80e4e404a7ae6a73f6a4822543}{length()} method. \hypertarget{classLsa__header_ae23a3d80e4e404a7ae6a73f6a4822543}{
\index{Lsa\_\-header@{Lsa\_\-header}!length@{length}}
\index{length@{length}!Lsa_header@{Lsa\_\-header}}
\subsubsection[{length}]{\setlength{\rightskip}{0pt plus 5cm}static size\_\-t Lsa\_\-header::length (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, static\mbox{]}}}}
\label{classLsa__header_ae23a3d80e4e404a7ae6a73f6a4822543}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} length of an LSA header. 
\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}
