\doxysection{ss7\+\_\+instance.\+h}
\label{ss7__instance_8h_source}\index{src/ss7\_instance.h@{src/ss7\_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\ <stdint.h>}}
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ <stdbool.h>}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <osmocom/core/linuxlist.h>}}
\DoxyCodeLine{00006\ }
\DoxyCodeLine{00007\ \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *\ SS7\ Instances}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ ***********************************************************************/}}
\DoxyCodeLine{00010\ }
\DoxyCodeLine{00011\ \textcolor{keyword}{struct\ }osmo\_ss7\_user;}
\DoxyCodeLine{00012\ \textcolor{keyword}{struct\ }osmo\_ss7\_route\_table;}
\DoxyCodeLine{00013\ \textcolor{keyword}{struct\ }osmo\_ss7\_route\_label;}
\DoxyCodeLine{00014\ \textcolor{keyword}{struct\ }osmo\_sccp\_instance;}
\DoxyCodeLine{00015\ }
\DoxyCodeLine{00016\ \textcolor{keyword}{struct\ }osmo\_ss7\_pc\_fmt\ \{}
\DoxyCodeLine{00017\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ delimiter;}
\DoxyCodeLine{00018\ \ \ \ \ \ \ \ \ uint8\_t\ component\_len[3];}
\DoxyCodeLine{00019\ \};}
\DoxyCodeLine{00020\ }
\DoxyCodeLine{00021\ \textcolor{keyword}{struct\ }osmo\_ss7\_instance\ \{}
\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }llist\_head\ list;}
\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }llist\_head\ linksets;}
\DoxyCodeLine{00027\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }llist\_head\ as\_list;}
\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }llist\_head\ asp\_list;}
\DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }llist\_head\ rtable\_list;}
\DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }llist\_head\ xua\_servers;}
\DoxyCodeLine{00034\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ array\ for\ faster\ lookup\ of\ user\ (indexed\ by\ service}}
\DoxyCodeLine{00035\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ *\ indicator)\ */}}
\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{struct\ }osmo\_ss7\_user\ *user[16];}
\DoxyCodeLine{00037\ }
\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }osmo\_ss7\_route\_table\ *rtable\_system;}
\DoxyCodeLine{00039\ }
\DoxyCodeLine{00040\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }osmo\_sccp\_instance\ *sccp;}
\DoxyCodeLine{00041\ }
\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\{}
\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ id;}
\DoxyCodeLine{00044\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ *name;}
\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ *description;}
\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ primary\_pc;}
\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ capability\ PCs\ */}}
\DoxyCodeLine{00048\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint8\_t\ network\_indicator;}
\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }osmo\_ss7\_pc\_fmt\ pc\_fmt;}
\DoxyCodeLine{00050\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ permit\_dyn\_rkm\_alloc;}
\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }llist\_head\ sccp\_address\_book;}
\DoxyCodeLine{00052\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint32\_t\ secondary\_pc;}
\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ How\ many\ bits\ from\ ITU\ OPC/DPC\ field\ (starting\ from\ least-\/significant-\/bit)}}
\DoxyCodeLine{00054\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *\ to\ skip\ for\ routing\ decisions\ (always\ takes\ 6\ bits).}}
\DoxyCodeLine{00055\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *\ range\ 0-\/8,\ defaults\ to\ 0,\ which\ means\ take\ least\ significant\ 6\ bits.\ */}}
\DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint8\_t\ opc\_shift;}
\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint8\_t\ dpc\_shift;}
\DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ How\ many\ bits\ from\ ITU\ SLS\ field\ (starting\ from\ least-\/significant-\/bit)}}
\DoxyCodeLine{00059\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *\ to\ skip\ for\ routing\ decisions.}}
\DoxyCodeLine{00060\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *\ range\ 0-\/3,\ defaults\ to\ 0,\ which\ means\ take\ all\ 4\ bits.\ */}}
\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ uint8\_t\ sls\_shift;}
\DoxyCodeLine{00062\ \ \ \ \ \ \ \ \ \}\ cfg;}
\DoxyCodeLine{00063\ \};}
\DoxyCodeLine{00064\ }
\DoxyCodeLine{00065\ \textcolor{keyword}{struct\ }osmo\_ss7\_instance\ *}
\DoxyCodeLine{00066\ ss7\_instance\_alloc(\textcolor{keywordtype}{void}\ *ctx,\ uint32\_t\ \textcolor{keywordtype}{id});}
\DoxyCodeLine{00067\ }
\DoxyCodeLine{00068\ uint32\_t\ ss7\_find\_free\_l\_rk\_id(\textcolor{keyword}{struct}\ osmo\_ss7\_instance\ *inst);}
\DoxyCodeLine{00069\ \textcolor{keyword}{struct\ }osmo\_ss7\_route\ *}
\DoxyCodeLine{00070\ ss7\_instance\_lookup\_route(\textcolor{keyword}{struct}\ osmo\_ss7\_instance\ *inst,\ \textcolor{keyword}{const}\ \textcolor{keyword}{struct}\ osmo\_ss7\_route\_label\ *rtlabel);}
\DoxyCodeLine{00071\ }
\DoxyCodeLine{00072\ \textcolor{preprocessor}{\#define\ \_LOGSS7(inst,\ subsys,\ level,\ fmt,\ args\ ...)\ \(\backslash\)}}
\DoxyCodeLine{00073\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ LOGP(subsys,\ level,\ "{}\%u:\ "{}\ fmt,\ inst\ ?\ (inst)-\/>cfg.id\ :\ 0,\ \#\#\ args)}}
\DoxyCodeLine{00074\ \textcolor{preprocessor}{\#define\ LOGSS7(inst,\ level,\ fmt,\ args\ ...)\ \(\backslash\)}}
\DoxyCodeLine{00075\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ \_LOGSS7(inst,\ DLSS7,\ level,\ fmt,\ \#\#\ args)}}

\end{DoxyCode}
