\doxysection{rtr.\+h}
\hypertarget{rtr_8h_source}{}\label{rtr_8h_source}\index{rtrlib/rtr/rtr.h@{rtrlib/rtr/rtr.h}}
\mbox{\hyperlink{rtr_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{00017\ \textcolor{preprocessor}{\#ifndef\ RTR\_H}}
\DoxyCodeLine{00018\ \textcolor{preprocessor}{\#define\ RTR\_H}}
\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ <pthread.h>}}
\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#include\ <stdbool.h>}}
\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#include\ <stdint.h>}}
\DoxyCodeLine{00022\ }
\DoxyCodeLine{00023\ \textcolor{keyword}{enum}\ \mbox{\hyperlink{group__mod__rtr__h_gaa67c38ea4f2832d0da2bb3ec40e691d8}{rtr\_rtvals}}\ \{\ \mbox{\hyperlink{group__mod__rtr__h_ggaa67c38ea4f2832d0da2bb3ec40e691d8a12b247f6dd6f92d7957f237d5d3e21bc}{RTR\_SUCCESS}}\ =\ 0,\ \mbox{\hyperlink{group__mod__rtr__h_ggaa67c38ea4f2832d0da2bb3ec40e691d8a5650aecaafb21d145060a2885e395eb1}{RTR\_ERROR}}\ =\ -\/1,\ \mbox{\hyperlink{group__mod__rtr__h_ggaa67c38ea4f2832d0da2bb3ec40e691d8abd30dc1e6e32b5b6f0014cf8c83946d6}{RTR\_INVALID\_PARAM}}\ =\ -\/2\ \};}
\DoxyCodeLine{00024\ }
\DoxyCodeLine{00028\ \textcolor{keyword}{enum}\ \mbox{\hyperlink{group__mod__rtr__h_ga31b1bb66cb95ac21f7108440e7506b38}{rtr\_interval\_mode}}\ \{}
\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__mod__rtr__h_gga31b1bb66cb95ac21f7108440e7506b38ab2d73bf198395e845d6ba207e264f6eb}{RTR\_INTERVAL\_MODE\_IGNORE\_ANY}},}
\DoxyCodeLine{00031\ }
\DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__mod__rtr__h_gga31b1bb66cb95ac21f7108440e7506b38abef109b4282a231bdbeec27117fa2ce3}{RTR\_INTERVAL\_MODE\_ACCEPT\_ANY}},}
\DoxyCodeLine{00034\ }
\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__mod__rtr__h_gga31b1bb66cb95ac21f7108440e7506b38a00460bd1c4f2db207a0b1ebefc354a50}{RTR\_INTERVAL\_MODE\_DEFAULT\_MIN\_MAX}},}
\DoxyCodeLine{00037\ }
\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__mod__rtr__h_gga31b1bb66cb95ac21f7108440e7506b38ab876811b811add0171f8fb637236f070}{RTR\_INTERVAL\_MODE\_IGNORE\_ON\_FAILURE}}}
\DoxyCodeLine{00040\ \};}
\DoxyCodeLine{00041\ }
\DoxyCodeLine{00045\ \textcolor{keyword}{enum}\ \mbox{\hyperlink{group__mod__rtr__h_ga62bcc901355906dd300e2b62c9278cbc}{rtr\_socket\_state}}\ \{}
\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__mod__rtr__h_gga62bcc901355906dd300e2b62c9278cbca5a8bbe8c0e848043d5707a9d70004c5a}{RTR\_CONNECTING}},}
\DoxyCodeLine{00048\ }
\DoxyCodeLine{00052\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__mod__rtr__h_gga62bcc901355906dd300e2b62c9278cbcad884689742a432e75a457e716e77b086}{RTR\_ESTABLISHED}},}
\DoxyCodeLine{00053\ }
\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__mod__rtr__h_gga62bcc901355906dd300e2b62c9278cbca036ce764a49435c826d21a5df1be8e7e}{RTR\_RESET}},}
\DoxyCodeLine{00056\ }
\DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__mod__rtr__h_gga62bcc901355906dd300e2b62c9278cbca3367cb5bc6343cfe13c6dd276235b2ea}{RTR\_SYNC}},}
\DoxyCodeLine{00059\ }
\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__mod__rtr__h_gga62bcc901355906dd300e2b62c9278cbca88fc4369bd2cd94d68545a0822afaf09}{RTR\_FAST\_RECONNECT}},}
\DoxyCodeLine{00062\ }
\DoxyCodeLine{00064\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__mod__rtr__h_gga62bcc901355906dd300e2b62c9278cbcaa5b13b46d42c0beefd37431b21424d1f}{RTR\_ERROR\_NO\_DATA\_AVAIL}},}
\DoxyCodeLine{00065\ }
\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__mod__rtr__h_gga62bcc901355906dd300e2b62c9278cbcad8dd32ab133cc01546ece546fcd0c7e4}{RTR\_ERROR\_NO\_INCR\_UPDATE\_AVAIL}},}
\DoxyCodeLine{00068\ }
\DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__mod__rtr__h_gga62bcc901355906dd300e2b62c9278cbca33bdf094610a6a16cbe2bad496115077}{RTR\_ERROR\_FATAL}},}
\DoxyCodeLine{00071\ }
\DoxyCodeLine{00073\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__mod__rtr__h_gga62bcc901355906dd300e2b62c9278cbcaaf42f891672acd81b0a01fa7455aafa3}{RTR\_ERROR\_TRANSPORT}},}
\DoxyCodeLine{00074\ }
\DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__mod__rtr__h_gga62bcc901355906dd300e2b62c9278cbcae4cecebbe31c18cc87a3179b7d638585}{RTR\_SHUTDOWN}},}
\DoxyCodeLine{00077\ }
\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__mod__rtr__h_gga62bcc901355906dd300e2b62c9278cbcac817bc30f7e29396ecae0a47fec69590}{RTR\_CLOSED}},}
\DoxyCodeLine{00080\ \};}
\DoxyCodeLine{00081\ }
\DoxyCodeLine{00082\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structrtr__socket}{rtr\_socket}};}
\DoxyCodeLine{00083\ }
\DoxyCodeLine{00087\ \textcolor{keyword}{typedef}\ void\ (*\mbox{\hyperlink{group__mod__rtr__h_ga71ec6263b63ee7fa9d1758b43a67dad8}{rtr\_connection\_state\_fp}})(\textcolor{keyword}{const}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structrtr__socket}{rtr\_socket}}\ *\mbox{\hyperlink{structrtr__socket}{rtr\_socket}},\ \textcolor{keyword}{const}\ \textcolor{keyword}{enum}\ \mbox{\hyperlink{group__mod__rtr__h_ga62bcc901355906dd300e2b62c9278cbc}{rtr\_socket\_state}}\ \mbox{\hyperlink{structrtr__socket_aae92959de164b904eaa9a38af92d12b8}{state}},}
\DoxyCodeLine{00088\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ *\mbox{\hyperlink{structrtr__socket_a37c2e770b4a63d7844bc455aa620b514}{connection\_state\_fp\_param\_config}},\ \textcolor{keywordtype}{void}\ *\mbox{\hyperlink{structrtr__socket_a5a3cd8a469d462aafea8e65debf4d1b9}{connection\_state\_fp\_param\_group}});}
\DoxyCodeLine{00089\ }
\DoxyCodeLine{00117\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structrtr__socket}{rtr\_socket}}\ \{}
\DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structtr__socket}{tr\_socket}}\ *\mbox{\hyperlink{structrtr__socket_a3fa0ec4fcbcb7d112f83a72d49daaff1}{tr\_socket}};}
\DoxyCodeLine{00119\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{structrtr__socket_a4682322c1db1147db9a87656831ae939}{refresh\_interval}};}
\DoxyCodeLine{00120\ \ \ \ \ \ \ \ \ time\_t\ \mbox{\hyperlink{structrtr__socket_ac524c934f0973530f1fec958a678ff54}{last\_update}};}
\DoxyCodeLine{00121\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{structrtr__socket_a1f080ad28c4637bd21c209931d57efba}{expire\_interval}};}
\DoxyCodeLine{00122\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{structrtr__socket_a29099c7ef2dfaeb6258fa53bb58c99f7}{retry\_interval}};}
\DoxyCodeLine{00123\ \ \ \ \ \ \ \ \ \textcolor{keyword}{enum}\ \mbox{\hyperlink{group__mod__rtr__h_ga31b1bb66cb95ac21f7108440e7506b38}{rtr\_interval\_mode}}\ \mbox{\hyperlink{structrtr__socket_ac7e3f5798868bc993ede909e589b26a1}{iv\_mode}};}
\DoxyCodeLine{00124\ \ \ \ \ \ \ \ \ \textcolor{keyword}{enum}\ \mbox{\hyperlink{group__mod__rtr__h_ga62bcc901355906dd300e2b62c9278cbc}{rtr\_socket\_state}}\ \mbox{\hyperlink{structrtr__socket_aae92959de164b904eaa9a38af92d12b8}{state}};}
\DoxyCodeLine{00125\ \ \ \ \ \ \ \ \ uint32\_t\ \mbox{\hyperlink{structrtr__socket_a04e0a6a8d3f1a78aded9e29490db1321}{session\_id}};}
\DoxyCodeLine{00126\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{structrtr__socket_aba2d0c4f1c394a6a0c946eca41e9d8f7}{request\_session\_id}};}
\DoxyCodeLine{00127\ \ \ \ \ \ \ \ \ uint32\_t\ \mbox{\hyperlink{structrtr__socket_a722e687714a2af098a4c1fdad1a90583}{serial\_number}};}
\DoxyCodeLine{00128\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structpfx__table}{pfx\_table}}\ *\mbox{\hyperlink{structrtr__socket_af59c25c4f04df2610b38c91933da0feb}{pfx\_table}};}
\DoxyCodeLine{00129\ \ \ \ \ \ \ \ \ pthread\_t\ \mbox{\hyperlink{structrtr__socket_af73cf58f27f0e1451378a9ae2c019db7}{thread\_id}};}
\DoxyCodeLine{00130\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__mod__rtr__h_ga71ec6263b63ee7fa9d1758b43a67dad8}{rtr\_connection\_state\_fp}}\ \mbox{\hyperlink{structrtr__socket_a20f89765b0a531cb1431274acbcff101}{connection\_state\_fp}};}
\DoxyCodeLine{00131\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ *\mbox{\hyperlink{structrtr__socket_a37c2e770b4a63d7844bc455aa620b514}{connection\_state\_fp\_param\_config}};}
\DoxyCodeLine{00132\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ *\mbox{\hyperlink{structrtr__socket_a5a3cd8a469d462aafea8e65debf4d1b9}{connection\_state\_fp\_param\_group}};}
\DoxyCodeLine{00133\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{structrtr__socket_a12bfdd21d02cc91922b8fc83f25fc6ac}{version}};}
\DoxyCodeLine{00134\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{structrtr__socket_adf61ad147b7bffc096d8de0b04326237}{has\_received\_pdus}};}
\DoxyCodeLine{00135\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structspki__table}{spki\_table}}\ *\mbox{\hyperlink{structrtr__socket_a4bc9898ede7d5ea003a4b32511de111e}{spki\_table}};}
\DoxyCodeLine{00136\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structaspa__table}{aspa\_table}}\ *\mbox{\hyperlink{structrtr__socket_a1216765f0f65a07d98ac0049332b3197}{aspa\_table}};}
\DoxyCodeLine{00137\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{structrtr__socket_a98205287e43550abf54d35b21545a15f}{is\_resetting}};}
\DoxyCodeLine{00138\ \};}
\DoxyCodeLine{00139\ }
\DoxyCodeLine{00146\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\mbox{\hyperlink{group__mod__rtr__h_ga65aa9655f85c354a8ad3d33c961d1a57}{rtr\_state\_to\_str}}(\textcolor{keyword}{enum}\ \mbox{\hyperlink{group__mod__rtr__h_ga62bcc901355906dd300e2b62c9278cbc}{rtr\_socket\_state}}\ state);}
\DoxyCodeLine{00147\ }
\DoxyCodeLine{00154\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{group__mod__rtr__h_ga77552d7d8f4d41774cb6b000b18bbf17}{rtr\_set\_interval\_mode}}(\textcolor{keyword}{struct}\ \mbox{\hyperlink{structrtr__socket}{rtr\_socket}}\ *\mbox{\hyperlink{structrtr__socket}{rtr\_socket}},\ \textcolor{keyword}{enum}\ \mbox{\hyperlink{group__mod__rtr__h_ga31b1bb66cb95ac21f7108440e7506b38}{rtr\_interval\_mode}}\ option);}
\DoxyCodeLine{00155\ }
\DoxyCodeLine{00161\ \textcolor{keyword}{enum}\ \mbox{\hyperlink{group__mod__rtr__h_ga31b1bb66cb95ac21f7108440e7506b38}{rtr\_interval\_mode}}\ \mbox{\hyperlink{group__mod__rtr__h_ga8b3673db716238adbb49b1537a316bfa}{rtr\_get\_interval\_mode}}(\textcolor{keyword}{struct}\ \mbox{\hyperlink{structrtr__socket}{rtr\_socket}}\ *\mbox{\hyperlink{structrtr__socket}{rtr\_socket}});}
\DoxyCodeLine{00162\ \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
