\doxysection{rtrlib/rtr/rtr\+\_\+private.h File Reference}
\hypertarget{rtr__private_8h}{}\label{rtr__private_8h}\index{rtrlib/rtr/rtr\_private.h@{rtrlib/rtr/rtr\_private.h}}
{\ttfamily \#include "{}rtrlib/rtr/rtr.\+h"{}}\newline
{\ttfamily \#include $<$pthread.\+h$>$}\newline
{\ttfamily \#include $<$stdbool.\+h$>$}\newline
{\ttfamily \#include $<$stdint.\+h$>$}\newline
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{rtr__private_8h_a82cab9d2b70bd23b380f3480055b34b2}{RTR\+\_\+\+DBG}}(fmt, ...)~\mbox{\hyperlink{log__private_8h_abb57f299264865eb02379019cfe4df0c}{lrtr\+\_\+dbg}}("{}RTR Socket\+: "{} fmt, \#\#\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+)
\item 
\#define \mbox{\hyperlink{rtr__private_8h_a33c951c3b36cd21bf8467c16dac38b06}{RTR\+\_\+\+DBG1}}(a)~\mbox{\hyperlink{log__private_8h_abb57f299264865eb02379019cfe4df0c}{lrtr\+\_\+dbg}}("{}RTR Socket\+: "{} a)
\end{DoxyCompactItemize}
\doxysubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{rtr__private_8h_ae1d75b575dbc8bfa66c7ef80576a131a}{rtr\+\_\+interval\+\_\+range}} \{ \mbox{\hyperlink{rtr__private_8h_ae1d75b575dbc8bfa66c7ef80576a131aafbf98c8d3be5a66249695790f3f7e722}{RTR\+\_\+\+BELOW\+\_\+\+INTERVAL\+\_\+\+RANGE}} = -\/1
, \mbox{\hyperlink{rtr__private_8h_ae1d75b575dbc8bfa66c7ef80576a131aaec9a3d1f3fe678b5a7e2dbcf051914cf}{RTR\+\_\+\+INSIDE\+\_\+\+INTERVAL\+\_\+\+RANGE}} = 0
, \mbox{\hyperlink{rtr__private_8h_ae1d75b575dbc8bfa66c7ef80576a131aa6c5ac3470349cd494e81f4337fa20818}{RTR\+\_\+\+ABOVE\+\_\+\+INTERVAL\+\_\+\+RANGE}} = 1
 \}
\item 
enum \mbox{\hyperlink{rtr__private_8h_a9d8fb3ecb1800546e470bf348b90b9ad}{rtr\+\_\+interval\+\_\+type}} \{ \mbox{\hyperlink{rtr__private_8h_a9d8fb3ecb1800546e470bf348b90b9ada3bbc7ebb2f1615371bce9f270ed6320e}{RTR\+\_\+\+INTERVAL\+\_\+\+TYPE\+\_\+\+EXPIRATION}}
, \mbox{\hyperlink{rtr__private_8h_a9d8fb3ecb1800546e470bf348b90b9ada016787e9e2bae86ac9420535bdf8855b}{RTR\+\_\+\+INTERVAL\+\_\+\+TYPE\+\_\+\+REFRESH}}
, \mbox{\hyperlink{rtr__private_8h_a9d8fb3ecb1800546e470bf348b90b9adaa74da0be5872cbaca0bc1053f3235789}{RTR\+\_\+\+INTERVAL\+\_\+\+TYPE\+\_\+\+RETRY}}
 \}
\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \mbox{\hyperlink{rtr__private_8h_a641b8f130228ca6453e2deeb665eea66}{rtr\+\_\+init}} (struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}}, struct \mbox{\hyperlink{structtr__socket}{tr\+\_\+socket}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structtr__socket}{tr\+\_\+socket}}, struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}}, struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structspki__table}{spki\+\_\+table}}, struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}}, const unsigned int refresh\+\_\+interval, const unsigned int expire\+\_\+interval, const unsigned int retry\+\_\+interval, enum \mbox{\hyperlink{group__mod__rtr__h_ga31b1bb66cb95ac21f7108440e7506b38}{rtr\+\_\+interval\+\_\+mode}} iv\+\_\+mode, \mbox{\hyperlink{group__mod__rtr__h_ga71ec6263b63ee7fa9d1758b43a67dad8}{rtr\+\_\+connection\+\_\+state\+\_\+fp}} fp, void \texorpdfstring{$\ast$}{*}fp\+\_\+data\+\_\+config, void \texorpdfstring{$\ast$}{*}fp\+\_\+data\+\_\+group)
\begin{DoxyCompactList}\small\item\em Initializes a \doxylink{structrtr__socket}{rtr\+\_\+socket}. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{rtr__private_8h_a1652e6992c66e2a12e308d0014037ed0}{rtr\+\_\+start}} (struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}})
\begin{DoxyCompactList}\small\item\em Starts the RTR protocol state machine in a pthread. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{rtr__private_8h_abb793e94184f164171b683fcc43337f5}{rtr\+\_\+stop}} (struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}})
\begin{DoxyCompactList}\small\item\em Stops the RTR connection and terminate the transport connection. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
static const uint32\+\_\+t \mbox{\hyperlink{rtr__private_8h_a778c7b8c4396b437a12951074bc7eac2}{RTR\+\_\+\+EXPIRATION\+\_\+\+MIN}} = 600
\item 
static const uint32\+\_\+t \mbox{\hyperlink{rtr__private_8h_a7f5453d26314046ae5a1e32c49d4ffdb}{RTR\+\_\+\+EXPIRATION\+\_\+\+MAX}} = 172800
\item 
static const uint32\+\_\+t \mbox{\hyperlink{rtr__private_8h_a28efb09585b2e5b4b26a821dd9294d13}{RTR\+\_\+\+EXPIRATION\+\_\+\+DEFAULT}} = 7200
\item 
static const uint32\+\_\+t \mbox{\hyperlink{rtr__private_8h_a71c5bcffa379ef6d51acea92ae5dff64}{RTR\+\_\+\+REFRESH\+\_\+\+MIN}} = 1
\item 
static const uint32\+\_\+t \mbox{\hyperlink{rtr__private_8h_a5346e705ddb0da80b37672adce66584b}{RTR\+\_\+\+REFRESH\+\_\+\+MAX}} = 86400
\item 
static const uint32\+\_\+t \mbox{\hyperlink{rtr__private_8h_a13d891470add9a31d86b0348ad26a121}{RTR\+\_\+\+REFRESH\+\_\+\+DEFAULT}} = 3600
\item 
static const uint32\+\_\+t \mbox{\hyperlink{rtr__private_8h_a5ce85959255a85dde9ca795ac1df074b}{RTR\+\_\+\+RETRY\+\_\+\+MIN}} = 1
\item 
static const uint32\+\_\+t \mbox{\hyperlink{rtr__private_8h_ac738445cdc25b60281e80e335a99e565}{RTR\+\_\+\+RETRY\+\_\+\+MAX}} = 7200
\item 
static const uint32\+\_\+t \mbox{\hyperlink{rtr__private_8h_af8836c1d92b112f4aa6ee97d53fb47d7}{RTR\+\_\+\+RETRY\+\_\+\+DEFAULT}} = 600
\item 
static const uint8\+\_\+t \mbox{\hyperlink{rtr__private_8h_a5d5cdd9fb3edc2e51d082110445497c4}{RTR\+\_\+\+PROTOCOL\+\_\+\+VERSION\+\_\+0}} = 0
\item 
static const uint8\+\_\+t \mbox{\hyperlink{rtr__private_8h_a772ccba015a48a4c07c3f36f9c236490}{RTR\+\_\+\+PROTOCOL\+\_\+\+VERSION\+\_\+1}} = 1
\item 
static const uint8\+\_\+t \mbox{\hyperlink{rtr__private_8h_a5133ce1dcf4bab19b33c32a3bc737bff}{RTR\+\_\+\+PROTOCOL\+\_\+\+VERSION\+\_\+2}} = 2
\item 
static const uint8\+\_\+t \mbox{\hyperlink{rtr__private_8h_aec31e11fb565c2b1ef56d54bc38fd869}{RTR\+\_\+\+PROTOCOL\+\_\+\+MIN\+\_\+\+SUPPORTED\+\_\+\+VERSION}}
\item 
static const uint8\+\_\+t \mbox{\hyperlink{rtr__private_8h_a6c0a71c5ba3c12a90bdf12450d06bcd7}{RTR\+\_\+\+PROTOCOL\+\_\+\+MAX\+\_\+\+SUPPORTED\+\_\+\+VERSION}} = 2
\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\Hypertarget{rtr__private_8h_a82cab9d2b70bd23b380f3480055b34b2}\label{rtr__private_8h_a82cab9d2b70bd23b380f3480055b34b2} 
\index{rtr\_private.h@{rtr\_private.h}!RTR\_DBG@{RTR\_DBG}}
\index{RTR\_DBG@{RTR\_DBG}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{RTR\_DBG}{RTR\_DBG}}
{\footnotesize\ttfamily \#define RTR\+\_\+\+DBG(\begin{DoxyParamCaption}\item[{}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})~\mbox{\hyperlink{log__private_8h_abb57f299264865eb02379019cfe4df0c}{lrtr\+\_\+dbg}}("{}RTR Socket\+: "{} fmt, \#\#\+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+)}

\Hypertarget{rtr__private_8h_a33c951c3b36cd21bf8467c16dac38b06}\label{rtr__private_8h_a33c951c3b36cd21bf8467c16dac38b06} 
\index{rtr\_private.h@{rtr\_private.h}!RTR\_DBG1@{RTR\_DBG1}}
\index{RTR\_DBG1@{RTR\_DBG1}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{RTR\_DBG1}{RTR\_DBG1}}
{\footnotesize\ttfamily \#define RTR\+\_\+\+DBG1(\begin{DoxyParamCaption}\item[{}]{a }\end{DoxyParamCaption})~\mbox{\hyperlink{log__private_8h_abb57f299264865eb02379019cfe4df0c}{lrtr\+\_\+dbg}}("{}RTR Socket\+: "{} a)}



\doxysubsection{Enumeration Type Documentation}
\Hypertarget{rtr__private_8h_ae1d75b575dbc8bfa66c7ef80576a131a}\label{rtr__private_8h_ae1d75b575dbc8bfa66c7ef80576a131a} 
\index{rtr\_private.h@{rtr\_private.h}!rtr\_interval\_range@{rtr\_interval\_range}}
\index{rtr\_interval\_range@{rtr\_interval\_range}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{rtr\_interval\_range}{rtr\_interval\_range}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{rtr__private_8h_ae1d75b575dbc8bfa66c7ef80576a131a}{rtr\+\_\+interval\+\_\+range}}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{RTR\_BELOW\_INTERVAL\_RANGE@{RTR\_BELOW\_INTERVAL\_RANGE}!rtr\_private.h@{rtr\_private.h}}\index{rtr\_private.h@{rtr\_private.h}!RTR\_BELOW\_INTERVAL\_RANGE@{RTR\_BELOW\_INTERVAL\_RANGE}}}\Hypertarget{rtr__private_8h_ae1d75b575dbc8bfa66c7ef80576a131aafbf98c8d3be5a66249695790f3f7e722}\label{rtr__private_8h_ae1d75b575dbc8bfa66c7ef80576a131aafbf98c8d3be5a66249695790f3f7e722} 
RTR\+\_\+\+BELOW\+\_\+\+INTERVAL\+\_\+\+RANGE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{RTR\_INSIDE\_INTERVAL\_RANGE@{RTR\_INSIDE\_INTERVAL\_RANGE}!rtr\_private.h@{rtr\_private.h}}\index{rtr\_private.h@{rtr\_private.h}!RTR\_INSIDE\_INTERVAL\_RANGE@{RTR\_INSIDE\_INTERVAL\_RANGE}}}\Hypertarget{rtr__private_8h_ae1d75b575dbc8bfa66c7ef80576a131aaec9a3d1f3fe678b5a7e2dbcf051914cf}\label{rtr__private_8h_ae1d75b575dbc8bfa66c7ef80576a131aaec9a3d1f3fe678b5a7e2dbcf051914cf} 
RTR\+\_\+\+INSIDE\+\_\+\+INTERVAL\+\_\+\+RANGE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{RTR\_ABOVE\_INTERVAL\_RANGE@{RTR\_ABOVE\_INTERVAL\_RANGE}!rtr\_private.h@{rtr\_private.h}}\index{rtr\_private.h@{rtr\_private.h}!RTR\_ABOVE\_INTERVAL\_RANGE@{RTR\_ABOVE\_INTERVAL\_RANGE}}}\Hypertarget{rtr__private_8h_ae1d75b575dbc8bfa66c7ef80576a131aa6c5ac3470349cd494e81f4337fa20818}\label{rtr__private_8h_ae1d75b575dbc8bfa66c7ef80576a131aa6c5ac3470349cd494e81f4337fa20818} 
RTR\+\_\+\+ABOVE\+\_\+\+INTERVAL\+\_\+\+RANGE&\\
\hline

\end{DoxyEnumFields}
\Hypertarget{rtr__private_8h_a9d8fb3ecb1800546e470bf348b90b9ad}\label{rtr__private_8h_a9d8fb3ecb1800546e470bf348b90b9ad} 
\index{rtr\_private.h@{rtr\_private.h}!rtr\_interval\_type@{rtr\_interval\_type}}
\index{rtr\_interval\_type@{rtr\_interval\_type}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{rtr\_interval\_type}{rtr\_interval\_type}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{rtr__private_8h_a9d8fb3ecb1800546e470bf348b90b9ad}{rtr\+\_\+interval\+\_\+type}}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{RTR\_INTERVAL\_TYPE\_EXPIRATION@{RTR\_INTERVAL\_TYPE\_EXPIRATION}!rtr\_private.h@{rtr\_private.h}}\index{rtr\_private.h@{rtr\_private.h}!RTR\_INTERVAL\_TYPE\_EXPIRATION@{RTR\_INTERVAL\_TYPE\_EXPIRATION}}}\Hypertarget{rtr__private_8h_a9d8fb3ecb1800546e470bf348b90b9ada3bbc7ebb2f1615371bce9f270ed6320e}\label{rtr__private_8h_a9d8fb3ecb1800546e470bf348b90b9ada3bbc7ebb2f1615371bce9f270ed6320e} 
RTR\+\_\+\+INTERVAL\+\_\+\+TYPE\+\_\+\+EXPIRATION&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{RTR\_INTERVAL\_TYPE\_REFRESH@{RTR\_INTERVAL\_TYPE\_REFRESH}!rtr\_private.h@{rtr\_private.h}}\index{rtr\_private.h@{rtr\_private.h}!RTR\_INTERVAL\_TYPE\_REFRESH@{RTR\_INTERVAL\_TYPE\_REFRESH}}}\Hypertarget{rtr__private_8h_a9d8fb3ecb1800546e470bf348b90b9ada016787e9e2bae86ac9420535bdf8855b}\label{rtr__private_8h_a9d8fb3ecb1800546e470bf348b90b9ada016787e9e2bae86ac9420535bdf8855b} 
RTR\+\_\+\+INTERVAL\+\_\+\+TYPE\+\_\+\+REFRESH&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{RTR\_INTERVAL\_TYPE\_RETRY@{RTR\_INTERVAL\_TYPE\_RETRY}!rtr\_private.h@{rtr\_private.h}}\index{rtr\_private.h@{rtr\_private.h}!RTR\_INTERVAL\_TYPE\_RETRY@{RTR\_INTERVAL\_TYPE\_RETRY}}}\Hypertarget{rtr__private_8h_a9d8fb3ecb1800546e470bf348b90b9adaa74da0be5872cbaca0bc1053f3235789}\label{rtr__private_8h_a9d8fb3ecb1800546e470bf348b90b9adaa74da0be5872cbaca0bc1053f3235789} 
RTR\+\_\+\+INTERVAL\+\_\+\+TYPE\+\_\+\+RETRY&\\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\Hypertarget{rtr__private_8h_a641b8f130228ca6453e2deeb665eea66}\label{rtr__private_8h_a641b8f130228ca6453e2deeb665eea66} 
\index{rtr\_private.h@{rtr\_private.h}!rtr\_init@{rtr\_init}}
\index{rtr\_init@{rtr\_init}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{rtr\_init()}{rtr\_init()}}
{\footnotesize\ttfamily int rtr\+\_\+init (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}}]{rtr\+\_\+socket,  }\item[{struct \mbox{\hyperlink{structtr__socket}{tr\+\_\+socket}} \texorpdfstring{$\ast$}{*}}]{tr\+\_\+socket,  }\item[{struct \mbox{\hyperlink{structpfx__table}{pfx\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{pfx\+\_\+table,  }\item[{struct \mbox{\hyperlink{structspki__table}{spki\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{spki\+\_\+table,  }\item[{struct \mbox{\hyperlink{structaspa__table}{aspa\+\_\+table}} \texorpdfstring{$\ast$}{*}}]{aspa\+\_\+table,  }\item[{const unsigned int}]{refresh\+\_\+interval,  }\item[{const unsigned int}]{expire\+\_\+interval,  }\item[{const unsigned int}]{retry\+\_\+interval,  }\item[{enum \mbox{\hyperlink{group__mod__rtr__h_ga31b1bb66cb95ac21f7108440e7506b38}{rtr\+\_\+interval\+\_\+mode}}}]{iv\+\_\+mode,  }\item[{\mbox{\hyperlink{group__mod__rtr__h_ga71ec6263b63ee7fa9d1758b43a67dad8}{rtr\+\_\+connection\+\_\+state\+\_\+fp}}}]{fp,  }\item[{void \texorpdfstring{$\ast$}{*}}]{fp\+\_\+data\+\_\+config,  }\item[{void \texorpdfstring{$\ast$}{*}}]{fp\+\_\+data\+\_\+group }\end{DoxyParamCaption})}



Initializes a \doxylink{structrtr__socket}{rtr\+\_\+socket}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em \doxylink{structrtr__socket}{rtr\+\_\+socket}} & Pointer to the allocated \doxylink{structrtr__socket}{rtr\+\_\+socket} that will be initialized. \\
\hline
\mbox{\texttt{ in}}  & {\em \doxylink{structtr__socket}{tr\+\_\+socket}} & Pointer to a \doxylink{structtr__socket}{tr\+\_\+socket} that will be used for the transport connection. If NULL the \doxylink{structtr__socket}{tr\+\_\+socket} element of the \doxylink{structrtr__socket}{rtr\+\_\+socket} won\textquotesingle{}t be changed. \\
\hline
\mbox{\texttt{ in}}  & {\em \doxylink{structpfx__table}{pfx\+\_\+table}} & \doxylink{structpfx__table}{pfx\+\_\+table} that stores the validation records obtained from the connected rtr server. \\
\hline
\mbox{\texttt{ in}}  & {\em \doxylink{structspki__table}{spki\+\_\+table}} & \doxylink{structspki__table}{spki\+\_\+table} that stores the router keys obtained from the connected rtr server. \\
\hline
\mbox{\texttt{ in}}  & {\em refresh\+\_\+interval} & Interval in seconds between serial queries that are sent to the server. Must be \texorpdfstring{$>$}{>}= 1 and \texorpdfstring{$<$}{<}= 86400 (one day), recommended default is 3600s (one hour). \\
\hline
\mbox{\texttt{ in}}  & {\em expire\+\_\+interval} & Stored validation records will be deleted if cache was unable to refresh data for this period. The value should be twice the refresh\+\_\+interval. The value must be \texorpdfstring{$>$}{>}= 600 (ten minutes) and \texorpdfstring{$<$}{<}= 172800 (two days). The recommended default is 7200s (two hours). \\
\hline
\mbox{\texttt{ in}}  & {\em retry\+\_\+interval} & This parameter tells the router how long to wait (in seconds) before retrying a failed Serial Query or Reset Query. The value must be \texorpdfstring{$>$}{>}= 1s and \texorpdfstring{$<$}{<}= 7200s (two hours). The recommended default is 600 seconds (ten minutes). \\
\hline
\mbox{\texttt{ in}}  & {\em iv\+\_\+mode} & The interval mode that controls how new interval values are applied. \\
\hline
\mbox{\texttt{ in}}  & {\em fp} & A callback function that is executed when the state of the socket changes. \\
\hline
\mbox{\texttt{ in}}  & {\em fp\+\_\+data\+\_\+config} & Parameter that is passed to the connection\+\_\+state\+\_\+fp callback. Expects \doxylink{structrtr__mgr__config}{rtr\+\_\+mgr\+\_\+config}. \\
\hline
\mbox{\texttt{ in}}  & {\em fp\+\_\+data\+\_\+group} & Parameter that is passed to the connection\+\_\+state\+\_\+fp callback. Expects \doxylink{structrtr__mgr__group}{rtr\+\_\+mgr\+\_\+group}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RTR\+\_\+\+INVALID\+\_\+\+PARAM If the refresh\+\_\+interval or the expire\+\_\+interval is not valid. 

RTR\+\_\+\+SUCCESS On success. 
\end{DoxyReturn}
\Hypertarget{rtr__private_8h_a1652e6992c66e2a12e308d0014037ed0}\label{rtr__private_8h_a1652e6992c66e2a12e308d0014037ed0} 
\index{rtr\_private.h@{rtr\_private.h}!rtr\_start@{rtr\_start}}
\index{rtr\_start@{rtr\_start}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{rtr\_start()}{rtr\_start()}}
{\footnotesize\ttfamily int rtr\+\_\+start (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}}]{rtr\+\_\+socket }\end{DoxyParamCaption})}



Starts the RTR protocol state machine in a pthread. 

Connection to the rtr\+\_\+server will be established and the pfx\+\_\+records will be synced. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structrtr__socket}{rtr\+\_\+socket}} & \doxylink{structrtr__socket}{rtr\+\_\+socket} that will be used. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RTR\+\_\+\+ERROR On error. 

RTR\+\_\+\+SUCCESS On success. 
\end{DoxyReturn}
\Hypertarget{rtr__private_8h_abb793e94184f164171b683fcc43337f5}\label{rtr__private_8h_abb793e94184f164171b683fcc43337f5} 
\index{rtr\_private.h@{rtr\_private.h}!rtr\_stop@{rtr\_stop}}
\index{rtr\_stop@{rtr\_stop}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{rtr\_stop()}{rtr\_stop()}}
{\footnotesize\ttfamily void rtr\+\_\+stop (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{structrtr__socket}{rtr\+\_\+socket}} \texorpdfstring{$\ast$}{*}}]{rtr\+\_\+socket }\end{DoxyParamCaption})}



Stops the RTR connection and terminate the transport connection. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em \doxylink{structrtr__socket}{rtr\+\_\+socket}} & \doxylink{structrtr__socket}{rtr\+\_\+socket} that will be used. \\
\hline
\end{DoxyParams}


\doxysubsection{Variable Documentation}
\Hypertarget{rtr__private_8h_a28efb09585b2e5b4b26a821dd9294d13}\label{rtr__private_8h_a28efb09585b2e5b4b26a821dd9294d13} 
\index{rtr\_private.h@{rtr\_private.h}!RTR\_EXPIRATION\_DEFAULT@{RTR\_EXPIRATION\_DEFAULT}}
\index{RTR\_EXPIRATION\_DEFAULT@{RTR\_EXPIRATION\_DEFAULT}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{RTR\_EXPIRATION\_DEFAULT}{RTR\_EXPIRATION\_DEFAULT}}
{\footnotesize\ttfamily const uint32\+\_\+t RTR\+\_\+\+EXPIRATION\+\_\+\+DEFAULT = 7200\hspace{0.3cm}{\ttfamily [static]}}

\Hypertarget{rtr__private_8h_a7f5453d26314046ae5a1e32c49d4ffdb}\label{rtr__private_8h_a7f5453d26314046ae5a1e32c49d4ffdb} 
\index{rtr\_private.h@{rtr\_private.h}!RTR\_EXPIRATION\_MAX@{RTR\_EXPIRATION\_MAX}}
\index{RTR\_EXPIRATION\_MAX@{RTR\_EXPIRATION\_MAX}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{RTR\_EXPIRATION\_MAX}{RTR\_EXPIRATION\_MAX}}
{\footnotesize\ttfamily const uint32\+\_\+t RTR\+\_\+\+EXPIRATION\+\_\+\+MAX = 172800\hspace{0.3cm}{\ttfamily [static]}}

\Hypertarget{rtr__private_8h_a778c7b8c4396b437a12951074bc7eac2}\label{rtr__private_8h_a778c7b8c4396b437a12951074bc7eac2} 
\index{rtr\_private.h@{rtr\_private.h}!RTR\_EXPIRATION\_MIN@{RTR\_EXPIRATION\_MIN}}
\index{RTR\_EXPIRATION\_MIN@{RTR\_EXPIRATION\_MIN}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{RTR\_EXPIRATION\_MIN}{RTR\_EXPIRATION\_MIN}}
{\footnotesize\ttfamily const uint32\+\_\+t RTR\+\_\+\+EXPIRATION\+\_\+\+MIN = 600\hspace{0.3cm}{\ttfamily [static]}}

\Hypertarget{rtr__private_8h_a6c0a71c5ba3c12a90bdf12450d06bcd7}\label{rtr__private_8h_a6c0a71c5ba3c12a90bdf12450d06bcd7} 
\index{rtr\_private.h@{rtr\_private.h}!RTR\_PROTOCOL\_MAX\_SUPPORTED\_VERSION@{RTR\_PROTOCOL\_MAX\_SUPPORTED\_VERSION}}
\index{RTR\_PROTOCOL\_MAX\_SUPPORTED\_VERSION@{RTR\_PROTOCOL\_MAX\_SUPPORTED\_VERSION}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{RTR\_PROTOCOL\_MAX\_SUPPORTED\_VERSION}{RTR\_PROTOCOL\_MAX\_SUPPORTED\_VERSION}}
{\footnotesize\ttfamily const uint8\+\_\+t RTR\+\_\+\+PROTOCOL\+\_\+\+MAX\+\_\+\+SUPPORTED\+\_\+\+VERSION = 2\hspace{0.3cm}{\ttfamily [static]}}

\Hypertarget{rtr__private_8h_aec31e11fb565c2b1ef56d54bc38fd869}\label{rtr__private_8h_aec31e11fb565c2b1ef56d54bc38fd869} 
\index{rtr\_private.h@{rtr\_private.h}!RTR\_PROTOCOL\_MIN\_SUPPORTED\_VERSION@{RTR\_PROTOCOL\_MIN\_SUPPORTED\_VERSION}}
\index{RTR\_PROTOCOL\_MIN\_SUPPORTED\_VERSION@{RTR\_PROTOCOL\_MIN\_SUPPORTED\_VERSION}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{RTR\_PROTOCOL\_MIN\_SUPPORTED\_VERSION}{RTR\_PROTOCOL\_MIN\_SUPPORTED\_VERSION}}
{\footnotesize\ttfamily const uint8\+\_\+t RTR\+\_\+\+PROTOCOL\+\_\+\+MIN\+\_\+\+SUPPORTED\+\_\+\+VERSION\hspace{0.3cm}{\ttfamily [static]}}

\Hypertarget{rtr__private_8h_a5d5cdd9fb3edc2e51d082110445497c4}\label{rtr__private_8h_a5d5cdd9fb3edc2e51d082110445497c4} 
\index{rtr\_private.h@{rtr\_private.h}!RTR\_PROTOCOL\_VERSION\_0@{RTR\_PROTOCOL\_VERSION\_0}}
\index{RTR\_PROTOCOL\_VERSION\_0@{RTR\_PROTOCOL\_VERSION\_0}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{RTR\_PROTOCOL\_VERSION\_0}{RTR\_PROTOCOL\_VERSION\_0}}
{\footnotesize\ttfamily const uint8\+\_\+t RTR\+\_\+\+PROTOCOL\+\_\+\+VERSION\+\_\+0 = 0\hspace{0.3cm}{\ttfamily [static]}}

\Hypertarget{rtr__private_8h_a772ccba015a48a4c07c3f36f9c236490}\label{rtr__private_8h_a772ccba015a48a4c07c3f36f9c236490} 
\index{rtr\_private.h@{rtr\_private.h}!RTR\_PROTOCOL\_VERSION\_1@{RTR\_PROTOCOL\_VERSION\_1}}
\index{RTR\_PROTOCOL\_VERSION\_1@{RTR\_PROTOCOL\_VERSION\_1}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{RTR\_PROTOCOL\_VERSION\_1}{RTR\_PROTOCOL\_VERSION\_1}}
{\footnotesize\ttfamily const uint8\+\_\+t RTR\+\_\+\+PROTOCOL\+\_\+\+VERSION\+\_\+1 = 1\hspace{0.3cm}{\ttfamily [static]}}

\Hypertarget{rtr__private_8h_a5133ce1dcf4bab19b33c32a3bc737bff}\label{rtr__private_8h_a5133ce1dcf4bab19b33c32a3bc737bff} 
\index{rtr\_private.h@{rtr\_private.h}!RTR\_PROTOCOL\_VERSION\_2@{RTR\_PROTOCOL\_VERSION\_2}}
\index{RTR\_PROTOCOL\_VERSION\_2@{RTR\_PROTOCOL\_VERSION\_2}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{RTR\_PROTOCOL\_VERSION\_2}{RTR\_PROTOCOL\_VERSION\_2}}
{\footnotesize\ttfamily const uint8\+\_\+t RTR\+\_\+\+PROTOCOL\+\_\+\+VERSION\+\_\+2 = 2\hspace{0.3cm}{\ttfamily [static]}}

\Hypertarget{rtr__private_8h_a13d891470add9a31d86b0348ad26a121}\label{rtr__private_8h_a13d891470add9a31d86b0348ad26a121} 
\index{rtr\_private.h@{rtr\_private.h}!RTR\_REFRESH\_DEFAULT@{RTR\_REFRESH\_DEFAULT}}
\index{RTR\_REFRESH\_DEFAULT@{RTR\_REFRESH\_DEFAULT}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{RTR\_REFRESH\_DEFAULT}{RTR\_REFRESH\_DEFAULT}}
{\footnotesize\ttfamily const uint32\+\_\+t RTR\+\_\+\+REFRESH\+\_\+\+DEFAULT = 3600\hspace{0.3cm}{\ttfamily [static]}}

\Hypertarget{rtr__private_8h_a5346e705ddb0da80b37672adce66584b}\label{rtr__private_8h_a5346e705ddb0da80b37672adce66584b} 
\index{rtr\_private.h@{rtr\_private.h}!RTR\_REFRESH\_MAX@{RTR\_REFRESH\_MAX}}
\index{RTR\_REFRESH\_MAX@{RTR\_REFRESH\_MAX}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{RTR\_REFRESH\_MAX}{RTR\_REFRESH\_MAX}}
{\footnotesize\ttfamily const uint32\+\_\+t RTR\+\_\+\+REFRESH\+\_\+\+MAX = 86400\hspace{0.3cm}{\ttfamily [static]}}

\Hypertarget{rtr__private_8h_a71c5bcffa379ef6d51acea92ae5dff64}\label{rtr__private_8h_a71c5bcffa379ef6d51acea92ae5dff64} 
\index{rtr\_private.h@{rtr\_private.h}!RTR\_REFRESH\_MIN@{RTR\_REFRESH\_MIN}}
\index{RTR\_REFRESH\_MIN@{RTR\_REFRESH\_MIN}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{RTR\_REFRESH\_MIN}{RTR\_REFRESH\_MIN}}
{\footnotesize\ttfamily const uint32\+\_\+t RTR\+\_\+\+REFRESH\+\_\+\+MIN = 1\hspace{0.3cm}{\ttfamily [static]}}

\Hypertarget{rtr__private_8h_af8836c1d92b112f4aa6ee97d53fb47d7}\label{rtr__private_8h_af8836c1d92b112f4aa6ee97d53fb47d7} 
\index{rtr\_private.h@{rtr\_private.h}!RTR\_RETRY\_DEFAULT@{RTR\_RETRY\_DEFAULT}}
\index{RTR\_RETRY\_DEFAULT@{RTR\_RETRY\_DEFAULT}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{RTR\_RETRY\_DEFAULT}{RTR\_RETRY\_DEFAULT}}
{\footnotesize\ttfamily const uint32\+\_\+t RTR\+\_\+\+RETRY\+\_\+\+DEFAULT = 600\hspace{0.3cm}{\ttfamily [static]}}

\Hypertarget{rtr__private_8h_ac738445cdc25b60281e80e335a99e565}\label{rtr__private_8h_ac738445cdc25b60281e80e335a99e565} 
\index{rtr\_private.h@{rtr\_private.h}!RTR\_RETRY\_MAX@{RTR\_RETRY\_MAX}}
\index{RTR\_RETRY\_MAX@{RTR\_RETRY\_MAX}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{RTR\_RETRY\_MAX}{RTR\_RETRY\_MAX}}
{\footnotesize\ttfamily const uint32\+\_\+t RTR\+\_\+\+RETRY\+\_\+\+MAX = 7200\hspace{0.3cm}{\ttfamily [static]}}

\Hypertarget{rtr__private_8h_a5ce85959255a85dde9ca795ac1df074b}\label{rtr__private_8h_a5ce85959255a85dde9ca795ac1df074b} 
\index{rtr\_private.h@{rtr\_private.h}!RTR\_RETRY\_MIN@{RTR\_RETRY\_MIN}}
\index{RTR\_RETRY\_MIN@{RTR\_RETRY\_MIN}!rtr\_private.h@{rtr\_private.h}}
\doxysubsubsection{\texorpdfstring{RTR\_RETRY\_MIN}{RTR\_RETRY\_MIN}}
{\footnotesize\ttfamily const uint32\+\_\+t RTR\+\_\+\+RETRY\+\_\+\+MIN = 1\hspace{0.3cm}{\ttfamily [static]}}

