\doxysection{tcap\+\_\+transaction\+\_\+tracking.\+h}
\label{tcap__transaction__tracking_8h_source}\index{src/tcap\_transaction\_tracking.h@{src/tcap\_transaction\_tracking.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}}
\DoxyCodeLine{00002\ }
\DoxyCodeLine{00003\ \textcolor{comment}{/*\ TCAP\ transaction\ tracking\ */}}
\DoxyCodeLine{00004\ }
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <stdint.h>}}
\DoxyCodeLine{00006\ }
\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ <osmocom/core/hashtable.h>}}
\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ <osmocom/core/msgb.h>}}
\DoxyCodeLine{00009\ }
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <osmocom/sigtran/sccp\_sap.h>}}
\DoxyCodeLine{00011\ }
\DoxyCodeLine{00012\ \textcolor{keyword}{struct\ }osmo\_ss7\_as;}
\DoxyCodeLine{00013\ \textcolor{keyword}{struct\ }osmo\_ss7\_asp;}
\DoxyCodeLine{00014\ }
\DoxyCodeLine{00015\ \textcolor{keyword}{struct\ }tcap\_trxn\_track\_tid\_entry\ \{}
\DoxyCodeLine{00016\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }hlist\_node\ list;}
\DoxyCodeLine{00017\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ tid\_valid;}
\DoxyCodeLine{00018\ \ \ \ \ \ \ \ \ uint32\_t\ tid;}
\DoxyCodeLine{00019\ \};}
\DoxyCodeLine{00020\ }
\DoxyCodeLine{00021\ \textcolor{keyword}{struct\ }tcap\_trxn\_track\_entry\ \{}
\DoxyCodeLine{00022\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }tcap\_trxn\_track\_tid\_entry\ peer\_tid;\ \textcolor{comment}{/*\ of\ the\ peer.\ If\ peer\ initiate\ transaction,\ this\ is\ otid\ */}}
\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }tcap\_trxn\_track\_tid\_entry\ own\_tid;\ \textcolor{comment}{/*\ assigned\ by\ this\ asp\ */}}
\DoxyCodeLine{00024\ }
\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }osmo\_sccp\_addr\ *own\_addr;}
\DoxyCodeLine{00026\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }osmo\_sccp\_addr\ *peer\_addr;}
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ time\_t\ tstamp;\ \textcolor{comment}{/*\ last\ time\ this\ cache\ was\ used\ */}}
\DoxyCodeLine{00029\ }
\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }osmo\_ss7\_asp\ *asp;}
\DoxyCodeLine{00031\ \};}
\DoxyCodeLine{00032\ }
\DoxyCodeLine{00033\ \textcolor{comment}{/*\ Entry\ centric\ API}}
\DoxyCodeLine{00034\ \textcolor{comment}{\ *\ Managing\ entries\ without\ management\ (e.g.\ update\ entries\ when\ used)}}
\DoxyCodeLine{00035\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00036\ \textcolor{keyword}{struct\ }tcap\_trxn\_track\_entry\ *tcap\_trxn\_track\_create\_entry(}
\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}\ osmo\_ss7\_as\ *as,}
\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}\ osmo\_ss7\_asp\ *asp,}
\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *own\_addr,}
\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint32\_t\ *own\_tid,}
\DoxyCodeLine{00041\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *peer\_addr,}
\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint32\_t\ *peer\_tid);}
\DoxyCodeLine{00043\ }
\DoxyCodeLine{00044\ \textcolor{keyword}{struct\ }tcap\_trxn\_track\_entry\ *tcap\_trxn\_track\_find\_entry(}
\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}\ osmo\_ss7\_as\ *as,}
\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *own\_addr,}
\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint32\_t\ *own\_tid,}
\DoxyCodeLine{00048\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *peer\_addr,}
\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint32\_t\ *peer\_tid);}
\DoxyCodeLine{00050\ }
\DoxyCodeLine{00051\ \textcolor{keywordtype}{void}\ tcap\_trxn\_track\_free\_entry(\textcolor{keyword}{struct}\ tcap\_trxn\_track\_entry\ *entry);}
\DoxyCodeLine{00052\ }
\DoxyCodeLine{00053\ \textcolor{keywordtype}{int}\ tcap\_trxn\_track\_free\_all\_entries(\textcolor{keyword}{struct}\ osmo\_ss7\_as\ *as);}
\DoxyCodeLine{00054\ \textcolor{keywordtype}{int}\ tcap\_trxn\_track\_free\_asp\_entries(\textcolor{keyword}{struct}\ osmo\_ss7\_as\ *as,\ \textcolor{keyword}{struct}\ osmo\_ss7\_asp\ *asp);}
\DoxyCodeLine{00055\ }
\DoxyCodeLine{00056\ \textcolor{comment}{/*\ Transaction\ centric\ API}}
\DoxyCodeLine{00057\ \textcolor{comment}{\ *\ It\ will\ update\ timestamp\ and\ used\ out\ of\ a\ TCAP\ transaction\ context}}
\DoxyCodeLine{00058\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00059\ \textcolor{keyword}{struct\ }tcap\_trxn\_track\_entry\ *tcap\_trxn\_track\_begin(}
\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}\ osmo\_ss7\_as\ *as,}
\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}\ osmo\_ss7\_asp\ *asp,}
\DoxyCodeLine{00062\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *own\_addr,}
\DoxyCodeLine{00063\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint32\_t\ *own\_tid,}
\DoxyCodeLine{00064\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *peer\_addr,}
\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint32\_t\ *peer\_tid);}
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00067\ \textcolor{keyword}{struct\ }osmo\_ss7\_asp\ *tcap\_trxn\_track\_continue(}
\DoxyCodeLine{00068\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}\ osmo\_ss7\_as\ *as,}
\DoxyCodeLine{00069\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *own\_addr,}
\DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint32\_t\ *own\_tid,}
\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *peer\_addr,}
\DoxyCodeLine{00072\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint32\_t\ *peer\_tid);}
\DoxyCodeLine{00073\ }
\DoxyCodeLine{00074\ \textcolor{keyword}{struct\ }osmo\_ss7\_asp\ *tcap\_trxn\_track\_end(}
\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}\ osmo\_ss7\_as\ *as,}
\DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *own\_addr,}
\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint32\_t\ *own\_tid,}
\DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_sccp\_addr\ *peer\_addr,}
\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ uint32\_t\ *peer\_tid);}
\DoxyCodeLine{00080\ }
\DoxyCodeLine{00081\ \textcolor{comment}{/*\ Garbage\ collection\ */}}
\DoxyCodeLine{00082\ \textcolor{keywordtype}{int}\ tcap\_trxn\_track\_garbage\_collect(\textcolor{keyword}{struct}\ osmo\_ss7\_as\ *as);}
\DoxyCodeLine{00083\ }
\DoxyCodeLine{00084\ \textcolor{keywordtype}{void}\ tcap\_trxn\_track\_garbage\_collect\_start(\textcolor{keyword}{struct}\ osmo\_ss7\_as\ *as);}
\DoxyCodeLine{00085\ \textcolor{keywordtype}{void}\ tcap\_trxn\_track\_garbage\_collect\_stop(\textcolor{keyword}{struct}\ osmo\_ss7\_as\ *as);}
\DoxyCodeLine{00086\ }

\end{DoxyCode}
