\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{1 \textcolor{preprocessor}{\#pragma once}} \DoxyCodeLine{2 } \DoxyCodeLine{3 \textcolor{preprocessor}{\#include }} \DoxyCodeLine{4 \textcolor{preprocessor}{\#include }} \DoxyCodeLine{5 \textcolor{preprocessor}{\#include }} \DoxyCodeLine{6 \textcolor{preprocessor}{\#include }} \DoxyCodeLine{7 } \DoxyCodeLine{8 \textcolor{preprocessor}{\#include }} \DoxyCodeLine{9 } \DoxyCodeLine{10 \textcolor{comment}{/***********************************************************************}} \DoxyCodeLine{11 \textcolor{comment}{ * SS7 Instances}} \DoxyCodeLine{12 \textcolor{comment}{ ***********************************************************************/}} \DoxyCodeLine{13 } \DoxyCodeLine{14 \textcolor{keyword}{struct }osmo\_ss7\_user;} \DoxyCodeLine{15 \textcolor{keyword}{struct }osmo\_ss7\_route\_table;} \DoxyCodeLine{16 \textcolor{keyword}{struct }osmo\_ss7\_route\_label;} \DoxyCodeLine{17 \textcolor{keyword}{struct }osmo\_sccp\_instance;} \DoxyCodeLine{18 } \DoxyCodeLine{19 \textcolor{keyword}{enum} ss7\_instance\_ctr \{} \DoxyCodeLine{20 SS7\_INST\_CTR\_PKT\_RX\_TOTAL,} \DoxyCodeLine{21 SS7\_INST\_CTR\_PKT\_RX\_UNKNOWN,} \DoxyCodeLine{22 SS7\_INST\_CTR\_PKT\_RX\_NI\_MISMATCH,} \DoxyCodeLine{23 SS7\_INST\_CTR\_PKT\_TX\_TOTAL,} \DoxyCodeLine{24 \};} \DoxyCodeLine{25 } \DoxyCodeLine{26 \textcolor{keyword}{struct }osmo\_ss7\_pc\_fmt \{} \DoxyCodeLine{27 \textcolor{keywordtype}{char} delimiter;} \DoxyCodeLine{28 uint8\_t component\_len[3];} \DoxyCodeLine{29 \};} \DoxyCodeLine{30 } \DoxyCodeLine{31 \textcolor{keyword}{struct }osmo\_ss7\_instance \{} \DoxyCodeLine{33 \textcolor{keyword}{struct }llist\_head list;} \DoxyCodeLine{35 \textcolor{keyword}{struct }llist\_head linksets;} \DoxyCodeLine{37 \textcolor{keyword}{struct }llist\_head as\_list;} \DoxyCodeLine{39 \textcolor{keyword}{struct }llist\_head asp\_list;} \DoxyCodeLine{41 \textcolor{keyword}{struct }llist\_head rtable\_list;} \DoxyCodeLine{43 \textcolor{keyword}{struct }llist\_head xua\_servers;} \DoxyCodeLine{44 \textcolor{comment}{/* array for faster lookup of user (indexed by service}} \DoxyCodeLine{45 \textcolor{comment}{ * indicator) */}} \DoxyCodeLine{46 \textcolor{keyword}{struct }osmo\_ss7\_user *user[16];} \DoxyCodeLine{47 } \DoxyCodeLine{48 \textcolor{keyword}{struct }osmo\_ss7\_route\_table *rtable\_system;} \DoxyCodeLine{49 } \DoxyCodeLine{50 \textcolor{keyword}{struct }osmo\_sccp\_instance *sccp;} \DoxyCodeLine{51 } \DoxyCodeLine{52 \textcolor{keyword}{struct }rate\_ctr\_group *ctrg;} \DoxyCodeLine{53 } \DoxyCodeLine{54 \textcolor{keyword}{struct }\{} \DoxyCodeLine{55 uint32\_t id;} \DoxyCodeLine{56 \textcolor{keywordtype}{char} *name;} \DoxyCodeLine{57 \textcolor{keywordtype}{char} *description;} \DoxyCodeLine{58 uint32\_t primary\_pc;} \DoxyCodeLine{59 \textcolor{comment}{/* capability PCs */}} \DoxyCodeLine{60 \textcolor{keyword}{enum} mtp\_network\_indicator network\_indicator;} \DoxyCodeLine{61 \textcolor{keyword}{struct }osmo\_ss7\_pc\_fmt pc\_fmt;} \DoxyCodeLine{62 \textcolor{keywordtype}{bool} permit\_dyn\_rkm\_alloc;} \DoxyCodeLine{63 \textcolor{keyword}{struct }llist\_head sccp\_address\_book;} \DoxyCodeLine{64 uint32\_t secondary\_pc;} \DoxyCodeLine{65 \textcolor{comment}{/* How many bits from ITU OPC/DPC field (starting from least-\/significant-\/bit)}} \DoxyCodeLine{66 \textcolor{comment}{ * to skip for routing decisions (always takes 6 bits).}} \DoxyCodeLine{67 \textcolor{comment}{ * range 0-\/8, defaults to 0, which means take least significant 6 bits. */}} \DoxyCodeLine{68 uint8\_t opc\_shift;} \DoxyCodeLine{69 uint8\_t dpc\_shift;} \DoxyCodeLine{70 \textcolor{comment}{/* How many bits from ITU SLS field (starting from least-\/significant-\/bit)}} \DoxyCodeLine{71 \textcolor{comment}{ * to skip for routing decisions.}} \DoxyCodeLine{72 \textcolor{comment}{ * range 0-\/3, defaults to 0, which means take all 4 bits. */}} \DoxyCodeLine{73 uint8\_t sls\_shift;} \DoxyCodeLine{74 \} cfg;} \DoxyCodeLine{75 \};} \DoxyCodeLine{76 } \DoxyCodeLine{77 \textcolor{keyword}{struct }osmo\_ss7\_instance *} \DoxyCodeLine{78 ss7\_instance\_alloc(\textcolor{keywordtype}{void} *ctx, uint32\_t \textcolor{keywordtype}{id});} \DoxyCodeLine{79 } \DoxyCodeLine{80 uint32\_t ss7\_find\_free\_l\_rk\_id(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst);} \DoxyCodeLine{81 \textcolor{keyword}{struct }osmo\_ss7\_route *} \DoxyCodeLine{82 ss7\_instance\_lookup\_route(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_route\_label *rtlabel);} \DoxyCodeLine{83 } \DoxyCodeLine{84 \textcolor{preprocessor}{\#define \_LOGSS7(inst, subsys, level, fmt, args ...) \(\backslash\)}} \DoxyCodeLine{85 \textcolor{preprocessor}{ LOGP(subsys, level, "{}\%u: "{}} fmt, inst ? (inst)-\/>cfg.id : 0, \#\# args)} \DoxyCodeLine{86 \textcolor{preprocessor}{\#define LOGSS7(inst, level, fmt, args ...) \(\backslash\)}} \DoxyCodeLine{87 \textcolor{preprocessor}{ \_LOGSS7(inst, DLSS7, level, fmt, \#\# args)}} \end{DoxyCode}