\doxysection{sccp\+\_\+instance.\+h}
\label{sccp__instance_8h_source}\index{src/sccp\_instance.h@{src/sccp\_instance.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}}
\DoxyCodeLine{00002\ }
\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#include\ <inttypes.h>}}
\DoxyCodeLine{00004\ }
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <osmocom/core/fsm.h>}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ <osmocom/core/prim.h>}}
\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ <osmocom/core/linuxlist.h>}}
\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ <osmocom/core/linuxrbtree.h>}}
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <osmocom/core/tdef.h>}}
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <osmocom/sigtran/sccp\_sap.h>}}
\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#include\ <osmocom/sigtran/osmo\_ss7.h>}}
\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ <osmocom/sigtran/protocol/mtp.h>}}
\DoxyCodeLine{00013\ }
\DoxyCodeLine{00014\ \textcolor{keyword}{struct\ }osmo\_ss7\_user;}
\DoxyCodeLine{00015\ }
\DoxyCodeLine{00016\ \textcolor{comment}{/*\ Appendix\ C.4\ of\ Q.714\ */}}
\DoxyCodeLine{00017\ \textcolor{keyword}{enum}\ osmo\_sccp\_timer\ \{}
\DoxyCodeLine{00018\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ 0\ kept\ unused\ on\ purpose\ since\ it's\ handled\ specially\ by\ osmo\_fsm\ */}}
\DoxyCodeLine{00019\ \ \ \ \ \ \ \ \ OSMO\_SCCP\_TIMER\_CONN\_EST\ =\ 1,}
\DoxyCodeLine{00020\ \ \ \ \ \ \ \ \ OSMO\_SCCP\_TIMER\_IAS,}
\DoxyCodeLine{00021\ \ \ \ \ \ \ \ \ OSMO\_SCCP\_TIMER\_IAR,}
\DoxyCodeLine{00022\ \ \ \ \ \ \ \ \ OSMO\_SCCP\_TIMER\_REL,}
\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ OSMO\_SCCP\_TIMER\_REPEAT\_REL,}
\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ OSMO\_SCCP\_TIMER\_INT,}
\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ OSMO\_SCCP\_TIMER\_GUARD,}
\DoxyCodeLine{00026\ \ \ \ \ \ \ \ \ OSMO\_SCCP\_TIMER\_RESET,}
\DoxyCodeLine{00027\ \ \ \ \ \ \ \ \ OSMO\_SCCP\_TIMER\_REASSEMBLY,}
\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ This\ must\ remain\ the\ last\ item:\ */}}
\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ OSMO\_SCCP\_TIMERS\_LEN}
\DoxyCodeLine{00030\ \};}
\DoxyCodeLine{00031\ }
\DoxyCodeLine{00032\ \textcolor{keyword}{extern}\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct\ }osmo\_tdef\ osmo\_sccp\_timer\_defaults[OSMO\_SCCP\_TIMERS\_LEN];}
\DoxyCodeLine{00033\ }
\DoxyCodeLine{00034\ \textcolor{keyword}{extern}\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct\ }value\_string\ osmo\_sccp\_timer\_names[];}
\DoxyCodeLine{00035\ \textcolor{keyword}{static}\ \textcolor{keyword}{inline}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *osmo\_sccp\_timer\_name(\textcolor{keyword}{enum}\ osmo\_sccp\_timer\ val)}
\DoxyCodeLine{00036\ \{\ \textcolor{keywordflow}{return}\ get\_value\_string(osmo\_sccp\_timer\_names,\ val);\ \}}
\DoxyCodeLine{00037\ }
\DoxyCodeLine{00038\ \textcolor{keyword}{struct\ }sccp\_pending\_rout\_fail\ \{}
\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ Item\ in\ inst-\/>rout\_fail\_pending.queue:\ */}}
\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }llist\_head\ list;}
\DoxyCodeLine{00041\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }xua\_msg\ *xua;}
\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ uint32\_t\ cause;}
\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ scoc;\ \textcolor{comment}{/*\ true\ if\ it's\ for\ SCOC,\ false\ if\ it's\ for\ SCLC.\ */}}
\DoxyCodeLine{00044\ \};}
\DoxyCodeLine{00045\ }
\DoxyCodeLine{00046\ \textcolor{comment}{/*\ an\ instance\ of\ the\ SCCP\ stack\ */}}
\DoxyCodeLine{00047\ \textcolor{keyword}{struct\ }osmo\_sccp\_instance\ \{}
\DoxyCodeLine{00048\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ entry\ in\ global\ list\ of\ ss7\ instances\ */}}
\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }llist\_head\ list;}
\DoxyCodeLine{00050\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ rbtree\ root\ of\ 'struct\ sccp\_connection'\ in\ this\ instance\ */}}
\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }rb\_root\ connections;}
\DoxyCodeLine{00052\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ list\ of\ SCCP\ users\ in\ this\ instance\ */}}
\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }llist\_head\ users;}
\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ routing\ context\ to\ be\ used\ in\ all\ outbound\ messages\ */}}
\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ uint32\_t\ route\_ctx;}
\DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ next\ connection\ ID\ to\ allocate\ */}}
\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ uint32\_t\ next\_id;}
\DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }osmo\_ss7\_instance\ *ss7;}
\DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ *priv;}
\DoxyCodeLine{00060\ }
\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }osmo\_ss7\_user\ *ss7\_user;}
\DoxyCodeLine{00062\ }
\DoxyCodeLine{00063\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }osmo\_tdef\ *tdefs;}
\DoxyCodeLine{00064\ }
\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ uint32\_t\ max\_optional\_data;}
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ Queued\ Routing\ Failures\ to\ transmit\ asynchronously\ up\ the\ stack:\ */}}
\DoxyCodeLine{00068\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\{}
\DoxyCodeLine{00069\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }osmo\_timer\_list\ timer;}
\DoxyCodeLine{00070\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }llist\_head\ queue;}
\DoxyCodeLine{00071\ \ \ \ \ \ \ \ \ \}\ rout\_fail\_pending;}
\DoxyCodeLine{00072\ \};}
\DoxyCodeLine{00073\ }
\DoxyCodeLine{00074\ \textcolor{keyword}{struct\ }osmo\_sccp\_user\ *}
\DoxyCodeLine{00075\ sccp\_user\_find(\textcolor{keyword}{struct}\ osmo\_sccp\_instance\ *inst,\ uint16\_t\ ssn,\ uint32\_t\ pc);}
\DoxyCodeLine{00076\ }
\DoxyCodeLine{00077\ \textcolor{preprocessor}{\#define\ \_LOGPSCI(sci,\ subsys,\ level,\ fmt,\ args\ ...)\ \(\backslash\)}}
\DoxyCodeLine{00078\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \_LOGSS7((sci)-\/>ss7,\ subsys,\ level,\ "{}SCCP(rctx=\%"{}\ PRIu32\ "{})\ "{}\ fmt,\ (sci)-\/>route\_ctx,\ \#\#\ args)}}
\DoxyCodeLine{00079\ \textcolor{preprocessor}{\#define\ LOGPSCI(sci,\ level,\ fmt,\ args\ ...)\ \(\backslash\)}}
\DoxyCodeLine{00080\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \_LOGPSCI(sci,\ DLSCCP,\ level,\ fmt,\ \#\#\ args)}}
\DoxyCodeLine{00081\ }

\end{DoxyCode}
