\doxysection{trie\+\_\+private.\+h}
\hypertarget{trie__private_8h_source}{}\label{trie__private_8h_source}\index{rtrlib/pfx/trie/trie\_private.h@{rtrlib/pfx/trie/trie\_private.h}}
\mbox{\hyperlink{trie__private_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\ RTR\_TRIE\_PRIVATE}}
\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#define\ RTR\_TRIE\_PRIVATE}}
\DoxyCodeLine{00012\ }
\DoxyCodeLine{00013\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{ip__private_8h}{rtrlib/lib/ip\_private.h}}"{}}}
\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{log__private_8h}{rtrlib/lib/log\_private.h}}"{}}}
\DoxyCodeLine{00015\ }
\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#include\ <inttypes.h>}}
\DoxyCodeLine{00017\ }
\DoxyCodeLine{00018\ \textcolor{preprocessor}{\#define\ PFX\_DBG1(a)\ lrtr\_dbg("{}PFX:\ "{}\ a)}}
\DoxyCodeLine{00019\ }
\DoxyCodeLine{00029\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structtrie__node}{trie\_node}}\ \{}
\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structlrtr__ip__addr}{lrtr\_ip\_addr}}\ \mbox{\hyperlink{structtrie__node_aef3efa7a79a2ce41e211f1a80557081f}{prefix}};}
\DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structtrie__node}{trie\_node}}\ *\mbox{\hyperlink{structtrie__node_aa0c02b23c765cbb82f3385207a33460d}{rchild}};}
\DoxyCodeLine{00032\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structtrie__node}{trie\_node}}\ *\mbox{\hyperlink{structtrie__node_a842294320976b9f48c48ec9c02b78d41}{lchild}};}
\DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structtrie__node}{trie\_node}}\ *\mbox{\hyperlink{structtrie__node_a4dfb8da0807f15df9e53f6c59fe9cfe3}{parent}};}
\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ *\mbox{\hyperlink{structtrie__node_a32224b6d81003c098458ac38eefb6649}{data}};}
\DoxyCodeLine{00035\ \ \ \ \ \ \ \ \ uint8\_t\ \mbox{\hyperlink{structtrie__node_a12190d2951f6306d350573b1e77f4de4}{len}};}
\DoxyCodeLine{00036\ \};}
\DoxyCodeLine{00037\ }
\DoxyCodeLine{00044\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{trie__private_8h_a1dd8536a8ad980f79e5d56f9b2174e89}{trie\_insert}}(\textcolor{keyword}{struct}\ \mbox{\hyperlink{structtrie__node}{trie\_node}}\ *root,\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{structtrie__node}{trie\_node}}\ *new\_node,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ level);}
\DoxyCodeLine{00045\ }
\DoxyCodeLine{00060\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structtrie__node}{trie\_node}}\ *\mbox{\hyperlink{trie__private_8h_a49ce5b8690dc3e78a88de98aa1ff9117}{trie\_lookup}}(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{structtrie__node}{trie\_node}}\ *root\_node,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\_ip\_addr}}\ *\mbox{\hyperlink{structtrie__node_aef3efa7a79a2ce41e211f1a80557081f}{prefix}},}
\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint8\_t\ mask\_len,\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ *level);}
\DoxyCodeLine{00062\ }
\DoxyCodeLine{00077\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structtrie__node}{trie\_node}}\ *\mbox{\hyperlink{trie__private_8h_a7008a96ba9755bdacc3203cbf3424449}{trie\_lookup\_exact}}(\textcolor{keyword}{struct}\ \mbox{\hyperlink{structtrie__node}{trie\_node}}\ *root\_node,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\_ip\_addr}}\ *\mbox{\hyperlink{structtrie__node_aef3efa7a79a2ce41e211f1a80557081f}{prefix}},}
\DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint8\_t\ mask\_len,\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ *level,\ \textcolor{keywordtype}{bool}\ *found);}
\DoxyCodeLine{00079\ }
\DoxyCodeLine{00089\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structtrie__node}{trie\_node}}\ *\mbox{\hyperlink{trie__private_8h_aa74e7bea478ad311be7230f7641913f6}{trie\_remove}}(\textcolor{keyword}{struct}\ \mbox{\hyperlink{structtrie__node}{trie\_node}}\ *root\_node,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\_ip\_addr}}\ *\mbox{\hyperlink{structtrie__node_aef3efa7a79a2ce41e211f1a80557081f}{prefix}},\ \textcolor{keyword}{const}\ uint8\_t\ mask\_len,}
\DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ level);}
\DoxyCodeLine{00091\ }
\DoxyCodeLine{00098\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{trie__private_8h_a4cd5562aadd06cd6eeaec08972d17bb3}{trie\_is\_leaf}}(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{structtrie__node}{trie\_node}}\ *node);}
\DoxyCodeLine{00099\ }
\DoxyCodeLine{00100\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{trie__private_8h_a35e444f2e47b98f760dca80e354e7870}{trie\_get\_children}}(\textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{structtrie__node}{trie\_node}}\ *root\_node,\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{structtrie__node}{trie\_node}}\ ***array,\ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ *\mbox{\hyperlink{rtr__pdus_8h_a96bbf959016e4411c9e6b9812a8be60a}{len}});}
\DoxyCodeLine{00101\ \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
