\doxysection{Subject Public Key Info table}
\hypertarget{group__mod__spki__h}{}\label{group__mod__spki__h}\index{Subject Public Key Info table@{Subject Public Key Info table}}


The \doxylink{structspki__table}{spki\+\_\+table} is an abstract data structure to organize the received Router Key PDUs from a RPKI-\/\+RTR cache server.  


\doxysubsubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structspki__record}{spki\+\_\+record}}
\begin{DoxyCompactList}\small\item\em \doxylink{structspki__record}{spki\+\_\+record}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group__mod__spki__h_gab4e5fd509ba36700c4b28bb56dea86a1}{SKI\+\_\+\+SIZE}}~20
\item 
\#define \mbox{\hyperlink{group__mod__spki__h_ga7fc61db2df09b056948f9e3416ebfa18}{SPKI\+\_\+\+SIZE}}~91
\end{DoxyCompactItemize}
\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__mod__spki__h_ga208a2bec5211e883b44ebe693a1c5e5d}{spki\+\_\+update\+\_\+fp}}) (struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structspki__table}{spki\+\_\+table}}, const struct \mbox{\hyperlink{structspki__record}{spki\+\_\+record}} record, const bool added)
\begin{DoxyCompactList}\small\item\em A function pointer that is called if an record was added to the \doxylink{structspki__table}{spki\+\_\+table} or was removed from the \doxylink{structspki__table}{spki\+\_\+table}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{group__mod__spki__h_ga8fb0b1637e4d6bd7fe6b02861d101505}{spki\+\_\+rtvals}} \{ \mbox{\hyperlink{group__mod__spki__h_gga8fb0b1637e4d6bd7fe6b02861d101505acebcca307c11fa762e9b579b1257d260}{SPKI\+\_\+\+SUCCESS}} = 0
, \mbox{\hyperlink{group__mod__spki__h_gga8fb0b1637e4d6bd7fe6b02861d101505a44f15f35694ac3ffa807f68e8be3d367}{SPKI\+\_\+\+ERROR}} = -\/1
, \mbox{\hyperlink{group__mod__spki__h_gga8fb0b1637e4d6bd7fe6b02861d101505a7122b5bbde0645f97699af0364d6aaf8}{SPKI\+\_\+\+DUPLICATE\+\_\+\+RECORD}} = -\/2
, \mbox{\hyperlink{group__mod__spki__h_gga8fb0b1637e4d6bd7fe6b02861d101505a452861bd3171cd41ae716207a48ffc39}{SPKI\+\_\+\+RECORD\+\_\+\+NOT\+\_\+\+FOUND}} = -\/3
 \}
\begin{DoxyCompactList}\small\item\em Possible return values for some spki\+\_\+table\+\_\+ functions. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{group__mod__spki__h_ga6470d24084c7ebb28e2783c02268e2a0}{spki\+\_\+table\+\_\+init}} (struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structspki__table}{spki\+\_\+table}}, \mbox{\hyperlink{group__mod__spki__h_ga208a2bec5211e883b44ebe693a1c5e5d}{spki\+\_\+update\+\_\+fp}} update\+\_\+fp)
\begin{DoxyCompactList}\small\item\em Initializes the \doxylink{structspki__table}{spki\+\_\+table} struct. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__spki__h_ga37e3e2db6162a8599f4692f0072dd750}{spki\+\_\+table\+\_\+free}} (struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structspki__table}{spki\+\_\+table}})
\begin{DoxyCompactList}\small\item\em Frees the memory associated with the \doxylink{structspki__table}{spki\+\_\+table}. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__spki__h_gafa4bfa4749f0d66527a0a5dd9b7e3edd}{spki\+\_\+table\+\_\+free\+\_\+without\+\_\+notify}} (struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structspki__table}{spki\+\_\+table}})
\begin{DoxyCompactList}\small\item\em Frees the memory associated with the \doxylink{structspki__table}{spki\+\_\+table} without calling the update callback. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__spki__h_ga19baa9ac00323d1dc4aadc3bc9fb09f6}{spki\+\_\+table\+\_\+add\+\_\+entry}} (struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structspki__table}{spki\+\_\+table}}, struct \mbox{\hyperlink{structspki__record}{spki\+\_\+record}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structspki__record}{spki\+\_\+record}})
\begin{DoxyCompactList}\small\item\em Adds a \doxylink{structspki__record}{spki\+\_\+record} to a \doxylink{structspki__table}{spki\+\_\+table}. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__spki__h_gaec064319c37f34806c28d7d4dbac7a27}{spki\+\_\+table\+\_\+get\+\_\+all}} (struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structspki__table}{spki\+\_\+table}}, uint32\+\_\+t \mbox{\hyperlink{rtr__pdus_8h_af54a4e57359d5c0dc5935878531a9e58}{asn}}, uint8\+\_\+t \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{rtr__pdus_8h_a12038882b8c1e8109c0e4b1ea6f8cb5c}{ski}}, struct \mbox{\hyperlink{structspki__record}{spki\+\_\+record}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}result, unsigned int \texorpdfstring{$\ast$}{*}result\+\_\+size)
\begin{DoxyCompactList}\small\item\em Returns all \doxylink{structspki__record}{spki\+\_\+record} whose ASN and SKI matches. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__spki__h_ga6806d7f244971d8acbc2467835ecdb6a}{spki\+\_\+table\+\_\+search\+\_\+by\+\_\+ski}} (struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structspki__table}{spki\+\_\+table}}, uint8\+\_\+t \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{rtr__pdus_8h_a12038882b8c1e8109c0e4b1ea6f8cb5c}{ski}}, struct \mbox{\hyperlink{structspki__record}{spki\+\_\+record}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}result, unsigned int \texorpdfstring{$\ast$}{*}result\+\_\+size)
\begin{DoxyCompactList}\small\item\em Returns all \doxylink{structspki__record}{spki\+\_\+record} whose SKI number matches the given one. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__spki__h_gac669b9806ad12e7c271d3a639ef00858}{spki\+\_\+table\+\_\+remove\+\_\+entry}} (struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structspki__table}{spki\+\_\+table}}, struct \mbox{\hyperlink{structspki__record}{spki\+\_\+record}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structspki__record}{spki\+\_\+record}})
\begin{DoxyCompactList}\small\item\em Removes \doxylink{structspki__record}{spki\+\_\+record} from \doxylink{structspki__table}{spki\+\_\+table}. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__spki__h_ga888e64c91916e50636a55749d4ee28f6}{spki\+\_\+table\+\_\+src\+\_\+remove}} (struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structspki__table}{spki\+\_\+table}}, const struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}socket)
\begin{DoxyCompactList}\small\item\em Removes all entries in the \doxylink{structspki__table}{spki\+\_\+table} that match the passed socket\+\_\+id. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mod__spki__h_ga0fe3891be819a04e13559f439f914f91}{spki\+\_\+table\+\_\+copy\+\_\+except\+\_\+socket}} (struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}src, struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}dest, struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}socket)
\begin{DoxyCompactList}\small\item\em Copy spki table except entries from the given socket. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__spki__h_ga097f92f19b6133400c8e10482bdd8498}{spki\+\_\+table\+\_\+notify\+\_\+diff}} (struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}new\+\_\+table, struct \mbox{\hyperlink{structspki__table}{spki\+\_\+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 two spki tables regarding one specific socket. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mod__spki__h_ga56699bbb215ec41c69d2212c71429fc9}{spki\+\_\+table\+\_\+swap}} (struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}a, struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}b)
\begin{DoxyCompactList}\small\item\em tommy\+\_\+hashlin and tommy\+\_\+list of the argument tables \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The \doxylink{structspki__table}{spki\+\_\+table} is an abstract data structure to organize the received Router Key PDUs from a RPKI-\/\+RTR cache server. 



\doxysubsection{Macro Definition Documentation}
\Hypertarget{group__mod__spki__h_gab4e5fd509ba36700c4b28bb56dea86a1}\label{group__mod__spki__h_gab4e5fd509ba36700c4b28bb56dea86a1} 
\index{Subject Public Key Info table@{Subject Public Key Info table}!SKI\_SIZE@{SKI\_SIZE}}
\index{SKI\_SIZE@{SKI\_SIZE}!Subject Public Key Info table@{Subject Public Key Info table}}
\doxysubsubsection{\texorpdfstring{SKI\_SIZE}{SKI\_SIZE}}
{\footnotesize\ttfamily \#define SKI\+\_\+\+SIZE~20}



{\ttfamily \#include $<$\mbox{\hyperlink{spkitable_8h}{rtrlib/spki/spkitable.\+h}}$>$}

\Hypertarget{group__mod__spki__h_ga7fc61db2df09b056948f9e3416ebfa18}\label{group__mod__spki__h_ga7fc61db2df09b056948f9e3416ebfa18} 
\index{Subject Public Key Info table@{Subject Public Key Info table}!SPKI\_SIZE@{SPKI\_SIZE}}
\index{SPKI\_SIZE@{SPKI\_SIZE}!Subject Public Key Info table@{Subject Public Key Info table}}
\doxysubsubsection{\texorpdfstring{SPKI\_SIZE}{SPKI\_SIZE}}
{\footnotesize\ttfamily \#define SPKI\+\_\+\+SIZE~91}



{\ttfamily \#include $<$\mbox{\hyperlink{spkitable_8h}{rtrlib/spki/spkitable.\+h}}$>$}



\doxysubsection{Typedef Documentation}
\Hypertarget{group__mod__spki__h_ga208a2bec5211e883b44ebe693a1c5e5d}\label{group__mod__spki__h_ga208a2bec5211e883b44ebe693a1c5e5d} 
\index{Subject Public Key Info table@{Subject Public Key Info table}!spki\_update\_fp@{spki\_update\_fp}}
\index{spki\_update\_fp@{spki\_update\_fp}!Subject Public Key Info table@{Subject Public Key Info table}}
\doxysubsubsection{\texorpdfstring{spki\_update\_fp}{spki\_update\_fp}}
{\footnotesize\ttfamily typedef void(\texorpdfstring{$\ast$}{*} spki\+\_\+update\+\_\+fp) (struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structspki__table}{spki\+\_\+table}}, const struct \mbox{\hyperlink{structspki__record}{spki\+\_\+record}} record, const bool added)}



{\ttfamily \#include $<$\mbox{\hyperlink{spkitable_8h}{rtrlib/spki/spkitable.\+h}}$>$}



A function pointer that is called if an record was added to the \doxylink{structspki__table}{spki\+\_\+table} or was removed from the \doxylink{structspki__table}{spki\+\_\+table}. 


\begin{DoxyParams}{Parameters}
{\em \doxylink{structspki__table}{spki\+\_\+table}} & which was updated. \\
\hline
{\em record} & \doxylink{structspki__record}{spki\+\_\+record} that was modified. \\
\hline
{\em added} & True if the record was added, false if the record was removed. \\
\hline
\end{DoxyParams}


\doxysubsection{Enumeration Type Documentation}
\Hypertarget{group__mod__spki__h_ga8fb0b1637e4d6bd7fe6b02861d101505}\label{group__mod__spki__h_ga8fb0b1637e4d6bd7fe6b02861d101505} 
\index{Subject Public Key Info table@{Subject Public Key Info table}!spki\_rtvals@{spki\_rtvals}}
\index{spki\_rtvals@{spki\_rtvals}!Subject Public Key Info table@{Subject Public Key Info table}}
\doxysubsubsection{\texorpdfstring{spki\_rtvals}{spki\_rtvals}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{group__mod__spki__h_ga8fb0b1637e4d6bd7fe6b02861d101505}{spki\+\_\+rtvals}}}



{\ttfamily \#include $<$\mbox{\hyperlink{spkitable__private_8h}{rtrlib/spki/spkitable\+\_\+private.\+h}}$>$}



Possible return values for some spki\+\_\+table\+\_\+ functions. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{SPKI\_SUCCESS@{SPKI\_SUCCESS}!Subject Public Key Info table@{Subject Public Key Info table}}\index{Subject Public Key Info table@{Subject Public Key Info table}!SPKI\_SUCCESS@{SPKI\_SUCCESS}}}\Hypertarget{group__mod__spki__h_gga8fb0b1637e4d6bd7fe6b02861d101505acebcca307c11fa762e9b579b1257d260}\label{group__mod__spki__h_gga8fb0b1637e4d6bd7fe6b02861d101505acebcca307c11fa762e9b579b1257d260} 
SPKI\+\_\+\+SUCCESS&Operation was successful. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{SPKI\_ERROR@{SPKI\_ERROR}!Subject Public Key Info table@{Subject Public Key Info table}}\index{Subject Public Key Info table@{Subject Public Key Info table}!SPKI\_ERROR@{SPKI\_ERROR}}}\Hypertarget{group__mod__spki__h_gga8fb0b1637e4d6bd7fe6b02861d101505a44f15f35694ac3ffa807f68e8be3d367}\label{group__mod__spki__h_gga8fb0b1637e4d6bd7fe6b02861d101505a44f15f35694ac3ffa807f68e8be3d367} 
SPKI\+\_\+\+ERROR&Error occurred. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{SPKI\_DUPLICATE\_RECORD@{SPKI\_DUPLICATE\_RECORD}!Subject Public Key Info table@{Subject Public Key Info table}}\index{Subject Public Key Info table@{Subject Public Key Info table}!SPKI\_DUPLICATE\_RECORD@{SPKI\_DUPLICATE\_RECORD}}}\Hypertarget{group__mod__spki__h_gga8fb0b1637e4d6bd7fe6b02861d101505a7122b5bbde0645f97699af0364d6aaf8}\label{group__mod__spki__h_gga8fb0b1637e4d6bd7fe6b02861d101505a7122b5bbde0645f97699af0364d6aaf8} 
SPKI\+\_\+\+DUPLICATE\+\_\+\+RECORD&The supplied \doxylink{structspki__record}{spki\+\_\+record} already exists in the \doxylink{structspki__table}{spki\+\_\+table}. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{SPKI\_RECORD\_NOT\_FOUND@{SPKI\_RECORD\_NOT\_FOUND}!Subject Public Key Info table@{Subject Public Key Info table}}\index{Subject Public Key Info table@{Subject Public Key Info table}!SPKI\_RECORD\_NOT\_FOUND@{SPKI\_RECORD\_NOT\_FOUND}}}\Hypertarget{group__mod__spki__h_gga8fb0b1637e4d6bd7fe6b02861d101505a452861bd3171cd41ae716207a48ffc39}\label{group__mod__spki__h_gga8fb0b1637e4d6bd7fe6b02861d101505a452861bd3171cd41ae716207a48ffc39} 
SPKI\+\_\+\+RECORD\+\_\+\+NOT\+\_\+\+FOUND&\doxylink{structspki__record}{spki\+\_\+record} wasn\textquotesingle{}t found in the \doxylink{structspki__table}{spki\+\_\+table}. \\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\Hypertarget{group__mod__spki__h_ga19baa9ac00323d1dc4aadc3bc9fb09f6}\label{group__mod__spki__h_ga19baa9ac00323d1dc4aadc3bc9fb09f6} 
\index{Subject Public Key Info table@{Subject Public Key Info table}!spki\_table\_add\_entry@{spki\_table\_add\_entry}}
\index{spki\_table\_add\_entry@{spki\_table\_add\_entry}!Subject Public Key Info table@{Subject Public Key Info table}}
\doxysubsubsection{\texorpdfstring{spki\_table\_add\_entry()}{spki\_table\_add\_entry()}}
{\footnotesize\ttfamily int spki\+\_\+table\+\_\+add\+\_\+entry (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{spki\+\_\+table,  }\item[{struct \mbox{\hyperlink{structspki__record}{spki\+\_\+record}} \texorpdfstring{$\ast$}{*}}]{spki\+\_\+record }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{spkitable__private_8h}{rtrlib/spki/spkitable\+\_\+private.\+h}}$>$}



Adds a \doxylink{structspki__record}{spki\+\_\+record} to a \doxylink{structspki__table}{spki\+\_\+table}. 


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

SPKI\+\_\+\+ERROR On error. 

SPKI\+\_\+\+DUPLICATE\+\_\+\+RECORD If an identical \doxylink{structspki__record}{spki\+\_\+record} already exists 
\end{DoxyReturn}
\Hypertarget{group__mod__spki__h_ga0fe3891be819a04e13559f439f914f91}\label{group__mod__spki__h_ga0fe3891be819a04e13559f439f914f91} 
\index{Subject Public Key Info table@{Subject Public Key Info table}!spki\_table\_copy\_except\_socket@{spki\_table\_copy\_except\_socket}}
\index{spki\_table\_copy\_except\_socket@{spki\_table\_copy\_except\_socket}!Subject Public Key Info table@{Subject Public Key Info table}}
\doxysubsubsection{\texorpdfstring{spki\_table\_copy\_except\_socket()}{spki\_table\_copy\_except\_socket()}}
{\footnotesize\ttfamily int spki\+\_\+table\+\_\+copy\+\_\+except\+\_\+socket (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{src,  }\item[{struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{dest,  }\item[{struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}}]{socket }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{spkitable__private_8h}{rtrlib/spki/spkitable\+\_\+private.\+h}}$>$}



Copy spki table except entries from the given socket. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em src} & source table \\
\hline
\mbox{\texttt{ in}}  & {\em dest} & target table \\
\hline
\mbox{\texttt{ in}}  & {\em socket} & socket which entries should not be copied \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
SPKI\+\_\+\+SUCCESS On success. 

SPKI\+\_\+\+ERROR On error. 
\end{DoxyReturn}
\Hypertarget{group__mod__spki__h_ga37e3e2db6162a8599f4692f0072dd750}\label{group__mod__spki__h_ga37e3e2db6162a8599f4692f0072dd750} 
\index{Subject Public Key Info table@{Subject Public Key Info table}!spki\_table\_free@{spki\_table\_free}}
\index{spki\_table\_free@{spki\_table\_free}!Subject Public Key Info table@{Subject Public Key Info table}}
\doxysubsubsection{\texorpdfstring{spki\_table\_free()}{spki\_table\_free()}}
{\footnotesize\ttfamily void spki\+\_\+table\+\_\+free (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{spki\+\_\+table }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{spkitable__private_8h}{rtrlib/spki/spkitable\+\_\+private.\+h}}$>$}



Frees the memory associated with the \doxylink{structspki__table}{spki\+\_\+table}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structspki__table}{spki\+\_\+table}} & \doxylink{structspki__table}{spki\+\_\+table} that will be initialized. \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__spki__h_gafa4bfa4749f0d66527a0a5dd9b7e3edd}\label{group__mod__spki__h_gafa4bfa4749f0d66527a0a5dd9b7e3edd} 
\index{Subject Public Key Info table@{Subject Public Key Info table}!spki\_table\_free\_without\_notify@{spki\_table\_free\_without\_notify}}
\index{spki\_table\_free\_without\_notify@{spki\_table\_free\_without\_notify}!Subject Public Key Info table@{Subject Public Key Info table}}
\doxysubsubsection{\texorpdfstring{spki\_table\_free\_without\_notify()}{spki\_table\_free\_without\_notify()}}
{\footnotesize\ttfamily void spki\+\_\+table\+\_\+free\+\_\+without\+\_\+notify (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{spki\+\_\+table }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{spkitable__private_8h}{rtrlib/spki/spkitable\+\_\+private.\+h}}$>$}



Frees the memory associated with the \doxylink{structspki__table}{spki\+\_\+table} without calling the update callback. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structspki__table}{spki\+\_\+table}} & \doxylink{structspki__table}{spki\+\_\+table} that will be initialized. \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__spki__h_gaec064319c37f34806c28d7d4dbac7a27}\label{group__mod__spki__h_gaec064319c37f34806c28d7d4dbac7a27} 
\index{Subject Public Key Info table@{Subject Public Key Info table}!spki\_table\_get\_all@{spki\_table\_get\_all}}
\index{spki\_table\_get\_all@{spki\_table\_get\_all}!Subject Public Key Info table@{Subject Public Key Info table}}
\doxysubsubsection{\texorpdfstring{spki\_table\_get\_all()}{spki\_table\_get\_all()}}
{\footnotesize\ttfamily int spki\+\_\+table\+\_\+get\+\_\+all (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{spki\+\_\+table,  }\item[{uint32\+\_\+t}]{asn,  }\item[{uint8\+\_\+t \texorpdfstring{$\ast$}{*}}]{ski,  }\item[{struct \mbox{\hyperlink{structspki__record}{spki\+\_\+record}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{result,  }\item[{unsigned int \texorpdfstring{$\ast$}{*}}]{result\+\_\+size }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{spkitable__private_8h}{rtrlib/spki/spkitable\+\_\+private.\+h}}$>$}



Returns all \doxylink{structspki__record}{spki\+\_\+record} whose ASN and SKI matches. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structspki__table}{spki\+\_\+table}} & \doxylink{structspki__table}{spki\+\_\+table} to use \\
\hline
\mbox{\texttt{ in}}  & {\em asn} & the AS number \\
\hline
\mbox{\texttt{ in}}  & {\em ski} & the 20 byte field which contains the SKI to search for \\
\hline
\mbox{\texttt{ out}}  & {\em result} & the result array. NULL if no records could be found \\
\hline
\mbox{\texttt{ out}}  & {\em result\+\_\+size} & elment count of the result array \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
SPKI\+\_\+\+SUCCESS On success 

SPKI\+\_\+\+ERROR On error 
\end{DoxyReturn}
\Hypertarget{group__mod__spki__h_ga6470d24084c7ebb28e2783c02268e2a0}\label{group__mod__spki__h_ga6470d24084c7ebb28e2783c02268e2a0} 
\index{Subject Public Key Info table@{Subject Public Key Info table}!spki\_table\_init@{spki\_table\_init}}
\index{spki\_table\_init@{spki\_table\_init}!Subject Public Key Info table@{Subject Public Key Info table}}
\doxysubsubsection{\texorpdfstring{spki\_table\_init()}{spki\_table\_init()}}
{\footnotesize\ttfamily void spki\+\_\+table\+\_\+init (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{spki\+\_\+table,  }\item[{\mbox{\hyperlink{group__mod__spki__h_ga208a2bec5211e883b44ebe693a1c5e5d}{spki\+\_\+update\+\_\+fp}}}]{update\+\_\+fp }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{spkitable__private_8h}{rtrlib/spki/spkitable\+\_\+private.\+h}}$>$}



Initializes the \doxylink{structspki__table}{spki\+\_\+table} struct. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structspki__table}{spki\+\_\+table}} & \doxylink{structspki__table}{spki\+\_\+table} that will be initialized. \\
\hline
\mbox{\texttt{ in}}  & {\em update\+\_\+fp} & Pointer to update function \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__spki__h_ga097f92f19b6133400c8e10482bdd8498}\label{group__mod__spki__h_ga097f92f19b6133400c8e10482bdd8498} 
\index{Subject Public Key Info table@{Subject Public Key Info table}!spki\_table\_notify\_diff@{spki\_table\_notify\_diff}}
\index{spki\_table\_notify\_diff@{spki\_table\_notify\_diff}!Subject Public Key Info table@{Subject Public Key Info table}}
\doxysubsubsection{\texorpdfstring{spki\_table\_notify\_diff()}{spki\_table\_notify\_diff()}}
{\footnotesize\ttfamily void spki\+\_\+table\+\_\+notify\+\_\+diff (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{new\+\_\+table,  }\item[{struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{old\+\_\+table,  }\item[{const struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}}]{socket }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{spkitable__private_8h}{rtrlib/spki/spkitable\+\_\+private.\+h}}$>$}



Notify client about changes between two spki tables regarding one specific socket. 

old\+\_\+table will be modified and should probably 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 entries should be diffed \\
\hline
\end{DoxyParams}
\Hypertarget{group__mod__spki__h_gac669b9806ad12e7c271d3a639ef00858}\label{group__mod__spki__h_gac669b9806ad12e7c271d3a639ef00858} 
\index{Subject Public Key Info table@{Subject Public Key Info table}!spki\_table\_remove\_entry@{spki\_table\_remove\_entry}}
\index{spki\_table\_remove\_entry@{spki\_table\_remove\_entry}!Subject Public Key Info table@{Subject Public Key Info table}}
\doxysubsubsection{\texorpdfstring{spki\_table\_remove\_entry()}{spki\_table\_remove\_entry()}}
{\footnotesize\ttfamily int spki\+\_\+table\+\_\+remove\+\_\+entry (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{spki\+\_\+table,  }\item[{struct \mbox{\hyperlink{structspki__record}{spki\+\_\+record}} \texorpdfstring{$\ast$}{*}}]{spki\+\_\+record }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{spkitable__private_8h}{rtrlib/spki/spkitable\+\_\+private.\+h}}$>$}



Removes \doxylink{structspki__record}{spki\+\_\+record} from \doxylink{structspki__table}{spki\+\_\+table}. 


\begin{DoxyParams}{Parameters}
{\em \doxylink{structspki__table}{spki\+\_\+table}} & \doxylink{structspki__table}{spki\+\_\+table} to use \\
\hline
{\em \doxylink{structspki__record}{spki\+\_\+record}} & \doxylink{structspki__record}{spki\+\_\+record} to remove; \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
SPKI\+\_\+\+SUCCESS On success 

SPKI\+\_\+\+ERROR On error 

SPKI\+\_\+\+RECORD\+\_\+\+NOT\+\_\+\+FOUND On record not found 
\end{DoxyReturn}
\Hypertarget{group__mod__spki__h_ga6806d7f244971d8acbc2467835ecdb6a}\label{group__mod__spki__h_ga6806d7f244971d8acbc2467835ecdb6a} 
\index{Subject Public Key Info table@{Subject Public Key Info table}!spki\_table\_search\_by\_ski@{spki\_table\_search\_by\_ski}}
\index{spki\_table\_search\_by\_ski@{spki\_table\_search\_by\_ski}!Subject Public Key Info table@{Subject Public Key Info table}}
\doxysubsubsection{\texorpdfstring{spki\_table\_search\_by\_ski()}{spki\_table\_search\_by\_ski()}}
{\footnotesize\ttfamily int spki\+\_\+table\+\_\+search\+\_\+by\+\_\+ski (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{spki\+\_\+table,  }\item[{uint8\+\_\+t \texorpdfstring{$\ast$}{*}}]{ski,  }\item[{struct \mbox{\hyperlink{structspki__record}{spki\+\_\+record}} \texorpdfstring{$\ast$}{*}\texorpdfstring{$\ast$}{*}}]{result,  }\item[{unsigned int \texorpdfstring{$\ast$}{*}}]{result\+\_\+size }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{spkitable__private_8h}{rtrlib/spki/spkitable\+\_\+private.\+h}}$>$}



Returns all \doxylink{structspki__record}{spki\+\_\+record} whose SKI number matches the given one. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structspki__table}{spki\+\_\+table}} & \doxylink{structspki__table}{spki\+\_\+table} to use \\
\hline
\mbox{\texttt{ in}}  & {\em ski} & the 20 byte field which contains the SKI to search for \\
\hline
\mbox{\texttt{ out}}  & {\em result} & the result array. NULL if no records could be found \\
\hline
\mbox{\texttt{ out}}  & {\em result\+\_\+size} & elment count of the result array \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
SPKI\+\_\+\+SUCCESS On success 

SPKI\+\_\+\+ERROR On error 
\end{DoxyReturn}
\Hypertarget{group__mod__spki__h_ga888e64c91916e50636a55749d4ee28f6}\label{group__mod__spki__h_ga888e64c91916e50636a55749d4ee28f6} 
\index{Subject Public Key Info table@{Subject Public Key Info table}!spki\_table\_src\_remove@{spki\_table\_src\_remove}}
\index{spki\_table\_src\_remove@{spki\_table\_src\_remove}!Subject Public Key Info table@{Subject Public Key Info table}}
\doxysubsubsection{\texorpdfstring{spki\_table\_src\_remove()}{spki\_table\_src\_remove()}}
{\footnotesize\ttfamily int spki\+\_\+table\+\_\+src\+\_\+remove (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{spki\+\_\+table,  }\item[{const struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}}]{socket }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{spkitable__private_8h}{rtrlib/spki/spkitable\+\_\+private.\+h}}$>$}



Removes all entries in the \doxylink{structspki__table}{spki\+\_\+table} that match the passed socket\+\_\+id. 


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

SPKI\+\_\+\+ERROR On error. 
\end{DoxyReturn}
\Hypertarget{group__mod__spki__h_ga56699bbb215ec41c69d2212c71429fc9}\label{group__mod__spki__h_ga56699bbb215ec41c69d2212c71429fc9} 
\index{Subject Public Key Info table@{Subject Public Key Info table}!spki\_table\_swap@{spki\_table\_swap}}
\index{spki\_table\_swap@{spki\_table\_swap}!Subject Public Key Info table@{Subject Public Key Info table}}
\doxysubsubsection{\texorpdfstring{spki\_table\_swap()}{spki\_table\_swap()}}
{\footnotesize\ttfamily void spki\+\_\+table\+\_\+swap (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{a,  }\item[{struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{b }\end{DoxyParamCaption})}



{\ttfamily \#include $<$\mbox{\hyperlink{spkitable__private_8h}{rtrlib/spki/spkitable\+\_\+private.\+h}}$>$}



tommy\+\_\+hashlin and tommy\+\_\+list of the argument tables 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em a} & \\
\hline
\mbox{\texttt{ in}}  & {\em b} & \\
\hline
\end{DoxyParams}
