\doxysection{ip.\+h}
\hypertarget{ip_8h_source}{}\label{ip_8h_source}\index{rtrlib/lib/ip.h@{rtrlib/lib/ip.h}}
\mbox{\hyperlink{ip_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{/*}}
\DoxyCodeLine{00002\ \textcolor{comment}{\ *\ This\ file\ is\ part\ of\ RTRlib.}}
\DoxyCodeLine{00003\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00004\ \textcolor{comment}{\ *\ This\ file\ is\ subject\ to\ the\ terms\ and\ conditions\ of\ the\ MIT\ license.}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *\ See\ the\ file\ LICENSE\ in\ the\ top\ level\ directory\ for\ more\ details.}}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00007\ \textcolor{comment}{\ *\ Website:\ http://rtrlib.realmv6.org/}}
\DoxyCodeLine{00008\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00009\ }
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#ifndef\ LRTR\_IP\_PUBLIC\_H}}
\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#define\ LRTR\_IP\_PUBLIC\_H}}
\DoxyCodeLine{00012\ }
\DoxyCodeLine{00013\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{ipv4_8h}{rtrlib/lib/ipv4.h}}"{}}}
\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{ipv6_8h}{rtrlib/lib/ipv6.h}}"{}}}
\DoxyCodeLine{00015\ }
\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#include\ <stdbool.h>}}
\DoxyCodeLine{00025\ \textcolor{keyword}{enum}\ \mbox{\hyperlink{group__util__h_gab1e0d2320694c34806cabed231e00f4d}{lrtr\_ip\_version}}\ \{}
\DoxyCodeLine{00027\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__util__h_ggab1e0d2320694c34806cabed231e00f4dad94652cc34a88a9ef29ca697e3a17952}{LRTR\_IPV4}},}
\DoxyCodeLine{00028\ }
\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__util__h_ggab1e0d2320694c34806cabed231e00f4da0bab871ffd3fb06fad7acdaecea1c42c}{LRTR\_IPV6}}}
\DoxyCodeLine{00031\ \};}
\DoxyCodeLine{00032\ }
\DoxyCodeLine{00038\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structlrtr__ip__addr}{lrtr\_ip\_addr}}\ \{}
\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \textcolor{keyword}{enum}\ \mbox{\hyperlink{group__util__h_gab1e0d2320694c34806cabed231e00f4d}{lrtr\_ip\_version}}\ \mbox{\hyperlink{structlrtr__ip__addr_a13b945386b9aef42863b33facf30853c}{ver}};}
\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \textcolor{keyword}{union\ }\{}
\DoxyCodeLine{00041\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structlrtr__ipv4__addr}{lrtr\_ipv4\_addr}}\ \mbox{\hyperlink{structlrtr__ip__addr_a535f17cfbdc895529f6f0c84bfed8c58}{addr4}};}
\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structlrtr__ipv6__addr}{lrtr\_ipv6\_addr}}\ \mbox{\hyperlink{structlrtr__ip__addr_af11ad007a752e2ff194f6b05752bb4c5}{addr6}};}
\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ \}\ \mbox{\hyperlink{structlrtr__ip__addr_a7554f583c09c1bea0ed7b3d646b838e3}{u}};}
\DoxyCodeLine{00044\ \};}
\DoxyCodeLine{00045\ }
\DoxyCodeLine{00056\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{group__util__h_ga01be4a9d17952175d50b298aad7b9479}{lrtr\_ip\_addr\_to\_str}}(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\_ip\_addr}}\ *ip,\ \textcolor{keywordtype}{char}\ *str,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{rtr__pdus_8h_a96bbf959016e4411c9e6b9812a8be60a}{len}});}
\DoxyCodeLine{00057\ }
\DoxyCodeLine{00065\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{group__util__h_gac667b04e3b155ebc6bebb983e99decb6}{lrtr\_ip\_str\_to\_addr}}(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *str,\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\_ip\_addr}}\ *ip);}
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00075\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{group__util__h_ga6b25b2ae306cf374df18044190b04793}{lrtr\_ip\_addr\_equal}}(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\_ip\_addr}}\ a,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\_ip\_addr}}\ b);}
\DoxyCodeLine{00076\ }
\DoxyCodeLine{00084\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{group__util__h_ga9a31d2cd8a621a77681fb4aa86d2c2b5}{lrtr\_ip\_str\_cmp}}(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\_ip\_addr}}\ *addr1,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *addr2);}
\DoxyCodeLine{00085\ }
\DoxyCodeLine{00086\ \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
