\doxysection{osmo\+\_\+ss7.\+h}
\label{osmo__ss7_8h_source}\index{include/osmocom/sigtran/osmo\_ss7.h@{include/osmocom/sigtran/osmo\_ss7.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 <stdint.h>}}
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include <stdbool.h>}}
\DoxyCodeLine{5 }
\DoxyCodeLine{6 \textcolor{preprocessor}{\#include <osmocom/core/linuxlist.h>}}
\DoxyCodeLine{7 \textcolor{preprocessor}{\#include <osmocom/core/utils.h>}}
\DoxyCodeLine{8 \textcolor{preprocessor}{\#include <osmocom/core/fsm.h>}}
\DoxyCodeLine{9 \textcolor{preprocessor}{\#include <osmocom/core/msgb.h>}}
\DoxyCodeLine{10 \textcolor{preprocessor}{\#include <osmocom/core/prim.h>}}
\DoxyCodeLine{11 \textcolor{preprocessor}{\#include <osmocom/core/socket.h>}}
\DoxyCodeLine{12 \textcolor{preprocessor}{\#include <osmocom/core/rate\_ctr.h>}}
\DoxyCodeLine{13 }
\DoxyCodeLine{14 \textcolor{keyword}{struct }osmo\_ss7\_instance;}
\DoxyCodeLine{15 }
\DoxyCodeLine{16 \textcolor{keyword}{extern} \textcolor{keyword}{struct }llist\_head osmo\_ss7\_instances;}
\DoxyCodeLine{17 \textcolor{comment}{/* Get an entry pointer from a list item in osmo\_ss7\_instances: */}}
\DoxyCodeLine{18 \textcolor{keyword}{struct }osmo\_ss7\_instance *osmo\_ss7\_instances\_llist\_entry(\textcolor{keyword}{struct} llist\_head *list);}
\DoxyCodeLine{19 }
\DoxyCodeLine{20 \textcolor{keywordtype}{int} osmo\_ss7\_init(\textcolor{keywordtype}{void});}
\DoxyCodeLine{21 }
\DoxyCodeLine{22 \textcolor{comment}{/* All known point-\/code formats have a length of or below 24 bit.}}
\DoxyCodeLine{23 \textcolor{comment}{ * A point-\/code value exceeding that is used to indicate an unset PC. */}}
\DoxyCodeLine{24 \textcolor{preprocessor}{\#define OSMO\_SS7\_PC\_INVALID 0xffffffff}}
\DoxyCodeLine{25 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{bool} osmo\_ss7\_pc\_is\_valid(uint32\_t pc)}
\DoxyCodeLine{26 \{}
\DoxyCodeLine{27         \textcolor{keywordflow}{return} pc <= 0x00ffffff;}
\DoxyCodeLine{28 \}}
\DoxyCodeLine{29 }
\DoxyCodeLine{30 \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{31 \textcolor{comment}{ * xUA Servers}}
\DoxyCodeLine{32 \textcolor{comment}{ ***********************************************************************/}}
\DoxyCodeLine{33 }
\DoxyCodeLine{34 \textcolor{keyword}{struct }osmo\_xua\_layer\_manager;}
\DoxyCodeLine{35 }
\DoxyCodeLine{36 \textcolor{keyword}{struct }osmo\_xua\_server;}
\DoxyCodeLine{37 }
\DoxyCodeLine{38 \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{39 \textcolor{comment}{ * SS7 Instances}}
\DoxyCodeLine{40 \textcolor{comment}{ ***********************************************************************/}}
\DoxyCodeLine{41 }
\DoxyCodeLine{42 \textcolor{keyword}{struct }osmo\_ss7\_pc\_fmt;}
\DoxyCodeLine{43 \textcolor{keyword}{struct }osmo\_ss7\_instance;}
\DoxyCodeLine{44 }
\DoxyCodeLine{45 \textcolor{keyword}{struct }osmo\_ss7\_instance *osmo\_ss7\_instance\_find(uint32\_t \textcolor{keywordtype}{id});}
\DoxyCodeLine{46 \textcolor{keyword}{struct }osmo\_ss7\_instance *}
\DoxyCodeLine{47 osmo\_ss7\_instance\_find\_or\_create(\textcolor{keywordtype}{void} *ctx, uint32\_t \textcolor{keywordtype}{id});}
\DoxyCodeLine{48 \textcolor{keywordtype}{void} osmo\_ss7\_instance\_destroy(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst);}
\DoxyCodeLine{49 }
\DoxyCodeLine{50 uint32\_t osmo\_ss7\_instance\_get\_id(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_instance *inst);}
\DoxyCodeLine{51 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_ss7\_instance\_get\_name(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_instance *inst);}
\DoxyCodeLine{52 }
\DoxyCodeLine{53 \textcolor{keywordtype}{int} osmo\_ss7\_instance\_set\_pc\_fmt(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst,}
\DoxyCodeLine{54                                 uint8\_t c0, uint8\_t c1, uint8\_t c2);}
\DoxyCodeLine{55 \textcolor{keyword}{const} \textcolor{keyword}{struct }osmo\_ss7\_pc\_fmt *}
\DoxyCodeLine{56 osmo\_ss7\_instance\_get\_pc\_fmt(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_instance *inst);}
\DoxyCodeLine{57 }
\DoxyCodeLine{58 uint32\_t osmo\_ss7\_instance\_get\_primary\_pc(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_instance *inst);}
\DoxyCodeLine{59 }
\DoxyCodeLine{60 \textcolor{keyword}{struct }osmo\_sccp\_instance *osmo\_ss7\_ensure\_sccp(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst);}
\DoxyCodeLine{61 \textcolor{keyword}{struct }osmo\_sccp\_instance *osmo\_ss7\_get\_sccp(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_instance *inst);}
\DoxyCodeLine{62 }
\DoxyCodeLine{63 \textcolor{keywordtype}{int} osmo\_ss7\_find\_free\_rctx(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst);}
\DoxyCodeLine{64 }
\DoxyCodeLine{65 \textcolor{keywordtype}{bool} osmo\_ss7\_pc\_is\_local(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_instance *inst, uint32\_t pc);}
\DoxyCodeLine{66 \textcolor{keywordtype}{int} osmo\_ss7\_pointcode\_parse(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_instance *inst, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *str);}
\DoxyCodeLine{67 \textcolor{keywordtype}{int} osmo\_ss7\_pointcode\_parse\_mask\_or\_len(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_instance *inst, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *in);}
\DoxyCodeLine{68 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_ss7\_pointcode\_print\_buf(\textcolor{keywordtype}{char} *buf, \textcolor{keywordtype}{size\_t} buf\_len, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_instance *inst, uint32\_t pc);}
\DoxyCodeLine{69 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_ss7\_pointcode\_print(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_instance *inst, uint32\_t pc);}
\DoxyCodeLine{70 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_ss7\_pointcode\_print2(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_instance *inst, uint32\_t pc);}
\DoxyCodeLine{71 }
\DoxyCodeLine{72 uint8\_t osmo\_ss7\_pc\_width(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_pc\_fmt *pc\_fmt);}
\DoxyCodeLine{73 uint32\_t osmo\_ss7\_pc\_normalize(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_pc\_fmt *pc\_fmt, uint32\_t pc);}
\DoxyCodeLine{74 }
\DoxyCodeLine{75 \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{76 \textcolor{comment}{ * MTP Users (Users of MTP, such as SCCP or ISUP)}}
\DoxyCodeLine{77 \textcolor{comment}{ ***********************************************************************/}}
\DoxyCodeLine{78 }
\DoxyCodeLine{79 \textcolor{keyword}{struct }osmo\_ss7\_user;}
\DoxyCodeLine{80 \textcolor{keyword}{struct }osmo\_mtp\_prim;}
\DoxyCodeLine{81 }
\DoxyCodeLine{82 }
\DoxyCodeLine{83 \textcolor{keyword}{struct }osmo\_ss7\_user *osmo\_ss7\_user\_create(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name);}
\DoxyCodeLine{84 \textcolor{keywordtype}{void} osmo\_ss7\_user\_destroy(\textcolor{keyword}{struct} osmo\_ss7\_user *user);}
\DoxyCodeLine{85 }
\DoxyCodeLine{86 \textcolor{keyword}{struct }osmo\_ss7\_instance *osmo\_ss7\_user\_get\_instance(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_user *user);}
\DoxyCodeLine{87 \textcolor{keywordtype}{void} osmo\_ss7\_user\_set\_prim\_cb(\textcolor{keyword}{struct} osmo\_ss7\_user *user, osmo\_prim\_cb prim\_cb);}
\DoxyCodeLine{88 \textcolor{keywordtype}{void} osmo\_ss7\_user\_set\_priv(\textcolor{keyword}{struct} osmo\_ss7\_user *user, \textcolor{keywordtype}{void} *priv);}
\DoxyCodeLine{89 \textcolor{keywordtype}{void} *osmo\_ss7\_user\_get\_priv(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_user *user);}
\DoxyCodeLine{90 }
\DoxyCodeLine{91 \textcolor{keywordtype}{int} osmo\_ss7\_user\_register(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, uint8\_t service\_ind,}
\DoxyCodeLine{92                            \textcolor{keyword}{struct} osmo\_ss7\_user *user);}
\DoxyCodeLine{93 \textcolor{keywordtype}{int} osmo\_ss7\_user\_unregister(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, uint8\_t service\_ind,}
\DoxyCodeLine{94                              \textcolor{keyword}{struct} osmo\_ss7\_user *user);}
\DoxyCodeLine{95 }
\DoxyCodeLine{96 \textcolor{comment}{/* SS7 User wants to issue MTP-\/TRANSFER.req */}}
\DoxyCodeLine{97 \textcolor{keywordtype}{int} osmo\_ss7\_user\_mtp\_xfer\_req(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst,}
\DoxyCodeLine{98                                 \textcolor{keyword}{struct} osmo\_mtp\_prim *omp);}
\DoxyCodeLine{99 }
\DoxyCodeLine{100 }
\DoxyCodeLine{101 \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{102 \textcolor{comment}{ * SCCP Instance}}
\DoxyCodeLine{103 \textcolor{comment}{ ***********************************************************************/}}
\DoxyCodeLine{104 }
\DoxyCodeLine{105 \textcolor{keyword}{struct }osmo\_sccp\_instance;}
\DoxyCodeLine{106 }
\DoxyCodeLine{107 \textcolor{keywordtype}{void} osmo\_sccp\_set\_max\_optional\_data(\textcolor{keyword}{struct} osmo\_sccp\_instance *inst, \textcolor{keywordtype}{int} val);}
\DoxyCodeLine{108 }
\DoxyCodeLine{109 \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{110 \textcolor{comment}{ * SS7 Links}}
\DoxyCodeLine{111 \textcolor{comment}{ ***********************************************************************/}}
\DoxyCodeLine{112 }
\DoxyCodeLine{113 \textcolor{keyword}{struct }osmo\_ss7\_link;}
\DoxyCodeLine{114 }
\DoxyCodeLine{115 \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{116 \textcolor{comment}{ * SS7 Linksets}}
\DoxyCodeLine{117 \textcolor{comment}{ ***********************************************************************/}}
\DoxyCodeLine{118 }
\DoxyCodeLine{119 \textcolor{keyword}{struct }osmo\_ss7\_linkset;}
\DoxyCodeLine{120 }
\DoxyCodeLine{121 \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{122 \textcolor{comment}{ * SS7 Routes}}
\DoxyCodeLine{123 \textcolor{comment}{ ***********************************************************************/}}
\DoxyCodeLine{124 }
\DoxyCodeLine{125 \textcolor{keyword}{struct }osmo\_ss7\_route;}
\DoxyCodeLine{126 }
\DoxyCodeLine{127 \textcolor{keyword}{struct }osmo\_ss7\_route *}
\DoxyCodeLine{128 osmo\_ss7\_route\_lookup(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, uint32\_t dpc)}
\DoxyCodeLine{129         OSMO\_DEPRECATED(\textcolor{stringliteral}{"{}Use internal ss7\_instance\_lookup\_route() instead"{}});}
\DoxyCodeLine{130 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_ss7\_route\_print(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_route *rt);}
\DoxyCodeLine{131 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_ss7\_route\_name(\textcolor{keyword}{struct} osmo\_ss7\_route *rt, \textcolor{keywordtype}{bool} list\_asps);}
\DoxyCodeLine{132 \textcolor{keyword}{struct }osmo\_ss7\_as *}
\DoxyCodeLine{133 osmo\_ss7\_route\_get\_dest\_as(\textcolor{keyword}{struct} osmo\_ss7\_route *rt);}
\DoxyCodeLine{134 }
\DoxyCodeLine{135 \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{136 \textcolor{comment}{ * SS7 Routing key}}
\DoxyCodeLine{137 \textcolor{comment}{ ***********************************************************************/}}
\DoxyCodeLine{138 }
\DoxyCodeLine{139 \textcolor{keyword}{struct }osmo\_ss7\_routing\_key \{}
\DoxyCodeLine{140         uint32\_t context;}
\DoxyCodeLine{141         uint32\_t l\_rk\_id;}
\DoxyCodeLine{142 }
\DoxyCodeLine{143         uint32\_t pc;}
\DoxyCodeLine{144         uint8\_t si;}
\DoxyCodeLine{145         uint32\_t ssn;}
\DoxyCodeLine{146         \textcolor{comment}{/* FIXME: more complex routing keys */}}
\DoxyCodeLine{147 \};}
\DoxyCodeLine{148 }
\DoxyCodeLine{149 }
\DoxyCodeLine{150 \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{151 \textcolor{comment}{ * SS7 ASP Protocols}}
\DoxyCodeLine{152 \textcolor{comment}{ ***********************************************************************/}}
\DoxyCodeLine{153 }
\DoxyCodeLine{154 \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol \{}
\DoxyCodeLine{155         OSMO\_SS7\_ASP\_PROT\_NONE,}
\DoxyCodeLine{156         OSMO\_SS7\_ASP\_PROT\_SUA,}
\DoxyCodeLine{157         OSMO\_SS7\_ASP\_PROT\_M3UA,}
\DoxyCodeLine{158         OSMO\_SS7\_ASP\_PROT\_IPA,}
\DoxyCodeLine{159         \_NUM\_OSMO\_SS7\_ASP\_PROT}
\DoxyCodeLine{160 \};}
\DoxyCodeLine{161 }
\DoxyCodeLine{162 \textcolor{keyword}{extern} \textcolor{keyword}{struct }value\_string osmo\_ss7\_asp\_protocol\_vals[];}
\DoxyCodeLine{163 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{164 osmo\_ss7\_asp\_protocol\_name(\textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol mode)}
\DoxyCodeLine{165 \{}
\DoxyCodeLine{166         \textcolor{keywordflow}{return} get\_value\_string(osmo\_ss7\_asp\_protocol\_vals, mode);}
\DoxyCodeLine{167 \}}
\DoxyCodeLine{168 }
\DoxyCodeLine{169 \textcolor{keywordtype}{int} osmo\_ss7\_asp\_protocol\_port(\textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol prot);}
\DoxyCodeLine{170 }
\DoxyCodeLine{171 }
\DoxyCodeLine{172 \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{173 \textcolor{comment}{ * SS7 AS Traffic Mode}}
\DoxyCodeLine{174 \textcolor{comment}{ ***********************************************************************/}}
\DoxyCodeLine{175 }
\DoxyCodeLine{176  \textcolor{comment}{/* Traffic mode implementations which can be configured on an AS, either by}}
\DoxyCodeLine{177 \textcolor{comment}{  * peer (eg. RFC4666 M3UA "{}Traffic Mode Type"{}) or locally through VTY.}}
\DoxyCodeLine{178 \textcolor{comment}{  * Note: This is related but not exactly RFC4666 M3UA "{}Traffic Mode Type"{} (enum}}
\DoxyCodeLine{179 \textcolor{comment}{  * m3ua\_traffic\_mode). */}}
\DoxyCodeLine{180 \textcolor{keyword}{enum} osmo\_ss7\_as\_traffic\_mode \{}
\DoxyCodeLine{181         \textcolor{comment}{/* RFC4666 M3UA "{}Traffic Mode Type"{} "{}Override"{}. Default traffic mode: */}}
\DoxyCodeLine{182         OSMO\_SS7\_AS\_TMOD\_OVERRIDE = 0,}
\DoxyCodeLine{183         \textcolor{comment}{/* RFC4666 M3UA "{}Traffic Mode Type"{} "{}Broadcast"{}: */}}
\DoxyCodeLine{184         OSMO\_SS7\_AS\_TMOD\_BCAST,}
\DoxyCodeLine{185         \textcolor{comment}{/* RFC4666 M3UA "{}Traffic Mode Type"{} "{}Loadshare"{},}}
\DoxyCodeLine{186 \textcolor{comment}{         * traffic distribution based on OPC+SLS: */}}
\DoxyCodeLine{187         OSMO\_SS7\_AS\_TMOD\_LOADSHARE,}
\DoxyCodeLine{188         \textcolor{comment}{/* RFC4666 M3UA "{}Traffic Mode Type"{} "{}Loadshare"{},}}
\DoxyCodeLine{189 \textcolor{comment}{         * traffic distribution implemented as round-\/robin: */}}
\DoxyCodeLine{190         OSMO\_SS7\_AS\_TMOD\_ROUNDROBIN,}
\DoxyCodeLine{191         \_NUM\_OSMO\_SS7\_ASP\_TMOD}
\DoxyCodeLine{192 \};}
\DoxyCodeLine{193 }
\DoxyCodeLine{194 \textcolor{keyword}{extern} \textcolor{keyword}{struct }value\_string osmo\_ss7\_as\_traffic\_mode\_vals[];}
\DoxyCodeLine{195 }
\DoxyCodeLine{196 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{197 osmo\_ss7\_as\_traffic\_mode\_name(\textcolor{keyword}{enum} osmo\_ss7\_as\_traffic\_mode mode)}
\DoxyCodeLine{198 \{}
\DoxyCodeLine{199         \textcolor{keywordflow}{return} get\_value\_string(osmo\_ss7\_as\_traffic\_mode\_vals, mode);}
\DoxyCodeLine{200 \}}
\DoxyCodeLine{201 }
\DoxyCodeLine{202 \textcolor{keyword}{enum} osmo\_ss7\_as\_traffic\_mode osmo\_ss7\_tmode\_from\_xua(uint32\_t in);}
\DoxyCodeLine{203 \textcolor{keywordtype}{int} osmo\_ss7\_tmode\_to\_xua(\textcolor{keyword}{enum} osmo\_ss7\_as\_traffic\_mode tmod);}
\DoxyCodeLine{204 }
\DoxyCodeLine{205 }
\DoxyCodeLine{206 \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{207 \textcolor{comment}{ * SS7 Application Servers}}
\DoxyCodeLine{208 \textcolor{comment}{ ***********************************************************************/}}
\DoxyCodeLine{209 }
\DoxyCodeLine{210 \textcolor{keyword}{struct }osmo\_ss7\_as;}
\DoxyCodeLine{211 \textcolor{keyword}{struct }osmo\_ss7\_asp;}
\DoxyCodeLine{212 }
\DoxyCodeLine{213 \textcolor{keyword}{struct }osmo\_ss7\_as *}
\DoxyCodeLine{214 osmo\_ss7\_as\_find\_by\_name(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name);}
\DoxyCodeLine{215 \textcolor{keyword}{struct }osmo\_ss7\_as *}
\DoxyCodeLine{216 osmo\_ss7\_as\_find\_by\_rctx(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, uint32\_t rctx);}
\DoxyCodeLine{217 \textcolor{keyword}{struct }osmo\_ss7\_as *}
\DoxyCodeLine{218 osmo\_ss7\_as\_find\_by\_l\_rk\_id(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, uint32\_t l\_rk\_id);}
\DoxyCodeLine{219 \textcolor{keyword}{struct }osmo\_ss7\_as *osmo\_ss7\_as\_find\_by\_proto(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst,}
\DoxyCodeLine{220                                               \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol proto);}
\DoxyCodeLine{221 \textcolor{keyword}{struct }osmo\_ss7\_as *}
\DoxyCodeLine{222 osmo\_ss7\_as\_find\_or\_create(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name,}
\DoxyCodeLine{223                           \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol proto);}
\DoxyCodeLine{224 \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol osmo\_ss7\_as\_get\_asp\_protocol(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_as *as);}
\DoxyCodeLine{225 \textcolor{keywordtype}{int} osmo\_ss7\_as\_add\_asp(\textcolor{keyword}{struct} osmo\_ss7\_as *as, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *asp\_name);}
\DoxyCodeLine{226 \textcolor{keywordtype}{int} osmo\_ss7\_as\_del\_asp(\textcolor{keyword}{struct} osmo\_ss7\_as *as, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *asp\_name);}
\DoxyCodeLine{227 \textcolor{keywordtype}{void} osmo\_ss7\_as\_destroy(\textcolor{keyword}{struct} osmo\_ss7\_as *as);}
\DoxyCodeLine{228 \textcolor{keywordtype}{bool} osmo\_ss7\_as\_has\_asp(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_as *as,}
\DoxyCodeLine{229                          \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{230 \textcolor{keyword}{struct }osmo\_ss7\_asp *osmo\_ss7\_as\_select\_asp(\textcolor{keyword}{struct} osmo\_ss7\_as *as);}
\DoxyCodeLine{231 \textcolor{keywordtype}{bool} osmo\_ss7\_as\_down(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_as *as);}
\DoxyCodeLine{232 \textcolor{keywordtype}{bool} osmo\_ss7\_as\_active(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_as *as);}
\DoxyCodeLine{233 \textcolor{keywordtype}{bool} osmo\_ss7\_as\_tmode\_compatible\_xua(\textcolor{keyword}{struct} osmo\_ss7\_as *as, uint32\_t m3ua\_tmt);}
\DoxyCodeLine{234 }
\DoxyCodeLine{235 }
\DoxyCodeLine{236 \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{237 \textcolor{comment}{ * SS7 Application Server Processes}}
\DoxyCodeLine{238 \textcolor{comment}{ ***********************************************************************/}}
\DoxyCodeLine{239 }
\DoxyCodeLine{240 \textcolor{keyword}{enum} osmo\_ss7\_asp\_admin\_state \{}
\DoxyCodeLine{242         OSMO\_SS7\_ASP\_ADM\_S\_SHUTDOWN,}
\DoxyCodeLine{244         OSMO\_SS7\_ASP\_ADM\_S\_BLOCKED,}
\DoxyCodeLine{246         OSMO\_SS7\_ASP\_ADM\_S\_ENABLED,}
\DoxyCodeLine{247 \};}
\DoxyCodeLine{248 }
\DoxyCodeLine{249 \textcolor{keyword}{enum} osmo\_ss7\_asp\_role \{}
\DoxyCodeLine{250         OSMO\_SS7\_ASP\_ROLE\_ASP,}
\DoxyCodeLine{251         OSMO\_SS7\_ASP\_ROLE\_SG,}
\DoxyCodeLine{252         OSMO\_SS7\_ASP\_ROLE\_IPSP,}
\DoxyCodeLine{253 \};}
\DoxyCodeLine{254 }
\DoxyCodeLine{255 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string osmo\_ss7\_asp\_role\_names[];}
\DoxyCodeLine{256 }
\DoxyCodeLine{257 \textcolor{keyword}{struct }osmo\_ss7\_asp;}
\DoxyCodeLine{258 }
\DoxyCodeLine{260 \textcolor{preprocessor}{\#define OSMO\_SS7\_ASP\_QUIRK\_NO\_NOTIFY            0x00000001}}
\DoxyCodeLine{262 \textcolor{preprocessor}{\#define OSMO\_SS7\_ASP\_QUIRK\_DAUD\_IN\_ASP          0x00000002}}
\DoxyCodeLine{264 \textcolor{preprocessor}{\#define OSMO\_SS7\_ASP\_QUIRK\_SNM\_INACTIVE         0x00000004}}
\DoxyCodeLine{265 }
\DoxyCodeLine{266 }
\DoxyCodeLine{267 \textcolor{keyword}{struct }osmo\_ss7\_asp *}
\DoxyCodeLine{268 osmo\_ss7\_asp\_find\_by\_name(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name);}
\DoxyCodeLine{269 \textcolor{keyword}{struct }osmo\_ss7\_asp *}
\DoxyCodeLine{270 osmo\_ss7\_asp\_find\_by\_proto(\textcolor{keyword}{struct} osmo\_ss7\_as *as,}
\DoxyCodeLine{271                            \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol proto);}
\DoxyCodeLine{272 \textcolor{keyword}{struct }osmo\_ss7\_asp *}
\DoxyCodeLine{273 osmo\_ss7\_asp\_find(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name,}
\DoxyCodeLine{274                   uint16\_t remote\_port, uint16\_t local\_port,}
\DoxyCodeLine{275                   \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol proto)}
\DoxyCodeLine{276         OSMO\_DEPRECATED(\textcolor{stringliteral}{"{}Use osmo\_ss7\_asp\_find2() instead"{}});}
\DoxyCodeLine{277 \textcolor{keyword}{struct }osmo\_ss7\_asp *}
\DoxyCodeLine{278 osmo\_ss7\_asp\_find2(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name,}
\DoxyCodeLine{279                    uint16\_t remote\_port, uint16\_t local\_port,}
\DoxyCodeLine{280                    \textcolor{keywordtype}{int} trans\_proto, \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol proto);}
\DoxyCodeLine{281 \textcolor{keyword}{struct }osmo\_ss7\_asp *}
\DoxyCodeLine{282 osmo\_ss7\_asp\_find\_or\_create(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name,}
\DoxyCodeLine{283                             uint16\_t remote\_port, uint16\_t local\_port,}
\DoxyCodeLine{284                             \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol proto)}
\DoxyCodeLine{285         OSMO\_DEPRECATED(\textcolor{stringliteral}{"{}Use osmo\_ss7\_asp\_find\_or\_create2() instead"{}});}
\DoxyCodeLine{286 \textcolor{keyword}{struct }osmo\_ss7\_asp *}
\DoxyCodeLine{287 osmo\_ss7\_asp\_find\_or\_create2(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name,}
\DoxyCodeLine{288                              uint16\_t remote\_port, uint16\_t local\_port,}
\DoxyCodeLine{289                              \textcolor{keywordtype}{int} trans\_proto, \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol proto);}
\DoxyCodeLine{290 \textcolor{keywordtype}{void} osmo\_ss7\_asp\_disconnect(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{291 \textcolor{keywordtype}{void} osmo\_ss7\_asp\_destroy(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{292 \textcolor{keywordtype}{int} osmo\_ss7\_asp\_send(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{293 \textcolor{keywordtype}{int} osmo\_ss7\_asp\_restart(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{294 \textcolor{keywordtype}{int} osmo\_ss7\_asp\_use\_default\_lm(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keywordtype}{int} log\_level);}
\DoxyCodeLine{295 \textcolor{keywordtype}{bool} osmo\_ss7\_asp\_active(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{296 \textcolor{keywordtype}{int} osmo\_ss7\_asp\_get\_log\_subsys(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{297 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_ss7\_asp\_get\_name(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{298 \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol osmo\_ss7\_asp\_get\_proto(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{299 \textcolor{keywordtype}{int} osmo\_ss7\_asp\_get\_trans\_proto(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{300 }
\DoxyCodeLine{308 \textcolor{keyword}{typedef} \textcolor{keywordtype}{int} osmo\_ss7\_asp\_rx\_unknown\_cb(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keywordtype}{int} ppid\_mux, \textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{309 }
\DoxyCodeLine{310 \textcolor{keywordtype}{void} osmo\_ss7\_register\_rx\_unknown\_cb(osmo\_ss7\_asp\_rx\_unknown\_cb *cb);}
\DoxyCodeLine{311 }
\DoxyCodeLine{312 }
\DoxyCodeLine{313 \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{314 \textcolor{comment}{ * Simple Client}}
\DoxyCodeLine{315 \textcolor{comment}{ ***********************************************************************/}}
\DoxyCodeLine{316 }
\DoxyCodeLine{317 \textcolor{keyword}{struct }osmo\_sccp\_instance *}
\DoxyCodeLine{318 osmo\_sccp\_simple\_client(\textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name, uint32\_t default\_pc,}
\DoxyCodeLine{319                         \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol prot, \textcolor{keywordtype}{int} default\_local\_port,}
\DoxyCodeLine{320                         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *default\_local\_ip, \textcolor{keywordtype}{int} default\_remote\_port,}
\DoxyCodeLine{321                         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *default\_remote\_ip);}
\DoxyCodeLine{322 }
\DoxyCodeLine{323 \textcolor{keyword}{struct }osmo\_sccp\_instance *}
\DoxyCodeLine{324 osmo\_sccp\_simple\_client\_on\_ss7\_id(\textcolor{keywordtype}{void} *ctx, uint32\_t ss7\_id, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name,}
\DoxyCodeLine{325                                   uint32\_t default\_pc,}
\DoxyCodeLine{326                                   \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol prot,}
\DoxyCodeLine{327                                   \textcolor{keywordtype}{int} default\_local\_port,}
\DoxyCodeLine{328                                   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *default\_local\_ip,}
\DoxyCodeLine{329                                   \textcolor{keywordtype}{int} default\_remote\_port,}
\DoxyCodeLine{330                                   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *default\_remote\_ip);}
\DoxyCodeLine{331 }
\DoxyCodeLine{332 \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{333 \textcolor{comment}{ * Simple Server}}
\DoxyCodeLine{334 \textcolor{comment}{ ***********************************************************************/}}
\DoxyCodeLine{335 }
\DoxyCodeLine{336 \textcolor{keyword}{struct }osmo\_sccp\_instance *}
\DoxyCodeLine{337 osmo\_sccp\_simple\_server(\textcolor{keywordtype}{void} *ctx, uint32\_t pc,}
\DoxyCodeLine{338                         \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol prot, \textcolor{keywordtype}{int} local\_port,}
\DoxyCodeLine{339                         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *local\_ip);}
\DoxyCodeLine{340 }
\DoxyCodeLine{341 \textcolor{keyword}{struct }osmo\_sccp\_instance *}
\DoxyCodeLine{342 osmo\_sccp\_simple\_server\_on\_ss7\_id(\textcolor{keywordtype}{void} *ctx, uint32\_t ss7\_id, uint32\_t pc,}
\DoxyCodeLine{343                                   \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol prot,}
\DoxyCodeLine{344                                   \textcolor{keywordtype}{int} local\_port, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *local\_ip);}
\DoxyCodeLine{345 }
\DoxyCodeLine{346 \textcolor{keyword}{struct }osmo\_sccp\_instance *}
\DoxyCodeLine{347 osmo\_sccp\_simple\_server\_add\_clnt(\textcolor{keyword}{struct} osmo\_sccp\_instance *inst,}
\DoxyCodeLine{348                                  \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol prot,}
\DoxyCodeLine{349                                  \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name, uint32\_t pc,}
\DoxyCodeLine{350                                  \textcolor{keywordtype}{int} local\_port, \textcolor{keywordtype}{int} remote\_port,}
\DoxyCodeLine{351                                  \textcolor{keyword}{const} \textcolor{keywordtype}{char} *remote\_ip);}
\DoxyCodeLine{352 }
\DoxyCodeLine{353 \textcolor{comment}{/* VTY related */}}
\DoxyCodeLine{354 \textcolor{keyword}{struct }vty;}
\DoxyCodeLine{355 \textcolor{keywordtype}{void} osmo\_ss7\_vty\_init\_asp(\textcolor{keywordtype}{void} *ctx);}
\DoxyCodeLine{356 \textcolor{keywordtype}{void} osmo\_ss7\_vty\_init\_sg(\textcolor{keywordtype}{void} *ctx);}
\DoxyCodeLine{357 \textcolor{keywordtype}{int} osmo\_ss7\_vty\_go\_parent(\textcolor{keyword}{struct} vty *vty);}
\DoxyCodeLine{358 \textcolor{keywordtype}{int} osmo\_ss7\_is\_config\_node(\textcolor{keyword}{struct} vty *vty, \textcolor{keywordtype}{int} node)}
\DoxyCodeLine{359         OSMO\_DEPRECATED(\textcolor{stringliteral}{"{}Implicit parent node tracking has replaced the use of this callback. "{}}}
\DoxyCodeLine{360                         \textcolor{stringliteral}{"{}This callback is no longer called, ever, and can be left NULL."{}});}

\end{DoxyCode}
