\hypertarget{classLsa}{
\section{Lsa Class Reference}
\label{classLsa}\index{Lsa@{Lsa}}
}


Link State Advertisement (LSA)  




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

Inheritance diagram for Lsa:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=9.000000cm]{classLsa}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classLsa_a15b0071d5b455ef6676ea5cfd4cbca98}{
typedef \hyperlink{classref__ptr}{ref\_\-ptr}$<$ \hyperlink{classLsa}{Lsa} $>$ \hyperlink{classLsa_a15b0071d5b455ef6676ea5cfd4cbca98}{LsaRef}}
\label{classLsa_a15b0071d5b455ef6676ea5cfd4cbca98}

\begin{DoxyCompactList}\small\item\em A reference counted pointer to an LSA which will be automatically deleted. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classLsa_a0c7b8f5dd0d058c18d17ce370f21705f}{
{\bfseries Lsa} (\hyperlink{structOspfTypes_a60eb031df0c10af753789ae76b185ec2}{OspfTypes::Version} version)}
\label{classLsa_a0c7b8f5dd0d058c18d17ce370f21705f}

\item 
\hyperlink{classLsa_a17f4ef57d9744b81301a19b384a74c14}{Lsa} (\hyperlink{structOspfTypes_a60eb031df0c10af753789ae76b185ec2}{OspfTypes::Version} version, uint8\_\-t $\ast$buf, size\_\-t len)
\begin{DoxyCompactList}\small\item\em Note passing in \hyperlink{protocolthe-p}{the} LSA buffer does not imply that it will be decoded. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_abace080cea1630b3092bd652b054b85d}{
\hyperlink{structOspfTypes_a60eb031df0c10af753789ae76b185ec2}{OspfTypes::Version} {\bfseries get\_\-version} () const }
\label{classLsa_abace080cea1630b3092bd652b054b85d}

\item 
virtual uint16\_\-t \hyperlink{classLsa_a0dcc648678ac88856635609a17029ae9}{get\_\-ls\_\-type} () const =0
\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 
virtual bool \hyperlink{classLsa_abcb3b34b9408371def09e5a166441832}{known} () const 
\begin{DoxyCompactList}\small\item\em OSPFv3 only is this a known LSA. \item\end{DoxyCompactList}\item 
virtual bool \hyperlink{classLsa_acde31d35a1316de4e531b464bd2d1519}{external} () const 
\item 
virtual bool \hyperlink{classLsa_ac4df00a711468ca7dd10c268d5885728}{type7} () const 
\item 
virtual size\_\-t \hyperlink{classLsa_ad3324ea3bfa81ff90d15690c5ccbd1e4}{min\_\-length} () const =0
\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 
virtual \hyperlink{classref__ptr}{LsaRef} \hyperlink{classLsa_a2658a7d54d470268138d15938be0f464}{decode} (uint8\_\-t $\ast$buf, size\_\-t \&len) const =0  throw (InvalidPacket)
\begin{DoxyCompactList}\small\item\em Decode an LSA. \item\end{DoxyCompactList}\item 
virtual bool \hyperlink{classLsa_ae3bd3a0bd24ed458cc8ac8d7e91d1c35}{encode} ()=0
\begin{DoxyCompactList}\small\item\em Encode an LSA for transmission. \item\end{DoxyCompactList}\item 
uint8\_\-t $\ast$ \hyperlink{classLsa_a7031b85d7384ba8a27bf726a1e245a29}{lsa} (size\_\-t \&len)
\begin{DoxyCompactList}\small\item\em Get a reference to \hyperlink{protocolthe-p}{the} raw LSA. \item\end{DoxyCompactList}\item 
bool \hyperlink{classLsa_aae15052a0651413596bb44685aaf83a2}{available} () const 
\begin{DoxyCompactList}\small\item\em Is a wire format version available? \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_a8beddbd38fbba805a6e4826b4c729d51}{
\hyperlink{classLsa__header}{Lsa\_\-header} \& {\bfseries get\_\-header} ()}
\label{classLsa_a8beddbd38fbba805a6e4826b4c729d51}

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

\item 
\hypertarget{classLsa_aa779b66bd93b81b2f789f146aa659cce}{
bool \hyperlink{classLsa_aa779b66bd93b81b2f789f146aa659cce}{valid} () const }
\label{classLsa_aa779b66bd93b81b2f789f146aa659cce}

\begin{DoxyCompactList}\small\item\em Is this LSA valid? \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_a41e79854eab9524ca5022704646ceed9}{
void \hyperlink{classLsa_a41e79854eab9524ca5022704646ceed9}{invalidate} (bool invalidate=true)}
\label{classLsa_a41e79854eab9524ca5022704646ceed9}

\begin{DoxyCompactList}\small\item\em Unconditionally clear \hyperlink{protocolthe-p}{the} timer and invalidate \hyperlink{protocolthe-p}{the} LSA if required, \hyperlink{protocolthe-p}{the} default is to invalidate \hyperlink{protocolthe-p}{the} LSA. \item\end{DoxyCompactList}\item 
bool \hyperlink{classLsa_a046045e368f05f7f22d10807e77c0a1e}{get\_\-self\_\-originating} () const 
\item 
\hypertarget{classLsa_a306a2780986f32f8d59190deaff0c274}{
void \hyperlink{classLsa_a306a2780986f32f8d59190deaff0c274}{set\_\-self\_\-originating} (bool orig)}
\label{classLsa_a306a2780986f32f8d59190deaff0c274}

\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} state of this LSA with respect to self originating or not. \item\end{DoxyCompactList}\item 
void \hyperlink{classLsa_a2cceb4a1fb8614b717b181810e18caed}{record\_\-creation\_\-time} (\hyperlink{classTimeVal}{TimeVal} now)
\begin{DoxyCompactList}\small\item\em Record \hyperlink{protocolthe-p}{the} time of creation and initial age. \item\end{DoxyCompactList}\item 
void \hyperlink{classLsa_a8125c33128d99570889864c3ab187d5b}{get\_\-creation\_\-time} (\hyperlink{classTimeVal}{TimeVal} \&now)
\begin{DoxyCompactList}\small\item\em Get arrival time. \item\end{DoxyCompactList}\item 
void \hyperlink{classLsa_a4f8f7cc2de4b10d6cbd8197a2b90c6eb}{revive} (const \hyperlink{classTimeVal}{TimeVal} \&now)
\begin{DoxyCompactList}\small\item\em Revive an LSA that is at MaxAge and MaxSequenceNumber. \item\end{DoxyCompactList}\item 
void \hyperlink{classLsa_aee21828622ef606d632415f3b4a7b4ae}{update\_\-age\_\-and\_\-seqno} (const \hyperlink{classTimeVal}{TimeVal} \&now)
\begin{DoxyCompactList}\small\item\em Update \hyperlink{protocolthe-p}{the} age and sequence number of a self originated LSAs. \item\end{DoxyCompactList}\item 
void \hyperlink{classLsa_acbd6edb0325da90d9d230f6dc23e1675}{update\_\-age} (\hyperlink{classTimeVal}{TimeVal} now)
\begin{DoxyCompactList}\small\item\em Update \hyperlink{protocolthe-p}{the} age field based on \hyperlink{protocolthe-p}{the} current time. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_a3fd6a77c3c65d1f75c416f63c6ba2850}{
void \hyperlink{classLsa_a3fd6a77c3c65d1f75c416f63c6ba2850}{set\_\-maxage} ()}
\label{classLsa_a3fd6a77c3c65d1f75c416f63c6ba2850}

\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} age to MaxAge. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_ae97e4c5ec101f0549c618f264d06dbe7}{
bool \hyperlink{classLsa_ae97e4c5ec101f0549c618f264d06dbe7}{maxage} () const }
\label{classLsa_ae97e4c5ec101f0549c618f264d06dbe7}

\begin{DoxyCompactList}\small\item\em Is \hyperlink{protocolthe-p}{the} age of this LSA MaxAge. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_a625714360794be206e942345e1f35b51}{
bool \hyperlink{classLsa_a625714360794be206e942345e1f35b51}{max\_\-sequence\_\-number} () const }
\label{classLsa_a625714360794be206e942345e1f35b51}

\begin{DoxyCompactList}\small\item\em Is \hyperlink{protocolthe-p}{the} LS Sequence Number MaxSequenceNumber? \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_aaaf5830b9af0ae517f85612da5cce79c}{
int32\_\-t \hyperlink{classLsa_aaaf5830b9af0ae517f85612da5cce79c}{get\_\-ls\_\-sequence\_\-number} () const }
\label{classLsa_aaaf5830b9af0ae517f85612da5cce79c}

\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} LS Sequence Number. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_a287cc93a8ade0379994d0132881e68e6}{
void \hyperlink{classLsa_a287cc93a8ade0379994d0132881e68e6}{set\_\-ls\_\-sequence\_\-number} (int32\_\-t seqno)}
\label{classLsa_a287cc93a8ade0379994d0132881e68e6}

\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} LS Sequence Number. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_aaca7fc249db6e15e0b1982e42e96c0ae}{
void \hyperlink{classLsa_aaca7fc249db6e15e0b1982e42e96c0ae}{increment\_\-sequence\_\-number} ()}
\label{classLsa_aaca7fc249db6e15e0b1982e42e96c0ae}

\begin{DoxyCompactList}\small\item\em Increment sequence number. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_a144af570c8d8e6e1168fc488ec99572e}{
void \hyperlink{classLsa_a144af570c8d8e6e1168fc488ec99572e}{add\_\-nack} (\hyperlink{structOspfTypes_ab410d0371b8456f91ff133e6edf9da3f}{OspfTypes::NeighbourID} nid)}
\label{classLsa_a144af570c8d8e6e1168fc488ec99572e}

\begin{DoxyCompactList}\small\item\em Add a neighbour ID to \hyperlink{protocolthe-p}{the} NACK list. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_aef5a3e29ba548a7f4a4037dc514de9bb}{
void \hyperlink{classLsa_aef5a3e29ba548a7f4a4037dc514de9bb}{remove\_\-nack} (\hyperlink{structOspfTypes_ab410d0371b8456f91ff133e6edf9da3f}{OspfTypes::NeighbourID} nid)}
\label{classLsa_aef5a3e29ba548a7f4a4037dc514de9bb}

\begin{DoxyCompactList}\small\item\em Remove a neighbour ID from \hyperlink{protocolthe-p}{the} NACK list. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_a49b0b7acec01e14493905d536b163e3f}{
bool \hyperlink{classLsa_a49b0b7acec01e14493905d536b163e3f}{exists\_\-nack} (\hyperlink{structOspfTypes_ab410d0371b8456f91ff133e6edf9da3f}{OspfTypes::NeighbourID} nid)}
\label{classLsa_a49b0b7acec01e14493905d536b163e3f}

\begin{DoxyCompactList}\small\item\em Does this neighbour exist on \hyperlink{protocolthe-p}{the} NACK list. \item\end{DoxyCompactList}\item 
bool \hyperlink{classLsa_ab71cd5bfdb565b0f6ee0f942b3a5135a}{empty\_\-nack} () const 
\begin{DoxyCompactList}\small\item\em If \hyperlink{protocolthe-p}{the} NACK list is empty return true. \item\end{DoxyCompactList}\item 
bool \hyperlink{classLsa_a64e69ecec42937c18da4796ccfa0af23}{get\_\-transmitted} ()
\item 
\hypertarget{classLsa_ad01001e51eebdb3874919e6a4173db4a}{
void \hyperlink{classLsa_ad01001e51eebdb3874919e6a4173db4a}{set\_\-transmitted} (bool t)}
\label{classLsa_ad01001e51eebdb3874919e6a4173db4a}

\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} transmitted state of this LSA. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_af0fee5e4821a3f83783099c831df11f5}{
\hyperlink{classXorpTimer}{XorpTimer} \& \hyperlink{classLsa_af0fee5e4821a3f83783099c831df11f5}{get\_\-timer} ()}
\label{classLsa_af0fee5e4821a3f83783099c831df11f5}

\begin{DoxyCompactList}\small\item\em Get a reference to \hyperlink{protocolthe-p}{the} internal timer. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_ae90b674381a942ce6e5333b12e975e55}{
void {\bfseries set\_\-tracing} (bool trace)}
\label{classLsa_ae90b674381a942ce6e5333b12e975e55}

\item 
\hypertarget{classLsa_ac002b3ba3368d6f03e13caa8158917c3}{
bool {\bfseries tracing} () const }
\label{classLsa_ac002b3ba3368d6f03e13caa8158917c3}

\item 
\hypertarget{classLsa_a89234902edb9fdb83b62e443faba9dea}{
void \hyperlink{classLsa_a89234902edb9fdb83b62e443faba9dea}{set\_\-peerid} (\hyperlink{structOspfTypes_a7b2f7f140158710a1b85588be80ca64d}{OspfTypes::PeerID} peerid)}
\label{classLsa_a89234902edb9fdb83b62e443faba9dea}

\begin{DoxyCompactList}\small\item\em For OSPFv3 only LSAs with Link-\/local flooding scope save \hyperlink{protocolthe-p}{the} ingress PeerID. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_ac20c1d739af7c8cdb8fa121c024aed58}{
\hyperlink{structOspfTypes_a7b2f7f140158710a1b85588be80ca64d}{OspfTypes::PeerID} \hyperlink{classLsa_ac20c1d739af7c8cdb8fa121c024aed58}{get\_\-peerid} () const }
\label{classLsa_ac20c1d739af7c8cdb8fa121c024aed58}

\begin{DoxyCompactList}\small\item\em For OSPFv3 only LSAs with Link-\/local flooding scope get \hyperlink{protocolthe-p}{the} ingress PeerID. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_af7d65f7cfee71727f724f9ee2fbb2cd4}{
bool \hyperlink{classLsa_af7d65f7cfee71727f724f9ee2fbb2cd4}{link\_\-local\_\-scope} () const }
\label{classLsa_af7d65f7cfee71727f724f9ee2fbb2cd4}

\begin{DoxyCompactList}\small\item\em OSPFv3 only Link-\/local scope. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_ae5edf483254d4ee36438e0366a7c56fe}{
bool \hyperlink{classLsa_ae5edf483254d4ee36438e0366a7c56fe}{area\_\-scope} () const }
\label{classLsa_ae5edf483254d4ee36438e0366a7c56fe}

\begin{DoxyCompactList}\small\item\em OSPFv3 only area scope. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_a4fc4500056867957f164b24c00205357}{
bool \hyperlink{classLsa_a4fc4500056867957f164b24c00205357}{as\_\-scope} () const }
\label{classLsa_a4fc4500056867957f164b24c00205357}

\begin{DoxyCompactList}\small\item\em OSPFv3 only AS scope. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_a090cd2f81f0ecb8f3070c7d38ec3827d}{
virtual const char $\ast$ \hyperlink{classLsa_a090cd2f81f0ecb8f3070c7d38ec3827d}{name} () const =0}
\label{classLsa_a090cd2f81f0ecb8f3070c7d38ec3827d}

\begin{DoxyCompactList}\small\item\em Printable name of this LSA. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_a5b95e1e890516bd50a778eb544f14c5e}{
virtual string \hyperlink{classLsa_a5b95e1e890516bd50a778eb544f14c5e}{str} () const =0}
\label{classLsa_a5b95e1e890516bd50a778eb544f14c5e}

\begin{DoxyCompactList}\small\item\em Generate a printable representation of \hyperlink{protocolthe-p}{the} LSA. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static void \hyperlink{classLsa_ad8f49b017ef7cbddfaf9fbf929588d3f}{update\_\-age\_\-inftransdelay} (uint8\_\-t $\ast$ptr, uint16\_\-t inftransdelay)
\begin{DoxyCompactList}\small\item\em Increment \hyperlink{protocolthe-p}{the} age field of an LSA by inftransdelay. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classLsa_a6273321b444a43e4528de0a67babc076}{
\hyperlink{classLsa__header}{Lsa\_\-header} \hyperlink{classLsa_a6273321b444a43e4528de0a67babc076}{\_\-header}}
\label{classLsa_a6273321b444a43e4528de0a67babc076}

\begin{DoxyCompactList}\small\item\em Add \hyperlink{protocolthe-p}{the} LSA type bindings. \item\end{DoxyCompactList}\item 
\hypertarget{classLsa_a1b02b066554db6184665be65f9a17558}{
vector$<$ uint8\_\-t $>$ {\bfseries \_\-pkt}}
\label{classLsa_a1b02b066554db6184665be65f9a17558}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classLsa_a72095024fc4644213672ef596d902616}{
void \hyperlink{classLsa_a72095024fc4644213672ef596d902616}{set\_\-ls\_\-age} (uint16\_\-t ls\_\-age)}
\label{classLsa_a72095024fc4644213672ef596d902616}

\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} age and update \hyperlink{protocolthe-p}{the} stored packet if it exists. \item\end{DoxyCompactList}\item 
bool \hyperlink{classLsa_a0d34702e39075ebdd128194add2d14e2}{understood} () const 
\begin{DoxyCompactList}\small\item\em OSPFv3 only is \hyperlink{protocolthe-p}{the} U-\/bit set, i.e. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classLsa_a6108e982b825d3f9cba6eb2ed43521be}{
const \hyperlink{structOspfTypes_a60eb031df0c10af753789ae76b185ec2}{OspfTypes::Version} {\bfseries \_\-version}}
\label{classLsa_a6108e982b825d3f9cba6eb2ed43521be}

\item 
\hypertarget{classLsa_a8d10a3a4b0a2936ff0c7e0b39fbd800e}{
bool {\bfseries \_\-valid}}
\label{classLsa_a8d10a3a4b0a2936ff0c7e0b39fbd800e}

\item 
\hypertarget{classLsa_ac9201f2cfd50e2cefd5f131f5642eab5}{
bool {\bfseries \_\-self\_\-originating}}
\label{classLsa_ac9201f2cfd50e2cefd5f131f5642eab5}

\item 
\hypertarget{classLsa_a349e63a538da439153cb15fec8e245fd}{
uint16\_\-t {\bfseries \_\-initial\_\-age}}
\label{classLsa_a349e63a538da439153cb15fec8e245fd}

\item 
\hypertarget{classLsa_a841cbcf02d23cd82a7418cd1703813c7}{
\hyperlink{classTimeVal}{TimeVal} {\bfseries \_\-creation}}
\label{classLsa_a841cbcf02d23cd82a7418cd1703813c7}

\item 
\hypertarget{classLsa_ad7f660d1664c3b389d529c913ab5b675}{
\hyperlink{classXorpTimer}{XorpTimer} {\bfseries \_\-timer}}
\label{classLsa_ad7f660d1664c3b389d529c913ab5b675}

\item 
\hypertarget{classLsa_a3925b32eb3f968c8c4406ec8c9b81dad}{
bool {\bfseries \_\-transmitted}}
\label{classLsa_a3925b32eb3f968c8c4406ec8c9b81dad}

\item 
\hypertarget{classLsa_a263bd390b3ac3176b4b6815db50af6c7}{
bool {\bfseries \_\-trace}}
\label{classLsa_a263bd390b3ac3176b4b6815db50af6c7}

\item 
\hypertarget{classLsa_a23ac858b3151ca18f1601d0794b285a7}{
set$<$ \hyperlink{structOspfTypes_ab410d0371b8456f91ff133e6edf9da3f}{OspfTypes::NeighbourID} $>$ {\bfseries \_\-nack\_\-list}}
\label{classLsa_a23ac858b3151ca18f1601d0794b285a7}

\item 
\hypertarget{classLsa_acacb671303e0103decfe6afddeb79b58}{
\hyperlink{structOspfTypes_a7b2f7f140158710a1b85588be80ca64d}{OspfTypes::PeerID} \hyperlink{classLsa_acacb671303e0103decfe6afddeb79b58}{\_\-peerid}}
\label{classLsa_acacb671303e0103decfe6afddeb79b58}

\begin{DoxyCompactList}\small\item\em If this is an OSPFv3 LSA and \hyperlink{protocolthe-p}{the} flooding scope is Link-\/local then \hyperlink{protocolthe-p}{the} PeerID should be set to \hyperlink{protocolthe-p}{the} peer that \hyperlink{protocolthe-p}{the} LSA is associated with. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Link State Advertisement (LSA) A generic LSA. All actual LSAs should be derived from this LSA. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classLsa_a17f4ef57d9744b81301a19b384a74c14}{
\index{Lsa@{Lsa}!Lsa@{Lsa}}
\index{Lsa@{Lsa}!Lsa@{Lsa}}
\subsubsection[{Lsa}]{\setlength{\rightskip}{0pt plus 5cm}Lsa::Lsa (
\begin{DoxyParamCaption}
\item[{{\bf OspfTypes::Version}}]{version, }
\item[{uint8\_\-t $\ast$}]{buf, }
\item[{size\_\-t}]{len}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classLsa_a17f4ef57d9744b81301a19b384a74c14}


Note passing in \hyperlink{protocolthe-p}{the} LSA buffer does not imply that it will be decoded. 

The buffer is just being stored. 

\subsection{Member Function Documentation}
\hypertarget{classLsa_aae15052a0651413596bb44685aaf83a2}{
\index{Lsa@{Lsa}!available@{available}}
\index{available@{available}!Lsa@{Lsa}}
\subsubsection[{available}]{\setlength{\rightskip}{0pt plus 5cm}bool Lsa::available (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classLsa_aae15052a0651413596bb44685aaf83a2}


Is a wire format version available? 

For all non self orignating LSAs there should be a wire version available.

Self originating LSAs such as Router LSAs can exist that do not yet have any valid fields (no interfaces to describe). Use this field to check if this LSA is available.

\begin{DoxyReturn}{Returns}
true is a wire format version is available. 
\end{DoxyReturn}
\hypertarget{classLsa_a2658a7d54d470268138d15938be0f464}{
\index{Lsa@{Lsa}!decode@{decode}}
\index{decode@{decode}!Lsa@{Lsa}}
\subsubsection[{decode}]{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf LsaRef} Lsa::decode (
\begin{DoxyParamCaption}
\item[{uint8\_\-t $\ast$}]{buf, }
\item[{size\_\-t \&}]{len}
\end{DoxyParamCaption}
) const  throw ({\bf InvalidPacket})\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classLsa_a2658a7d54d470268138d15938be0f464}


Decode an LSA. 


\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 reference to an LSA that manages its own memory. 
\end{DoxyReturn}


Implemented in \hyperlink{classUnknownLsa_adea599207418e5c2252921812fb62f59}{UnknownLsa}, \hyperlink{classRouterLsa_a8fb8bfe10a25a79e239d8f61f78e8f5a}{RouterLsa}, \hyperlink{classNetworkLsa_aa4b968da45a13096622eda2c5191e0d5}{NetworkLsa}, \hyperlink{classSummaryNetworkLsa_ace7b6056b3f7a16c023284998e5a89c2}{SummaryNetworkLsa}, \hyperlink{classSummaryRouterLsa_aaaf0aac868eb1829524161c6353eeab7}{SummaryRouterLsa}, \hyperlink{classASExternalLsa_afbf2ed0cd52cbd7e1369b5319406bdfa}{ASExternalLsa}, \hyperlink{classLinkLsa_a0d7f3ce579b39f37947480cdd3e4dbd1}{LinkLsa}, and \hyperlink{classIntraAreaPrefixLsa_ac630470617bd664b1a68dcb2c6c622c2}{IntraAreaPrefixLsa}.

\hypertarget{classLsa_ab71cd5bfdb565b0f6ee0f942b3a5135a}{
\index{Lsa@{Lsa}!empty\_\-nack@{empty\_\-nack}}
\index{empty\_\-nack@{empty\_\-nack}!Lsa@{Lsa}}
\subsubsection[{empty\_\-nack}]{\setlength{\rightskip}{0pt plus 5cm}bool Lsa::empty\_\-nack (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classLsa_ab71cd5bfdb565b0f6ee0f942b3a5135a}


If \hyperlink{protocolthe-p}{the} NACK list is empty return true. 

All of \hyperlink{protocolthe-p}{the} neighbours have now nacked this LSA. \hypertarget{classLsa_ae3bd3a0bd24ed458cc8ac8d7e91d1c35}{
\index{Lsa@{Lsa}!encode@{encode}}
\index{encode@{encode}!Lsa@{Lsa}}
\subsubsection[{encode}]{\setlength{\rightskip}{0pt plus 5cm}virtual bool Lsa::encode (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classLsa_ae3bd3a0bd24ed458cc8ac8d7e91d1c35}


Encode an LSA for transmission. 

\begin{DoxyReturn}{Returns}
True on success. 
\end{DoxyReturn}


Implemented in \hyperlink{classUnknownLsa_aae790e7fe30bc14ea1dc1c3e0e5257e9}{UnknownLsa}, \hyperlink{classRouterLsa_a8c62d79cad822e861bae5de5667170fc}{RouterLsa}, \hyperlink{classNetworkLsa_ad6c91c9ac457a20479276754bbdf7466}{NetworkLsa}, \hyperlink{classSummaryNetworkLsa_a5edea49e8bf8e8a544668acd8b503590}{SummaryNetworkLsa}, \hyperlink{classSummaryRouterLsa_a69b5f1a47e52e617570b46edc33cf91e}{SummaryRouterLsa}, \hyperlink{classASExternalLsa_a9fdf5c315b7288de1836dc3f65bdebdd}{ASExternalLsa}, \hyperlink{classLinkLsa_a77e28a4b3d1fb4432164996d7b8ba3f5}{LinkLsa}, and \hyperlink{classIntraAreaPrefixLsa_a13a8312f7140494927554e1309df614c}{IntraAreaPrefixLsa}.

\hypertarget{classLsa_acde31d35a1316de4e531b464bd2d1519}{
\index{Lsa@{Lsa}!external@{external}}
\index{external@{external}!Lsa@{Lsa}}
\subsubsection[{external}]{\setlength{\rightskip}{0pt plus 5cm}virtual bool Lsa::external (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classLsa_acde31d35a1316de4e531b464bd2d1519}
\begin{DoxyReturn}{Returns}
True if this is an AS-\/external-\/LSA. 
\end{DoxyReturn}


Reimplemented in \hyperlink{classASExternalLsa_ae79906bbddb9d4fde9c0ae35dc22d61e}{ASExternalLsa}, and \hyperlink{classType7Lsa_a5d95d707fa2ce85b1724d9eb86687384}{Type7Lsa}.

\hypertarget{classLsa_a8125c33128d99570889864c3ab187d5b}{
\index{Lsa@{Lsa}!get\_\-creation\_\-time@{get\_\-creation\_\-time}}
\index{get\_\-creation\_\-time@{get\_\-creation\_\-time}!Lsa@{Lsa}}
\subsubsection[{get\_\-creation\_\-time}]{\setlength{\rightskip}{0pt plus 5cm}void Lsa::get\_\-creation\_\-time (
\begin{DoxyParamCaption}
\item[{{\bf TimeVal} \&}]{now}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classLsa_a8125c33128d99570889864c3ab187d5b}


Get arrival time. 


\begin{DoxyParams}{Parameters}
{\em now} & out parameter which will be contain \hyperlink{protocolthe-p}{the} time \hyperlink{protocolthe-p}{the} LSA arrived. \\
\hline
\end{DoxyParams}
\hypertarget{classLsa_a0dcc648678ac88856635609a17029ae9}{
\index{Lsa@{Lsa}!get\_\-ls\_\-type@{get\_\-ls\_\-type}}
\index{get\_\-ls\_\-type@{get\_\-ls\_\-type}!Lsa@{Lsa}}
\subsubsection[{get\_\-ls\_\-type}]{\setlength{\rightskip}{0pt plus 5cm}virtual uint16\_\-t Lsa::get\_\-ls\_\-type (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classLsa_a0dcc648678ac88856635609a17029ae9}


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

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


Implemented in \hyperlink{classUnknownLsa_a39211b2adfb0891f9ddf76a7a5d39c15}{UnknownLsa}, \hyperlink{classRouterLsa_abe7ba9c313ec2f3ef28170bf78943249}{RouterLsa}, \hyperlink{classNetworkLsa_a37aeb3e6a21c479b99c4cdfee6e55618}{NetworkLsa}, \hyperlink{classSummaryNetworkLsa_ad7f0194514396d9bb7abf9b0cfef10bf}{SummaryNetworkLsa}, \hyperlink{classSummaryRouterLsa_a155185f87d1f4c6c538cd0616cb47f5e}{SummaryRouterLsa}, \hyperlink{classASExternalLsa_a07e7e2f9f9cd64178d9210eb0e34816e}{ASExternalLsa}, \hyperlink{classType7Lsa_a1be2bdea4c4eab154712d9d8b192164a}{Type7Lsa}, \hyperlink{classLinkLsa_ac6bfbc6bd3ef34589976951687667758}{LinkLsa}, and \hyperlink{classIntraAreaPrefixLsa_a628c5595cb7bac08a49fc76b23dc7ccb}{IntraAreaPrefixLsa}.

\hypertarget{classLsa_a046045e368f05f7f22d10807e77c0a1e}{
\index{Lsa@{Lsa}!get\_\-self\_\-originating@{get\_\-self\_\-originating}}
\index{get\_\-self\_\-originating@{get\_\-self\_\-originating}!Lsa@{Lsa}}
\subsubsection[{get\_\-self\_\-originating}]{\setlength{\rightskip}{0pt plus 5cm}bool Lsa::get\_\-self\_\-originating (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classLsa_a046045e368f05f7f22d10807e77c0a1e}
\begin{DoxyReturn}{Returns}
true of this is a self originating LSA. 
\end{DoxyReturn}
\hypertarget{classLsa_a64e69ecec42937c18da4796ccfa0af23}{
\index{Lsa@{Lsa}!get\_\-transmitted@{get\_\-transmitted}}
\index{get\_\-transmitted@{get\_\-transmitted}!Lsa@{Lsa}}
\subsubsection[{get\_\-transmitted}]{\setlength{\rightskip}{0pt plus 5cm}bool Lsa::get\_\-transmitted (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classLsa_a64e69ecec42937c18da4796ccfa0af23}
\begin{DoxyReturn}{Returns}
true if this LSA has been transmitted. 
\end{DoxyReturn}
\hypertarget{classLsa_abcb3b34b9408371def09e5a166441832}{
\index{Lsa@{Lsa}!known@{known}}
\index{known@{known}!Lsa@{Lsa}}
\subsubsection[{known}]{\setlength{\rightskip}{0pt plus 5cm}virtual bool Lsa::known (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classLsa_abcb3b34b9408371def09e5a166441832}


OSPFv3 only is this a known LSA. 

\begin{DoxyReturn}{Returns}
true if this is a known LSA. 
\end{DoxyReturn}


Reimplemented in \hyperlink{classUnknownLsa_af9bbc9ba30367c44de7073b938587163}{UnknownLsa}.

\hypertarget{classLsa_a7031b85d7384ba8a27bf726a1e245a29}{
\index{Lsa@{Lsa}!lsa@{lsa}}
\index{lsa@{lsa}!Lsa@{Lsa}}
\subsubsection[{lsa}]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t$\ast$ Lsa::lsa (
\begin{DoxyParamCaption}
\item[{size\_\-t \&}]{len}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classLsa_a7031b85d7384ba8a27bf726a1e245a29}


Get a reference to \hyperlink{protocolthe-p}{the} raw LSA. 


\begin{DoxyParams}{Parameters}
{\em len} & The length of \hyperlink{protocolthe-p}{the} LSA.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to start of \hyperlink{protocolthe-p}{the} LSA. 
\end{DoxyReturn}
\hypertarget{classLsa_ad3324ea3bfa81ff90d15690c5ccbd1e4}{
\index{Lsa@{Lsa}!min\_\-length@{min\_\-length}}
\index{min\_\-length@{min\_\-length}!Lsa@{Lsa}}
\subsubsection[{min\_\-length}]{\setlength{\rightskip}{0pt plus 5cm}virtual size\_\-t Lsa::min\_\-length (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classLsa_ad3324ea3bfa81ff90d15690c5ccbd1e4}


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

\begin{DoxyReturn}{Returns}
The minmum possible length of this LSA. 
\end{DoxyReturn}


Implemented in \hyperlink{classUnknownLsa_a1dd68eceac09843c91971d0f4878d3ef}{UnknownLsa}, \hyperlink{classRouterLsa_a2b7262bee886b7767db0b8f6394be557}{RouterLsa}, \hyperlink{classNetworkLsa_a1de96bbf9f569f099e681c4240ab1bfb}{NetworkLsa}, \hyperlink{classSummaryNetworkLsa_af684818f7a4f7ea3bd535e7c677f2047}{SummaryNetworkLsa}, \hyperlink{classSummaryRouterLsa_a78775d1207cd044db9571c9713a5ef86}{SummaryRouterLsa}, \hyperlink{classASExternalLsa_ab7b2eff686239438b62770fb0b9b7be5}{ASExternalLsa}, \hyperlink{classLinkLsa_a0bc42a32a4db6432a06b7921f8550ba0}{LinkLsa}, and \hyperlink{classIntraAreaPrefixLsa_af74c506d0064cd33b92fedbea0dd9d5a}{IntraAreaPrefixLsa}.

\hypertarget{classLsa_a2cceb4a1fb8614b717b181810e18caed}{
\index{Lsa@{Lsa}!record\_\-creation\_\-time@{record\_\-creation\_\-time}}
\index{record\_\-creation\_\-time@{record\_\-creation\_\-time}!Lsa@{Lsa}}
\subsubsection[{record\_\-creation\_\-time}]{\setlength{\rightskip}{0pt plus 5cm}void Lsa::record\_\-creation\_\-time (
\begin{DoxyParamCaption}
\item[{{\bf TimeVal}}]{now}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classLsa_a2cceb4a1fb8614b717b181810e18caed}


Record \hyperlink{protocolthe-p}{the} time of creation and initial age. 


\begin{DoxyParams}{Parameters}
{\em now} & \hyperlink{protocolthe-p}{the} current time. \\
\hline
\end{DoxyParams}
\hypertarget{classLsa_a4f8f7cc2de4b10d6cbd8197a2b90c6eb}{
\index{Lsa@{Lsa}!revive@{revive}}
\index{revive@{revive}!Lsa@{Lsa}}
\subsubsection[{revive}]{\setlength{\rightskip}{0pt plus 5cm}void Lsa::revive (
\begin{DoxyParamCaption}
\item[{const {\bf TimeVal} \&}]{now}
\end{DoxyParamCaption}
)}}
\label{classLsa_a4f8f7cc2de4b10d6cbd8197a2b90c6eb}


Revive an LSA that is at MaxAge and MaxSequenceNumber. 

The age is taken back to zero and sequence number InitialSequenceNumber. \hypertarget{classLsa_ac4df00a711468ca7dd10c268d5885728}{
\index{Lsa@{Lsa}!type7@{type7}}
\index{type7@{type7}!Lsa@{Lsa}}
\subsubsection[{type7}]{\setlength{\rightskip}{0pt plus 5cm}virtual bool Lsa::type7 (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classLsa_ac4df00a711468ca7dd10c268d5885728}
\begin{DoxyReturn}{Returns}
True if this LSA is a Type-\/7-\/LSA. 
\end{DoxyReturn}


Reimplemented in \hyperlink{classType7Lsa_a0ab59fde712b8644153616e16b73b320}{Type7Lsa}.

\hypertarget{classLsa_a0d34702e39075ebdd128194add2d14e2}{
\index{Lsa@{Lsa}!understood@{understood}}
\index{understood@{understood}!Lsa@{Lsa}}
\subsubsection[{understood}]{\setlength{\rightskip}{0pt plus 5cm}bool Lsa::understood (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, private\mbox{]}}}}
\label{classLsa_a0d34702e39075ebdd128194add2d14e2}


OSPFv3 only is \hyperlink{protocolthe-p}{the} U-\/bit set, i.e. 

should this LSA be processed as if it is understood; obviously if we already know about it it is understood. \hypertarget{classLsa_acbd6edb0325da90d9d230f6dc23e1675}{
\index{Lsa@{Lsa}!update\_\-age@{update\_\-age}}
\index{update\_\-age@{update\_\-age}!Lsa@{Lsa}}
\subsubsection[{update\_\-age}]{\setlength{\rightskip}{0pt plus 5cm}void Lsa::update\_\-age (
\begin{DoxyParamCaption}
\item[{{\bf TimeVal}}]{now}
\end{DoxyParamCaption}
)}}
\label{classLsa_acbd6edb0325da90d9d230f6dc23e1675}


Update \hyperlink{protocolthe-p}{the} age field based on \hyperlink{protocolthe-p}{the} current time. 


\begin{DoxyParams}{Parameters}
{\em now} & \hyperlink{protocolthe-p}{the} current time. \\
\hline
\end{DoxyParams}
\hypertarget{classLsa_aee21828622ef606d632415f3b4a7b4ae}{
\index{Lsa@{Lsa}!update\_\-age\_\-and\_\-seqno@{update\_\-age\_\-and\_\-seqno}}
\index{update\_\-age\_\-and\_\-seqno@{update\_\-age\_\-and\_\-seqno}!Lsa@{Lsa}}
\subsubsection[{update\_\-age\_\-and\_\-seqno}]{\setlength{\rightskip}{0pt plus 5cm}void Lsa::update\_\-age\_\-and\_\-seqno (
\begin{DoxyParamCaption}
\item[{const {\bf TimeVal} \&}]{now}
\end{DoxyParamCaption}
)}}
\label{classLsa_aee21828622ef606d632415f3b4a7b4ae}


Update \hyperlink{protocolthe-p}{the} age and sequence number of a self originated LSAs. 

Plus encode. \hypertarget{classLsa_ad8f49b017ef7cbddfaf9fbf929588d3f}{
\index{Lsa@{Lsa}!update\_\-age\_\-inftransdelay@{update\_\-age\_\-inftransdelay}}
\index{update\_\-age\_\-inftransdelay@{update\_\-age\_\-inftransdelay}!Lsa@{Lsa}}
\subsubsection[{update\_\-age\_\-inftransdelay}]{\setlength{\rightskip}{0pt plus 5cm}void Lsa::update\_\-age\_\-inftransdelay (
\begin{DoxyParamCaption}
\item[{uint8\_\-t $\ast$}]{ptr, }
\item[{uint16\_\-t}]{inftransdelay}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classLsa_ad8f49b017ef7cbddfaf9fbf929588d3f}


Increment \hyperlink{protocolthe-p}{the} age field of an LSA by inftransdelay. 


\begin{DoxyParams}{Parameters}
{\em ptr} & to \hyperlink{protocolthe-p}{the} age field, first field in a LSA. \\
\hline
{\em inftransdelay} & delay to add in seconds. \\
\hline
\end{DoxyParams}


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}
