libosmo-sigtran  2.3.0.34-f51d.202609021800
Osmocom SIGTRAN library
osmo_ss7.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <stdint.h>
4 #include <stdbool.h>
5 
6 #include <osmocom/core/linuxlist.h>
7 #include <osmocom/core/utils.h>
8 #include <osmocom/core/fsm.h>
9 #include <osmocom/core/msgb.h>
10 #include <osmocom/core/prim.h>
11 #include <osmocom/core/socket.h>
12 #include <osmocom/core/rate_ctr.h>
13 
14 /* Maximum number of supported RCTXs present in RFC4666 Routing Context IE. */
15 #define OSMO_SS7_MAX_RCTX_COUNT 128
16 
17 struct osmo_ss7_instance;
18 
19 extern struct llist_head osmo_ss7_instances;
20 /* Get an entry pointer from a list item in osmo_ss7_instances: */
21 struct osmo_ss7_instance *osmo_ss7_instances_llist_entry(struct llist_head *list);
22 
23 int osmo_ss7_init(void);
24 
25 /* All known point-code formats have a length of or below 24 bit.
26  * A point-code value exceeding that is used to indicate an unset PC. */
27 #define OSMO_SS7_PC_INVALID 0xffffffff
28 static inline bool osmo_ss7_pc_is_valid(uint32_t pc)
29 {
30  return pc <= 0x00ffffff;
31 }
32 
33 /***********************************************************************
34  * xUA Servers
35  ***********************************************************************/
36 
38 
39 struct osmo_xua_server;
40 
41 /***********************************************************************
42  * SS7 Instances
43  ***********************************************************************/
44 
45 struct osmo_ss7_pc_fmt;
46 struct osmo_ss7_instance;
47 
48 struct osmo_ss7_instance *osmo_ss7_instance_find(uint32_t id);
49 struct osmo_ss7_instance *
50 osmo_ss7_instance_find_or_create(void *ctx, uint32_t id);
52 
53 uint32_t osmo_ss7_instance_get_id(const struct osmo_ss7_instance *inst);
54 const char *osmo_ss7_instance_get_name(const struct osmo_ss7_instance *inst);
55 
57  uint8_t c0, uint8_t c1, uint8_t c2);
58 const struct osmo_ss7_pc_fmt *
60 
61 uint32_t osmo_ss7_instance_get_primary_pc(const struct osmo_ss7_instance *inst);
63 
65 struct osmo_sccp_instance *osmo_ss7_get_sccp(const struct osmo_ss7_instance *inst);
66 
68 
69 bool osmo_ss7_pc_is_local(const struct osmo_ss7_instance *inst, uint32_t pc);
70 bool osmo_ss7_pointcode_is_valid(const struct osmo_ss7_instance *inst, uint32_t pc);
71 int osmo_ss7_pointcode_parse(const struct osmo_ss7_instance *inst, const char *str);
72 int osmo_ss7_pointcode_parse_mask_or_len(const struct osmo_ss7_instance *inst, const char *in);
73 const char *osmo_ss7_pointcode_print_buf(char *buf, size_t buf_len, const struct osmo_ss7_instance *inst, uint32_t pc);
74 const char *osmo_ss7_pointcode_print(const struct osmo_ss7_instance *inst, uint32_t pc);
75 const char *osmo_ss7_pointcode_print2(const struct osmo_ss7_instance *inst, uint32_t pc);
76 
77 uint8_t osmo_ss7_pc_width(const struct osmo_ss7_pc_fmt *pc_fmt);
78 uint32_t osmo_ss7_pc_normalize(const struct osmo_ss7_pc_fmt *pc_fmt, uint32_t pc);
79 
80 /***********************************************************************
81  * MTP Users (Users of MTP, such as SCCP or ISUP)
82  ***********************************************************************/
83 
84 struct osmo_ss7_user;
85 struct osmo_mtp_prim;
86 
87 
88 struct osmo_ss7_user *osmo_ss7_user_create(struct osmo_ss7_instance *inst, const char *name);
89 void osmo_ss7_user_destroy(struct osmo_ss7_user *user);
90 
92 void osmo_ss7_user_set_prim_cb(struct osmo_ss7_user *user, osmo_prim_cb prim_cb);
93 void osmo_ss7_user_set_priv(struct osmo_ss7_user *user, void *priv);
94 void *osmo_ss7_user_get_priv(const struct osmo_ss7_user *user);
95 
96 int osmo_ss7_user_register(struct osmo_ss7_user *user, uint8_t service_ind);
97 int osmo_ss7_user_unregister(struct osmo_ss7_user *user, uint8_t service_ind);
98 
99 struct osmo_ss7_user *osmo_ss7_user_find_by_si(const struct osmo_ss7_instance *inst, uint8_t service_indicator);
100 
101 /* MTP User wants to submit a primitive down to MTP SAP */
103  struct osmo_mtp_prim *omp);
104 
105 /***********************************************************************
106  * SCCP Instance
107  ***********************************************************************/
108 
109 struct osmo_sccp_instance;
110 
111 void osmo_sccp_set_max_optional_data(struct osmo_sccp_instance *inst, int val);
112 
113 /***********************************************************************
114  * SS7 Links
115  ***********************************************************************/
116 
117 struct osmo_ss7_link;
118 
119 /***********************************************************************
120  * SS7 Linksets
121  ***********************************************************************/
122 
123 struct osmo_ss7_linkset;
124 
125 /***********************************************************************
126  * SS7 Routes
127  ***********************************************************************/
128 
129 struct osmo_ss7_route;
130 
131 struct osmo_ss7_route *
132 osmo_ss7_route_lookup(struct osmo_ss7_instance *inst, uint32_t dpc)
133  OSMO_DEPRECATED("Use internal ss7_instance_lookup_route() instead");
134 const char *osmo_ss7_route_print(const struct osmo_ss7_route *rt);
135 const char *osmo_ss7_route_name(struct osmo_ss7_route *rt, bool list_asps);
136 struct osmo_ss7_as *
138 
139 /***********************************************************************
140  * SS7 Routing key
141  ***********************************************************************/
142 
144  uint32_t context;
145  uint32_t l_rk_id;
146 
147  uint32_t pc;
148  uint8_t si;
149  uint32_t ssn;
150  /* FIXME: more complex routing keys */
151 };
152 
153 
154 /***********************************************************************
155  * SS7 ASP Protocols
156  ***********************************************************************/
157 
164 };
165 
166 extern struct value_string osmo_ss7_asp_protocol_vals[];
167 static inline const char *
169 {
170  return get_value_string(osmo_ss7_asp_protocol_vals, mode);
171 }
172 
174 
175 
176 /***********************************************************************
177  * SS7 AS Traffic Mode
178  ***********************************************************************/
179 
180  /* Traffic mode implementations which can be configured on an AS, either by
181  * peer (eg. RFC4666 M3UA "Traffic Mode Type") or locally through VTY.
182  * Note: This is related but not exactly RFC4666 M3UA "Traffic Mode Type" (enum
183  * m3ua_traffic_mode). */
185  /* RFC4666 M3UA "Traffic Mode Type" "Override". Default traffic mode: */
187  /* RFC4666 M3UA "Traffic Mode Type" "Broadcast": */
189  /* RFC4666 M3UA "Traffic Mode Type" "Loadshare",
190  * traffic distribution based on OPC+SLS: */
192  /* RFC4666 M3UA "Traffic Mode Type" "Loadshare",
193  * traffic distribution implemented as round-robin: */
196 };
197 
198 extern struct value_string osmo_ss7_as_traffic_mode_vals[];
199 
200 static inline const char *
202 {
203  return get_value_string(osmo_ss7_as_traffic_mode_vals, mode);
204 }
205 
208 
209 
210 /***********************************************************************
211  * SS7 Application Servers
212  ***********************************************************************/
213 
214 struct osmo_ss7_as;
215 struct osmo_ss7_asp;
216 
217 struct osmo_ss7_as *
219 struct osmo_ss7_as *
220 osmo_ss7_as_find_by_rctx(struct osmo_ss7_instance *inst, uint32_t rctx);
221 struct osmo_ss7_as *
222 osmo_ss7_as_find_by_l_rk_id(struct osmo_ss7_instance *inst, uint32_t l_rk_id);
225 struct osmo_ss7_as *
229 int osmo_ss7_as_add_asp(struct osmo_ss7_as *as, const char *asp_name);
230 int osmo_ss7_as_del_asp(struct osmo_ss7_as *as, const char *asp_name);
231 void osmo_ss7_as_destroy(struct osmo_ss7_as *as);
232 bool osmo_ss7_as_has_asp(const struct osmo_ss7_as *as,
233  const struct osmo_ss7_asp *asp);
235 bool osmo_ss7_as_down(const struct osmo_ss7_as *as);
236 bool osmo_ss7_as_active(const struct osmo_ss7_as *as);
237 bool osmo_ss7_as_tmode_compatible_xua(struct osmo_ss7_as *as, uint32_t m3ua_tmt);
238 
239 
240 /***********************************************************************
241  * SS7 Application Server Processes
242  ***********************************************************************/
243 
248 };
249 
250 extern const struct value_string osmo_ss7_asp_role_names[];
251 
252 struct osmo_ss7_asp;
253 
255 #define OSMO_SS7_ASP_QUIRK_NO_NOTIFY 0x00000001
257 #define OSMO_SS7_ASP_QUIRK_DAUD_IN_ASP 0x00000002
259 #define OSMO_SS7_ASP_QUIRK_SNM_INACTIVE 0x00000004
260 
261 
262 struct osmo_ss7_asp *
264 struct osmo_ss7_asp *
267 struct osmo_ss7_asp *
268 osmo_ss7_asp_find(struct osmo_ss7_instance *inst, const char *name,
269  uint16_t remote_port, uint16_t local_port,
271  OSMO_DEPRECATED("Use osmo_ss7_asp_find2() instead");
272 struct osmo_ss7_asp *
273 osmo_ss7_asp_find2(struct osmo_ss7_instance *inst, const char *name,
274  uint16_t remote_port, uint16_t local_port,
276 struct osmo_ss7_asp *
278  uint16_t remote_port, uint16_t local_port,
280  OSMO_DEPRECATED("Use osmo_ss7_asp_find_or_create2() instead");
281 struct osmo_ss7_asp *
283  uint16_t remote_port, uint16_t local_port,
285 void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp);
286 void osmo_ss7_asp_destroy(struct osmo_ss7_asp *asp);
287 int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg);
288 int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp);
289 bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp);
290 int osmo_ss7_asp_get_log_subsys(const struct osmo_ss7_asp *asp);
291 const char *osmo_ss7_asp_get_name(const struct osmo_ss7_asp *asp);
293 int osmo_ss7_asp_get_trans_proto(const struct osmo_ss7_asp *asp);
294 
302 typedef int osmo_ss7_asp_rx_unknown_cb(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg);
303 
305 
306 
307 /***********************************************************************
308  * Simple Client
309  ***********************************************************************/
310 
311 struct osmo_sccp_instance *
312 osmo_sccp_simple_client(void *ctx, const char *name, uint32_t default_pc,
313  enum osmo_ss7_asp_protocol prot, int default_local_port,
314  const char *default_local_ip, int default_remote_port,
315  const char *default_remote_ip);
316 
317 struct osmo_sccp_instance *
318 osmo_sccp_simple_client_on_ss7_id(void *ctx, uint32_t ss7_id, const char *name,
319  uint32_t default_pc,
320  enum osmo_ss7_asp_protocol prot,
321  int default_local_port,
322  const char *default_local_ip,
323  int default_remote_port,
324  const char *default_remote_ip);
325 
326 /***********************************************************************
327  * Simple Server
328  ***********************************************************************/
329 
330 struct osmo_sccp_instance *
331 osmo_sccp_simple_server(void *ctx, uint32_t pc,
332  enum osmo_ss7_asp_protocol prot, int local_port,
333  const char *local_ip);
334 
335 struct osmo_sccp_instance *
336 osmo_sccp_simple_server_on_ss7_id(void *ctx, uint32_t ss7_id, uint32_t pc,
337  enum osmo_ss7_asp_protocol prot,
338  int local_port, const char *local_ip);
339 
340 struct osmo_sccp_instance *
342  enum osmo_ss7_asp_protocol prot,
343  const char *name, uint32_t pc,
344  int local_port, int remote_port,
345  const char *remote_ip);
346 
347 /* VTY related */
348 struct vty;
349 void osmo_ss7_vty_init_asp(void *ctx);
350 void osmo_ss7_vty_init_sg(void *ctx);
351 int osmo_ss7_vty_go_parent(struct vty *vty);
352 int osmo_ss7_is_config_node(struct vty *vty, int node)
353  OSMO_DEPRECATED("Implicit parent node tracking has replaced the use of this callback. "
354  "This callback is no longer called, ever, and can be left NULL.");
uint32_t dpc
Definition: m3ua.h:1
int osmo_ss7_as_add_asp(struct osmo_ss7_as *as, const char *asp_name)
Add given ASP to given AS.
Definition: ss7_as.c:239
struct osmo_ss7_user * osmo_ss7_user_create(struct osmo_ss7_instance *inst, const char *name)
Definition: ss7_user.c:39
const struct osmo_ss7_pc_fmt * osmo_ss7_instance_get_pc_fmt(const struct osmo_ss7_instance *inst)
Definition: ss7_instance.c:206
int osmo_ss7_pointcode_parse_mask_or_len(const struct osmo_ss7_instance *inst, const char *in)
Definition: ss7_instance.c:682
void osmo_sccp_set_max_optional_data(struct osmo_sccp_instance *inst, int val)
Adjust the upper bound for the optional data length (the payload) for CR, CC, CREF and RLSD messages.
Definition: sccp_instance.c:962
struct osmo_ss7_as * osmo_ss7_route_get_dest_as(struct osmo_ss7_route *rt)
Get destination AS of route.
Definition: ss7_route.c:433
struct osmo_ss7_asp * osmo_ss7_as_select_asp(struct osmo_ss7_as *as)
Select an AS to transmit a message, according to AS configuration and ASP availability.
Definition: ss7_as.c:685
const char * osmo_ss7_pointcode_print2(const struct osmo_ss7_instance *inst, uint32_t pc)
Definition: ss7_instance.c:676
bool osmo_ss7_pc_is_local(const struct osmo_ss7_instance *inst, uint32_t pc)
Definition: ss7_instance.c:232
struct osmo_ss7_instance * osmo_ss7_user_get_instance(const struct osmo_ss7_user *user)
Definition: ss7_user.c:64
int osmo_ss7_asp_get_trans_proto(const struct osmo_ss7_asp *asp)
Get the transport proto of a given ASP.
Definition: ss7_asp.c:1533
void osmo_ss7_vty_init_sg(void *ctx)
Definition: ss7_vty.c:1561
uint32_t osmo_ss7_instance_get_primary_pc(const struct osmo_ss7_instance *inst)
Definition: ss7_instance.c:176
struct osmo_ss7_asp * osmo_ss7_asp_find_or_create(struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, enum osmo_ss7_asp_protocol proto) OSMO_DEPRECATED("Use osmo_ss7_asp_find_or_create2() instead")
Definition: ss7_instance.c:508
struct osmo_ss7_user * osmo_ss7_user_find_by_si(const struct osmo_ss7_instance *inst, uint8_t service_indicator)
Definition: ss7_user.c:57
static bool osmo_ss7_pc_is_valid(uint32_t pc)
Definition: osmo_ss7.h:28
int osmo_ss7_pointcode_parse(const struct osmo_ss7_instance *inst, const char *str)
Definition: ss7_instance.c:610
uint32_t osmo_ss7_instance_get_id(const struct osmo_ss7_instance *inst)
Definition: ss7_instance.c:166
struct osmo_ss7_asp * osmo_ss7_asp_find_by_proto(struct osmo_ss7_as *as, enum osmo_ss7_asp_protocol proto)
Find an ASP that matches the given ASP protocol (xUA variant).
Definition: ss7_instance.c:438
int osmo_ss7_user_register(struct osmo_ss7_user *user, uint8_t service_ind)
Register a MTP user for a given service indicator.
Definition: ss7_user.c:88
osmo_ss7_asp_protocol
Definition: osmo_ss7.h:158
@ OSMO_SS7_ASP_PROT_SUA
Definition: osmo_ss7.h:160
@ OSMO_SS7_ASP_PROT_NONE
Definition: osmo_ss7.h:159
@ OSMO_SS7_ASP_PROT_IPA
Definition: osmo_ss7.h:162
@ OSMO_SS7_ASP_PROT_M3UA
Definition: osmo_ss7.h:161
@ _NUM_OSMO_SS7_ASP_PROT
Definition: osmo_ss7.h:163
struct value_string osmo_ss7_asp_protocol_vals[]
Definition: ss7_asp.c:146
struct value_string osmo_ss7_as_traffic_mode_vals[]
Definition: ss7_as.c:88
int osmo_ss7_tmode_to_xua(enum osmo_ss7_as_traffic_mode tmod)
Definition: ss7.c:196
enum osmo_ss7_asp_protocol osmo_ss7_asp_get_proto(const struct osmo_ss7_asp *asp)
Get the proto of a given ASP.
Definition: ss7_asp.c:1524
osmo_ss7_asp_role
Definition: osmo_ss7.h:244
@ OSMO_SS7_ASP_ROLE_SG
Definition: osmo_ss7.h:246
@ OSMO_SS7_ASP_ROLE_ASP
Definition: osmo_ss7.h:245
@ OSMO_SS7_ASP_ROLE_IPSP
Definition: osmo_ss7.h:247
int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg)
send a fully encoded msgb via a given ASP
Definition: ss7_asp.c:1413
struct osmo_sccp_instance * osmo_sccp_simple_client_on_ss7_id(void *ctx, uint32_t ss7_id, const char *name, uint32_t default_pc, enum osmo_ss7_asp_protocol prot, int default_local_port, const char *default_local_ip, int default_remote_port, const char *default_remote_ip)
request an sccp client instance
Definition: sccp_instance.c:578
struct osmo_ss7_route * osmo_ss7_route_lookup(struct osmo_ss7_instance *inst, uint32_t dpc) OSMO_DEPRECATED("Use internal ss7_instance_lookup_route() instead")
Find a SS7 route for given destination point code in given SS7.
Definition: ss7_route.c:416
void osmo_ss7_instance_destroy(struct osmo_ss7_instance *inst)
Destroy a SS7 Instance.
Definition: ss7_instance.c:139
struct osmo_ss7_as * osmo_ss7_as_find_by_l_rk_id(struct osmo_ss7_instance *inst, uint32_t l_rk_id)
Find Application Server by given local routing key ID.
Definition: ss7_instance.c:343
void osmo_ss7_user_set_priv(struct osmo_ss7_user *user, void *priv)
Definition: ss7_user.c:74
struct osmo_ss7_asp * osmo_ss7_asp_find_or_create2(struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, int trans_proto, enum osmo_ss7_asp_protocol proto)
Definition: ss7_instance.c:486
int osmo_ss7_asp_rx_unknown_cb(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg)
Weak function to handle payload for unknown/unsupported PPID or IPA StreamID.
Definition: osmo_ss7.h:302
const struct value_string osmo_ss7_asp_role_names[]
Definition: ss7_asp.c:154
uint32_t osmo_ss7_pc_normalize(const struct osmo_ss7_pc_fmt *pc_fmt, uint32_t pc)
Definition: ss7.c:102
struct osmo_sccp_instance * osmo_ss7_get_sccp(const struct osmo_ss7_instance *inst)
Get the SCCP instance, if present.
Definition: ss7_instance.c:227
int osmo_ss7_asp_protocol_port(enum osmo_ss7_asp_protocol prot)
Definition: ss7_asp.c:205
bool osmo_ss7_as_active(const struct osmo_ss7_as *as)
Determine if given AS is in the active state.
Definition: ss7_as.c:432
void osmo_ss7_asp_destroy(struct osmo_ss7_asp *asp)
Definition: ss7_asp.c:783
bool osmo_ss7_as_down(const struct osmo_ss7_as *as)
Determine if given AS is in the down state.
Definition: ss7_as.c:442
struct osmo_sccp_instance * osmo_ss7_ensure_sccp(struct osmo_ss7_instance *inst)
Allocate an SCCP instance, if not present yet.
Definition: ss7_instance.c:213
osmo_ss7_as_traffic_mode
Definition: osmo_ss7.h:184
@ OSMO_SS7_AS_TMOD_OVERRIDE
Definition: osmo_ss7.h:186
@ _NUM_OSMO_SS7_ASP_TMOD
Definition: osmo_ss7.h:195
@ OSMO_SS7_AS_TMOD_ROUNDROBIN
Definition: osmo_ss7.h:194
@ OSMO_SS7_AS_TMOD_BCAST
Definition: osmo_ss7.h:188
@ OSMO_SS7_AS_TMOD_LOADSHARE
Definition: osmo_ss7.h:191
struct osmo_ss7_instance * osmo_ss7_instance_find_or_create(void *ctx, uint32_t id)
Find or create a SS7 Instance.
Definition: ss7.c:132
struct osmo_ss7_asp * osmo_ss7_asp_find(struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, enum osmo_ss7_asp_protocol proto) OSMO_DEPRECATED("Use osmo_ss7_asp_find2() instead")
Definition: ss7_instance.c:474
struct osmo_ss7_asp * osmo_ss7_asp_find2(struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, int trans_proto, enum osmo_ss7_asp_protocol proto)
Definition: ss7_instance.c:452
bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp)
Definition: ss7_asp.c:981
int osmo_ss7_user_unregister(struct osmo_ss7_user *user, uint8_t service_ind)
Unregister a MTP user for a given service indicator.
Definition: ss7_user.c:110
struct llist_head osmo_ss7_instances
int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp)
Definition: ss7_asp.c:921
const char * osmo_ss7_asp_get_name(const struct osmo_ss7_asp *asp)
Get the name of a given ASP.
Definition: ss7_asp.c:1515
struct osmo_sccp_instance * osmo_sccp_simple_server_on_ss7_id(void *ctx, uint32_t ss7_id, uint32_t pc, enum osmo_ss7_asp_protocol prot, int local_port, const char *local_ip)
Definition: sccp_instance.c:829
uint8_t osmo_ss7_pc_width(const struct osmo_ss7_pc_fmt *pc_fmt)
Definition: ss7.c:88
int osmo_ss7_init(void)
Definition: ss7.c:170
void osmo_ss7_register_rx_unknown_cb(osmo_ss7_asp_rx_unknown_cb *cb)
Register a call-back function for unknown SCTP PPID / IPA Stream ID.
Definition: ss7_asp.c:1472
struct osmo_ss7_as * osmo_ss7_as_find_or_create(struct osmo_ss7_instance *inst, const char *name, enum osmo_ss7_asp_protocol proto)
Find or Create Application Server.
Definition: ss7_instance.c:395
int osmo_ss7_is_config_node(struct vty *vty, int node) OSMO_DEPRECATED("Implicit parent node tracking has replaced the use of this callback. " "This callback is no longer called
struct osmo_sccp_instance * osmo_sccp_simple_client(void *ctx, const char *name, uint32_t default_pc, enum osmo_ss7_asp_protocol prot, int default_local_port, const char *default_local_ip, int default_remote_port, const char *default_remote_ip)
request an sccp client instance
Definition: sccp_instance.c:808
struct osmo_ss7_asp * osmo_ss7_asp_find_by_name(struct osmo_ss7_instance *inst, const char *name)
Definition: ss7_instance.c:421
void osmo_ss7_user_set_prim_cb(struct osmo_ss7_user *user, osmo_prim_cb prim_cb)
Definition: ss7_user.c:69
struct osmo_ss7_as * osmo_ss7_as_find_by_rctx(struct osmo_ss7_instance *inst, uint32_t rctx)
Find Application Server by given routing context.
Definition: ss7_instance.c:326
bool osmo_ss7_pointcode_is_valid(const struct osmo_ss7_instance *inst, uint32_t pc)
Whether the PC is valid according to SS7 instance point code format configuration.
Definition: ss7_instance.c:248
struct osmo_ss7_as * osmo_ss7_as_find_by_name(struct osmo_ss7_instance *inst, const char *name)
Find Application Server by given name.
Definition: ss7_instance.c:309
void osmo_ss7_user_destroy(struct osmo_ss7_user *user)
Definition: ss7_user.c:51
uint8_t osmo_ss7_instance_get_network_indicator(const struct osmo_ss7_instance *inst)
Definition: ss7_instance.c:182
struct osmo_sccp_instance * osmo_sccp_simple_server(void *ctx, uint32_t pc, enum osmo_ss7_asp_protocol prot, int local_port, const char *local_ip)
Definition: sccp_instance.c:873
enum osmo_ss7_asp_protocol osmo_ss7_as_get_asp_protocol(const struct osmo_ss7_as *as)
Get asp_protocol configuration of a given AS.
Definition: ss7_as.c:206
static const char * osmo_ss7_asp_protocol_name(enum osmo_ss7_asp_protocol mode)
Definition: osmo_ss7.h:168
int osmo_ss7_vty_go_parent(struct vty *vty)
Definition: ss7_vty.c:1430
bool osmo_ss7_as_has_asp(const struct osmo_ss7_as *as, const struct osmo_ss7_asp *asp)
Determine if given AS contains ASP.
Definition: ss7_as.c:383
const char * osmo_ss7_instance_get_name(const struct osmo_ss7_instance *inst)
Definition: ss7_instance.c:171
const char * osmo_ss7_route_print(const struct osmo_ss7_route *rt)
Definition: ss7_route.c:330
const char * osmo_ss7_route_name(struct osmo_ss7_route *rt, bool list_asps)
Return human readable representation of the route, in a static buffer.
Definition: ss7_route.c:355
int osmo_ss7_as_del_asp(struct osmo_ss7_as *as, const char *asp_name)
Delete given ASP from given AS.
Definition: ss7_as.c:340
struct osmo_ss7_instance * osmo_ss7_instance_find(uint32_t id)
Find a SS7 Instance with given ID.
Definition: ss7.c:115
const char * osmo_ss7_pointcode_print(const struct osmo_ss7_instance *inst, uint32_t pc)
Definition: ss7_instance.c:668
int osmo_ss7_user_mtp_sap_prim_down(struct osmo_ss7_user *user, struct osmo_mtp_prim *omp)
Definition: mtp_sap.c:215
int osmo_ss7_find_free_rctx(struct osmo_ss7_instance *inst)
Definition: ss7_instance.c:259
int osmo_ss7_instance_set_pc_fmt(struct osmo_ss7_instance *inst, uint8_t c0, uint8_t c1, uint8_t c2)
Set the point code format used in given SS7 instance.
Definition: ss7_instance.c:188
static const char * osmo_ss7_as_traffic_mode_name(enum osmo_ss7_as_traffic_mode mode)
Definition: osmo_ss7.h:201
bool osmo_ss7_as_tmode_compatible_xua(struct osmo_ss7_as *as, uint32_t m3ua_tmt)
Definition: ss7_as.c:717
struct osmo_ss7_as * osmo_ss7_as_find_by_proto(struct osmo_ss7_instance *inst, enum osmo_ss7_asp_protocol proto)
Find Application Server (AS) by given protocol.
Definition: ss7_instance.c:361
int osmo_ss7_asp_get_log_subsys(const struct osmo_ss7_asp *asp)
Get the logging subsystem for a given ASP.
Definition: ss7_asp.c:1499
const char * osmo_ss7_pointcode_print_buf(char *buf, size_t buf_len, const struct osmo_ss7_instance *inst, uint32_t pc)
Definition: ss7_instance.c:644
void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp)
Definition: ss7_asp.c:1460
enum osmo_ss7_as_traffic_mode osmo_ss7_tmode_from_xua(uint32_t in)
Definition: ss7.c:213
void osmo_ss7_vty_init_asp(void *ctx)
Definition: ss7_vty.c:1555
void * osmo_ss7_user_get_priv(const struct osmo_ss7_user *user)
Definition: ss7_user.c:79
struct osmo_ss7_instance * osmo_ss7_instances_llist_entry(struct llist_head *list)
Definition: ss7.c:69
struct osmo_sccp_instance * osmo_sccp_simple_server_add_clnt(struct osmo_sccp_instance *inst, enum osmo_ss7_asp_protocol prot, const char *name, uint32_t pc, int local_port, int remote_port, const char *remote_ip)
Definition: sccp_instance.c:882
void osmo_ss7_as_destroy(struct osmo_ss7_as *as)
Destroy given Application Server.
Definition: ss7_as.c:354
Definition: mtp_sap.h:64
Definition: sccp_instance.h:47
Definition: ss7_as.h:105
char * name
Definition: ss7_as.h:149
enum osmo_ss7_asp_protocol proto
Definition: ss7_as.h:151
struct osmo_ss7_instance * inst
Definition: ss7_as.h:108
Definition: ss7_asp.h:55
enum osmo_ss7_asp_protocol proto
Definition: ss7_asp.h:114
struct osmo_ss7_instance * inst
Definition: ss7_asp.h:61
char * name
Definition: ss7_asp.h:112
int trans_proto
The underlaying transport protocol (one of IPPROTO_*)
Definition: ss7_asp.h:178
Definition: ss7_instance.h:47
struct osmo_ss7_user * user[16]
Definition: ss7_instance.h:62
struct llist_head list
member of global list of instances
Definition: ss7_instance.h:49
Definition: ss7_linkset.h:13
Definition: ss7_instance.h:42
Definition: ss7_route.h:28
Definition: osmo_ss7.h:143
uint8_t si
Definition: osmo_ss7.h:148
uint32_t context
Definition: osmo_ss7.h:144
uint32_t l_rk_id
Definition: osmo_ss7.h:145
uint32_t ssn
Definition: osmo_ss7.h:149
uint32_t pc
Definition: osmo_ss7.h:147
Definition: ss7_user.h:15
const char * name
Definition: ss7_user.h:19
struct osmo_ss7_instance * inst
Definition: ss7_user.h:17
Definition: ss7_asp.h:23
Definition: ss7_xua_srv.h:18
uint32_t pc
Definition: tcap_as_loadshare.c:2