\hypertarget{classIPNet}{
\section{IPNet$<$ A $>$ Class Template Reference}
\label{classIPNet}\index{IPNet@{IPNet}}
}


A template class for subnets.  




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

Inheritance diagram for IPNet$<$ A $>$:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classIPNet}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classIPNet_aa9ce6a378279b5bb9b39877724eec933}{IPNet} ()
\begin{DoxyCompactList}\small\item\em Default constructor taking no parameters. \item\end{DoxyCompactList}\item 
\hyperlink{classIPNet_a555d97b24b6d5781051429be1cfca260}{IPNet} (const A \&a, uint8\_\-t prefix\_\-len)  throw (InvalidNetmaskLength)
\begin{DoxyCompactList}\small\item\em Constructor from a given base address and a prefix length. \item\end{DoxyCompactList}\item 
\hyperlink{classIPNet_a1c384a0fe6361e87f560f41f4a84f263}{IPNet} (const char $\ast$from\_\-cstring)  throw (InvalidString, InvalidNetmaskLength)
\begin{DoxyCompactList}\small\item\em Constructor from a string. \item\end{DoxyCompactList}\item 
\hyperlink{classIPNet_a24eba20c915ae72c1b7a7e875c3b11e6}{IPNet} (const \hyperlink{classIPNet}{IPNet} \&n)
\begin{DoxyCompactList}\small\item\em Copy constructor. \item\end{DoxyCompactList}\item 
\hyperlink{classIPNet}{IPNet} \& \hyperlink{classIPNet_a77e090aa95d8dc9697c2ee20403c5d28}{operator=} (const \hyperlink{classIPNet}{IPNet} \&n)
\begin{DoxyCompactList}\small\item\em Assignment operator. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_ae295325908a0140a1d8b12c884f3dab0}{operator==} (const \hyperlink{classIPNet}{IPNet} \&other) const 
\begin{DoxyCompactList}\small\item\em Equality Operator. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_a58ea4e370cee73d847ddf3356d076cce}{operator$<$} (const \hyperlink{classIPNet}{IPNet} \&other) const 
\begin{DoxyCompactList}\small\item\em Less-\/than comparison for subnets (see body for description). \item\end{DoxyCompactList}\item 
\hyperlink{classIPNet}{IPNet} \& \hyperlink{classIPNet_a4680aef0671ad6fd182b3c3e5862f060}{operator-\/-\/} ()
\begin{DoxyCompactList}\small\item\em Decrement Operator. \item\end{DoxyCompactList}\item 
\hyperlink{classIPNet}{IPNet} \& \hyperlink{classIPNet_a2d811c36686769df9f73f7d9a4e9393e}{operator++} ()
\begin{DoxyCompactList}\small\item\em Increment Operator. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_a67fa803a205b9c87cee9ba7f6058696d}{operator==} (const \hyperlink{classU32Range}{U32Range} \&range) const 
\begin{DoxyCompactList}\small\item\em Equality Operator for \hyperlink{classU32Range}{U32Range} operand. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_a81599208b62f8ebf737a049dfb542803}{operator!=} (const \hyperlink{classU32Range}{U32Range} \&range) const 
\begin{DoxyCompactList}\small\item\em Non-\/equality Operator for \hyperlink{classU32Range}{U32Range} operand. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_aca12892e9ceeb35eb5010b9f04afabc8}{operator$<$} (const \hyperlink{classU32Range}{U32Range} \&range) const 
\begin{DoxyCompactList}\small\item\em Less-\/than comparison for prefix lengths for \hyperlink{classU32Range}{U32Range} operand. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_ace98fbf42244d70105f20ab1b9fd1feb}{operator$<$=} (const \hyperlink{classU32Range}{U32Range} \&range) const 
\begin{DoxyCompactList}\small\item\em Less-\/than or equal comparison for prefix lengths for \hyperlink{classU32Range}{U32Range} operand. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_aa1348be3c172621255a14081012195c7}{operator$>$} (const \hyperlink{classU32Range}{U32Range} \&range) const 
\begin{DoxyCompactList}\small\item\em Greater-\/than comparison for prefix lengths for \hyperlink{classU32Range}{U32Range} operand. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_ad5dc211463289a3041b0b325655812f2}{operator$>$=} (const \hyperlink{classU32Range}{U32Range} \&range) const 
\begin{DoxyCompactList}\small\item\em Greater-\/than or equal comparison for prefix lengths for \hyperlink{classU32Range}{U32Range} operand. \item\end{DoxyCompactList}\item 
string \hyperlink{classIPNet_aef456db857bb34b13dba4be4563fc960}{str} () const 
\begin{DoxyCompactList}\small\item\em Convert this address from binary form to presentation format. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_a189e213ef301b378fd5f23c4183def19}{is\_\-valid} () const 
\begin{DoxyCompactList}\small\item\em Test if \hyperlink{protocolthe-p}{the} object contains a real (non-\/default) value. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_a2008660140e76c5aea1a7c4e70d61067}{is\_\-overlap} (const \hyperlink{classIPNet}{IPNet} \&other) const 
\begin{DoxyCompactList}\small\item\em Test if subnets overlap. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_a9500c494c265cc213bc30459fdb8638a}{contains} (const \hyperlink{classIPNet}{IPNet} \&other) const 
\begin{DoxyCompactList}\small\item\em Test if a subnet contains (or is equal to) another subnet. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_ab04fc63f29fe43d80f8fb9dab2bb88be}{contains} (const A \&addr) const 
\begin{DoxyCompactList}\small\item\em Test if an address is within a subnet. \item\end{DoxyCompactList}\item 
uint32\_\-t \hyperlink{classIPNet_a514015432550b7dba4449390186854f8}{overlap} (const \hyperlink{classIPNet}{IPNet} \&other) const 
\begin{DoxyCompactList}\small\item\em Determine \hyperlink{protocolthe-p}{the} number of \hyperlink{protocolthe-p}{the} most significant bits overlapping with another subnet. \item\end{DoxyCompactList}\item 
const A \& \hyperlink{classIPNet_af41bd2a25b8b66938ca58aa7c07d05aa}{masked\_\-addr} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} base address. \item\end{DoxyCompactList}\item 
\hypertarget{classIPNet_a9b5c05e1887709ad030c93574eca25c4}{
A \& {\bfseries masked\_\-addr\_\-nc} ()}
\label{classIPNet_a9b5c05e1887709ad030c93574eca25c4}

\item 
uint8\_\-t \hyperlink{classIPNet_af4ea80f12ee1dd1a79232aba4b7111a5}{prefix\_\-len} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} prefix length. \item\end{DoxyCompactList}\item 
\hypertarget{classIPNet_a0a9eaca5da97e44fe75a6420886250dc}{
void {\bfseries set\_\-prefix\_\-len} (uint8\_\-t v)}
\label{classIPNet_a0a9eaca5da97e44fe75a6420886250dc}

\item 
A \hyperlink{classIPNet_a22bbf799a2f0121ad9570e72b15476a8}{netmask} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} network mask. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_a640b69989971c3918241fdd0393678cc}{is\_\-unicast} () const 
\begin{DoxyCompactList}\small\item\em Test if this subnet is a unicast prefix. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_ad5447800c67d2fb3ff02f930cce77a30}{is\_\-multicast} () const 
\begin{DoxyCompactList}\small\item\em Test if this subnet is within \hyperlink{protocolthe-p}{the} multicast address range. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_a6ce91d64bc8ab732c6458621d20b6cb7}{is\_\-class\_\-a} () const 
\begin{DoxyCompactList}\small\item\em Test if this subnet is within \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} Class A address range (0.0.0.0/1). \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_a0dc95eb0252fed3a5163eaf61a05bc9b}{is\_\-class\_\-b} () const 
\begin{DoxyCompactList}\small\item\em Test if this subnet is within \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} Class B address range (128.0.0.0/2). \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_a79fd75627db4ec423540f4b99b8c36f4}{is\_\-class\_\-c} () const 
\begin{DoxyCompactList}\small\item\em Test if this subnet is within \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} Class C address range (192.0.0.0/3). \item\end{DoxyCompactList}\item 
bool \hyperlink{classIPNet_ac0c1f6c23f8c7fa363449dbe1b060e85}{is\_\-experimental} () const 
\begin{DoxyCompactList}\small\item\em Test if this subnet is within \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} experimental Class E address range (240.0.0.0/4). \item\end{DoxyCompactList}\item 
A \hyperlink{classIPNet_a855ecde7efe21a605f0047e9c8334767}{top\_\-addr} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} highest address within this subnet. \item\end{DoxyCompactList}\item 
\hypertarget{classIPNet_a7fbe7b030c0087aed9e7c813a2654e00}{
{\footnotesize template$<$$>$ }\\{\bfseries IPNet} (const \hyperlink{classIPvX}{IPvX} \&ipvx, uint8\_\-t prefix\_\-len) throw(InvalidNetmaskLength)}
\label{classIPNet_a7fbe7b030c0087aed9e7c813a2654e00}

\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static int \hyperlink{classIPNet_a9f62c158ffb86de85f07d4a7632552ab}{af} ()
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} address family. \item\end{DoxyCompactList}\item 
static const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \hyperlink{classIPNet_a9b6ad6c8407a714c66ba9616af3c7939}{ip\_\-multicast\_\-base\_\-prefix} ()
\begin{DoxyCompactList}\small\item\em Return \hyperlink{protocolthe-p}{the} subnet containing all multicast addresses. \item\end{DoxyCompactList}\item 
static const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \hyperlink{classIPNet_a0cb4ff89c1da080aaf750b1b0a97dcef}{ip\_\-class\_\-a\_\-base\_\-prefix} ()
\begin{DoxyCompactList}\small\item\em Return \hyperlink{protocolthe-p}{the} subnet containing all \hyperlink{classIPv4}{IPv4} Class A addresses (0.0.0.0/1). \item\end{DoxyCompactList}\item 
static const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \hyperlink{classIPNet_ab6704d7df684d4e8bf51b4649e55cb10}{ip\_\-class\_\-b\_\-base\_\-prefix} ()
\begin{DoxyCompactList}\small\item\em Return \hyperlink{protocolthe-p}{the} subnet containing all \hyperlink{classIPv4}{IPv4} Class B addresses (128.0.0.0/2). \item\end{DoxyCompactList}\item 
static const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \hyperlink{classIPNet_aa87e48690312951779f07e3e6c30e9f1}{ip\_\-class\_\-c\_\-base\_\-prefix} ()
\begin{DoxyCompactList}\small\item\em Return \hyperlink{protocolthe-p}{the} subnet containing all \hyperlink{classIPv4}{IPv4} Class C addresses (192.0.0.0/3). \item\end{DoxyCompactList}\item 
static const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \hyperlink{classIPNet_a19774df5c8a018cc0a601ca073f19321}{ip\_\-experimental\_\-base\_\-prefix} ()
\begin{DoxyCompactList}\small\item\em Return \hyperlink{protocolthe-p}{the} subnet containing all \hyperlink{classIPv4}{IPv4} experimental Class E addresses (240.0.0.0/4). \item\end{DoxyCompactList}\item 
static \hyperlink{classIPNet}{IPNet}$<$ A $>$ \hyperlink{classIPNet_a8c1befd8c1c6eefb9e14af0508736b63}{common\_\-subnet} (const \hyperlink{classIPNet}{IPNet}$<$ A $>$ x, const \hyperlink{classIPNet}{IPNet}$<$ A $>$ y)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} smallest subnet containing both subnets. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIPNet_a1d795d99243dde235df3b70b2e5425a4}{
void {\bfseries initialize\_\-from\_\-string} (const char $\ast$s)  throw (InvalidString, InvalidNetmaskLength)}
\label{classIPNet_a1d795d99243dde235df3b70b2e5425a4}

\item 
\hypertarget{classIPNet_a4efdf1e6cc1544ff68bcebd36822c417}{
{\footnotesize template$<$$>$ }\\void {\bfseries initialize\_\-from\_\-string} (const char $\ast$cp) throw(InvalidString, InvalidNetmaskLength)}
\label{classIPNet_a4efdf1e6cc1544ff68bcebd36822c417}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIPNet_aa419eae6b7b887ffc5379966fddba3ae}{
A {\bfseries \_\-masked\_\-addr}}
\label{classIPNet_aa419eae6b7b887ffc5379966fddba3ae}

\item 
\hypertarget{classIPNet_a9c6e5dd7ab2a9ada6ab965659773708e}{
uint8\_\-t {\bfseries \_\-prefix\_\-len}}
\label{classIPNet_a9c6e5dd7ab2a9ada6ab965659773708e}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$class A$>$ class IPNet$<$ A $>$}

A template class for subnets. A \char`\"{}subnet\char`\"{} is specified by a base \char`\"{}address\char`\"{} and a \char`\"{}prefix length\char`\"{}. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classIPNet_aa9ce6a378279b5bb9b39877724eec933}{
\index{IPNet@{IPNet}!IPNet@{IPNet}}
\index{IPNet@{IPNet}!IPNet@{IPNet}}
\subsubsection[{IPNet}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ {\bf IPNet}$<$ A $>$::{\bf IPNet} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_aa9ce6a378279b5bb9b39877724eec933}


Default constructor taking no parameters. 

Default value has INADDR\_\-ANY/0. \hypertarget{classIPNet_a555d97b24b6d5781051429be1cfca260}{
\index{IPNet@{IPNet}!IPNet@{IPNet}}
\index{IPNet@{IPNet}!IPNet@{IPNet}}
\subsubsection[{IPNet}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ {\bf IPNet}$<$ A $>$::{\bf IPNet} (
\begin{DoxyParamCaption}
\item[{const A \&}]{a, }
\item[{uint8\_\-t}]{prefix\_\-len}
\end{DoxyParamCaption}
)  throw ({\bf InvalidNetmaskLength})\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_a555d97b24b6d5781051429be1cfca260}


Constructor from a given base address and a prefix length. 


\begin{DoxyParams}{Parameters}
{\em a} & base address for \hyperlink{protocolthe-p}{the} subnet. \\
\hline
{\em prefix\_\-len} & length of subnet mask (e.g., class C nets would have prefix\_\-len=24). \\
\hline
\end{DoxyParams}
\hypertarget{classIPNet_a1c384a0fe6361e87f560f41f4a84f263}{
\index{IPNet@{IPNet}!IPNet@{IPNet}}
\index{IPNet@{IPNet}!IPNet@{IPNet}}
\subsubsection[{IPNet}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ {\bf IPNet}$<$ A $>$::{\bf IPNet} (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{from\_\-cstring}
\end{DoxyParamCaption}
)  throw ({\bf InvalidString}, {\bf InvalidNetmaskLength})\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_a1c384a0fe6361e87f560f41f4a84f263}


Constructor from a string. 


\begin{DoxyParams}{Parameters}
{\em from\_\-cstring} & C-\/style string with slash separated address and prefix length. \\
\hline
\end{DoxyParams}
\hypertarget{classIPNet_a24eba20c915ae72c1b7a7e875c3b11e6}{
\index{IPNet@{IPNet}!IPNet@{IPNet}}
\index{IPNet@{IPNet}!IPNet@{IPNet}}
\subsubsection[{IPNet}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ {\bf IPNet}$<$ A $>$::{\bf IPNet} (
\begin{DoxyParamCaption}
\item[{const {\bf IPNet}$<$ A $>$ \&}]{n}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_a24eba20c915ae72c1b7a7e875c3b11e6}


Copy constructor. 


\begin{DoxyParams}{Parameters}
{\em n} & \hyperlink{protocolthe-p}{the} subnet to copy from. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classIPNet_a9f62c158ffb86de85f07d4a7632552ab}{
\index{IPNet@{IPNet}!af@{af}}
\index{af@{af}!IPNet@{IPNet}}
\subsubsection[{af}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ static int {\bf IPNet}$<$ A $>$::af (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, static\mbox{]}}}}
\label{classIPNet_a9f62c158ffb86de85f07d4a7632552ab}


Get \hyperlink{protocolthe-p}{the} address family. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} address family of this address. 
\end{DoxyReturn}
\hypertarget{classIPNet_a8c1befd8c1c6eefb9e14af0508736b63}{
\index{IPNet@{IPNet}!common\_\-subnet@{common\_\-subnet}}
\index{common\_\-subnet@{common\_\-subnet}!IPNet@{IPNet}}
\subsubsection[{common\_\-subnet}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ static {\bf IPNet}$<$A$>$ {\bf IPNet}$<$ A $>$::common\_\-subnet (
\begin{DoxyParamCaption}
\item[{const {\bf IPNet}$<$ A $>$}]{x, }
\item[{const {\bf IPNet}$<$ A $>$}]{y}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, static\mbox{]}}}}
\label{classIPNet_a8c1befd8c1c6eefb9e14af0508736b63}


Get \hyperlink{protocolthe-p}{the} smallest subnet containing both subnets. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} smallest subnet containing both subnets passed as arguments. 
\end{DoxyReturn}
\hypertarget{classIPNet_a9500c494c265cc213bc30459fdb8638a}{
\index{IPNet@{IPNet}!contains@{contains}}
\index{contains@{contains}!IPNet@{IPNet}}
\subsubsection[{contains}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ bool {\bf IPNet}$<$ A $>$::contains (
\begin{DoxyParamCaption}
\item[{const {\bf IPNet}$<$ A $>$ \&}]{other}
\end{DoxyParamCaption}
) const}}
\label{classIPNet_a9500c494c265cc213bc30459fdb8638a}


Test if a subnet contains (or is equal to) another subnet. 

in LaTeX, x.contains(y) would be \$x  y\$


\begin{DoxyParams}{Parameters}
{\em other} & \hyperlink{protocolthe-p}{the} subnet to test against. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if this subnet contains or is equal to other. 
\end{DoxyReturn}
\hypertarget{classIPNet_ab04fc63f29fe43d80f8fb9dab2bb88be}{
\index{IPNet@{IPNet}!contains@{contains}}
\index{contains@{contains}!IPNet@{IPNet}}
\subsubsection[{contains}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf IPNet}$<$ A $>$::contains (
\begin{DoxyParamCaption}
\item[{const A \&}]{addr}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_ab04fc63f29fe43d80f8fb9dab2bb88be}


Test if an address is within a subnet. 


\begin{DoxyParams}{Parameters}
{\em addr} & \hyperlink{protocolthe-p}{the} address to test against. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if addr is within this subnet. 
\end{DoxyReturn}
\hypertarget{classIPNet_a0cb4ff89c1da080aaf750b1b0a97dcef}{
\index{IPNet@{IPNet}!ip\_\-class\_\-a\_\-base\_\-prefix@{ip\_\-class\_\-a\_\-base\_\-prefix}}
\index{ip\_\-class\_\-a\_\-base\_\-prefix@{ip\_\-class\_\-a\_\-base\_\-prefix}!IPNet@{IPNet}}
\subsubsection[{ip\_\-class\_\-a\_\-base\_\-prefix}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ static const {\bf IPNet}$<$A$>$ {\bf IPNet}$<$ A $>$::ip\_\-class\_\-a\_\-base\_\-prefix (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classIPNet_a0cb4ff89c1da080aaf750b1b0a97dcef}


Return \hyperlink{protocolthe-p}{the} subnet containing all \hyperlink{classIPv4}{IPv4} Class A addresses (0.0.0.0/1). 

This method applies only for \hyperlink{classIPv4}{IPv4}. Note that this is a static function and can be used without a particular object. Example: IPv4Net my\_\-prefix = \hyperlink{classIPNet_a0cb4ff89c1da080aaf750b1b0a97dcef}{IPv4Net::ip\_\-class\_\-a\_\-base\_\-prefix()}; IPv4Net my\_\-prefix = ipv4net.ip\_\-class\_\-a\_\-base\_\-prefix();

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} subnet containing Class A addresses. 
\end{DoxyReturn}
\hypertarget{classIPNet_ab6704d7df684d4e8bf51b4649e55cb10}{
\index{IPNet@{IPNet}!ip\_\-class\_\-b\_\-base\_\-prefix@{ip\_\-class\_\-b\_\-base\_\-prefix}}
\index{ip\_\-class\_\-b\_\-base\_\-prefix@{ip\_\-class\_\-b\_\-base\_\-prefix}!IPNet@{IPNet}}
\subsubsection[{ip\_\-class\_\-b\_\-base\_\-prefix}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ static const {\bf IPNet}$<$A$>$ {\bf IPNet}$<$ A $>$::ip\_\-class\_\-b\_\-base\_\-prefix (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classIPNet_ab6704d7df684d4e8bf51b4649e55cb10}


Return \hyperlink{protocolthe-p}{the} subnet containing all \hyperlink{classIPv4}{IPv4} Class B addresses (128.0.0.0/2). 

This method applies only for \hyperlink{classIPv4}{IPv4}. Note that this is a static function and can be used without a particular object. Example: IPv4Net my\_\-prefix = \hyperlink{classIPNet_ab6704d7df684d4e8bf51b4649e55cb10}{IPv4Net::ip\_\-class\_\-b\_\-base\_\-prefix()}; IPv4Net my\_\-prefix = ipv4net.ip\_\-class\_\-b\_\-base\_\-prefix();

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} subnet containing Class B addresses. 
\end{DoxyReturn}
\hypertarget{classIPNet_aa87e48690312951779f07e3e6c30e9f1}{
\index{IPNet@{IPNet}!ip\_\-class\_\-c\_\-base\_\-prefix@{ip\_\-class\_\-c\_\-base\_\-prefix}}
\index{ip\_\-class\_\-c\_\-base\_\-prefix@{ip\_\-class\_\-c\_\-base\_\-prefix}!IPNet@{IPNet}}
\subsubsection[{ip\_\-class\_\-c\_\-base\_\-prefix}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ static const {\bf IPNet}$<$A$>$ {\bf IPNet}$<$ A $>$::ip\_\-class\_\-c\_\-base\_\-prefix (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classIPNet_aa87e48690312951779f07e3e6c30e9f1}


Return \hyperlink{protocolthe-p}{the} subnet containing all \hyperlink{classIPv4}{IPv4} Class C addresses (192.0.0.0/3). 

This method applies only for \hyperlink{classIPv4}{IPv4}. Note that this is a static function and can be used without a particular object. Example: IPv4Net my\_\-prefix = \hyperlink{classIPNet_aa87e48690312951779f07e3e6c30e9f1}{IPv4Net::ip\_\-class\_\-c\_\-base\_\-prefix()}; IPv4Net my\_\-prefix = ipv4net.ip\_\-class\_\-c\_\-base\_\-prefix();

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} subnet containing Class C addresses. 
\end{DoxyReturn}
\hypertarget{classIPNet_a19774df5c8a018cc0a601ca073f19321}{
\index{IPNet@{IPNet}!ip\_\-experimental\_\-base\_\-prefix@{ip\_\-experimental\_\-base\_\-prefix}}
\index{ip\_\-experimental\_\-base\_\-prefix@{ip\_\-experimental\_\-base\_\-prefix}!IPNet@{IPNet}}
\subsubsection[{ip\_\-experimental\_\-base\_\-prefix}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ static const {\bf IPNet}$<$A$>$ {\bf IPNet}$<$ A $>$::ip\_\-experimental\_\-base\_\-prefix (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classIPNet_a19774df5c8a018cc0a601ca073f19321}


Return \hyperlink{protocolthe-p}{the} subnet containing all \hyperlink{classIPv4}{IPv4} experimental Class E addresses (240.0.0.0/4). 

This method applies only for \hyperlink{classIPv4}{IPv4}. Note that this is a static function and can be used without a particular object. Example: IPv4Net my\_\-prefix = \hyperlink{classIPNet_a19774df5c8a018cc0a601ca073f19321}{IPv4Net::ip\_\-experimental\_\-base\_\-prefix()}; IPv4Net my\_\-prefix = ipv4net.ip\_\-experimental\_\-base\_\-prefix();

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} subnet containing experimental addresses. 
\end{DoxyReturn}
\hypertarget{classIPNet_a9b6ad6c8407a714c66ba9616af3c7939}{
\index{IPNet@{IPNet}!ip\_\-multicast\_\-base\_\-prefix@{ip\_\-multicast\_\-base\_\-prefix}}
\index{ip\_\-multicast\_\-base\_\-prefix@{ip\_\-multicast\_\-base\_\-prefix}!IPNet@{IPNet}}
\subsubsection[{ip\_\-multicast\_\-base\_\-prefix}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ static const {\bf IPNet}$<$A$>$ {\bf IPNet}$<$ A $>$::ip\_\-multicast\_\-base\_\-prefix (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, static\mbox{]}}}}
\label{classIPNet_a9b6ad6c8407a714c66ba9616af3c7939}


Return \hyperlink{protocolthe-p}{the} subnet containing all multicast addresses. 

Note that this is a static function and can be used without a particular object. Example: IPv4Net my\_\-prefix = \hyperlink{classIPNet_a9b6ad6c8407a714c66ba9616af3c7939}{IPv4Net::ip\_\-multicast\_\-base\_\-prefix()}; IPv4Net my\_\-prefix = ipv4net.ip\_\-multicast\_\-base\_\-prefix();

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} subnet containing multicast addresses. 
\end{DoxyReturn}
\hypertarget{classIPNet_a6ce91d64bc8ab732c6458621d20b6cb7}{
\index{IPNet@{IPNet}!is\_\-class\_\-a@{is\_\-class\_\-a}}
\index{is\_\-class\_\-a@{is\_\-class\_\-a}!IPNet@{IPNet}}
\subsubsection[{is\_\-class\_\-a}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf IPNet}$<$ A $>$::is\_\-class\_\-a (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classIPNet_a6ce91d64bc8ab732c6458621d20b6cb7}


Test if this subnet is within \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} Class A address range (0.0.0.0/1). 

This method applies only for \hyperlink{classIPv4}{IPv4}.

\begin{DoxyReturn}{Returns}
true if this subnet is within \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} Class A address range. 
\end{DoxyReturn}


Reimplemented in \hyperlink{classIPvXNet_ae61f56d72418b50a9a67eba0f6180493}{IPvXNet}.

\hypertarget{classIPNet_a0dc95eb0252fed3a5163eaf61a05bc9b}{
\index{IPNet@{IPNet}!is\_\-class\_\-b@{is\_\-class\_\-b}}
\index{is\_\-class\_\-b@{is\_\-class\_\-b}!IPNet@{IPNet}}
\subsubsection[{is\_\-class\_\-b}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf IPNet}$<$ A $>$::is\_\-class\_\-b (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classIPNet_a0dc95eb0252fed3a5163eaf61a05bc9b}


Test if this subnet is within \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} Class B address range (128.0.0.0/2). 

This method applies only for \hyperlink{classIPv4}{IPv4}.

\begin{DoxyReturn}{Returns}
true if this subnet is within \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} Class B address range. 
\end{DoxyReturn}


Reimplemented in \hyperlink{classIPvXNet_a96db74e4152a785eaa7e5e4a7f6a1890}{IPvXNet}.

\hypertarget{classIPNet_a79fd75627db4ec423540f4b99b8c36f4}{
\index{IPNet@{IPNet}!is\_\-class\_\-c@{is\_\-class\_\-c}}
\index{is\_\-class\_\-c@{is\_\-class\_\-c}!IPNet@{IPNet}}
\subsubsection[{is\_\-class\_\-c}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf IPNet}$<$ A $>$::is\_\-class\_\-c (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classIPNet_a79fd75627db4ec423540f4b99b8c36f4}


Test if this subnet is within \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} Class C address range (192.0.0.0/3). 

This method applies only for \hyperlink{classIPv4}{IPv4}.

\begin{DoxyReturn}{Returns}
true if this subnet is within \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} Class C address range. 
\end{DoxyReturn}


Reimplemented in \hyperlink{classIPvXNet_a2d963166666878616edc80e2c118a20b}{IPvXNet}.

\hypertarget{classIPNet_ac0c1f6c23f8c7fa363449dbe1b060e85}{
\index{IPNet@{IPNet}!is\_\-experimental@{is\_\-experimental}}
\index{is\_\-experimental@{is\_\-experimental}!IPNet@{IPNet}}
\subsubsection[{is\_\-experimental}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf IPNet}$<$ A $>$::is\_\-experimental (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classIPNet_ac0c1f6c23f8c7fa363449dbe1b060e85}


Test if this subnet is within \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} experimental Class E address range (240.0.0.0/4). 

This method applies only for \hyperlink{classIPv4}{IPv4}.

\begin{DoxyReturn}{Returns}
true if this subnet is within \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} experimental address range. 
\end{DoxyReturn}


Reimplemented in \hyperlink{classIPvXNet_a47b709b8d7504f0b703fce79302cda48}{IPvXNet}.

\hypertarget{classIPNet_ad5447800c67d2fb3ff02f930cce77a30}{
\index{IPNet@{IPNet}!is\_\-multicast@{is\_\-multicast}}
\index{is\_\-multicast@{is\_\-multicast}!IPNet@{IPNet}}
\subsubsection[{is\_\-multicast}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf IPNet}$<$ A $>$::is\_\-multicast (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_ad5447800c67d2fb3ff02f930cce77a30}


Test if this subnet is within \hyperlink{protocolthe-p}{the} multicast address range. 

\begin{DoxyReturn}{Returns}
true if this subnet is within \hyperlink{protocolthe-p}{the} multicast address range. 
\end{DoxyReturn}


Reimplemented in \hyperlink{classIPvXNet_ac225fd556124633e4ab519f18c4bed25}{IPvXNet}.

\hypertarget{classIPNet_a2008660140e76c5aea1a7c4e70d61067}{
\index{IPNet@{IPNet}!is\_\-overlap@{is\_\-overlap}}
\index{is\_\-overlap@{is\_\-overlap}!IPNet@{IPNet}}
\subsubsection[{is\_\-overlap}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ bool {\bf IPNet}$<$ A $>$::is\_\-overlap (
\begin{DoxyParamCaption}
\item[{const {\bf IPNet}$<$ A $>$ \&}]{other}
\end{DoxyParamCaption}
) const}}
\label{classIPNet_a2008660140e76c5aea1a7c4e70d61067}


Test if subnets overlap. 


\begin{DoxyParams}{Parameters}
{\em other} & \hyperlink{protocolthe-p}{the} subnet to compare against. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if there is some overlap between \hyperlink{protocolthe-p}{the} two subnets. 
\end{DoxyReturn}
\hypertarget{classIPNet_a640b69989971c3918241fdd0393678cc}{
\index{IPNet@{IPNet}!is\_\-unicast@{is\_\-unicast}}
\index{is\_\-unicast@{is\_\-unicast}!IPNet@{IPNet}}
\subsubsection[{is\_\-unicast}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf IPNet}$<$ A $>$::is\_\-unicast (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classIPNet_a640b69989971c3918241fdd0393678cc}


Test if this subnet is a unicast prefix. 

In case of \hyperlink{classIPv4}{IPv4} all prefixes that fall within \hyperlink{protocolthe-p}{the} Class A, Class B or Class C address space are unicast. In case of \hyperlink{classIPv6}{IPv6} all prefixes that don't contain \hyperlink{protocolthe-p}{the} multicast address space are unicast. Note that \hyperlink{protocolthe-p}{the} default route (0.0.0.0/0 for \hyperlink{classIPv4}{IPv4} or ::/0 for \hyperlink{classIPv6}{IPv6}) is also considered an unicast prefix.

\begin{DoxyReturn}{Returns}
true if this subnet is a unicast prefix. 
\end{DoxyReturn}


Reimplemented in \hyperlink{classIPvXNet_a53901897aa025a5630080288ad6640f6}{IPvXNet}.

\hypertarget{classIPNet_a189e213ef301b378fd5f23c4183def19}{
\index{IPNet@{IPNet}!is\_\-valid@{is\_\-valid}}
\index{is\_\-valid@{is\_\-valid}!IPNet@{IPNet}}
\subsubsection[{is\_\-valid}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf IPNet}$<$ A $>$::is\_\-valid (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_a189e213ef301b378fd5f23c4183def19}


Test if \hyperlink{protocolthe-p}{the} object contains a real (non-\/default) value. 

\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} object stores a real (non-\/default) value. 
\end{DoxyReturn}
\hypertarget{classIPNet_af41bd2a25b8b66938ca58aa7c07d05aa}{
\index{IPNet@{IPNet}!masked\_\-addr@{masked\_\-addr}}
\index{masked\_\-addr@{masked\_\-addr}!IPNet@{IPNet}}
\subsubsection[{masked\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ const A\& {\bf IPNet}$<$ A $>$::masked\_\-addr (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_af41bd2a25b8b66938ca58aa7c07d05aa}


Get \hyperlink{protocolthe-p}{the} base address. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} base address for this subnet. 
\end{DoxyReturn}
\hypertarget{classIPNet_a22bbf799a2f0121ad9570e72b15476a8}{
\index{IPNet@{IPNet}!netmask@{netmask}}
\index{netmask@{netmask}!IPNet@{IPNet}}
\subsubsection[{netmask}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ A {\bf IPNet}$<$ A $>$::netmask (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_a22bbf799a2f0121ad9570e72b15476a8}


Get \hyperlink{protocolthe-p}{the} network mask. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} netmask associated with this subnet. 
\end{DoxyReturn}
\hypertarget{classIPNet_a81599208b62f8ebf737a049dfb542803}{
\index{IPNet@{IPNet}!operator!=@{operator!=}}
\index{operator!=@{operator!=}!IPNet@{IPNet}}
\subsubsection[{operator!=}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf IPNet}$<$ A $>$::operator!= (
\begin{DoxyParamCaption}
\item[{const {\bf U32Range} \&}]{range}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_a81599208b62f8ebf737a049dfb542803}


Non-\/equality Operator for \hyperlink{classU32Range}{U32Range} operand. 


\begin{DoxyParams}{Parameters}
{\em range} & \hyperlink{protocolthe-p}{the} right-\/hand operand to compare against. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} prefix length falls outside \hyperlink{protocolthe-p}{the} range defined by \hyperlink{protocolthe-p}{the} right-\/hand operand. 
\end{DoxyReturn}
\hypertarget{classIPNet_a2d811c36686769df9f73f7d9a4e9393e}{
\index{IPNet@{IPNet}!operator++@{operator++}}
\index{operator++@{operator++}!IPNet@{IPNet}}
\subsubsection[{operator++}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ {\bf IPNet}$<$ A $>$ \& {\bf IPNet}$<$ A $>$::operator++ (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classIPNet_a2d811c36686769df9f73f7d9a4e9393e}


Increment Operator. 

The numerical value of \hyperlink{protocolthe-p}{the} prefix address is incremented by one. Example: incrementing 128.2.0.0/16 results in 128.3.0.0/16.

\begin{DoxyReturn}{Returns}
a reference to this subnet after \hyperlink{protocolthe-p}{the} increment 
\end{DoxyReturn}
\hypertarget{classIPNet_a4680aef0671ad6fd182b3c3e5862f060}{
\index{IPNet@{IPNet}!operator-\/-\/@{operator-\/-\/}}
\index{operator-\/-\/@{operator-\/-\/}!IPNet@{IPNet}}
\subsubsection[{operator-\/-\/}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ {\bf IPNet}$<$ A $>$ \& {\bf IPNet}$<$ A $>$::operator-\/-\/ (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classIPNet_a4680aef0671ad6fd182b3c3e5862f060}


Decrement Operator. 

The numerical value of \hyperlink{protocolthe-p}{the} prefix address is decrement by one. Example: decrementing 128.2.0.0/16 results in 128.1.0.0/16.

\begin{DoxyReturn}{Returns}
a reference to this subnet after \hyperlink{protocolthe-p}{the} decrement 
\end{DoxyReturn}
\hypertarget{classIPNet_aca12892e9ceeb35eb5010b9f04afabc8}{
\index{IPNet@{IPNet}!operator$<$@{operator$<$}}
\index{operator$<$@{operator$<$}!IPNet@{IPNet}}
\subsubsection[{operator$<$}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf IPNet}$<$ A $>$::operator$<$ (
\begin{DoxyParamCaption}
\item[{const {\bf U32Range} \&}]{range}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_aca12892e9ceeb35eb5010b9f04afabc8}


Less-\/than comparison for prefix lengths for \hyperlink{classU32Range}{U32Range} operand. 


\begin{DoxyParams}{Parameters}
{\em range} & \hyperlink{protocolthe-p}{the} right-\/hand side of \hyperlink{protocolthe-p}{the} comparison. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} prefix length is bellow \hyperlink{protocolthe-p}{the} range defined by \hyperlink{protocolthe-p}{the} right-\/hand operand. 
\end{DoxyReturn}
\hypertarget{classIPNet_a58ea4e370cee73d847ddf3356d076cce}{
\index{IPNet@{IPNet}!operator$<$@{operator$<$}}
\index{operator$<$@{operator$<$}!IPNet@{IPNet}}
\subsubsection[{operator$<$}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ bool {\bf IPNet}$<$ A $>$::operator$<$ (
\begin{DoxyParamCaption}
\item[{const {\bf IPNet}$<$ A $>$ \&}]{other}
\end{DoxyParamCaption}
) const}}
\label{classIPNet_a58ea4e370cee73d847ddf3356d076cce}


Less-\/than comparison for subnets (see body for description). 


\begin{DoxyParams}{Parameters}
{\em other} & \hyperlink{protocolthe-p}{the} right-\/hand side of \hyperlink{protocolthe-p}{the} comparison. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} left-\/hand side is \char`\"{}smaller\char`\"{} than \hyperlink{protocolthe-p}{the} right-\/hand side according to \hyperlink{protocolthe-p}{the} chosen order. 
\end{DoxyReturn}
\hypertarget{classIPNet_ace98fbf42244d70105f20ab1b9fd1feb}{
\index{IPNet@{IPNet}!operator$<$=@{operator$<$=}}
\index{operator$<$=@{operator$<$=}!IPNet@{IPNet}}
\subsubsection[{operator$<$=}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf IPNet}$<$ A $>$::operator$<$= (
\begin{DoxyParamCaption}
\item[{const {\bf U32Range} \&}]{range}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_ace98fbf42244d70105f20ab1b9fd1feb}


Less-\/than or equal comparison for prefix lengths for \hyperlink{classU32Range}{U32Range} operand. 


\begin{DoxyParams}{Parameters}
{\em range} & \hyperlink{protocolthe-p}{the} right-\/hand side of \hyperlink{protocolthe-p}{the} comparison. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} prefix length is bellow or within \hyperlink{protocolthe-p}{the} range defined by \hyperlink{protocolthe-p}{the} right-\/hand operand. 
\end{DoxyReturn}
\hypertarget{classIPNet_a77e090aa95d8dc9697c2ee20403c5d28}{
\index{IPNet@{IPNet}!operator=@{operator=}}
\index{operator=@{operator=}!IPNet@{IPNet}}
\subsubsection[{operator=}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ {\bf IPNet}\& {\bf IPNet}$<$ A $>$::operator= (
\begin{DoxyParamCaption}
\item[{const {\bf IPNet}$<$ A $>$ \&}]{n}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_a77e090aa95d8dc9697c2ee20403c5d28}


Assignment operator. 


\begin{DoxyParams}{Parameters}
{\em n} & \hyperlink{protocolthe-p}{the} subnet to assign from. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} subnet after \hyperlink{protocolthe-p}{the} assignment. 
\end{DoxyReturn}
\hypertarget{classIPNet_a67fa803a205b9c87cee9ba7f6058696d}{
\index{IPNet@{IPNet}!operator==@{operator==}}
\index{operator==@{operator==}!IPNet@{IPNet}}
\subsubsection[{operator==}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf IPNet}$<$ A $>$::operator== (
\begin{DoxyParamCaption}
\item[{const {\bf U32Range} \&}]{range}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_a67fa803a205b9c87cee9ba7f6058696d}


Equality Operator for \hyperlink{classU32Range}{U32Range} operand. 


\begin{DoxyParams}{Parameters}
{\em range} & \hyperlink{protocolthe-p}{the} right-\/hand operand to compare against. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} prefix length falls inside \hyperlink{protocolthe-p}{the} range defined by \hyperlink{protocolthe-p}{the} right-\/hand operand. 
\end{DoxyReturn}
\hypertarget{classIPNet_ae295325908a0140a1d8b12c884f3dab0}{
\index{IPNet@{IPNet}!operator==@{operator==}}
\index{operator==@{operator==}!IPNet@{IPNet}}
\subsubsection[{operator==}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf IPNet}$<$ A $>$::operator== (
\begin{DoxyParamCaption}
\item[{const {\bf IPNet}$<$ A $>$ \&}]{other}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_ae295325908a0140a1d8b12c884f3dab0}


Equality Operator. 


\begin{DoxyParams}{Parameters}
{\em other} & \hyperlink{protocolthe-p}{the} right-\/hand operand to compare against. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} left-\/hand operand is numerically same as \hyperlink{protocolthe-p}{the} right-\/hand operand. 
\end{DoxyReturn}
\hypertarget{classIPNet_aa1348be3c172621255a14081012195c7}{
\index{IPNet@{IPNet}!operator$>$@{operator$>$}}
\index{operator$>$@{operator$>$}!IPNet@{IPNet}}
\subsubsection[{operator$>$}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf IPNet}$<$ A $>$::operator$>$ (
\begin{DoxyParamCaption}
\item[{const {\bf U32Range} \&}]{range}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_aa1348be3c172621255a14081012195c7}


Greater-\/than comparison for prefix lengths for \hyperlink{classU32Range}{U32Range} operand. 


\begin{DoxyParams}{Parameters}
{\em range} & \hyperlink{protocolthe-p}{the} right-\/hand side of \hyperlink{protocolthe-p}{the} comparison. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} prefix length is above \hyperlink{protocolthe-p}{the} range defined by \hyperlink{protocolthe-p}{the} right-\/hand operand. 
\end{DoxyReturn}
\hypertarget{classIPNet_ad5dc211463289a3041b0b325655812f2}{
\index{IPNet@{IPNet}!operator$>$=@{operator$>$=}}
\index{operator$>$=@{operator$>$=}!IPNet@{IPNet}}
\subsubsection[{operator$>$=}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf IPNet}$<$ A $>$::operator$>$= (
\begin{DoxyParamCaption}
\item[{const {\bf U32Range} \&}]{range}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_ad5dc211463289a3041b0b325655812f2}


Greater-\/than or equal comparison for prefix lengths for \hyperlink{classU32Range}{U32Range} operand. 


\begin{DoxyParams}{Parameters}
{\em range} & \hyperlink{protocolthe-p}{the} right-\/hand side of \hyperlink{protocolthe-p}{the} comparison. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} prefix length is above or within \hyperlink{protocolthe-p}{the} range defined by \hyperlink{protocolthe-p}{the} right-\/hand operand. 
\end{DoxyReturn}
\hypertarget{classIPNet_a514015432550b7dba4449390186854f8}{
\index{IPNet@{IPNet}!overlap@{overlap}}
\index{overlap@{overlap}!IPNet@{IPNet}}
\subsubsection[{overlap}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ uint32\_\-t {\bf IPNet}$<$ A $>$::overlap (
\begin{DoxyParamCaption}
\item[{const {\bf IPNet}$<$ A $>$ \&}]{other}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_a514015432550b7dba4449390186854f8}


Determine \hyperlink{protocolthe-p}{the} number of \hyperlink{protocolthe-p}{the} most significant bits overlapping with another subnet. 


\begin{DoxyParams}{Parameters}
{\em other} & \hyperlink{protocolthe-p}{the} subnet to test against. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} number of bits overlapping between other and this subnet. 
\end{DoxyReturn}
\hypertarget{classIPNet_af4ea80f12ee1dd1a79232aba4b7111a5}{
\index{IPNet@{IPNet}!prefix\_\-len@{prefix\_\-len}}
\index{prefix\_\-len@{prefix\_\-len}!IPNet@{IPNet}}
\subsubsection[{prefix\_\-len}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ uint8\_\-t {\bf IPNet}$<$ A $>$::prefix\_\-len (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_af4ea80f12ee1dd1a79232aba4b7111a5}


Get \hyperlink{protocolthe-p}{the} prefix length. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} prefix length for this subnet. 
\end{DoxyReturn}
\hypertarget{classIPNet_aef456db857bb34b13dba4be4563fc960}{
\index{IPNet@{IPNet}!str@{str}}
\index{str@{str}!IPNet@{IPNet}}
\subsubsection[{str}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ string {\bf IPNet}$<$ A $>$::str (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classIPNet_aef456db857bb34b13dba4be4563fc960}


Convert this address from binary form to presentation format. 

\begin{DoxyReturn}{Returns}
C++ string with \hyperlink{protocolthe-p}{the} human-\/readable ASCII representation of \hyperlink{protocolthe-p}{the} address. 
\end{DoxyReturn}
\hypertarget{classIPNet_a855ecde7efe21a605f0047e9c8334767}{
\index{IPNet@{IPNet}!top\_\-addr@{top\_\-addr}}
\index{top\_\-addr@{top\_\-addr}!IPNet@{IPNet}}
\subsubsection[{top\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ A {\bf IPNet}$<$ A $>$::top\_\-addr (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIPNet_a855ecde7efe21a605f0047e9c8334767}


Get \hyperlink{protocolthe-p}{the} highest address within this subnet. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} highest address within this subnet. 
\end{DoxyReturn}


The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/libxorp/ipnet.hh\end{DoxyCompactItemize}
