\doxysection{Prefix validation table}
\hypertarget{group__mod__pfx__h}{}\label{group__mod__pfx__h}\index{Prefix validation table@{Prefix validation table}}


The \doxylink{structpfx__table}{pfx\+\_\+table} is an abstract data structure to organize the validated prefix origin data received from an RPKI-\/\+RTR cache server.  


\doxysubsubsection*{Modules}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__mod__trie__pfx__h}{Trie}}
\begin{DoxyCompactList}\small\item\em An implementation of a \doxylink{group__mod__pfx__h}{pfx\+\_\+table} data structure using a shortest prefix first tree (trie) for storing \doxylink{structpfx__record}{pfx\+\_\+records}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__mod__pfx__h_ga48478a61dc1cd09f646631b1691ff707}{pfx\+\_\+for\+\_\+each\+\_\+fp}}) (const struct \mbox{\hyperlink{structpfx__record}{pfx\+\_\+record}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structpfx__record}{pfx\+\_\+record}}, void \texorpdfstring{$\ast$}{*}data)
\begin{DoxyCompactList}\small\item\em A function pointer that is called for each record in the \doxylink{structpfx__table}{pfx\+\_\+table}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{group__mod__pfx__h_gacb1f5563c9a0bcfb6a7be631a0e8f15a}{pfx\+\_\+rtvals}} \{ \mbox{\hyperlink{group__mod__pfx__h_ggacb1f5563c9a0bcfb6a7be631a0e8f15aa390c4d5cd921fb06fd7548f6099c6800}{PFX\+\_\+\+SUCCESS}} = 0
, \mbox{\hyperlink{group__mod__pfx__h_ggacb1f5563c9a0bcfb6a7be631a0e8f15aa22e5a2c063ffe08b1a02f650703631a0}{PFX\+\_\+\+ERROR}} = -\/1
, \mbox{\hyperlink{group__mod__pfx__h_ggacb1f5563c9a0bcfb6a7be631a0e8f15aa575f72a26ad782aac4720c8a25d763c1}{PFX\+\_\+\+DUPLICATE\+\_\+\+RECORD}} = -\/2
, \mbox{\hyperlink{group__mod__pfx__h_ggacb1f5563c9a0bcfb6a7be631a0e8f15aaf8b6a635062ca6ca493836c2f4d1fa03}{PFX\+\_\+\+RECORD\+\_\+\+NOT\+\_\+\+FOUND}} = -\/3
 \}
\begin{DoxyCompactList}\small\item\em Possible return values for pfx\+\_\+ functions. \end{DoxyCompactList}\item 
enum \mbox{\hyperlink{group__mod__pfx__h_ga9f87b27f024a9db70884c3981e030aa0}{pfxv\+\_\+state}} \{ \mbox{\hyperlink{group__mod__pfx__h_gga9f87b27f024a9db70884c3981e030aa0a822b53f311ed40e3f91c44f6ac2c6c92}{BGP\+\_\+\+PFXV\+\_\+\+STATE\+\_\+\+VALID}}
, \mbox{\hyperlink{group__mod__pfx__h_gga9f87b27f024a9db70884c3981e030aa0af4c75701949d919bae43e92f5e656342}{BGP\+\_\+\+PFXV\+\_\+\+STATE\+\_\+\+NOT\+\_\+\+FOUND}}
, \mbox{\hyperlink{group__mod__pfx__h_gga9f87b27f024a9db70884c3981e030aa0aae9350d7596c31ff7a04d7a4c34a0459}{BGP\+\_\+\+PFXV\+\_\+\+STATE\+\_\+\+INVALID}}
 \}
\begin{DoxyCompactList}\small\item\em Validation states returned from pfx\+\_\+validate\+\_\+origin. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{group__mod__pfx__h_ga1c2751808568eef03338a9905a0735ff}{pfx\+\_\+table\+\_\+init}} (struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}}, \mbox{\hyperlink{group__mod__trie__pfx__h_gafcc9cb0377b569f364b373c82d5d2d3c}{pfx\+\_\+update\+\_\+fp}} update\+\_\+fp)
\begin{DoxyCompactList}\small\item\em Initializes the \doxylink{structpfx__table}{pfx\+\_\+table} struct. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__pfx__h_gaf31f339bbca6180da436a43d0bd17d10}{pfx\+\_\+table\+\_\+free}} (struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}})
\begin{DoxyCompactList}\small\item\em Frees all memory associated with the \doxylink{structpfx__table}{pfx\+\_\+table}. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__pfx__h_gaae469c2eac68b697dfa4128e1c2ff792}{pfx\+\_\+table\+\_\+add}} (struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}}, const struct \mbox{\hyperlink{structpfx__record}{pfx\+\_\+record}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structpfx__record}{pfx\+\_\+record}})
\begin{DoxyCompactList}\small\item\em Adds a \doxylink{structpfx__record}{pfx\+\_\+record} to a \doxylink{structpfx__table}{pfx\+\_\+table}. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__pfx__h_ga2f03e320b7d228e7861413b8007e8648}{pfx\+\_\+table\+\_\+remove}} (struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}}, const struct \mbox{\hyperlink{structpfx__record}{pfx\+\_\+record}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structpfx__record}{pfx\+\_\+record}})
\begin{DoxyCompactList}\small\item\em Removes a \doxylink{structpfx__record}{pfx\+\_\+record} from a \doxylink{structpfx__table}{pfx\+\_\+table}. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__pfx__h_gabcdf5278a027b9e6e1051eb1ecfac782}{pfx\+\_\+table\+\_\+src\+\_\+remove}} (struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}}, const struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}socket)
\begin{DoxyCompactList}\small\item\em Removes all entries in the \doxylink{structpfx__table}{pfx\+\_\+table} that match the passed socket\+\_\+id value from a \doxylink{structpfx__table}{pfx\+\_\+table}. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__pfx__h_ga24a6236cd78f9708c089793c02eb693f}{pfx\+\_\+table\+\_\+validate}} (struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}}, const uint32\+\_\+t \mbox{\hyperlink{rtr__pdus_8h_af54a4e57359d5c0dc5935878531a9e58}{asn}}, const struct \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr}} \texorpdfstring{$\ast$}{*}prefix, const uint8\+\_\+t mask\+\_\+len, enum \mbox{\hyperlink{group__mod__pfx__h_ga9f87b27f024a9db70884c3981e030aa0}{pfxv\+\_\+state}} \texorpdfstring{$\ast$}{*}result)
\begin{DoxyCompactList}\small\item\em Validates the origin of a BGP-\/\+Route. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__pfx__h_gadc7e5454793c8c69724a72a14ffe0f3b}{pfx\+\_\+table\+\_\+validate\+\_\+r}} (struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}}, struct \mbox{\hyperlink{structpfx__record}{pfx\+\_\+record}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}reason, unsigned int \texorpdfstring{$\ast$}{*}reason\+\_\+len, const uint32\+\_\+t \mbox{\hyperlink{rtr__pdus_8h_af54a4e57359d5c0dc5935878531a9e58}{asn}}, const struct \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr}} \texorpdfstring{$\ast$}{*}prefix, const uint8\+\_\+t mask\+\_\+len, enum \mbox{\hyperlink{group__mod__pfx__h_ga9f87b27f024a9db70884c3981e030aa0}{pfxv\+\_\+state}} \texorpdfstring{$\ast$}{*}result)
\begin{DoxyCompactList}\small\item\em Validates the origin of a BGP-\/\+Route and returns a list of \doxylink{structpfx__record}{pfx\+\_\+record} that decided the result. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__pfx__h_gac22895fe1d7d1de65003de76399be48d}{pfx\+\_\+table\+\_\+for\+\_\+each\+\_\+ipv4\+\_\+record}} (struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}}, \mbox{\hyperlink{group__mod__pfx__h_ga48478a61dc1cd09f646631b1691ff707}{pfx\+\_\+for\+\_\+each\+\_\+fp}} fp, void \texorpdfstring{$\ast$}{*}data)
\begin{DoxyCompactList}\small\item\em Iterates over all IPv4 records in the \doxylink{structpfx__table}{pfx\+\_\+table}. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__pfx__h_ga06d1f95df3a8952bced60588d52bc51e}{pfx\+\_\+table\+\_\+for\+\_\+each\+\_\+ipv6\+\_\+record}} (struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}}, \mbox{\hyperlink{group__mod__pfx__h_ga48478a61dc1cd09f646631b1691ff707}{pfx\+\_\+for\+\_\+each\+\_\+fp}} fp, void \texorpdfstring{$\ast$}{*}data)
\begin{DoxyCompactList}\small\item\em Iterates over all IPv6 records in the \doxylink{structpfx__table}{pfx\+\_\+table}. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__pfx__h_ga4046391b18d6dc33be26869c24ef0088}{pfx\+\_\+table\+\_\+free\+\_\+without\+\_\+notify}} (struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}})
\begin{DoxyCompactList}\small\item\em Frees all memory associated with the \doxylink{structpfx__table}{pfx\+\_\+table} without calling the update callback. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__pfx__h_gaaa09ae81a3f0f1bce13671514ad88bc8}{pfx\+\_\+table\+\_\+swap}} (struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}a, struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}b)
\begin{DoxyCompactList}\small\item\em Swap root nodes of the argument tables. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__pfx__h_gaf31b5ccae5d357c4e50cd23013dbb9c5}{pfx\+\_\+table\+\_\+copy\+\_\+except\+\_\+socket}} (struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}src\+\_\+table, struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}dst\+\_\+table, const struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}socket)
\begin{DoxyCompactList}\small\item\em Copy content of {\ttfamily src\+\_\+table} into {\ttfamily dst\+\_\+table}. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__pfx__h_ga133d254827141060f614f7c667425320}{pfx\+\_\+table\+\_\+notify\+\_\+diff}} (struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}new\+\_\+table, struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}old\+\_\+table, const struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}socket)
\begin{DoxyCompactList}\small\item\em Notify client about changes between to pfx tables regarding one specific socket. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The \doxylink{structpfx__table}{pfx\+\_\+table} is an abstract data structure to organize the validated prefix origin data received from an RPKI-\/\+RTR cache server. 



\doxysubsection{Typedef Documentation}
\Hypertarget{group__mod__pfx__h_ga48478a61dc1cd09f646631b1691ff707}\label{group__mod__pfx__h_ga48478a61dc1cd09f646631b1691ff707} 
\index{Prefix validation table@{Prefix validation table}!pfx\_for\_each\_fp@{pfx\_for\_each\_fp}}
\index{pfx\_for\_each\_fp@{pfx\_for\_each\_fp}!Prefix validation table@{Prefix validation table}}
\doxysubsubsection{\texorpdfstring{pfx\_for\_each\_fp}{pfx\_for\_each\_fp}}
{\footnotesize\ttfamily typedef void(\texorpdfstring{$\ast$}{*} pfx\+\_\+for\+\_\+each\+\_\+fp) (const struct \mbox{\hyperlink{structpfx__record}{pfx\+\_\+record}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structpfx__record}{pfx\+\_\+record}}, void \texorpdfstring{$\ast$}{*}data)}



{\ttfamily \#include $<$\mbox{\hyperlink{pfx_8h}{rtrlib/pfx/pfx.\+h}}$>$}



A function pointer that is called for each record in the \doxylink{structpfx__table}{pfx\+\_\+table}. 


\begin{DoxyParams}{Parameters}
{\em \doxylink{structpfx__record}{pfx\+\_\+record}} & \\
\hline
{\em data} & forwarded data which the user has passed to \doxylink{group__mod__pfx__h_gac22895fe1d7d1de65003de76399be48d}{pfx\+\_\+table\+\_\+for\+\_\+each\+\_\+ipv4\+\_\+record()} or \doxylink{group__mod__pfx__h_ga06d1f95df3a8952bced60588d52bc51e}{pfx\+\_\+table\+\_\+for\+\_\+each\+\_\+ipv6\+\_\+record()} \\
\hline
\end{DoxyParams}


\doxysubsection{Enumeration Type Documentation}
\Hypertarget{group__mod__pfx__h_gacb1f5563c9a0bcfb6a7be631a0e8f15a}\label{group__mod__pfx__h_gacb1f5563c9a0bcfb6a7be631a0e8f15a} 
\index{Prefix validation table@{Prefix validation table}!pfx\_rtvals@{pfx\_rtvals}}
\index{pfx\_rtvals@{pfx\_rtvals}!Prefix validation table@{Prefix validation table}}
\doxysubsubsection{\texorpdfstring{pfx\_rtvals}{pfx\_rtvals}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{group__mod__pfx__h_gacb1f5563c9a0bcfb6a7be631a0e8f15a}{pfx\+\_\+rtvals}}}



{\ttfamily \#include $<$\mbox{\hyperlink{pfx_8h}{rtrlib/pfx/pfx.\+h}}$>$}



Possible return values for pfx\+\_\+ functions. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{PFX\_SUCCESS@{PFX\_SUCCESS}!Prefix validation table@{Prefix validation table}}\index{Prefix validation table@{Prefix validation table}!PFX\_SUCCESS@{PFX\_SUCCESS}}}\Hypertarget{group__mod__pfx__h_ggacb1f5563c9a0bcfb6a7be631a0e8f15aa390c4d5cd921fb06fd7548f6099c6800}\label{group__mod__pfx__h_ggacb1f5563c9a0bcfb6a7be631a0e8f15aa390c4d5cd921fb06fd7548f6099c6800} 
PFX\+\_\+\+SUCCESS&Operation was successful. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{PFX\_ERROR@{PFX\_ERROR}!Prefix validation table@{Prefix validation table}}\index{Prefix validation table@{Prefix validation table}!PFX\_ERROR@{PFX\_ERROR}}}\Hypertarget{group__mod__pfx__h_ggacb1f5563c9a0bcfb6a7be631a0e8f15aa22e5a2c063ffe08b1a02f650703631a0}\label{group__mod__pfx__h_ggacb1f5563c9a0bcfb6a7be631a0e8f15aa22e5a2c063ffe08b1a02f650703631a0} 
PFX\+\_\+\+ERROR&Error occurred. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{PFX\_DUPLICATE\_RECORD@{PFX\_DUPLICATE\_RECORD}!Prefix validation table@{Prefix validation table}}\index{Prefix validation table@{Prefix validation table}!PFX\_DUPLICATE\_RECORD@{PFX\_DUPLICATE\_RECORD}}}\Hypertarget{group__mod__pfx__h_ggacb1f5563c9a0bcfb6a7be631a0e8f15aa575f72a26ad782aac4720c8a25d763c1}\label{group__mod__pfx__h_ggacb1f5563c9a0bcfb6a7be631a0e8f15aa575f72a26ad782aac4720c8a25d763c1} 
PFX\+\_\+\+DUPLICATE\+\_\+\+RECORD&The supplied \doxylink{structpfx__record}{pfx\+\_\+record} already exists in the \doxylink{structpfx__table}{pfx\+\_\+table}. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{PFX\_RECORD\_NOT\_FOUND@{PFX\_RECORD\_NOT\_FOUND}!Prefix validation table@{Prefix validation table}}\index{Prefix validation table@{Prefix validation table}!PFX\_RECORD\_NOT\_FOUND@{PFX\_RECORD\_NOT\_FOUND}}}\Hypertarget{group__mod__pfx__h_ggacb1f5563c9a0bcfb6a7be631a0e8f15aaf8b6a635062ca6ca493836c2f4d1fa03}\label{group__mod__pfx__h_ggacb1f5563c9a0bcfb6a7be631a0e8f15aaf8b6a635062ca6ca493836c2f4d1fa03} 
PFX\+\_\+\+RECORD\+\_\+\+NOT\+\_\+\+FOUND&\doxylink{structpfx__record}{pfx\+\_\+record} wasn\textquotesingle{}t found in the \doxylink{structpfx__table}{pfx\+\_\+table}. \\
\hline

\end{DoxyEnumFields}
\Hypertarget{group__mod__pfx__h_ga9f87b27f024a9db70884c3981e030aa0}\label{group__mod__pfx__h_ga9f87b27f024a9db70884c3981e030aa0} 
\index{Prefix validation table@{Prefix validation table}!pfxv\_state@{pfxv\_state}}
\index{pfxv\_state@{pfxv\_state}!Prefix validation table@{Prefix validation table}}
\doxysubsubsection{\texorpdfstring{pfxv\_state}{pfxv\_state}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{group__mod__pfx__h_ga9f87b27f024a9db70884c3981e030aa0}{pfxv\+\_\+state}}}



{\ttfamily \#include $<$\mbox{\hyperlink{pfx_8h}{rtrlib/pfx/pfx.\+h}}$>$}



Validation states returned from pfx\+\_\+validate\+\_\+origin. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{BGP\_PFXV\_STATE\_VALID@{BGP\_PFXV\_STATE\_VALID}!Prefix validation table@{Prefix validation table}}\index{Prefix validation table@{Prefix validation table}!BGP\_PFXV\_STATE\_VALID@{BGP\_PFXV\_STATE\_VALID}}}\Hypertarget{group__mod__pfx__h_gga9f87b27f024a9db70884c3981e030aa0a822b53f311ed40e3f91c44f6ac2c6c92}\label{group__mod__pfx__h_gga9f87b27f024a9db70884c3981e030aa0a822b53f311ed40e3f91c44f6ac2c6c92} 
BGP\+\_\+\+PFXV\+\_\+\+STATE\+\_\+\+VALID&A valid certificate for the \doxylink{structpfx__record}{pfx\+\_\+record} exists. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{BGP\_PFXV\_STATE\_NOT\_FOUND@{BGP\_PFXV\_STATE\_NOT\_FOUND}!Prefix validation table@{Prefix validation table}}\index{Prefix validation table@{Prefix validation table}!BGP\_PFXV\_STATE\_NOT\_FOUND@{BGP\_PFXV\_STATE\_NOT\_FOUND}}}\Hypertarget{group__mod__pfx__h_gga9f87b27f024a9db70884c3981e030aa0af4c75701949d919bae43e92f5e656342}\label{group__mod__pfx__h_gga9f87b27f024a9db70884c3981e030aa0af4c75701949d919bae43e92f5e656342} 
BGP\+\_\+\+PFXV\+\_\+\+STATE\+\_\+\+NOT\+\_\+\+FOUND&No certificate for the route exists. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{BGP\_PFXV\_STATE\_INVALID@{BGP\_PFXV\_STATE\_INVALID}!Prefix validation table@{Prefix validation table}}\index{Prefix validation table@{Prefix validation table}!BGP\_PFXV\_STATE\_INVALID@{BGP\_PFXV\_STATE\_INVALID}}}\Hypertarget{group__mod__pfx__h_gga9f87b27f024a9db70884c3981e030aa0aae9350d7596c31ff7a04d7a4c34a0459}\label{group__mod__pfx__h_gga9f87b27f024a9db70884c3981e030aa0aae9350d7596c31ff7a04d7a4c34a0459} 
BGP\+\_\+\+PFXV\+\_\+\+STATE\+\_\+\+INVALID&One or more records that match the input prefix exists in the \doxylink{structpfx__table}{pfx\+\_\+table} but the prefix max\+\_\+len or ASN doesn\textquotesingle{}t match. \\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\Hypertarget{group__mod__pfx__h_gaae469c2eac68b697dfa4128e1c2ff792}\label{group__mod__pfx__h_gaae469c2eac68b697dfa4128e1c2ff792} 
\index{Prefix validation table@{Prefix validation table}!pfx\_table\_add@{pfx\_table\_add}}
\index{pfx\_table\_add@{pfx\_table\_add}!Prefix validation table@{Prefix validation table}}
\doxysubsubsection{\texorpdfstring{pfx\_table\_add()}{pfx\_table\_add()}}
{\footnotesize\ttfamily int pfx\+\_\+table\+\_\+add (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{pfx\+\_\+table,  }\item[{const struct \mbox{\hyperlink{structpfx__record}{pfx\+\_\+record}} \texorpdfstring{$\ast$}{*}}]{pfx\+\_\+record }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{pfx_8h}{rtrlib/pfx/pfx.\+h}}$>$}



Adds a \doxylink{structpfx__record}{pfx\+\_\+record} to a \doxylink{structpfx__table}{pfx\+\_\+table}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structpfx__table}{pfx\+\_\+table}} & \doxylink{structpfx__table}{pfx\+\_\+table} to use. \\
\hline
\mbox{\texttt{ in}}  & {\em \doxylink{structpfx__record}{pfx\+\_\+record}} & \doxylink{structpfx__record}{pfx\+\_\+record} that will be added. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
PFX\+\_\+\+SUCCESS On success. 

PFX\+\_\+\+ERROR On error. 

PFX\+\_\+\+DUPLICATE\+\_\+\+RECORD If the \doxylink{structpfx__record}{pfx\+\_\+record} already exists. 
\end{DoxyReturn}
\Hypertarget{group__mod__pfx__h_gaf31b5ccae5d357c4e50cd23013dbb9c5}\label{group__mod__pfx__h_gaf31b5ccae5d357c4e50cd23013dbb9c5} 
\index{Prefix validation table@{Prefix validation table}!pfx\_table\_copy\_except\_socket@{pfx\_table\_copy\_except\_socket}}
\index{pfx\_table\_copy\_except\_socket@{pfx\_table\_copy\_except\_socket}!Prefix validation table@{Prefix validation table}}
\doxysubsubsection{\texorpdfstring{pfx\_table\_copy\_except\_socket()}{pfx\_table\_copy\_except\_socket()}}
{\footnotesize\ttfamily int pfx\+\_\+table\+\_\+copy\+\_\+except\+\_\+socket (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{src\+\_\+table,  }\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{dst\+\_\+table,  }\item[{const struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}}]{socket }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{pfx__private_8h}{rtrlib/pfx/pfx\+\_\+private.\+h}}$>$}



Copy content of {\ttfamily src\+\_\+table} into {\ttfamily dst\+\_\+table}. 

dst must be empty and initialized 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em src\+\_\+table} & Source table \\
\hline
\mbox{\texttt{ out}}  & {\em dst\+\_\+table} & Destination table \\
\hline
\mbox{\texttt{ in}}  & {\em socket} & socket which prefixes should not be copied \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__pfx__h_gac22895fe1d7d1de65003de76399be48d}\label{group__mod__pfx__h_gac22895fe1d7d1de65003de76399be48d} 
\index{Prefix validation table@{Prefix validation table}!pfx\_table\_for\_each\_ipv4\_record@{pfx\_table\_for\_each\_ipv4\_record}}
\index{pfx\_table\_for\_each\_ipv4\_record@{pfx\_table\_for\_each\_ipv4\_record}!Prefix validation table@{Prefix validation table}}
\doxysubsubsection{\texorpdfstring{pfx\_table\_for\_each\_ipv4\_record()}{pfx\_table\_for\_each\_ipv4\_record()}}
{\footnotesize\ttfamily void pfx\+\_\+table\+\_\+for\+\_\+each\+\_\+ipv4\+\_\+record (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{pfx\+\_\+table,  }\item[{\mbox{\hyperlink{group__mod__pfx__h_ga48478a61dc1cd09f646631b1691ff707}{pfx\+\_\+for\+\_\+each\+\_\+fp}}}]{fp,  }\item[{void \texorpdfstring{$\ast$}{*}}]{data }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{pfx_8h}{rtrlib/pfx/pfx.\+h}}$>$}



Iterates over all IPv4 records in the \doxylink{structpfx__table}{pfx\+\_\+table}. 

For every \doxylink{structpfx__record}{pfx\+\_\+record} the function fp is called. The \doxylink{structpfx__record}{pfx\+\_\+record} and the data pointer is passed to the fp. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structpfx__table}{pfx\+\_\+table}} & \\
\hline
\mbox{\texttt{ in}}  & {\em fp} & A pointer to a callback function with the signature {\ttfamily pfx\+\_\+for\+\_\+each\+\_\+fp}. \\
\hline
\mbox{\texttt{ in}}  & {\em data} & This parameter is forwarded to the callback function. \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__pfx__h_ga06d1f95df3a8952bced60588d52bc51e}\label{group__mod__pfx__h_ga06d1f95df3a8952bced60588d52bc51e} 
\index{Prefix validation table@{Prefix validation table}!pfx\_table\_for\_each\_ipv6\_record@{pfx\_table\_for\_each\_ipv6\_record}}
\index{pfx\_table\_for\_each\_ipv6\_record@{pfx\_table\_for\_each\_ipv6\_record}!Prefix validation table@{Prefix validation table}}
\doxysubsubsection{\texorpdfstring{pfx\_table\_for\_each\_ipv6\_record()}{pfx\_table\_for\_each\_ipv6\_record()}}
{\footnotesize\ttfamily void pfx\+\_\+table\+\_\+for\+\_\+each\+\_\+ipv6\+\_\+record (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{pfx\+\_\+table,  }\item[{\mbox{\hyperlink{group__mod__pfx__h_ga48478a61dc1cd09f646631b1691ff707}{pfx\+\_\+for\+\_\+each\+\_\+fp}}}]{fp,  }\item[{void \texorpdfstring{$\ast$}{*}}]{data }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{pfx_8h}{rtrlib/pfx/pfx.\+h}}$>$}



Iterates over all IPv6 records in the \doxylink{structpfx__table}{pfx\+\_\+table}. 

For every \doxylink{structpfx__record}{pfx\+\_\+record} the function fp is called. The \doxylink{structpfx__record}{pfx\+\_\+record} and the data pointer is passed to the fp. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structpfx__table}{pfx\+\_\+table}} & \\
\hline
\mbox{\texttt{ in}}  & {\em fp} & A pointer to a callback function with the signature {\ttfamily pfx\+\_\+for\+\_\+each\+\_\+fp}. \\
\hline
\mbox{\texttt{ in}}  & {\em data} & This parameter is forwarded to the callback function. \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__pfx__h_gaf31f339bbca6180da436a43d0bd17d10}\label{group__mod__pfx__h_gaf31f339bbca6180da436a43d0bd17d10} 
\index{Prefix validation table@{Prefix validation table}!pfx\_table\_free@{pfx\_table\_free}}
\index{pfx\_table\_free@{pfx\_table\_free}!Prefix validation table@{Prefix validation table}}
\doxysubsubsection{\texorpdfstring{pfx\_table\_free()}{pfx\_table\_free()}}
{\footnotesize\ttfamily void pfx\+\_\+table\+\_\+free (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{pfx\+\_\+table }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{pfx_8h}{rtrlib/pfx/pfx.\+h}}$>$}



Frees all memory associated with the \doxylink{structpfx__table}{pfx\+\_\+table}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structpfx__table}{pfx\+\_\+table}} & \doxylink{structpfx__table}{pfx\+\_\+table} that will be freed. \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__pfx__h_ga4046391b18d6dc33be26869c24ef0088}\label{group__mod__pfx__h_ga4046391b18d6dc33be26869c24ef0088} 
\index{Prefix validation table@{Prefix validation table}!pfx\_table\_free\_without\_notify@{pfx\_table\_free\_without\_notify}}
\index{pfx\_table\_free\_without\_notify@{pfx\_table\_free\_without\_notify}!Prefix validation table@{Prefix validation table}}
\doxysubsubsection{\texorpdfstring{pfx\_table\_free\_without\_notify()}{pfx\_table\_free\_without\_notify()}}
{\footnotesize\ttfamily void pfx\+\_\+table\+\_\+free\+\_\+without\+\_\+notify (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{pfx\+\_\+table }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{pfx__private_8h}{rtrlib/pfx/pfx\+\_\+private.\+h}}$>$}



Frees all memory associated with the \doxylink{structpfx__table}{pfx\+\_\+table} without calling the update callback. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structpfx__table}{pfx\+\_\+table}} & \doxylink{structpfx__table}{pfx\+\_\+table} that will be freed. \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__pfx__h_ga1c2751808568eef03338a9905a0735ff}\label{group__mod__pfx__h_ga1c2751808568eef03338a9905a0735ff} 
\index{Prefix validation table@{Prefix validation table}!pfx\_table\_init@{pfx\_table\_init}}
\index{pfx\_table\_init@{pfx\_table\_init}!Prefix validation table@{Prefix validation table}}
\doxysubsubsection{\texorpdfstring{pfx\_table\_init()}{pfx\_table\_init()}}
{\footnotesize\ttfamily void pfx\+\_\+table\+\_\+init (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{pfx\+\_\+table,  }\item[{\mbox{\hyperlink{group__mod__trie__pfx__h_gafcc9cb0377b569f364b373c82d5d2d3c}{pfx\+\_\+update\+\_\+fp}}}]{update\+\_\+fp }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{pfx_8h}{rtrlib/pfx/pfx.\+h}}$>$}



Initializes the \doxylink{structpfx__table}{pfx\+\_\+table} struct. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structpfx__table}{pfx\+\_\+table}} & \doxylink{structpfx__table}{pfx\+\_\+table} that will be initialized. \\
\hline
\mbox{\texttt{ in}}  & {\em update\+\_\+fp} & A function pointer that will be called if a record was added or removed. \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__pfx__h_ga133d254827141060f614f7c667425320}\label{group__mod__pfx__h_ga133d254827141060f614f7c667425320} 
\index{Prefix validation table@{Prefix validation table}!pfx\_table\_notify\_diff@{pfx\_table\_notify\_diff}}
\index{pfx\_table\_notify\_diff@{pfx\_table\_notify\_diff}!Prefix validation table@{Prefix validation table}}
\doxysubsubsection{\texorpdfstring{pfx\_table\_notify\_diff()}{pfx\_table\_notify\_diff()}}
{\footnotesize\ttfamily void pfx\+\_\+table\+\_\+notify\+\_\+diff (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{new\+\_\+table,  }\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{old\+\_\+table,  }\item[{const struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}}]{socket }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{pfx__private_8h}{rtrlib/pfx/pfx\+\_\+private.\+h}}$>$}



Notify client about changes between to pfx tables regarding one specific socket. 

old\+\_\+table will be modified it should be freed after calling this function 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em new\+\_\+table} & \\
\hline
\mbox{\texttt{ in}}  & {\em old\+\_\+table} & \\
\hline
\mbox{\texttt{ in}}  & {\em socket} & socket which prefixes should be diffed \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__pfx__h_ga2f03e320b7d228e7861413b8007e8648}\label{group__mod__pfx__h_ga2f03e320b7d228e7861413b8007e8648} 
\index{Prefix validation table@{Prefix validation table}!pfx\_table\_remove@{pfx\_table\_remove}}
\index{pfx\_table\_remove@{pfx\_table\_remove}!Prefix validation table@{Prefix validation table}}
\doxysubsubsection{\texorpdfstring{pfx\_table\_remove()}{pfx\_table\_remove()}}
{\footnotesize\ttfamily int pfx\+\_\+table\+\_\+remove (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{pfx\+\_\+table,  }\item[{const struct \mbox{\hyperlink{structpfx__record}{pfx\+\_\+record}} \texorpdfstring{$\ast$}{*}}]{pfx\+\_\+record }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{pfx_8h}{rtrlib/pfx/pfx.\+h}}$>$}



Removes a \doxylink{structpfx__record}{pfx\+\_\+record} from a \doxylink{structpfx__table}{pfx\+\_\+table}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structpfx__table}{pfx\+\_\+table}} & \doxylink{structpfx__table}{pfx\+\_\+table} to use. \\
\hline
\mbox{\texttt{ in}}  & {\em \doxylink{structpfx__record}{pfx\+\_\+record}} & Record that will be removed. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
PFX\+\_\+\+SUCCESS On success. 

PFX\+\_\+\+ERROR On error. 

PFX\+\_\+\+RECORD\+\_\+\+NOT\+\_\+\+FOUND If pfx\+\_\+records couldn\textquotesingle{}t be found. 
\end{DoxyReturn}
\Hypertarget{group__mod__pfx__h_gabcdf5278a027b9e6e1051eb1ecfac782}\label{group__mod__pfx__h_gabcdf5278a027b9e6e1051eb1ecfac782} 
\index{Prefix validation table@{Prefix validation table}!pfx\_table\_src\_remove@{pfx\_table\_src\_remove}}
\index{pfx\_table\_src\_remove@{pfx\_table\_src\_remove}!Prefix validation table@{Prefix validation table}}
\doxysubsubsection{\texorpdfstring{pfx\_table\_src\_remove()}{pfx\_table\_src\_remove()}}
{\footnotesize\ttfamily int pfx\+\_\+table\+\_\+src\+\_\+remove (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{pfx\+\_\+table,  }\item[{const struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}}]{socket }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{pfx_8h}{rtrlib/pfx/pfx.\+h}}$>$}



Removes all entries in the \doxylink{structpfx__table}{pfx\+\_\+table} that match the passed socket\+\_\+id value from a \doxylink{structpfx__table}{pfx\+\_\+table}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structpfx__table}{pfx\+\_\+table}} & \doxylink{structpfx__table}{pfx\+\_\+table} to use. \\
\hline
\mbox{\texttt{ in}}  & {\em socket} & origin socket of the record \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
PFX\+\_\+\+SUCCESS On success. 

PFX\+\_\+\+ERROR On error. 
\end{DoxyReturn}
\Hypertarget{group__mod__pfx__h_gaaa09ae81a3f0f1bce13671514ad88bc8}\label{group__mod__pfx__h_gaaa09ae81a3f0f1bce13671514ad88bc8} 
\index{Prefix validation table@{Prefix validation table}!pfx\_table\_swap@{pfx\_table\_swap}}
\index{pfx\_table\_swap@{pfx\_table\_swap}!Prefix validation table@{Prefix validation table}}
\doxysubsubsection{\texorpdfstring{pfx\_table\_swap()}{pfx\_table\_swap()}}
{\footnotesize\ttfamily void pfx\+\_\+table\+\_\+swap (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{a,  }\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{b }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{pfx__private_8h}{rtrlib/pfx/pfx\+\_\+private.\+h}}$>$}



Swap root nodes of the argument tables. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em a} & First table \\
\hline
\mbox{\texttt{ in,out}}  & {\em b} & second table \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__pfx__h_ga24a6236cd78f9708c089793c02eb693f}\label{group__mod__pfx__h_ga24a6236cd78f9708c089793c02eb693f} 
\index{Prefix validation table@{Prefix validation table}!pfx\_table\_validate@{pfx\_table\_validate}}
\index{pfx\_table\_validate@{pfx\_table\_validate}!Prefix validation table@{Prefix validation table}}
\doxysubsubsection{\texorpdfstring{pfx\_table\_validate()}{pfx\_table\_validate()}}
{\footnotesize\ttfamily int pfx\+\_\+table\+\_\+validate (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{pfx\+\_\+table,  }\item[{const uint32\+\_\+t}]{asn,  }\item[{const struct \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr}} \texorpdfstring{$\ast$}{*}}]{prefix,  }\item[{const uint8\+\_\+t}]{mask\+\_\+len,  }\item[{enum \mbox{\hyperlink{group__mod__pfx__h_ga9f87b27f024a9db70884c3981e030aa0}{pfxv\+\_\+state}} \texorpdfstring{$\ast$}{*}}]{result }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{pfx_8h}{rtrlib/pfx/pfx.\+h}}$>$}



Validates the origin of a BGP-\/\+Route. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structpfx__table}{pfx\+\_\+table}} & \doxylink{structpfx__table}{pfx\+\_\+table} to use. \\
\hline
\mbox{\texttt{ in}}  & {\em asn} & Autonomous system number of the Origin-\/\+AS of the route. \\
\hline
\mbox{\texttt{ in}}  & {\em prefix} & Announced network Prefix. \\
\hline
\mbox{\texttt{ in}}  & {\em mask\+\_\+len} & Length of the network mask of the announced prefix. \\
\hline
\mbox{\texttt{ out}}  & {\em result} & Result of the validation. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
PFX\+\_\+\+SUCCESS On success. 

PFX\+\_\+\+ERROR On error. 
\end{DoxyReturn}
\Hypertarget{group__mod__pfx__h_gadc7e5454793c8c69724a72a14ffe0f3b}\label{group__mod__pfx__h_gadc7e5454793c8c69724a72a14ffe0f3b} 
\index{Prefix validation table@{Prefix validation table}!pfx\_table\_validate\_r@{pfx\_table\_validate\_r}}
\index{pfx\_table\_validate\_r@{pfx\_table\_validate\_r}!Prefix validation table@{Prefix validation table}}
\doxysubsubsection{\texorpdfstring{pfx\_table\_validate\_r()}{pfx\_table\_validate\_r()}}
{\footnotesize\ttfamily int pfx\+\_\+table\+\_\+validate\+\_\+r (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{pfx\+\_\+table,  }\item[{struct \mbox{\hyperlink{structpfx__record}{pfx\+\_\+record}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{reason,  }\item[{unsigned int \texorpdfstring{$\ast$}{*}}]{reason\+\_\+len,  }\item[{const uint32\+\_\+t}]{asn,  }\item[{const struct \mbox{\hyperlink{structlrtr__ip__addr}{lrtr\+\_\+ip\+\_\+addr}} \texorpdfstring{$\ast$}{*}}]{prefix,  }\item[{const uint8\+\_\+t}]{mask\+\_\+len,  }\item[{enum \mbox{\hyperlink{group__mod__pfx__h_ga9f87b27f024a9db70884c3981e030aa0}{pfxv\+\_\+state}} \texorpdfstring{$\ast$}{*}}]{result }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{pfx_8h}{rtrlib/pfx/pfx.\+h}}$>$}



Validates the origin of a BGP-\/\+Route and returns a list of \doxylink{structpfx__record}{pfx\+\_\+record} that decided the result. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structpfx__table}{pfx\+\_\+table}} & \doxylink{structpfx__table}{pfx\+\_\+table} to use. \\
\hline
\mbox{\texttt{ out}}  & {\em reason} & Pointer to a memory area that will be used as array of pfx\+\_\+records. The memory area will be overwritten. Reason must point to NULL or an allocated memory area. \\
\hline
\mbox{\texttt{ out}}  & {\em reason\+\_\+len} & Size of the array reason. \\
\hline
\mbox{\texttt{ in}}  & {\em asn} & Autonomous system number of the Origin-\/\+AS of the route. \\
\hline
\mbox{\texttt{ in}}  & {\em prefix} & Announced network Prefix \\
\hline
\mbox{\texttt{ in}}  & {\em mask\+\_\+len} & Length of the network mask of the announced prefix \\
\hline
\mbox{\texttt{ out}}  & {\em result} & Result of the validation. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
PFX\+\_\+\+SUCCESS On success. 

PFX\+\_\+\+ERROR On error. 
\end{DoxyReturn}
\input{group__mod__trie__pfx__h}
