\doxysection{rtrlib/lib/ip\+\_\+private.h File Reference}
\hypertarget{ip__private_8h}{}\label{ip__private_8h}\index{rtrlib/lib/ip\_private.h@{rtrlib/lib/ip\_private.h}}
{\ttfamily \#include "{}ip.\+h"{}}\newline
{\ttfamily \#include "{}rtrlib/lib/ipv4\+\_\+private.\+h"{}}\newline
{\ttfamily \#include "{}rtrlib/lib/ipv6\+\_\+private.\+h"{}}\newline
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
bool \mbox{\hyperlink{ip__private_8h_a74c6ae719b06a8681d679c0c0f80f4ef}{lrtr\+\_\+ip\+\_\+addr\+\_\+is\+\_\+zero}} (const struct \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr}})
\begin{DoxyCompactList}\small\item\em Detects if the \doxylink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr} only contains 0 bits. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr}} \mbox{\hyperlink{ip__private_8h_a7c12e41338dc1d284157b25162ee55c1}{lrtr\+\_\+ip\+\_\+addr\+\_\+get\+\_\+bits}} (const struct \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr}} \texorpdfstring{$\ast$}{*}val, const uint8\+\_\+t from, const uint8\+\_\+t number)
\begin{DoxyCompactList}\small\item\em Extracts number bits from the passed \doxylink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr}, starting at bit number from. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__util__h_ga6b25b2ae306cf374df18044190b04793}{lrtr\+\_\+ip\+\_\+addr\+\_\+equal}} (const struct \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr}} a, const struct \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr}} b)
\begin{DoxyCompactList}\small\item\em Checks if two \doxylink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr} structs are equal. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{group__util__h_ga9a31d2cd8a621a77681fb4aa86d2c2b5}{lrtr\+\_\+ip\+\_\+str\+\_\+cmp}} (const struct \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr}} \texorpdfstring{$\ast$}{*}addr1, const char \texorpdfstring{$\ast$}{*}addr2)
\begin{DoxyCompactList}\small\item\em Compares addr1 in the \doxylink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr} struct with addr2 in string representation. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Function Documentation}
\Hypertarget{ip__private_8h_a7c12e41338dc1d284157b25162ee55c1}\label{ip__private_8h_a7c12e41338dc1d284157b25162ee55c1} 
\index{ip\_private.h@{ip\_private.h}!lrtr\_ip\_addr\_get\_bits@{lrtr\_ip\_addr\_get\_bits}}
\index{lrtr\_ip\_addr\_get\_bits@{lrtr\_ip\_addr\_get\_bits}!ip\_private.h@{ip\_private.h}}
\doxysubsubsection{\texorpdfstring{lrtr\_ip\_addr\_get\_bits()}{lrtr\_ip\_addr\_get\_bits()}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr}} lrtr\+\_\+ip\+\_\+addr\+\_\+get\+\_\+bits (\begin{DoxyParamCaption}\item[{const struct \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr}} \texorpdfstring{$\ast$}{*}}]{val,  }\item[{const uint8\+\_\+t}]{from,  }\item[{const uint8\+\_\+t}]{number }\end{DoxyParamCaption})}



Extracts number bits from the passed \doxylink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr}, starting at bit number from. 

The bit with the highest significance is bit 0. All bits that aren\textquotesingle{}t in the specified range will be 0. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em val} & \doxylink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr} \\
\hline
\mbox{\texttt{ in}}  & {\em from} & Position of the first bit that is extracted. \\
\hline
\mbox{\texttt{ in}}  & {\em number} & How many bits will be extracted. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
An lrtr\+\_\+ipv\+\_\+addr, where all bits that aren\textquotesingle{}t in the specified range are set to 0. 
\end{DoxyReturn}
\Hypertarget{ip__private_8h_a74c6ae719b06a8681d679c0c0f80f4ef}\label{ip__private_8h_a74c6ae719b06a8681d679c0c0f80f4ef} 
\index{ip\_private.h@{ip\_private.h}!lrtr\_ip\_addr\_is\_zero@{lrtr\_ip\_addr\_is\_zero}}
\index{lrtr\_ip\_addr\_is\_zero@{lrtr\_ip\_addr\_is\_zero}!ip\_private.h@{ip\_private.h}}
\doxysubsubsection{\texorpdfstring{lrtr\_ip\_addr\_is\_zero()}{lrtr\_ip\_addr\_is\_zero()}}
{\footnotesize\ttfamily bool lrtr\+\_\+ip\+\_\+addr\+\_\+is\+\_\+zero (\begin{DoxyParamCaption}\item[{const struct \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr}}}]{ }\end{DoxyParamCaption})}



Detects if the \doxylink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr} only contains 0 bits. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr}} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true If the saved \doxylink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr} is 0. 

false If the saved \doxylink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr} isn\textquotesingle{}t 0. 
\end{DoxyReturn}
