\doxysection{tcap\+\_\+trans\+\_\+tracking.\+h}
\label{tcap__trans__tracking_8h_source}\index{src/tcap\_trans\_tracking.h@{src/tcap\_trans\_tracking.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{2 }
\DoxyCodeLine{3 \textcolor{comment}{/* TCAP transaction tracking */}}
\DoxyCodeLine{4 }
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <stdint.h>}}
\DoxyCodeLine{6 }
\DoxyCodeLine{7 \textcolor{preprocessor}{\#include <osmocom/core/hashtable.h>}}
\DoxyCodeLine{8 \textcolor{preprocessor}{\#include <osmocom/core/msgb.h>}}
\DoxyCodeLine{9 }
\DoxyCodeLine{10 \textcolor{preprocessor}{\#include <osmocom/sigtran/sccp\_sap.h>}}
\DoxyCodeLine{11 }
\DoxyCodeLine{12 \textcolor{keyword}{struct }osmo\_ss7\_as;}
\DoxyCodeLine{13 \textcolor{keyword}{struct }osmo\_ss7\_asp;}
\DoxyCodeLine{14 }
\DoxyCodeLine{15 \textcolor{keyword}{struct }tcap\_trans\_track\_tid\_entry \{}
\DoxyCodeLine{16         \textcolor{keyword}{struct }hlist\_node list;}
\DoxyCodeLine{17         \textcolor{keywordtype}{bool} tid\_valid;}
\DoxyCodeLine{18         uint32\_t tid;}
\DoxyCodeLine{19 \};}
\DoxyCodeLine{20 }
\DoxyCodeLine{21 \textcolor{keyword}{struct }tcap\_trans\_track\_entry \{}
\DoxyCodeLine{22         \textcolor{keyword}{struct }tcap\_trans\_track\_tid\_entry peer\_tid; \textcolor{comment}{/* of the peer. If peer initiate transaction, this is otid */}}
\DoxyCodeLine{23         \textcolor{keyword}{struct }tcap\_trans\_track\_tid\_entry own\_tid; \textcolor{comment}{/* assigned by this asp */}}
\DoxyCodeLine{24 }
\DoxyCodeLine{25         \textcolor{keyword}{struct }osmo\_sccp\_addr *own\_addr;}
\DoxyCodeLine{26         \textcolor{keyword}{struct }osmo\_sccp\_addr *peer\_addr;}
\DoxyCodeLine{27 }
\DoxyCodeLine{28         time\_t tstamp; \textcolor{comment}{/* last time this cache was used */}}
\DoxyCodeLine{29 }
\DoxyCodeLine{30         \textcolor{keyword}{struct }osmo\_ss7\_asp *asp;}
\DoxyCodeLine{31 \};}
\DoxyCodeLine{32 }
\DoxyCodeLine{33 \textcolor{comment}{/* Entry centric API}}
\DoxyCodeLine{34 \textcolor{comment}{ * Managing entries without management (e.g. update entries when used)}}
\DoxyCodeLine{35 \textcolor{comment}{ */}}
\DoxyCodeLine{36 \textcolor{keyword}{struct }tcap\_trans\_track\_entry *tcap\_trans\_track\_entry\_create(}
\DoxyCodeLine{37         \textcolor{keyword}{struct} osmo\_ss7\_as *as,}
\DoxyCodeLine{38         \textcolor{keyword}{struct} osmo\_ss7\_asp *asp,}
\DoxyCodeLine{39         \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *own\_addr,}
\DoxyCodeLine{40         \textcolor{keyword}{const} uint32\_t *own\_tid,}
\DoxyCodeLine{41         \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *peer\_addr,}
\DoxyCodeLine{42         \textcolor{keyword}{const} uint32\_t *peer\_tid);}
\DoxyCodeLine{43 }
\DoxyCodeLine{44 \textcolor{keyword}{struct }tcap\_trans\_track\_entry *tcap\_trans\_track\_entry\_find(}
\DoxyCodeLine{45         \textcolor{keyword}{struct} osmo\_ss7\_as *as,}
\DoxyCodeLine{46         \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *own\_addr,}
\DoxyCodeLine{47         \textcolor{keyword}{const} uint32\_t *own\_tid,}
\DoxyCodeLine{48         \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *peer\_addr,}
\DoxyCodeLine{49         \textcolor{keyword}{const} uint32\_t *peer\_tid);}
\DoxyCodeLine{50 }
\DoxyCodeLine{51 \textcolor{keywordtype}{void} tcap\_trans\_track\_entry\_free(\textcolor{keyword}{struct} tcap\_trans\_track\_entry *entry);}
\DoxyCodeLine{52 }
\DoxyCodeLine{53 \textcolor{keywordtype}{int} tcap\_trans\_track\_entries\_free\_all(\textcolor{keyword}{struct} osmo\_ss7\_as *as);}
\DoxyCodeLine{54 \textcolor{keywordtype}{int} tcap\_trans\_track\_entries\_free\_by\_asp(\textcolor{keyword}{struct} osmo\_ss7\_as *as, \textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{55 }
\DoxyCodeLine{56 \textcolor{comment}{/* Transaction centric API}}
\DoxyCodeLine{57 \textcolor{comment}{ * It will update timestamp and used out of a TCAP transaction context}}
\DoxyCodeLine{58 \textcolor{comment}{ */}}
\DoxyCodeLine{59 \textcolor{keyword}{struct }tcap\_trans\_track\_entry *tcap\_trans\_track\_begin(}
\DoxyCodeLine{60         \textcolor{keyword}{struct} osmo\_ss7\_as *as,}
\DoxyCodeLine{61         \textcolor{keyword}{struct} osmo\_ss7\_asp *asp,}
\DoxyCodeLine{62         \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *own\_addr,}
\DoxyCodeLine{63         \textcolor{keyword}{const} uint32\_t *own\_tid,}
\DoxyCodeLine{64         \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *peer\_addr,}
\DoxyCodeLine{65         \textcolor{keyword}{const} uint32\_t *peer\_tid);}
\DoxyCodeLine{66 }
\DoxyCodeLine{67 \textcolor{keyword}{struct }osmo\_ss7\_asp *tcap\_trans\_track\_continue(}
\DoxyCodeLine{68         \textcolor{keyword}{struct} osmo\_ss7\_as *as,}
\DoxyCodeLine{69         \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *own\_addr,}
\DoxyCodeLine{70         \textcolor{keyword}{const} uint32\_t *own\_tid,}
\DoxyCodeLine{71         \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *peer\_addr,}
\DoxyCodeLine{72         \textcolor{keyword}{const} uint32\_t *peer\_tid);}
\DoxyCodeLine{73 }
\DoxyCodeLine{74 \textcolor{keyword}{struct }osmo\_ss7\_asp *tcap\_trans\_track\_end(}
\DoxyCodeLine{75         \textcolor{keyword}{struct} osmo\_ss7\_as *as,}
\DoxyCodeLine{76         \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *own\_addr,}
\DoxyCodeLine{77         \textcolor{keyword}{const} uint32\_t *own\_tid,}
\DoxyCodeLine{78         \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *peer\_addr,}
\DoxyCodeLine{79         \textcolor{keyword}{const} uint32\_t *peer\_tid);}
\DoxyCodeLine{80 }
\DoxyCodeLine{81 \textcolor{comment}{/* Garbage collection */}}
\DoxyCodeLine{82 \textcolor{keywordtype}{int} tcap\_trans\_track\_garbage\_collect(\textcolor{keyword}{struct} osmo\_ss7\_as *as);}
\DoxyCodeLine{83 }
\DoxyCodeLine{84 \textcolor{keywordtype}{void} tcap\_trans\_track\_garbage\_collect\_start(\textcolor{keyword}{struct} osmo\_ss7\_as *as);}
\DoxyCodeLine{85 \textcolor{keywordtype}{void} tcap\_trans\_track\_garbage\_collect\_stop(\textcolor{keyword}{struct} osmo\_ss7\_as *as);}
\DoxyCodeLine{86 }

\end{DoxyCode}
