\hypertarget{classIPv6Prefix}{
\section{IPv6Prefix Class Reference}
\label{classIPv6Prefix}\index{IPv6Prefix@{IPv6Prefix}}
}


RFC 2470 A.4.1 \hyperlink{classIPv6}{IPv6} Prefix Representation OSPFv3 only.  




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

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIPv6Prefix_a4c6a19c5c6223bd5d6ff6d67a2ec47c2}{
{\bfseries IPv6Prefix} (\hyperlink{structOspfTypes_a60eb031df0c10af753789ae76b185ec2}{OspfTypes::Version} version, bool use\_\-metric=false)}
\label{classIPv6Prefix_a4c6a19c5c6223bd5d6ff6d67a2ec47c2}

\item 
\hypertarget{classIPv6Prefix_a0154a6d35bd1a138cf8dc94ba8fe04d2}{
{\bfseries IPv6Prefix} (const \hyperlink{classIPv6Prefix}{IPv6Prefix} \&rhs)}
\label{classIPv6Prefix_a0154a6d35bd1a138cf8dc94ba8fe04d2}

\item 
\hypertarget{classIPv6Prefix_a02a61a22798ae163329ac6883d66cd38}{
\hyperlink{classIPv6Prefix}{IPv6Prefix} {\bfseries operator=} (const \hyperlink{classIPv6Prefix}{IPv6Prefix} \&rhs)}
\label{classIPv6Prefix_a02a61a22798ae163329ac6883d66cd38}

\item 
\hypertarget{classIPv6Prefix_a9ad3bd17ade5cf0bed5519cd94a9edfb}{
void {\bfseries copy} (const \hyperlink{classIPv6Prefix}{IPv6Prefix} \&rhs)}
\label{classIPv6Prefix_a9ad3bd17ade5cf0bed5519cd94a9edfb}

\item 
size\_\-t \hyperlink{classIPv6Prefix_a009b58ac4c40a5032e4f67b36edaaca6}{length} () const 
\item 
\hyperlink{classIPv6Prefix}{IPv6Prefix} \hyperlink{classIPv6Prefix_aa936f4656bb8489d53f9cbf136869ce6}{decode} (uint8\_\-t $\ast$ptr, size\_\-t \&len, uint8\_\-t prefixlen, uint8\_\-t option) const   throw (InvalidPacket)
\begin{DoxyCompactList}\small\item\em Decode a \hyperlink{classIPv6Prefix}{IPv6Prefix}. \item\end{DoxyCompactList}\item 
size\_\-t \hyperlink{classIPv6Prefix_a93f5caea6cd0233616da2de1ab7db8e7}{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{classIPv6Prefix_a1fd678ac37f93798c3d62a31511d9068}{
\hyperlink{structOspfTypes_a60eb031df0c10af753789ae76b185ec2}{OspfTypes::Version} {\bfseries get\_\-version} () const }
\label{classIPv6Prefix_a1fd678ac37f93798c3d62a31511d9068}

\item 
\hypertarget{classIPv6Prefix_a1173bdcb3bb9b0ef2fba6b244dd6a7b3}{
void {\bfseries set\_\-network} (const \hyperlink{classIPNet}{IPNet}$<$ \hyperlink{classIPv6}{IPv6} $>$ \&network)}
\label{classIPv6Prefix_a1173bdcb3bb9b0ef2fba6b244dd6a7b3}

\item 
\hypertarget{classIPv6Prefix_a8fdfd1c3b2add37d318658f2dac0a127}{
\hyperlink{classIPNet}{IPNet}$<$ \hyperlink{classIPv6}{IPv6} $>$ {\bfseries get\_\-network} () const }
\label{classIPv6Prefix_a8fdfd1c3b2add37d318658f2dac0a127}

\item 
\hypertarget{classIPv6Prefix_a1bd73ea84a0c488f4117fed152b7b91b}{
bool {\bfseries use\_\-metric} () const }
\label{classIPv6Prefix_a1bd73ea84a0c488f4117fed152b7b91b}

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

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

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

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

\item 
\hypertarget{classIPv6Prefix_a4883f761f0275a5ed7a5514537b523c2}{
void {\bfseries set\_\-bit} (bool set, uint8\_\-t bit)}
\label{classIPv6Prefix_a4883f761f0275a5ed7a5514537b523c2}

\item 
\hypertarget{classIPv6Prefix_aa163ec3226188c01ec66d08b62c0eda6}{
bool {\bfseries get\_\-bit} (uint8\_\-t bit) const }
\label{classIPv6Prefix_aa163ec3226188c01ec66d08b62c0eda6}

\item 
\hypertarget{classIPv6Prefix_a07843ea0bc03244a821811da43841c5c}{
void {\bfseries set\_\-nu\_\-bit} (bool set)}
\label{classIPv6Prefix_a07843ea0bc03244a821811da43841c5c}

\item 
\hypertarget{classIPv6Prefix_a09f6830aaaa363638a63ac2d5cec7d8c}{
bool {\bfseries get\_\-nu\_\-bit} () const }
\label{classIPv6Prefix_a09f6830aaaa363638a63ac2d5cec7d8c}

\item 
\hypertarget{classIPv6Prefix_a6cd52bfb7e6361c7ab064bd3c7c5209b}{
void {\bfseries set\_\-la\_\-bit} (bool set)}
\label{classIPv6Prefix_a6cd52bfb7e6361c7ab064bd3c7c5209b}

\item 
\hypertarget{classIPv6Prefix_a5e42b3b940bb6fbfd938c5de93295c76}{
bool {\bfseries get\_\-la\_\-bit} () const }
\label{classIPv6Prefix_a5e42b3b940bb6fbfd938c5de93295c76}

\item 
\hypertarget{classIPv6Prefix_a33aecbaa648a49a60570416281607bb7}{
void {\bfseries set\_\-mc\_\-bit} (bool set)}
\label{classIPv6Prefix_a33aecbaa648a49a60570416281607bb7}

\item 
\hypertarget{classIPv6Prefix_ab82d2a0977624307d268bd977f0e6d7e}{
bool {\bfseries get\_\-mc\_\-bit} () const }
\label{classIPv6Prefix_ab82d2a0977624307d268bd977f0e6d7e}

\item 
\hypertarget{classIPv6Prefix_a8ba6088c14eff0a520049dc5d72b432a}{
void {\bfseries set\_\-p\_\-bit} (bool set)}
\label{classIPv6Prefix_a8ba6088c14eff0a520049dc5d72b432a}

\item 
\hypertarget{classIPv6Prefix_a7fbe0318400db06ac6640b73dfe2642c}{
bool {\bfseries get\_\-p\_\-bit} () const }
\label{classIPv6Prefix_a7fbe0318400db06ac6640b73dfe2642c}

\item 
\hypertarget{classIPv6Prefix_afbb77a1d0946b8ccf3b089c9d0bc82bc}{
void {\bfseries set\_\-dn\_\-bit} (bool set)}
\label{classIPv6Prefix_afbb77a1d0946b8ccf3b089c9d0bc82bc}

\item 
\hypertarget{classIPv6Prefix_a28603f0b6850d9ca27f2828a990e73b9}{
bool {\bfseries get\_\-dn\_\-bit} () const }
\label{classIPv6Prefix_a28603f0b6850d9ca27f2828a990e73b9}

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

\begin{DoxyCompactList}\small\item\em Generate a printable representation. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static size\_\-t \hyperlink{classIPv6Prefix_a4edc29c46cc2f01384e365cf62f48440}{bytes\_\-per\_\-prefix} (uint8\_\-t prefix)
\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIPv6Prefix_a5f16e8afc6e399f26d0c22f3c0ddad6d}{
static const uint8\_\-t {\bfseries NU\_\-bit} = 0x1}
\label{classIPv6Prefix_a5f16e8afc6e399f26d0c22f3c0ddad6d}

\item 
\hypertarget{classIPv6Prefix_a2da08dbb2f7a78ca36ad3b0583c9607e}{
static const uint8\_\-t {\bfseries LA\_\-bit} = 0x2}
\label{classIPv6Prefix_a2da08dbb2f7a78ca36ad3b0583c9607e}

\item 
\hypertarget{classIPv6Prefix_a8ecf4a71b8fa67e8c171fc466ba13d65}{
static const uint8\_\-t {\bfseries MC\_\-bit} = 0x4}
\label{classIPv6Prefix_a8ecf4a71b8fa67e8c171fc466ba13d65}

\item 
\hypertarget{classIPv6Prefix_a04fe443f3ce1685500216841a5b1063b}{
static const uint8\_\-t {\bfseries P\_\-bit} = 0x8}
\label{classIPv6Prefix_a04fe443f3ce1685500216841a5b1063b}

\item 
\hypertarget{classIPv6Prefix_aa9ea91e6b3a139620133ace9d7e57aca}{
static const uint8\_\-t {\bfseries DN\_\-bit} = 0x10}
\label{classIPv6Prefix_aa9ea91e6b3a139620133ace9d7e57aca}

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

\item 
\hypertarget{classIPv6Prefix_a28df431c11f31c630771061866721a3a}{
const bool {\bfseries \_\-use\_\-metric}}
\label{classIPv6Prefix_a28df431c11f31c630771061866721a3a}

\item 
\hypertarget{classIPv6Prefix_ac484212cdf4e9c0cc59be797e511a51a}{
\hyperlink{classIPNet}{IPNet}$<$ \hyperlink{classIPv6}{IPv6} $>$ {\bfseries \_\-network}}
\label{classIPv6Prefix_ac484212cdf4e9c0cc59be797e511a51a}

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

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

\end{DoxyCompactItemize}


\subsection{Detailed Description}
RFC 2470 A.4.1 \hyperlink{classIPv6}{IPv6} Prefix Representation OSPFv3 only. 

\subsection{Member Function Documentation}
\hypertarget{classIPv6Prefix_a4edc29c46cc2f01384e365cf62f48440}{
\index{IPv6Prefix@{IPv6Prefix}!bytes\_\-per\_\-prefix@{bytes\_\-per\_\-prefix}}
\index{bytes\_\-per\_\-prefix@{bytes\_\-per\_\-prefix}!IPv6Prefix@{IPv6Prefix}}
\subsubsection[{bytes\_\-per\_\-prefix}]{\setlength{\rightskip}{0pt plus 5cm}static size\_\-t IPv6Prefix::bytes\_\-per\_\-prefix (
\begin{DoxyParamCaption}
\item[{uint8\_\-t}]{prefix}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, static\mbox{]}}}}
\label{classIPv6Prefix_a4edc29c46cc2f01384e365cf62f48440}
\begin{DoxyReturn}{Returns}
Number of bytes that will be occupied by this prefix. 
\end{DoxyReturn}
\hypertarget{classIPv6Prefix_a93f5caea6cd0233616da2de1ab7db8e7}{
\index{IPv6Prefix@{IPv6Prefix}!copy\_\-out@{copy\_\-out}}
\index{copy\_\-out@{copy\_\-out}!IPv6Prefix@{IPv6Prefix}}
\subsubsection[{copy\_\-out}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t IPv6Prefix::copy\_\-out (
\begin{DoxyParamCaption}
\item[{uint8\_\-t $\ast$}]{to\_\-uint8}
\end{DoxyParamCaption}
) const}}
\label{classIPv6Prefix_a93f5caea6cd0233616da2de1ab7db8e7}


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

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

\hyperlink{classIPv6Prefix_a009b58ac4c40a5032e4f67b36edaaca6}{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{classIPv6Prefix_aa936f4656bb8489d53f9cbf136869ce6}{
\index{IPv6Prefix@{IPv6Prefix}!decode@{decode}}
\index{decode@{decode}!IPv6Prefix@{IPv6Prefix}}
\subsubsection[{decode}]{\setlength{\rightskip}{0pt plus 5cm}{\bf IPv6Prefix} IPv6Prefix::decode (
\begin{DoxyParamCaption}
\item[{uint8\_\-t $\ast$}]{ptr, }
\item[{size\_\-t \&}]{len, }
\item[{uint8\_\-t}]{prefixlen, }
\item[{uint8\_\-t}]{option}
\end{DoxyParamCaption}
) const  throw ({\bf InvalidPacket})}}
\label{classIPv6Prefix_aa936f4656bb8489d53f9cbf136869ce6}


Decode a \hyperlink{classIPv6Prefix}{IPv6Prefix}. 


\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
{\em prefixlen} & prefix length \\
\hline
{\em option} & prefix option\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A \hyperlink{classIPv6Prefix}{IPv6Prefix}. 
\end{DoxyReturn}
\hypertarget{classIPv6Prefix_a009b58ac4c40a5032e4f67b36edaaca6}{
\index{IPv6Prefix@{IPv6Prefix}!length@{length}}
\index{length@{length}!IPv6Prefix@{IPv6Prefix}}
\subsubsection[{length}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t IPv6Prefix::length (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classIPv6Prefix_a009b58ac4c40a5032e4f67b36edaaca6}
\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}
