\doxysection{xua\+\_\+internal.\+h}
\label{xua__internal_8h_source}\index{src/xua\_internal.h@{src/xua\_internal.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 <osmocom/core/tdef.h>}}
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include <osmocom/sigtran/osmo\_ss7.h>}}
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <osmocom/sigtran/xua\_msg.h>}}
\DoxyCodeLine{6 }
\DoxyCodeLine{7 \textcolor{preprocessor}{\#define M3UA\_MSG\_SIZE 2048}}
\DoxyCodeLine{8 \textcolor{preprocessor}{\#define M3UA\_MSG\_HEADROOM 512}}
\DoxyCodeLine{9 }
\DoxyCodeLine{10 \textcolor{keyword}{struct }osmo\_sccp\_addr;}
\DoxyCodeLine{11 \textcolor{keyword}{struct }m3ua\_data\_hdr;}
\DoxyCodeLine{12 }
\DoxyCodeLine{13 \textcolor{keywordtype}{int} sua\_addr\_parse\_part(\textcolor{keyword}{struct} osmo\_sccp\_addr *out,}
\DoxyCodeLine{14                         \textcolor{keyword}{const} \textcolor{keyword}{struct} xua\_msg\_part *param);}
\DoxyCodeLine{15 \textcolor{keywordtype}{int} sua\_addr\_parse(\textcolor{keyword}{struct} osmo\_sccp\_addr *out, \textcolor{keyword}{struct} xua\_msg *xua, uint16\_t iei);}
\DoxyCodeLine{16 }
\DoxyCodeLine{17 \textcolor{keywordtype}{int} sua\_parse\_gt(\textcolor{keyword}{struct} osmo\_sccp\_gt *gt, \textcolor{keyword}{const} uint8\_t *data, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} datalen);}
\DoxyCodeLine{18 }
\DoxyCodeLine{19 \textcolor{keyword}{struct }xua\_msg *osmo\_sccp\_to\_xua(\textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{20 \textcolor{keyword}{struct }msgb *osmo\_sua\_to\_sccp(\textcolor{keyword}{struct} xua\_msg *xua);}
\DoxyCodeLine{21 }
\DoxyCodeLine{22 \textcolor{keywordtype}{int} sua\_rx\_msg(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{23 }
\DoxyCodeLine{24 \textcolor{keywordtype}{int} sua\_tx\_xua\_as(\textcolor{keyword}{struct} osmo\_ss7\_as *as, \textcolor{keyword}{struct} xua\_msg *xua);}
\DoxyCodeLine{25 \textcolor{keywordtype}{void} sua\_tx\_snm\_available(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{const} uint32\_t *rctx, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} num\_rctx,}
\DoxyCodeLine{26                           \textcolor{keyword}{const} uint32\_t *aff\_pc, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} num\_aff\_pc, \textcolor{keyword}{const} uint32\_t *aff\_ssn,}
\DoxyCodeLine{27                           \textcolor{keyword}{const} uint32\_t *smi, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *info\_string, \textcolor{keywordtype}{bool} available);}
\DoxyCodeLine{28 \textcolor{keywordtype}{void} sua\_tx\_snm\_congestion(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{const} uint32\_t *rctx, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} num\_rctx,}
\DoxyCodeLine{29                            \textcolor{keyword}{const} uint32\_t *aff\_pc, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} num\_aff\_pc, \textcolor{keyword}{const} uint32\_t *ssn,}
\DoxyCodeLine{30                            \textcolor{keyword}{const} uint8\_t cong\_level, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *info\_string);}
\DoxyCodeLine{31 \textcolor{keywordtype}{void} sua\_tx\_dupu(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{const} uint32\_t *rctx, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} num\_rctx,}
\DoxyCodeLine{32                  uint32\_t dpc, uint16\_t user, uint16\_t cause, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *info\_str);}
\DoxyCodeLine{33 }
\DoxyCodeLine{34 \textcolor{keyword}{struct }osmo\_mtp\_prim *m3ua\_to\_xfer\_ind(\textcolor{keyword}{struct} xua\_msg *xua);}
\DoxyCodeLine{35 \textcolor{keywordtype}{int} m3ua\_hmdc\_rx\_from\_l2(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, \textcolor{keyword}{struct} xua\_msg *xua);}
\DoxyCodeLine{36 \textcolor{keywordtype}{int} m3ua\_tx\_xua\_as(\textcolor{keyword}{struct} osmo\_ss7\_as *as, \textcolor{keyword}{struct} xua\_msg *xua);}
\DoxyCodeLine{37 \textcolor{keywordtype}{void} m3ua\_tx\_snm\_available(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{const} uint32\_t *rctx, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} num\_rctx,}
\DoxyCodeLine{38                            \textcolor{keyword}{const} uint32\_t *aff\_pc, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} num\_aff\_pc,}
\DoxyCodeLine{39                            \textcolor{keyword}{const} \textcolor{keywordtype}{char} *info\_string, \textcolor{keywordtype}{bool} available);}
\DoxyCodeLine{40 \textcolor{keywordtype}{void} m3ua\_tx\_snm\_congestion(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{const} uint32\_t *rctx, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} num\_rctx,}
\DoxyCodeLine{41                             \textcolor{keyword}{const} uint32\_t *aff\_pc, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} num\_aff\_pc,}
\DoxyCodeLine{42                             \textcolor{keyword}{const} uint32\_t *concerned\_dpc, \textcolor{keyword}{const} uint8\_t *cong\_level,}
\DoxyCodeLine{43                             \textcolor{keyword}{const} \textcolor{keywordtype}{char} *info\_string);}
\DoxyCodeLine{44 \textcolor{keywordtype}{void} m3ua\_tx\_dupu(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{const} uint32\_t *rctx, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} num\_rctx,}
\DoxyCodeLine{45                   uint32\_t dpc, uint16\_t user, uint16\_t cause, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *info\_str);}
\DoxyCodeLine{46 }
\DoxyCodeLine{47 \textcolor{keywordtype}{void} xua\_snm\_rx\_daud(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{struct} xua\_msg *xua);}
\DoxyCodeLine{48 \textcolor{keywordtype}{void} xua\_snm\_rx\_duna(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{struct} osmo\_ss7\_as *as, \textcolor{keyword}{struct} xua\_msg *xua);}
\DoxyCodeLine{49 \textcolor{keywordtype}{void} xua\_snm\_rx\_dava(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{struct} osmo\_ss7\_as *as, \textcolor{keyword}{struct} xua\_msg *xua);}
\DoxyCodeLine{50 \textcolor{keywordtype}{void} xua\_snm\_rx\_dupu(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{struct} osmo\_ss7\_as *as, \textcolor{keyword}{struct} xua\_msg *xua);}
\DoxyCodeLine{51 \textcolor{keywordtype}{void} xua\_snm\_rx\_scon(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{struct} osmo\_ss7\_as *as, \textcolor{keyword}{struct} xua\_msg *xua);}
\DoxyCodeLine{52 \textcolor{keywordtype}{int} m3ua\_rx\_msg(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{53 }
\DoxyCodeLine{54 \textcolor{keyword}{struct }msgb *m3ua\_msgb\_alloc(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *name);}
\DoxyCodeLine{55 \textcolor{keyword}{struct }xua\_msg *m3ua\_xfer\_from\_data(\textcolor{keyword}{const} \textcolor{keyword}{struct} m3ua\_data\_hdr *data\_hdr,}
\DoxyCodeLine{56                                     \textcolor{keyword}{const} uint8\_t *data, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} data\_len);}
\DoxyCodeLine{57 \textcolor{keyword}{struct }m3ua\_data\_hdr *data\_hdr\_from\_m3ua(\textcolor{keyword}{struct} xua\_msg *xua);}
\DoxyCodeLine{58 \textcolor{keywordtype}{void} m3ua\_dh\_to\_xfer\_param(\textcolor{keyword}{struct} osmo\_mtp\_transfer\_param *param,}
\DoxyCodeLine{59                            \textcolor{keyword}{const} \textcolor{keyword}{struct} m3ua\_data\_hdr *mdh);}
\DoxyCodeLine{60 \textcolor{keywordtype}{void} mtp\_xfer\_param\_to\_m3ua\_dh(\textcolor{keyword}{struct} m3ua\_data\_hdr *mdh,}
\DoxyCodeLine{61                                 \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_mtp\_transfer\_param *param);}
\DoxyCodeLine{62 }
\DoxyCodeLine{63 }
\DoxyCodeLine{64 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }xua\_msg\_class m3ua\_msg\_class\_mgmt;}
\DoxyCodeLine{65 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }xua\_msg\_class m3ua\_msg\_class\_snm;}
\DoxyCodeLine{66 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }xua\_msg\_class m3ua\_msg\_class\_rkm;}
\DoxyCodeLine{67 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }xua\_msg\_class m3ua\_msg\_class\_aspsm;}
\DoxyCodeLine{68 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }xua\_msg\_class m3ua\_msg\_class\_asptm;}
\DoxyCodeLine{69 }
\DoxyCodeLine{70 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string m3ua\_err\_names[];}
\DoxyCodeLine{71 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string m3ua\_ntfy\_type\_names[];}
\DoxyCodeLine{72 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string m3ua\_ntfy\_stchg\_names[];}
\DoxyCodeLine{73 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string m3ua\_ntfy\_other\_names[];}
\DoxyCodeLine{74 }
\DoxyCodeLine{75 \textcolor{keyword}{struct }xua\_msg *m3ua\_encode\_notify(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_xlm\_prim\_notify *npar);}
\DoxyCodeLine{76 \textcolor{keywordtype}{int} m3ua\_decode\_notify(\textcolor{keyword}{struct} osmo\_xlm\_prim\_notify *npar, \textcolor{keywordtype}{void} *ctx,}
\DoxyCodeLine{77                         \textcolor{keyword}{const} \textcolor{keyword}{struct} xua\_msg *xua);}
\DoxyCodeLine{78 \textcolor{keywordtype}{int} m3ua\_rx\_rkm(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{struct} xua\_msg *xua);}
\DoxyCodeLine{79 \textcolor{keywordtype}{void} xua\_rkm\_cleanup\_dyn\_as\_for\_asp(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{80 }
\DoxyCodeLine{81 \textcolor{keyword}{struct }osmo\_xlm\_prim *xua\_xlm\_prim\_alloc(\textcolor{keyword}{enum} osmo\_xlm\_prim\_type prim\_type,}
\DoxyCodeLine{82                                          \textcolor{keyword}{enum} osmo\_prim\_operation op);}
\DoxyCodeLine{83 }
\DoxyCodeLine{84 \textcolor{keywordtype}{void} xua\_asp\_send\_xlm\_prim(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{struct} osmo\_xlm\_prim *prim);}
\DoxyCodeLine{85 \textcolor{keywordtype}{void} xua\_asp\_send\_xlm\_prim\_simple(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp,}
\DoxyCodeLine{86                                 \textcolor{keyword}{enum} osmo\_xlm\_prim\_type prim\_type,}
\DoxyCodeLine{87                                 \textcolor{keyword}{enum} osmo\_prim\_operation op);}
\DoxyCodeLine{88 }
\DoxyCodeLine{89 \textcolor{keywordtype}{void} xua\_snm\_pc\_available(\textcolor{keyword}{struct} osmo\_ss7\_as *as, \textcolor{keyword}{const} uint32\_t *aff\_pc,}
\DoxyCodeLine{90                           \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} num\_aff\_pc, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *info\_str, \textcolor{keywordtype}{bool} available);}
\DoxyCodeLine{91 }
\DoxyCodeLine{92 \textcolor{keyword}{enum} ss7\_asp\_lm\_timer \{}
\DoxyCodeLine{93         \textcolor{comment}{/* 0 kept unused on purpose since it's handled specially by osmo\_fsm */}}
\DoxyCodeLine{94         SS7\_ASP\_LM\_T\_WAIT\_ASP\_UP = 1,}
\DoxyCodeLine{95         SS7\_ASP\_LM\_T\_WAIT\_NOTIFY,}
\DoxyCodeLine{96         SS7\_ASP\_LM\_T\_WAIT\_NOTIY\_RKM,}
\DoxyCodeLine{97         SS7\_ASP\_LM\_T\_WAIT\_RK\_REG\_RESP,}
\DoxyCodeLine{98         \textcolor{comment}{/* This must remain the last item: */}}
\DoxyCodeLine{99         SS7\_ASP\_LM\_TIMERS\_LEN}
\DoxyCodeLine{100 \};}
\DoxyCodeLine{101 }
\DoxyCodeLine{102 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }osmo\_tdef ss7\_asp\_lm\_timer\_defaults[SS7\_ASP\_LM\_TIMERS\_LEN];}
\DoxyCodeLine{103 }
\DoxyCodeLine{104 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string ss7\_asp\_lm\_timer\_names[];}
\DoxyCodeLine{105 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *ss7\_asp\_lm\_timer\_name(\textcolor{keyword}{enum} ss7\_asp\_lm\_timer val)}
\DoxyCodeLine{106 \{ \textcolor{keywordflow}{return} get\_value\_string(ss7\_asp\_lm\_timer\_names, val); \}}
\DoxyCodeLine{107 }
\DoxyCodeLine{108 \textcolor{keyword}{extern} \textcolor{keyword}{struct }osmo\_fsm xua\_default\_lm\_fsm;}
\DoxyCodeLine{109 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string m3ua\_rkm\_reg\_status\_vals[];}
\DoxyCodeLine{110 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string m3ua\_rkm\_dereg\_status\_vals[];}
\DoxyCodeLine{111 }
\DoxyCodeLine{112 \textcolor{preprocessor}{\#define CS7\_STR "{}ITU-\/T Signaling System 7\(\backslash\)n"{}}}
\DoxyCodeLine{113 \textcolor{preprocessor}{\#define PC\_STR  "{}Point Code\(\backslash\)n"{}}}
\DoxyCodeLine{114 \textcolor{preprocessor}{\#define INST\_STR "{}An instance of the SS7 stack\(\backslash\)n"{}}}
\DoxyCodeLine{115 }
\DoxyCodeLine{116 \textcolor{keywordtype}{int} xua\_as\_transmit\_msg(\textcolor{keyword}{struct} osmo\_ss7\_as *as, \textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{117 }
\DoxyCodeLine{118 \textcolor{keywordtype}{int} xua\_find\_as\_for\_asp(\textcolor{keyword}{struct} osmo\_ss7\_as **as, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_asp *asp,}
\DoxyCodeLine{119                         \textcolor{keyword}{const} \textcolor{keyword}{struct} xua\_msg\_part *rctx\_ie);}
\DoxyCodeLine{120 }
\DoxyCodeLine{121 \textcolor{keywordtype}{int} ipa\_tx\_xua\_as(\textcolor{keyword}{struct} osmo\_ss7\_as *as, \textcolor{keyword}{struct} xua\_msg *xua);}
\DoxyCodeLine{122 \textcolor{keywordtype}{int} ipa\_rx\_msg(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{struct} msgb *msg, uint8\_t sls);}
\DoxyCodeLine{123 \textcolor{keyword}{struct }osmo\_ss7\_as *ipa\_find\_as\_for\_asp(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{124 }
\DoxyCodeLine{125 \textcolor{keywordtype}{int} osmo\_isup\_party\_parse(\textcolor{keywordtype}{char} *out\_digits, \textcolor{keyword}{const} uint8\_t *in,}
\DoxyCodeLine{126                         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} in\_num\_bytes, \textcolor{keywordtype}{bool} odd);}
\DoxyCodeLine{127 \textcolor{keywordtype}{int} osmo\_sccp\_addr\_parse(\textcolor{keyword}{struct} osmo\_sccp\_addr *out,}
\DoxyCodeLine{128                         \textcolor{keyword}{const} uint8\_t *addr, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} addrlen);}
\DoxyCodeLine{129 \textcolor{keywordtype}{int} osmo\_sccp\_addr\_encode(\textcolor{keyword}{struct} msgb *msg, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *in);}
\DoxyCodeLine{130 }
\DoxyCodeLine{131 \textcolor{keywordtype}{int} ss7\_asp\_rx\_unknown(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keywordtype}{int} ppid\_mux, \textcolor{keyword}{struct} msgb *msg);}

\end{DoxyCode}
