libosmo-sccp  0.7.1.20171026
Osmocom SIGTRAN library
 All Data Structures Files Functions Variables Enumerations Enumerator Macros
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 
12 extern struct llist_head osmo_ss7_instances;
13 
14 struct osmo_ss7_instance;
15 struct osmo_ss7_user;
16 struct osmo_sccp_instance;
17 struct osmo_mtp_prim;
19 
20 int osmo_ss7_init(void);
22 
23 bool osmo_ss7_pc_is_local(struct osmo_ss7_instance *inst, uint32_t pc);
24 int osmo_ss7_pointcode_parse(struct osmo_ss7_instance *inst, const char *str);
25 int osmo_ss7_pointcode_parse_mask_or_len(struct osmo_ss7_instance *inst, const char *in);
26 const char *osmo_ss7_pointcode_print(const struct osmo_ss7_instance *inst, uint32_t pc);
27 const char *osmo_ss7_pointcode_print2(const struct osmo_ss7_instance *inst, uint32_t pc);
28 
29 /* All known point-code formats have a length of or below 24 bit.
30  * A point-code value exceeding that is used to indicate an unset PC. */
31 #define OSMO_SS7_PC_INVALID 0xffffffff
32 static inline bool osmo_ss7_pc_is_valid(uint32_t pc)
33 {
34  return pc <= 0x00ffffff;
35 }
36 
37 /***********************************************************************
38  * SS7 Routing Tables
39  ***********************************************************************/
40 
43  struct llist_head list;
47  struct llist_head routes;
48 
49  struct {
50  char *name;
51  char *description;
52  } cfg;
53 };
54 
55 struct osmo_ss7_route_table *
57 struct osmo_ss7_route_table *
60 
61 /***********************************************************************
62  * SS7 Instances
63  ***********************************************************************/
64 
66  char delimiter;
67  uint8_t component_len[3];
68 };
69 
72  struct llist_head list;
74  struct llist_head linksets;
76  struct llist_head as_list;
78  struct llist_head asp_list;
80  struct llist_head rtable_list;
82  struct llist_head xua_servers;
83  /* array for faster lookup of user (indexed by service
84  * indicator) */
85  const struct osmo_ss7_user *user[16];
86 
88 
90 
91  struct {
92  uint32_t id;
93  char *name;
94  char *description;
95  uint32_t primary_pc;
96  /* secondary PCs */
97  /* capability PCs */
101  struct llist_head sccp_address_book;
102  } cfg;
103 };
104 
105 struct osmo_ss7_instance *osmo_ss7_instance_find(uint32_t id);
106 struct osmo_ss7_instance *
107 osmo_ss7_instance_find_or_create(void *ctx, uint32_t id);
110  uint8_t c0, uint8_t c1, uint8_t c2);
111 
112 /***********************************************************************
113  * MTP Users (Users of MTP, such as SCCP or ISUP)
114  ***********************************************************************/
115 
117  /* pointer back to SS7 instance */
119  /* name of the user */
120  const char *name;
121  /* primitive call-back for incoming MTP primitives */
122  osmo_prim_cb prim_cb;
123  /* private data */
124  void *priv;
125 };
126 
127 int osmo_ss7_user_register(struct osmo_ss7_instance *inst, uint8_t service_ind,
128  struct osmo_ss7_user *user);
129 
130 int osmo_ss7_user_unregister(struct osmo_ss7_instance *inst, uint8_t service_ind,
131  struct osmo_ss7_user *user);
132 
133 int osmo_ss7_mtp_to_user(struct osmo_ss7_instance *inst, struct osmo_mtp_prim *omp);
134 
135 /* SS7 User wants to issue MTP-TRANSFER.req */
137  struct osmo_mtp_prim *omp);
138 
139 /***********************************************************************
140  * SS7 Links
141  ***********************************************************************/
142 
148 };
149 
150 struct osmo_ss7_linkset;
151 struct osmo_ss7_link;
152 
156  struct {
157  char *name;
158  char *description;
159  uint32_t id;
160 
162  } cfg;
163 };
164 
165 void osmo_ss7_link_destroy(struct osmo_ss7_link *link);
166 struct osmo_ss7_link *
167 osmo_ss7_link_find_or_create(struct osmo_ss7_linkset *lset, uint32_t id);
168 
169 /***********************************************************************
170  * SS7 Linksets
171  ***********************************************************************/
172 
174  struct llist_head list;
178  struct osmo_ss7_link *links[16];
179 
180  struct {
181  char *name;
182  char *description;
183  uint32_t adjacent_pc;
184  uint32_t local_pc;
185  } cfg;
186 };
187 
188 void osmo_ss7_linkset_destroy(struct osmo_ss7_linkset *lset);
189 struct osmo_ss7_linkset *
191 struct osmo_ss7_linkset *
192 osmo_ss7_linkset_find_or_create(struct osmo_ss7_instance *inst, const char *name, uint32_t pc);
193 
194 
195 /***********************************************************************
196  * SS7 Routes
197  ***********************************************************************/
198 
201  struct llist_head list;
204 
205  struct {
209  struct osmo_ss7_as *as;
210  } dest;
211 
212  struct {
213  /* FIXME: presence? */
214  uint32_t pc;
215  uint32_t mask;
219  uint32_t priority;
220  uint8_t qos_class;
221  } cfg;
222 };
223 
224 struct osmo_ss7_route *
225 osmo_ss7_route_find_dpc(struct osmo_ss7_route_table *rtbl, uint32_t dpc);
226 struct osmo_ss7_route *
228  uint32_t mask);
229 struct osmo_ss7_route *
230 osmo_ss7_route_lookup(struct osmo_ss7_instance *inst, uint32_t dpc);
231 struct osmo_ss7_route *
232 osmo_ss7_route_create(struct osmo_ss7_route_table *rtbl, uint32_t dpc,
233  uint32_t mask, const char *linkset_name);
234 void osmo_ss7_route_destroy(struct osmo_ss7_route *rt);
235 
236 
237 /***********************************************************************
238  * SS7 Application Servers
239  ***********************************************************************/
240 
242  uint32_t context;
243  uint32_t l_rk_id;
244 
245  uint32_t pc;
246  uint8_t si;
247  uint32_t ssn;
248  /* FIXME: more complex routing keys */
249 };
250 
252  OSMO_SS7_AS_TMOD_OVERRIDE = 0, /* default */
257 };
258 
259 extern struct value_string osmo_ss7_as_traffic_mode_vals[];
260 
261 static inline const char *
263 {
264  return get_value_string(osmo_ss7_as_traffic_mode_vals, mode);
265 }
266 
273 };
274 
275 extern struct value_string osmo_ss7_asp_protocol_vals[];
276 
277 static inline const char *
279 {
280  return get_value_string(osmo_ss7_asp_protocol_vals, mode);
281 }
282 
284 
285 struct osmo_ss7_as {
287  struct llist_head list;
289 
291  struct osmo_fsm_inst *fi;
292 
295 
296  struct {
297  char *name;
298  char *description;
303  uint8_t qos_class;
304  struct {
305  uint32_t dpc;
306  } pc_override;
307 
308  struct osmo_ss7_asp *asps[16];
309  } cfg;
310 };
311 
312 struct osmo_ss7_as *
314 struct osmo_ss7_as *
315 osmo_ss7_as_find_by_rctx(struct osmo_ss7_instance *inst, uint32_t rctx);
316 struct osmo_ss7_as *
317 osmo_ss7_as_find_by_l_rk_id(struct osmo_ss7_instance *inst, uint32_t l_rk_id);
320 struct osmo_ss7_as *
323 int osmo_ss7_as_add_asp(struct osmo_ss7_as *as, const char *asp_name);
324 int osmo_ss7_as_del_asp(struct osmo_ss7_as *as, const char *asp_name);
325 void osmo_ss7_as_destroy(struct osmo_ss7_as *as);
326 bool osmo_ss7_as_has_asp(struct osmo_ss7_as *as,
327  struct osmo_ss7_asp *asp);
328 void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp);
329 
330 
331 /***********************************************************************
332  * SS7 Application Server Processes
333  ***********************************************************************/
334 
336  char *host;
337  uint16_t port;
338 };
339 
347 };
348 
349 struct osmo_ss7_asp {
351  struct llist_head list;
353 
355  struct osmo_fsm_inst *fi;
356 
359  struct llist_head siblings;
360 
362  struct osmo_stream_cli *client;
363  struct osmo_stream_srv *server;
365  char *sock_name;
366 
367  /* ASP Identifier for ASP-UP + NTFY */
368  uint32_t asp_id;
370 
371  /* Layer Manager to which we talk */
372  const struct osmo_xua_layer_manager *lm;
373  void *lm_priv;
374 
377 
379  struct msgb *pending_msg;
380 
381  struct {
382  char *name;
383  char *description;
386  bool is_server;
387 
390  uint8_t qos_class;
391  } cfg;
392 };
393 
394 struct osmo_ss7_asp *
396 struct osmo_ss7_asp
399 struct osmo_ss7_asp *
401  uint16_t remote_port, uint16_t local_port,
403 void osmo_ss7_asp_destroy(struct osmo_ss7_asp *asp);
404 int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg);
405 int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp);
406 int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level);
407 
408 #define LOGPASP(asp, subsys, level, fmt, args ...) \
409  LOGP(subsys, level, "asp-%s: " fmt, (asp)->cfg.name, ## args)
410 
411 /***********************************************************************
412  * xUA Servers
413  ***********************************************************************/
414 
416  osmo_prim_cb prim_cb;
417 };
418 
420  struct llist_head list;
422 
423  /* list of ASPs established via this server */
424  struct llist_head asp_list;
425 
426  struct osmo_stream_srv_link *server;
427 
428  struct {
432  } cfg;
433 };
434 
435 struct osmo_xua_server *
437  uint16_t local_port);
438 
439 struct osmo_xua_server *
441  uint16_t local_port, const char *local_host);
442 
443 int
444 osmo_ss7_xua_server_set_local_host(struct osmo_xua_server *xs, const char *local_host);
445 
447 
448 struct osmo_sccp_instance *
449 osmo_sccp_simple_client(void *ctx, const char *name, uint32_t default_pc,
450  enum osmo_ss7_asp_protocol prot, int default_local_port,
451  const char *default_local_ip, int default_remote_port,
452  const char *default_remote_ip);
453 
454 struct osmo_sccp_instance *
455 osmo_sccp_simple_client_on_ss7_id(void *ctx, uint32_t ss7_id, const char *name,
456  uint32_t default_pc,
457  enum osmo_ss7_asp_protocol prot,
458  int default_local_port,
459  const char *default_local_ip,
460  int default_remote_port,
461  const char *default_remote_ip);
462 
463 struct osmo_sccp_instance *
464 osmo_sccp_simple_server(void *ctx, uint32_t pc,
465  enum osmo_ss7_asp_protocol prot, int local_port,
466  const char *local_ip);
467 
468 struct osmo_sccp_instance *
469 osmo_sccp_simple_server_on_ss7_id(void *ctx, uint32_t ss7_id, uint32_t pc,
470  enum osmo_ss7_asp_protocol prot,
471  int local_port, const char *local_ip);
472 
473 struct osmo_sccp_instance *
475  enum osmo_ss7_asp_protocol prot,
476  const char *name, uint32_t pc,
477  int local_port, int remote_port,
478  const char *remote_ip);
479 
482 
483 /* VTY related */
484 struct vty;
485 void osmo_ss7_vty_init_asp(void *ctx);
486 void osmo_ss7_vty_init_sg(void *ctx);
487 int osmo_ss7_vty_go_parent(struct vty *vty);
488 int osmo_ss7_is_config_node(struct vty *vty, int node);
struct llist_head xua_servers
list of osmo_xua_servers
Definition: osmo_ss7.h:82
struct llist_head list
entry in 'ref osmo_ss7_instance.as_list
Definition: osmo_ss7.h:287
uint32_t dpc
Definition: m3ua.h:431
int osmo_ss7_init(void)
Definition: osmo_ss7.c:1836
struct osmo_stream_cli * client
osmo_stream / libosmo-netif handles
Definition: osmo_ss7.h:362
void osmo_ss7_linkset_destroy(struct osmo_ss7_linkset *lset)
Destroy a SS7 Linkset.
Definition: osmo_ss7.c:508
uint32_t id
Definition: osmo_ss7.h:92
struct osmo_stream_srv_link * server
Definition: osmo_ss7.h:426
struct llist_head list
member in osmo_ss7_route_table::routes
Definition: osmo_ss7.h:201
uint8_t component_len[3]
Definition: osmo_ss7.h:67
struct osmo_xua_server * osmo_ss7_xua_server_find(struct osmo_ss7_instance *inst, enum osmo_ss7_asp_protocol proto, uint16_t local_port)
Definition: osmo_ss7.c:1732
uint32_t primary_pc
Definition: osmo_ss7.h:95
uint8_t si
Definition: osmo_ss7.h:246
uint8_t network_indicator
Definition: osmo_ss7.h:98
char * linkset_name
human-specified linkset name
Definition: osmo_ss7.h:217
struct llist_head list
member of global list of instances
Definition: osmo_ss7.h:72
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: osmo_ss7.c:407
void osmo_ss7_route_table_destroy(struct osmo_ss7_route_table *rtbl)
Definition: osmo_ss7.c:658
Definition: osmo_ss7.h:144
int osmo_ss7_mtp_to_user(struct osmo_ss7_instance *inst, struct osmo_mtp_prim *omp)
Definition: osmo_ss7.c:477
struct osmo_ss7_route * osmo_ss7_route_find_dpc(struct osmo_ss7_route_table *rtbl, uint32_t dpc)
Find a SS7 route for given destination point code in given table.
Definition: osmo_ss7.c:672
struct osmo_ss7_linkset * osmo_ss7_linkset_find_by_name(struct osmo_ss7_instance *inst, const char *name)
Find SS7 Linkset by given name.
Definition: osmo_ss7.c:538
struct osmo_ss7_asp * asps[16]
Definition: osmo_ss7.h:308
struct osmo_ss7_as::@25::@26 pc_override
uint32_t local_pc
Definition: osmo_ss7.h:184
char * description
Definition: osmo_ss7.h:298
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_user.c:552
struct osmo_stream_srv * server
Definition: osmo_ss7.h:363
uint32_t context
Definition: osmo_ss7.h:242
Definition: sccp_internal.h:9
struct llist_head sccp_address_book
Definition: osmo_ss7.h:101
struct osmo_ss7_instance * osmo_ss7_instance_find_or_create(void *ctx, uint32_t id)
Find or create a SS7 Instance.
Definition: osmo_ss7.c:343
const char * osmo_ss7_pointcode_print2(const struct osmo_ss7_instance *inst, uint32_t pc)
Definition: osmo_ss7.c:280
bool rkm_dyn_allocated
Were we dynamically allocated by RKM?
Definition: osmo_ss7.h:294
int osmo_ss7_user_unregister(struct osmo_ss7_instance *inst, uint8_t service_ind, struct osmo_ss7_user *user)
Unregister a MTP user for a given service indicator.
Definition: osmo_ss7.c:457
Definition: osmo_ss7.h:199
struct llist_head linksets
list of osmo_ss7_linkset
Definition: osmo_ss7.h:74
bool permit_dyn_rkm_alloc
Definition: osmo_ss7.h:100
void * priv
Definition: osmo_ss7.h:124
Definition: osmo_ss7.h:419
struct llist_head list
entry in osmo_ss7_instance::asp_list
Definition: osmo_ss7.h:351
struct osmo_ss7_instance * inst
osmo_ss7_instance to which we belong
Definition: osmo_ss7.h:45
int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level)
Definition: xua_default_lm_fsm.c:363
uint32_t l_rk_id
Definition: osmo_ss7.h:243
struct osmo_fsm_inst * fi
ASP FSM.
Definition: osmo_ss7.h:355
bool accept_dyn_reg
Definition: osmo_ss7.h:429
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 protocol.
Definition: osmo_ss7.c:1094
void osmo_ss7_asp_destroy(struct osmo_ss7_asp *asp)
Definition: osmo_ss7.c:1140
struct value_string osmo_ss7_as_traffic_mode_vals[]
Definition: osmo_ss7.c:59
Definition: osmo_ss7.h:271
struct osmo_ss7_link * links[16]
array of osmo_ss7_link
Definition: osmo_ss7.h:178
uint8_t qos_class
Definition: osmo_ss7.h:390
struct llist_head list
Definition: osmo_ss7.h:420
Definition: osmo_ss7.h:335
const struct osmo_xua_layer_manager * lm
Definition: osmo_ss7.h:372
uint32_t asp_id
Definition: osmo_ss7.h:368
struct osmo_ss7_instance * inst
osmo_ss7_instance to which we belong
Definition: osmo_ss7.h:176
uint32_t priority
lower priority is higher
Definition: osmo_ss7.h:219
Definition: osmo_ss7.h:116
Definition: osmo_ss7.h:41
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_user.c:561
Definition: osmo_ss7.h:241
struct osmo_ss7_instance::@20 cfg
struct osmo_ss7_link * osmo_ss7_link_find_or_create(struct osmo_ss7_linkset *lset, uint32_t id)
Find or create SS7 Link with given ID in given Linkset.
Definition: osmo_ss7.c:599
uint32_t pc
Definition: osmo_ss7.h:245
int osmo_ss7_asp_protocol_port(enum osmo_ss7_asp_protocol prot)
Definition: osmo_ss7.c:310
enum osmo_ss7_as_traffic_mode osmo_ss7_tmode_from_xua(uint32_t in)
Definition: osmo_ss7.c:1863
static const char * osmo_ss7_asp_protocol_name(enum osmo_ss7_asp_protocol mode)
Definition: osmo_ss7.h:278
Definition: osmo_ss7.h:270
const struct osmo_ss7_user * user[16]
Definition: osmo_ss7.h:85
int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp)
Definition: osmo_ss7.c:1176
int osmo_ss7_as_del_asp(struct osmo_ss7_as *as, const char *asp_name)
Delete given ASP from given AS.
Definition: osmo_ss7.c:948
struct osmo_ss7_route_table * rtable_system
Definition: osmo_ss7.h:87
int osmo_ss7_is_config_node(struct vty *vty, int node)
Definition: osmo_ss7_vty.c:1666
osmo_ss7_link_adm_state
Definition: osmo_ss7.h:143
enum osmo_ss7_asp_protocol proto
Definition: osmo_ss7.h:431
int osmo_ss7_tmode_to_xua(enum osmo_ss7_as_traffic_mode tmod)
Definition: osmo_ss7.c:1849
void osmo_ss7_link_destroy(struct osmo_ss7_link *link)
Destryo SS7 Link.
Definition: osmo_ss7.c:582
struct osmo_ss7_instance * inst
Definition: osmo_ss7.h:118
bool dyn_allocated
Were we dynamically allocated.
Definition: osmo_ss7.h:376
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: osmo_ss7.c:885
struct osmo_ss7_asp_peer local
Definition: osmo_ss7.h:388
struct osmo_ss7_instance * osmo_ss7_instance_find(uint32_t id)
Find a SS7 Instance with given ID.
Definition: osmo_ss7.c:326
struct osmo_ss7_instance * inst
Definition: osmo_ss7.h:421
struct llist_head osmo_ss7_instances
Definition: osmo_ss7.h:272
uint32_t dpc
Definition: osmo_ss7.h:305
struct osmo_xua_server::@28 cfg
uint32_t mask
Definition: osmo_ss7.h:215
struct osmo_ss7_route_table * osmo_ss7_route_table_find_or_create(struct osmo_ss7_instance *inst, const char *name)
Definition: osmo_ss7.c:641
struct osmo_ss7_routing_key routing_key
Definition: osmo_ss7.h:300
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: osmo_ss7.c:832
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: osmo_ss7.c:798
enum osmo_ss7_asp_protocol proto
Definition: osmo_ss7.h:299
struct value_string osmo_ss7_asp_protocol_vals[]
Definition: osmo_ss7.c:67
Definition: osmo_ss7.h:269
bool asp_id_present
Definition: osmo_ss7.h:369
struct llist_head siblings
Definition: osmo_ss7.h:359
static bool osmo_ss7_pc_is_valid(uint32_t pc)
Definition: osmo_ss7.h:32
Definition: osmo_ss7.h:415
int osmo_ss7_xua_server_set_local_host(struct osmo_xua_server *xs, const char *local_host)
Definition: osmo_ss7.c:1800
void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp)
Definition: osmo_ss7.c:1718
Definition: osmo_ss7.h:253
struct llist_head list
member in list of routing tables
Definition: osmo_ss7.h:43
no SCTP association with peer
Definition: osmo_ss7.h:342
void osmo_ss7_vty_init_asp(void *ctx)
Definition: osmo_ss7_vty.c:1768
osmo_ss7_asp_admin_state
Definition: osmo_ss7.h:340
Definition: osmo_ss7.h:256
char * name
Definition: osmo_ss7.h:181
void osmo_ss7_route_destroy(struct osmo_ss7_route *rt)
Destroy a given SS7 route.
Definition: osmo_ss7.c:782
osmo_prim_cb prim_cb
Definition: osmo_ss7.h:416
void osmo_ss7_instance_destroy(struct osmo_ss7_instance *inst)
Destroy a SS7 Instance.
Definition: osmo_ss7.c:384
struct llist_head asp_list
Definition: osmo_ss7.h:424
const char * osmo_ss7_pointcode_print(const struct osmo_ss7_instance *inst, uint32_t pc)
Definition: osmo_ss7.c:272
char * description
Definition: osmo_ss7.h:94
void osmo_ss7_vty_init_sg(void *ctx)
Definition: osmo_ss7_vty.c:1774
Definition: osmo_ss7.h:65
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_user.c:516
int osmo_ss7_vty_go_parent(struct vty *vty)
Definition: osmo_ss7_vty.c:1618
enum osmo_ss7_asp_admin_state adm_state
Definition: osmo_ss7.h:385
enum osmo_ss7_as_traffic_mode mode
Definition: osmo_ss7.h:301
osmo_ss7_as_traffic_mode
Definition: osmo_ss7.h:251
char * name
Definition: osmo_ss7.h:93
struct osmo_ss7_route * osmo_ss7_route_lookup(struct osmo_ss7_instance *inst, uint32_t dpc)
Find a SS7 route for given destination point code in given SS7.
Definition: osmo_ss7.c:707
int osmo_ss7_find_free_rctx(struct osmo_ss7_instance *inst)
Definition: osmo_ss7.c:90
struct osmo_ss7_pc_fmt pc_fmt
Definition: osmo_ss7.h:99
char * description
Definition: osmo_ss7.h:182
struct osmo_ss7_instance * inst
Definition: osmo_ss7.h:352
osmo_ss7_asp_protocol
Definition: osmo_ss7.h:267
int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg)
send a fully encoded msgb via a given ASP
Definition: osmo_ss7.c:1680
const char * name
Definition: osmo_ss7.h:120
int osmo_ss7_user_mtp_xfer_req(struct osmo_ss7_instance *inst, struct osmo_mtp_prim *omp)
Definition: osmo_ss7_hmrt.c:198
Definition: osmo_ss7.h:252
Definition: osmo_ss7.h:349
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)
Definition: osmo_ss7.c:1108
struct osmo_ss7_instance * inst
Definition: osmo_ss7.h:288
struct osmo_fsm_inst * fi
AS FSM.
Definition: osmo_ss7.h:291
Definition: osmo_ss7.h:147
uint32_t ssn
Definition: osmo_ss7.h:247
struct osmo_xua_server * osmo_ss7_xua_server_create(struct osmo_ss7_instance *inst, enum osmo_ss7_asp_protocol proto, uint16_t local_port, const char *local_host)
create a new xUA server listening to given ip/port
Definition: osmo_ss7.c:1754
struct llist_head routes
list of osmo_ss7_route
Definition: osmo_ss7.h:47
int osmo_ss7_as_add_asp(struct osmo_ss7_as *as, const char *asp_name)
Add given ASP to given AS.
Definition: osmo_ss7.c:918
uint32_t adjacent_pc
Definition: osmo_ss7.h:183
SCP association, but reject ASP-ACTIVE.
Definition: osmo_ss7.h:344
struct osmo_ss7_asp * osmo_ss7_asp_find_by_name(struct osmo_ss7_instance *inst, const char *name)
Definition: osmo_ss7.c:1016
static const char * osmo_ss7_as_traffic_mode_name(enum osmo_ss7_as_traffic_mode mode)
Definition: osmo_ss7.h:262
struct llist_head asp_list
list of osmo_ss7_asp
Definition: osmo_ss7.h:78
struct osmo_sccp_instance * sccp
Definition: osmo_ss7.h:89
char * sock_name
pre-formatted human readable local/remote socket name
Definition: osmo_ss7.h:365
in normal operation
Definition: osmo_ss7.h:346
Definition: osmo_ss7.h:254
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: osmo_ss7.c:815
Definition: osmo_ss7.h:255
struct osmo_ss7_asp_peer remote
Definition: osmo_ss7.h:389
struct llist_head rtable_list
list of osmo_ss7_route_table
Definition: osmo_ss7.h:80
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_user.c:311
void osmo_ss7_as_destroy(struct osmo_ss7_as *as)
Destroy given Application Server.
Definition: osmo_ss7.c:973
struct osmo_ss7_route * osmo_ss7_route_find_dpc_mask(struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask)
Find a SS7 route for given destination point code + mask in given table.
Definition: osmo_ss7.c:689
uint8_t qos_class
Definition: osmo_ss7.h:220
struct osmo_ss7_linkset * osmo_ss7_linkset_find_or_create(struct osmo_ss7_instance *inst, const char *name, uint32_t pc)
Find or allocate SS7 Linkset.
Definition: osmo_ss7.c:555
struct msgb * pending_msg
Pending message for non-blocking IPA read.
Definition: osmo_ss7.h:379
struct llist_head as_list
list of osmo_ss7_as
Definition: osmo_ss7.h:76
char * description
Definition: osmo_ss7.h:383
struct osmo_xua_server * xua_server
osmo_xua_server over which we were established
Definition: osmo_ss7.h:358
Definition: osmo_ss7.h:146
Definition: osmo_ss7.h:70
Definition: osmo_ss7.h:268
bool is_server
Definition: osmo_ss7.h:386
struct osmo_ss7_route::@24 cfg
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: osmo_ss7.c:850
Definition: osmo_ss7.h:173
Definition: osmo_ss7.h:145
bool osmo_ss7_pc_is_local(struct osmo_ss7_instance *inst, uint32_t pc)
Definition: osmo_ss7.c:1827
enum osmo_ss7_asp_protocol proto
Definition: osmo_ss7.h:384
struct llist_head list
Definition: osmo_ss7.h:174
char * name
Definition: osmo_ss7.h:297
osmo_prim_cb prim_cb
Definition: osmo_ss7.h:122
struct osmo_ss7_linkset * linkset
pointer to linkset (destination) of route
Definition: osmo_ss7.h:207
void * lm_priv
Definition: osmo_ss7.h:373
char * host
Definition: osmo_ss7.h:336
struct osmo_ss7_route_table * rtable
osmo_ss7_route_table to which we belong
Definition: osmo_ss7.h:203
char delimiter
Definition: osmo_ss7.h:66
struct osmo_ss7_route_table::@19 cfg
struct osmo_ss7_as * as
pointer to Application Server
Definition: osmo_ss7.h:209
int osmo_ss7_pointcode_parse(struct osmo_ss7_instance *inst, const char *str)
Definition: osmo_ss7.c:214
struct osmo_ss7_asp::@27 cfg
struct osmo_ss7_asp_peer local
Definition: osmo_ss7.h:430
Definition: osmo_ss7.h:285
int osmo_ss7_pointcode_parse_mask_or_len(struct osmo_ss7_instance *inst, const char *in)
Definition: osmo_ss7.c:286
uint32_t pc
Definition: osmo_ss7.h:214
uint16_t port
Definition: osmo_ss7.h:337
int osmo_ss7_user_register(struct osmo_ss7_instance *inst, uint8_t service_ind, struct osmo_ss7_user *user)
Register a MTP user for a given service indicator.
Definition: osmo_ss7.c:433
bool osmo_ss7_as_has_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp)
Determine if given AS contains ASP.
Definition: osmo_ss7.c:998
struct osmo_ss7_route::@23 dest
char * name
Definition: osmo_ss7.h:382
struct osmo_ss7_route * osmo_ss7_route_create(struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask, const char *linkset_name)
Create a new route in the given routing table.
Definition: osmo_ss7.c:743
Definition: mtp_sap.h:56
char * description
Definition: osmo_ss7.h:51
void osmo_ss7_xua_server_destroy(struct osmo_xua_server *xs)
Definition: osmo_ss7.c:1810
struct osmo_ss7_linkset::@22 cfg
uint32_t recovery_timeout_msec
Definition: osmo_ss7.h:302
uint8_t qos_class
Definition: osmo_ss7.h:303
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_user.c:495
char * name
Definition: osmo_ss7.h:50
struct osmo_ss7_as::@25 cfg
struct osmo_ss7_route_table * osmo_ss7_route_table_find(struct osmo_ss7_instance *inst, const char *name)
Definition: osmo_ss7.c:629