\doxysection{rtrlib/lib/ipv6\+\_\+private.h File Reference}
\hypertarget{ipv6__private_8h}{}\label{ipv6__private_8h}\index{rtrlib/lib/ipv6\_private.h@{rtrlib/lib/ipv6\_private.h}}
{\ttfamily \#include "{}ipv6.\+h"{}}\newline
{\ttfamily \#include "{}rtrlib/lib/convert\+\_\+byte\+\_\+order\+\_\+private.\+h"{}}\newline
{\ttfamily \#include $<$stdbool.\+h$>$}\newline
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$sys/types.\+h$>$}\newline
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
bool \mbox{\hyperlink{ipv6__private_8h_a4cd422e07941c4ee133fa82d25fe0e52}{lrtr\+\_\+ipv6\+\_\+addr\+\_\+equal}} (const struct \mbox{\hyperlink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr}} \texorpdfstring{$\ast$}{*}a, const struct \mbox{\hyperlink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr}} \texorpdfstring{$\ast$}{*}b)
\begin{DoxyCompactList}\small\item\em Compares two \doxylink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr} structs. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr}} \mbox{\hyperlink{ipv6__private_8h_ab111a4b10dd2bdc8d2d080d83af3e6ef}{lrtr\+\_\+ipv6\+\_\+get\+\_\+bits}} (const struct \mbox{\hyperlink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr}} \texorpdfstring{$\ast$}{*}val, const uint8\+\_\+t first\+\_\+bit, const uint8\+\_\+t quantity)
\begin{DoxyCompactList}\small\item\em Extracts quantity bits from an IPv6 address. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{ipv6__private_8h_a3e1eb799d23713b34ed530baf4da9251}{lrtr\+\_\+ipv6\+\_\+addr\+\_\+to\+\_\+str}} (const struct \mbox{\hyperlink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr}} \texorpdfstring{$\ast$}{*}ip, char \texorpdfstring{$\ast$}{*}str, const unsigned int \mbox{\hyperlink{rtr__pdus_8h_a96bbf959016e4411c9e6b9812a8be60a}{len}})
\begin{DoxyCompactList}\small\item\em Converts the passed ipv6\+\_\+addr to string representation. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{ipv6__private_8h_a9b57448e055860cd9bd4fec67483755b}{lrtr\+\_\+ipv6\+\_\+str\+\_\+to\+\_\+addr}} (const char \texorpdfstring{$\ast$}{*}str, struct \mbox{\hyperlink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr}} \texorpdfstring{$\ast$}{*}ip)
\begin{DoxyCompactList}\small\item\em Converts the passed IPv6 address string in to \doxylink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr} struct. \end{DoxyCompactList}\end{DoxyCompactItemize}
\textbf{ }\par
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{group__util__h_gaf1180d77166d4f87f81541e752cdc4d6}{lrtr\+\_\+ipv6\+\_\+addr\+\_\+convert\+\_\+byte\+\_\+order}} (const uint32\+\_\+t \texorpdfstring{$\ast$}{*}src, uint32\+\_\+t \texorpdfstring{$\ast$}{*}dest, const enum \mbox{\hyperlink{convert__byte__order__private_8h_ac7f9e54856274b72079ec96ab0e18fa1}{target\+\_\+byte\+\_\+order}} tbo)
\begin{DoxyCompactList}\small\item\em Converts the passed IPv6 address to given byte order. \end{DoxyCompactList}\end{DoxyCompactItemize}



\doxysubsection{Function Documentation}
\Hypertarget{ipv6__private_8h_a4cd422e07941c4ee133fa82d25fe0e52}\label{ipv6__private_8h_a4cd422e07941c4ee133fa82d25fe0e52} 
\index{ipv6\_private.h@{ipv6\_private.h}!lrtr\_ipv6\_addr\_equal@{lrtr\_ipv6\_addr\_equal}}
\index{lrtr\_ipv6\_addr\_equal@{lrtr\_ipv6\_addr\_equal}!ipv6\_private.h@{ipv6\_private.h}}
\doxysubsubsection{\texorpdfstring{lrtr\_ipv6\_addr\_equal()}{lrtr\_ipv6\_addr\_equal()}}
{\footnotesize\ttfamily bool lrtr\+\_\+ipv6\+\_\+addr\+\_\+equal (\begin{DoxyParamCaption}\item[{const struct \mbox{\hyperlink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr}} \texorpdfstring{$\ast$}{*}}]{a,  }\item[{const struct \mbox{\hyperlink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr}} \texorpdfstring{$\ast$}{*}}]{b }\end{DoxyParamCaption})}



Compares two \doxylink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr} structs. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em a} & \doxylink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr} \\
\hline
\mbox{\texttt{ in}}  & {\em b} & \doxylink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr}\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if a == b 

false if a != b 
\end{DoxyReturn}
\Hypertarget{ipv6__private_8h_a3e1eb799d23713b34ed530baf4da9251}\label{ipv6__private_8h_a3e1eb799d23713b34ed530baf4da9251} 
\index{ipv6\_private.h@{ipv6\_private.h}!lrtr\_ipv6\_addr\_to\_str@{lrtr\_ipv6\_addr\_to\_str}}
\index{lrtr\_ipv6\_addr\_to\_str@{lrtr\_ipv6\_addr\_to\_str}!ipv6\_private.h@{ipv6\_private.h}}
\doxysubsubsection{\texorpdfstring{lrtr\_ipv6\_addr\_to\_str()}{lrtr\_ipv6\_addr\_to\_str()}}
{\footnotesize\ttfamily int lrtr\+\_\+ipv6\+\_\+addr\+\_\+to\+\_\+str (\begin{DoxyParamCaption}\item[{const struct \mbox{\hyperlink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr}} \texorpdfstring{$\ast$}{*}}]{ip,  }\item[{char \texorpdfstring{$\ast$}{*}}]{str,  }\item[{const unsigned int}]{len }\end{DoxyParamCaption})}



Converts the passed ipv6\+\_\+addr to string representation. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ip\+\_\+addr} & Pointer to an IPv6 address \\
\hline
\mbox{\texttt{ out}}  & {\em str} & Pointer to string buf, at least INET6\+\_\+\+ADDRSTRLEN bytes. \\
\hline
\mbox{\texttt{ in}}  & {\em len} & Length of string buffer {\ttfamily str} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success 

-\/1 on error 
\end{DoxyReturn}
\Hypertarget{ipv6__private_8h_ab111a4b10dd2bdc8d2d080d83af3e6ef}\label{ipv6__private_8h_ab111a4b10dd2bdc8d2d080d83af3e6ef} 
\index{ipv6\_private.h@{ipv6\_private.h}!lrtr\_ipv6\_get\_bits@{lrtr\_ipv6\_get\_bits}}
\index{lrtr\_ipv6\_get\_bits@{lrtr\_ipv6\_get\_bits}!ipv6\_private.h@{ipv6\_private.h}}
\doxysubsubsection{\texorpdfstring{lrtr\_ipv6\_get\_bits()}{lrtr\_ipv6\_get\_bits()}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr}} lrtr\+\_\+ipv6\+\_\+get\+\_\+bits (\begin{DoxyParamCaption}\item[{const struct \mbox{\hyperlink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr}} \texorpdfstring{$\ast$}{*}}]{val,  }\item[{const uint8\+\_\+t}]{first\+\_\+bit,  }\item[{const uint8\+\_\+t}]{quantity }\end{DoxyParamCaption})}



Extracts quantity bits from an IPv6 address. 

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} & ipv6\+\_\+addr \\
\hline
\mbox{\texttt{ in}}  & {\em first\+\_\+bit} & Position of the first bit that is extracted, inclusive. \\
\hline
\mbox{\texttt{ in}}  & {\em quantity} & How many bits will be extracted.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
ipv6\+\_\+addr, with all bits not in specified range set to 0. 
\end{DoxyReturn}
\Hypertarget{ipv6__private_8h_a9b57448e055860cd9bd4fec67483755b}\label{ipv6__private_8h_a9b57448e055860cd9bd4fec67483755b} 
\index{ipv6\_private.h@{ipv6\_private.h}!lrtr\_ipv6\_str\_to\_addr@{lrtr\_ipv6\_str\_to\_addr}}
\index{lrtr\_ipv6\_str\_to\_addr@{lrtr\_ipv6\_str\_to\_addr}!ipv6\_private.h@{ipv6\_private.h}}
\doxysubsubsection{\texorpdfstring{lrtr\_ipv6\_str\_to\_addr()}{lrtr\_ipv6\_str\_to\_addr()}}
{\footnotesize\ttfamily int lrtr\+\_\+ipv6\+\_\+str\+\_\+to\+\_\+addr (\begin{DoxyParamCaption}\item[{const char \texorpdfstring{$\ast$}{*}}]{str,  }\item[{struct \mbox{\hyperlink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr}} \texorpdfstring{$\ast$}{*}}]{ip }\end{DoxyParamCaption})}



Converts the passed IPv6 address string in to \doxylink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr} struct. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em str} & Pointer to a string buffer \\
\hline
\mbox{\texttt{ out}}  & {\em ip} & Pointer to \doxylink{structlrtr__ipv6__addr}{lrtr\+\_\+ipv6\+\_\+addr}\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success 

-\/1 on error 
\end{DoxyReturn}
