\hypertarget{classLsaDecoder}{
\section{LsaDecoder Class Reference}
\label{classLsaDecoder}\index{LsaDecoder@{LsaDecoder}}
}


LSA byte streams are decoded through this class.  




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

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classLsaDecoder_a49d2ff5922a779c9902c5853247c4fc0}{
{\bfseries LsaDecoder} (\hyperlink{structOspfTypes_a60eb031df0c10af753789ae76b185ec2}{OspfTypes::Version} version)}
\label{classLsaDecoder_a49d2ff5922a779c9902c5853247c4fc0}

\item 
void \hyperlink{classLsaDecoder_a956cd43aa8b2684e9da3c75c4bbaa588}{register\_\-decoder} (\hyperlink{classLsa}{Lsa} $\ast$lsa)
\begin{DoxyCompactList}\small\item\em Register \hyperlink{protocolthe-p}{the} LSA decoders, called multiple times with each LSA. \item\end{DoxyCompactList}\item 
void \hyperlink{classLsaDecoder_a8a0fffcf0a747068547abec4fb24cbd3}{register\_\-unknown\_\-decoder} (\hyperlink{classLsa}{Lsa} $\ast$lsa)
\begin{DoxyCompactList}\small\item\em Register \hyperlink{protocolthe-p}{the} unknown LSA decoder, called once. \item\end{DoxyCompactList}\item 
\hyperlink{classref__ptr}{Lsa::LsaRef} \hyperlink{classLsaDecoder_ac6ce8a3fe9319d5c35f25c989792606a}{decode} (uint8\_\-t $\ast$ptr, size\_\-t \&len) const   throw (InvalidPacket)
\begin{DoxyCompactList}\small\item\em Decode an LSA. \item\end{DoxyCompactList}\item 
size\_\-t \hyperlink{classLsaDecoder_a2165b4764b3fbde825e96bedc0688e43}{min\_\-length} () const 
\item 
bool \hyperlink{classLsaDecoder_af8eae7eebd891d71006243df731a7f68}{validate} (uint16\_\-t type) const 
\begin{DoxyCompactList}\small\item\em Validate type field. \item\end{DoxyCompactList}\item 
bool \hyperlink{classLsaDecoder_a54c343cc6f1a5f11c8aa4312044c1505}{external} (uint16\_\-t type)
\begin{DoxyCompactList}\small\item\em Is an LSA of this type an AS-\/external-\/LSA? \item\end{DoxyCompactList}\item 
\hypertarget{classLsaDecoder_a15b269c7432454a49f6f9b0d1d052ddb}{
const char $\ast$ \hyperlink{classLsaDecoder_a15b269c7432454a49f6f9b0d1d052ddb}{name} (uint16\_\-t type) const }
\label{classLsaDecoder_a15b269c7432454a49f6f9b0d1d052ddb}

\begin{DoxyCompactList}\small\item\em Return \hyperlink{protocolthe-p}{the} name of this LSA. \item\end{DoxyCompactList}\item 
\hypertarget{classLsaDecoder_a0c01632dd16321bf2ac346680c2e5a56}{
\hyperlink{structOspfTypes_a60eb031df0c10af753789ae76b185ec2}{OspfTypes::Version} {\bfseries get\_\-version} () const }
\label{classLsaDecoder_a0c01632dd16321bf2ac346680c2e5a56}

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

\item 
\hypertarget{classLsaDecoder_a3a634195225adb74ea6eafa2dba3e0d6}{
size\_\-t {\bfseries \_\-min\_\-lsa\_\-length}}
\label{classLsaDecoder_a3a634195225adb74ea6eafa2dba3e0d6}

\item 
\hypertarget{classLsaDecoder_ad00695364fbb2937c3838c153fafab80}{
map$<$ uint16\_\-t, \hyperlink{classLsa}{Lsa} $\ast$ $>$ {\bfseries \_\-lsa\_\-decoders}}
\label{classLsaDecoder_ad00695364fbb2937c3838c153fafab80}

\item 
\hypertarget{classLsaDecoder_a832ef7e7cc9b628ba2f96f4747fb476d}{
\hyperlink{classLsa}{Lsa} $\ast$ {\bfseries \_\-unknown\_\-lsa\_\-decoder}}
\label{classLsaDecoder_a832ef7e7cc9b628ba2f96f4747fb476d}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
LSA byte streams are decoded through this class. 

\subsection{Member Function Documentation}
\hypertarget{classLsaDecoder_ac6ce8a3fe9319d5c35f25c989792606a}{
\index{LsaDecoder@{LsaDecoder}!decode@{decode}}
\index{decode@{decode}!LsaDecoder@{LsaDecoder}}
\subsubsection[{decode}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Lsa::LsaRef} LsaDecoder::decode (
\begin{DoxyParamCaption}
\item[{uint8\_\-t $\ast$}]{ptr, }
\item[{size\_\-t \&}]{len}
\end{DoxyParamCaption}
) const  throw ({\bf InvalidPacket})}}
\label{classLsaDecoder_ac6ce8a3fe9319d5c35f25c989792606a}


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}
\hypertarget{classLsaDecoder_a54c343cc6f1a5f11c8aa4312044c1505}{
\index{LsaDecoder@{LsaDecoder}!external@{external}}
\index{external@{external}!LsaDecoder@{LsaDecoder}}
\subsubsection[{external}]{\setlength{\rightskip}{0pt plus 5cm}bool LsaDecoder::external (
\begin{DoxyParamCaption}
\item[{uint16\_\-t}]{type}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classLsaDecoder_a54c343cc6f1a5f11c8aa4312044c1505}


Is an LSA of this type an AS-\/external-\/LSA? 

\begin{DoxyReturn}{Returns}
true if this type is an AS-\/external-\/LSA 
\end{DoxyReturn}
\hypertarget{classLsaDecoder_a2165b4764b3fbde825e96bedc0688e43}{
\index{LsaDecoder@{LsaDecoder}!min\_\-length@{min\_\-length}}
\index{min\_\-length@{min\_\-length}!LsaDecoder@{LsaDecoder}}
\subsubsection[{min\_\-length}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t LsaDecoder::min\_\-length (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classLsaDecoder_a2165b4764b3fbde825e96bedc0688e43}
\begin{DoxyReturn}{Returns}
The length of \hyperlink{protocolthe-p}{the} smallest LSA that can be decoded. 
\end{DoxyReturn}
\hypertarget{classLsaDecoder_a956cd43aa8b2684e9da3c75c4bbaa588}{
\index{LsaDecoder@{LsaDecoder}!register\_\-decoder@{register\_\-decoder}}
\index{register\_\-decoder@{register\_\-decoder}!LsaDecoder@{LsaDecoder}}
\subsubsection[{register\_\-decoder}]{\setlength{\rightskip}{0pt plus 5cm}void LsaDecoder::register\_\-decoder (
\begin{DoxyParamCaption}
\item[{{\bf Lsa} $\ast$}]{lsa}
\end{DoxyParamCaption}
)}}
\label{classLsaDecoder_a956cd43aa8b2684e9da3c75c4bbaa588}


Register \hyperlink{protocolthe-p}{the} LSA decoders, called multiple times with each LSA. 


\begin{DoxyParams}{Parameters}
{\em LSA} & decoder \\
\hline
\end{DoxyParams}
\hypertarget{classLsaDecoder_a8a0fffcf0a747068547abec4fb24cbd3}{
\index{LsaDecoder@{LsaDecoder}!register\_\-unknown\_\-decoder@{register\_\-unknown\_\-decoder}}
\index{register\_\-unknown\_\-decoder@{register\_\-unknown\_\-decoder}!LsaDecoder@{LsaDecoder}}
\subsubsection[{register\_\-unknown\_\-decoder}]{\setlength{\rightskip}{0pt plus 5cm}void LsaDecoder::register\_\-unknown\_\-decoder (
\begin{DoxyParamCaption}
\item[{{\bf Lsa} $\ast$}]{lsa}
\end{DoxyParamCaption}
)}}
\label{classLsaDecoder_a8a0fffcf0a747068547abec4fb24cbd3}


Register \hyperlink{protocolthe-p}{the} unknown LSA decoder, called once. 


\begin{DoxyParams}{Parameters}
{\em LSA} & decoder \\
\hline
\end{DoxyParams}
\hypertarget{classLsaDecoder_af8eae7eebd891d71006243df731a7f68}{
\index{LsaDecoder@{LsaDecoder}!validate@{validate}}
\index{validate@{validate}!LsaDecoder@{LsaDecoder}}
\subsubsection[{validate}]{\setlength{\rightskip}{0pt plus 5cm}bool LsaDecoder::validate (
\begin{DoxyParamCaption}
\item[{uint16\_\-t}]{type}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classLsaDecoder_af8eae7eebd891d71006243df731a7f68}


Validate type field. 

If we know how to decode an LSA of this type we must know how to process it.

\begin{DoxyReturn}{Returns}
true if we know about this type of LSA. 
\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}
