libosmo-sigtran  2.0.0.52-6412.202412092026
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 struct osmo_ss7_instance;
15 
16 extern struct llist_head osmo_ss7_instances;
17 /* Get an entry pointer from a list item in osmo_ss7_instances: */
18 struct osmo_ss7_instance *osmo_ss7_instances_llist_entry(struct llist_head *list);
19 
20 int osmo_ss7_init(void);
21 
22 /* All known point-code formats have a length of or below 24 bit.
23  * A point-code value exceeding that is used to indicate an unset PC. */
24 #define OSMO_SS7_PC_INVALID 0xffffffff
25 static inline bool osmo_ss7_pc_is_valid(uint32_t pc)
26 {
27  return pc <= 0x00ffffff;
28 }
29 
30 /***********************************************************************
31  * xUA Servers
32  ***********************************************************************/
33 
35 
36 struct osmo_xua_server;
37 
38 /***********************************************************************
39  * SS7 Instances
40  ***********************************************************************/
41 
42 struct osmo_ss7_pc_fmt;
43 struct osmo_ss7_instance;
44 
45 struct osmo_ss7_instance *osmo_ss7_instance_find(uint32_t id);
46 struct osmo_ss7_instance *
47 osmo_ss7_instance_find_or_create(void *ctx, uint32_t id);
49 
50 uint32_t osmo_ss7_instance_get_id(const struct osmo_ss7_instance *inst);
51 const char *osmo_ss7_instance_get_name(const struct osmo_ss7_instance *inst);
52 
54  uint8_t c0, uint8_t c1, uint8_t c2);
55 const struct osmo_ss7_pc_fmt *
57 
58 uint32_t osmo_ss7_instance_get_primary_pc(const struct osmo_ss7_instance *inst);
59 
61 struct osmo_sccp_instance *osmo_ss7_get_sccp(const struct osmo_ss7_instance *inst);
62 
64 
65 bool osmo_ss7_pc_is_local(const struct osmo_ss7_instance *inst, uint32_t pc);
66 int osmo_ss7_pointcode_parse(const struct osmo_ss7_instance *inst, const char *str);
67 int osmo_ss7_pointcode_parse_mask_or_len(const struct osmo_ss7_instance *inst, const char *in);
68 const char *osmo_ss7_pointcode_print_buf(char *buf, size_t buf_len, const struct osmo_ss7_instance *inst, uint32_t pc);
69 const char *osmo_ss7_pointcode_print(const struct osmo_ss7_instance *inst, uint32_t pc);
70 const char *osmo_ss7_pointcode_print2(const struct osmo_ss7_instance *inst, uint32_t pc);
71 
72 uint8_t osmo_ss7_pc_width(const struct osmo_ss7_pc_fmt *pc_fmt);
73 uint32_t osmo_ss7_pc_normalize(const struct osmo_ss7_pc_fmt *pc_fmt, uint32_t pc);
74 
75 /***********************************************************************
76  * MTP Users (Users of MTP, such as SCCP or ISUP)
77  ***********************************************************************/
78 
79 struct osmo_ss7_user;
80 struct osmo_mtp_prim;
81 
82 
83 struct osmo_ss7_user *osmo_ss7_user_create(struct osmo_ss7_instance *inst, const char *name);
84 void osmo_ss7_user_destroy(struct osmo_ss7_user *user);
85 
87 void osmo_ss7_user_set_prim_cb(struct osmo_ss7_user *user, osmo_prim_cb prim_cb);
88 void osmo_ss7_user_set_priv(struct osmo_ss7_user *user, void *priv);
89 void *osmo_ss7_user_get_priv(const struct osmo_ss7_user *user);
90 
91 int osmo_ss7_user_register(struct osmo_ss7_instance *inst, uint8_t service_ind,
92  struct osmo_ss7_user *user);
93 int osmo_ss7_user_unregister(struct osmo_ss7_instance *inst, uint8_t service_ind,
94  struct osmo_ss7_user *user);
95 
96 /* SS7 User wants to issue MTP-TRANSFER.req */
98  struct osmo_mtp_prim *omp);
99 
100 
101 /***********************************************************************
102  * SCCP Instance
103  ***********************************************************************/
104 
105 struct osmo_sccp_instance;
106 
107 void osmo_sccp_set_max_optional_data(struct osmo_sccp_instance *inst, int val);
108 
109 /***********************************************************************
110  * SS7 Links
111  ***********************************************************************/
112 
113 struct osmo_ss7_link;
114 
115 /***********************************************************************
116  * SS7 Linksets
117  ***********************************************************************/
118 
119 struct osmo_ss7_linkset;
120 
121 /***********************************************************************
122  * SS7 Routes
123  ***********************************************************************/
124 
125 struct osmo_ss7_route;
126 
127 struct osmo_ss7_route *
128 osmo_ss7_route_lookup(struct osmo_ss7_instance *inst, uint32_t dpc);
129 const char *osmo_ss7_route_print(const struct osmo_ss7_route *rt);
130 const char *osmo_ss7_route_name(struct osmo_ss7_route *rt, bool list_asps);
131 struct osmo_ss7_as *
133 
134 /***********************************************************************
135  * SS7 Routing key
136  ***********************************************************************/
137 
139  uint32_t context;
140  uint32_t l_rk_id;
141 
142  uint32_t pc;
143  uint8_t si;
144  uint32_t ssn;
145  /* FIXME: more complex routing keys */
146 };
147 
148 
149 /***********************************************************************
150  * SS7 ASP Protocols
151  ***********************************************************************/
152 
159 };
160 
161 extern struct value_string osmo_ss7_asp_protocol_vals[];
162 static inline const char *
164 {
165  return get_value_string(osmo_ss7_asp_protocol_vals, mode);
166 }
167 
169 
170 
171 /***********************************************************************
172  * SS7 AS Traffic Mode
173  ***********************************************************************/
174 
176  OSMO_SS7_AS_TMOD_OVERRIDE = 0, /* default */
181 };
182 
183 extern struct value_string osmo_ss7_as_traffic_mode_vals[];
184 
185 static inline const char *
187 {
188  return get_value_string(osmo_ss7_as_traffic_mode_vals, mode);
189 }
190 
193 
194 
195 /***********************************************************************
196  * SS7 Application Servers
197  ***********************************************************************/
198 
199 struct osmo_ss7_as;
200 struct osmo_ss7_asp;
201 
202 struct osmo_ss7_as *
204 struct osmo_ss7_as *
205 osmo_ss7_as_find_by_rctx(struct osmo_ss7_instance *inst, uint32_t rctx);
206 struct osmo_ss7_as *
207 osmo_ss7_as_find_by_l_rk_id(struct osmo_ss7_instance *inst, uint32_t l_rk_id);
210 struct osmo_ss7_as *
214 int osmo_ss7_as_add_asp(struct osmo_ss7_as *as, const char *asp_name);
215 int osmo_ss7_as_del_asp(struct osmo_ss7_as *as, const char *asp_name);
216 void osmo_ss7_as_destroy(struct osmo_ss7_as *as);
217 bool osmo_ss7_as_has_asp(const struct osmo_ss7_as *as,
218  const struct osmo_ss7_asp *asp);
220 bool osmo_ss7_as_down(const struct osmo_ss7_as *as);
221 bool osmo_ss7_as_active(const struct osmo_ss7_as *as);
222 bool osmo_ss7_as_tmode_compatible_xua(struct osmo_ss7_as *as, uint32_t m3ua_tmt);
223 
224 
225 /***********************************************************************
226  * SS7 Application Server Processes
227  ***********************************************************************/
228 
236 };
237 
242 };
243 
244 extern const struct value_string osmo_ss7_asp_role_names[];
245 
246 struct osmo_ss7_asp;
247 
249 #define OSMO_SS7_ASP_QUIRK_NO_NOTIFY 0x00000001
251 #define OSMO_SS7_ASP_QUIRK_DAUD_IN_ASP 0x00000002
253 #define OSMO_SS7_ASP_QUIRK_SNM_INACTIVE 0x00000004
254 
255 
256 struct osmo_ss7_asp *
258 struct osmo_ss7_asp *
261 struct osmo_ss7_asp *
262 osmo_ss7_asp_find(struct osmo_ss7_instance *inst, const char *name,
263  uint16_t remote_port, uint16_t local_port,
265  OSMO_DEPRECATED("Use osmo_ss7_asp_find2() instead");
266 struct osmo_ss7_asp *
267 osmo_ss7_asp_find2(struct osmo_ss7_instance *inst, const char *name,
268  uint16_t remote_port, uint16_t local_port,
270 struct osmo_ss7_asp *
272  uint16_t remote_port, uint16_t local_port,
274  OSMO_DEPRECATED("Use osmo_ss7_asp_find_or_create2() instead");
275 struct osmo_ss7_asp *
277  uint16_t remote_port, uint16_t local_port,
279 void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp);
280 void osmo_ss7_asp_destroy(struct osmo_ss7_asp *asp);
281 int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg);
282 int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp);
283 int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level);
284 bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp);
285 int osmo_ss7_asp_get_log_subsys(const struct osmo_ss7_asp *asp);
286 const char *osmo_ss7_asp_get_name(const struct osmo_ss7_asp *asp);
288 int osmo_ss7_asp_get_trans_proto(const struct osmo_ss7_asp *asp);
289 
297 typedef int osmo_ss7_asp_rx_unknown_cb(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg);
298 
300 
301 
302 /***********************************************************************
303  * Simple Client
304  ***********************************************************************/
305 
306 struct osmo_sccp_instance *
307 osmo_sccp_simple_client(void *ctx, const char *name, uint32_t default_pc,
308  enum osmo_ss7_asp_protocol prot, int default_local_port,
309  const char *default_local_ip, int default_remote_port,
310  const char *default_remote_ip);
311 
312 struct osmo_sccp_instance *
313 osmo_sccp_simple_client_on_ss7_id(void *ctx, uint32_t ss7_id, const char *name,
314  uint32_t default_pc,
315  enum osmo_ss7_asp_protocol prot,
316  int default_local_port,
317  const char *default_local_ip,
318  int default_remote_port,
319  const char *default_remote_ip);
320 
321 /***********************************************************************
322  * Simple Server
323  ***********************************************************************/
324 
325 struct osmo_sccp_instance *
326 osmo_sccp_simple_server(void *ctx, uint32_t pc,
327  enum osmo_ss7_asp_protocol prot, int local_port,
328  const char *local_ip);
329 
330 struct osmo_sccp_instance *
331 osmo_sccp_simple_server_on_ss7_id(void *ctx, uint32_t ss7_id, uint32_t pc,
332  enum osmo_ss7_asp_protocol prot,
333  int local_port, const char *local_ip);
334 
335 struct osmo_sccp_instance *
337  enum osmo_ss7_asp_protocol prot,
338  const char *name, uint32_t pc,
339  int local_port, int remote_port,
340  const char *remote_ip);
341 
342 /* VTY related */
343 struct vty;
344 void osmo_ss7_vty_init_asp(void *ctx);
345 void osmo_ss7_vty_init_sg(void *ctx);
346 int osmo_ss7_vty_go_parent(struct vty *vty);
347 int osmo_ss7_is_config_node(struct vty *vty, int node);
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: osmo_ss7_as.c:113
struct osmo_ss7_user * osmo_ss7_user_create(struct osmo_ss7_instance *inst, const char *name)
Definition: osmo_ss7_user.c:37
const struct osmo_ss7_pc_fmt * osmo_ss7_instance_get_pc_fmt(const struct osmo_ss7_instance *inst)
Definition: osmo_ss7_instance.c:146
int osmo_ss7_pointcode_parse_mask_or_len(const struct osmo_ss7_instance *inst, const char *in)
Definition: osmo_ss7_instance.c:587
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_user.c:895
struct osmo_ss7_as * osmo_ss7_route_get_dest_as(struct osmo_ss7_route *rt)
Get destination AS of route.
Definition: osmo_ss7_route.c:311
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: osmo_ss7_as.c:281
const char * osmo_ss7_pointcode_print2(const struct osmo_ss7_instance *inst, uint32_t pc)
Definition: osmo_ss7_instance.c:581
bool osmo_ss7_pc_is_local(const struct osmo_ss7_instance *inst, uint32_t pc)
Definition: osmo_ss7_instance.c:172
struct osmo_ss7_instance * osmo_ss7_user_get_instance(const struct osmo_ss7_user *user)
Definition: osmo_ss7_user.c:54
int osmo_ss7_asp_get_trans_proto(const struct osmo_ss7_asp *asp)
Get the transport proto of a given ASP.
Definition: osmo_ss7_asp.c:1230
void osmo_ss7_vty_init_sg(void *ctx)
Definition: osmo_ss7_vty.c:3116
uint32_t osmo_ss7_instance_get_primary_pc(const struct osmo_ss7_instance *inst)
Definition: osmo_ss7_instance.c:122
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_user.c:79
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: osmo_ss7_instance.c:413
static bool osmo_ss7_pc_is_valid(uint32_t pc)
Definition: osmo_ss7.h:25
int osmo_ss7_pointcode_parse(const struct osmo_ss7_instance *inst, const char *str)
Definition: osmo_ss7_instance.c:515
uint32_t osmo_ss7_instance_get_id(const struct osmo_ss7_instance *inst)
Definition: osmo_ss7_instance.c:112
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: osmo_ss7_instance.c:343
osmo_ss7_asp_protocol
Definition: osmo_ss7.h:153
@ OSMO_SS7_ASP_PROT_SUA
Definition: osmo_ss7.h:155
@ OSMO_SS7_ASP_PROT_NONE
Definition: osmo_ss7.h:154
@ OSMO_SS7_ASP_PROT_IPA
Definition: osmo_ss7.h:157
@ OSMO_SS7_ASP_PROT_M3UA
Definition: osmo_ss7.h:156
@ _NUM_OSMO_SS7_ASP_PROT
Definition: osmo_ss7.h:158
struct value_string osmo_ss7_asp_protocol_vals[]
Definition: osmo_ss7_asp.c:119
struct value_string osmo_ss7_as_traffic_mode_vals[]
Definition: osmo_ss7_as.c:49
int osmo_ss7_tmode_to_xua(enum osmo_ss7_as_traffic_mode tmod)
Definition: osmo_ss7.c:190
enum osmo_ss7_asp_protocol osmo_ss7_asp_get_proto(const struct osmo_ss7_asp *asp)
Get the proto of a given ASP.
Definition: osmo_ss7_asp.c:1221
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_user.c:103
osmo_ss7_asp_role
Definition: osmo_ss7.h:238
@ OSMO_SS7_ASP_ROLE_SG
Definition: osmo_ss7.h:240
@ OSMO_SS7_ASP_ROLE_ASP
Definition: osmo_ss7.h:239
@ OSMO_SS7_ASP_ROLE_IPSP
Definition: osmo_ss7.h:241
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_asp.c:1113
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:507
void osmo_ss7_instance_destroy(struct osmo_ss7_instance *inst)
Destroy a SS7 Instance.
Definition: osmo_ss7_instance.c:89
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_instance.c:248
void osmo_ss7_user_set_priv(struct osmo_ss7_user *user, void *priv)
Definition: osmo_ss7_user.c:64
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: osmo_ss7_instance.c:391
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:297
const struct value_string osmo_ss7_asp_role_names[]
Definition: osmo_ss7_asp.c:127
osmo_ss7_asp_admin_state
Definition: osmo_ss7.h:229
@ OSMO_SS7_ASP_ADM_S_SHUTDOWN
no SCTP association with peer
Definition: osmo_ss7.h:231
@ OSMO_SS7_ASP_ADM_S_BLOCKED
SCP association, but reject ASP-ACTIVE.
Definition: osmo_ss7.h:233
@ OSMO_SS7_ASP_ADM_S_ENABLED
in normal operation
Definition: osmo_ss7.h:235
uint32_t osmo_ss7_pc_normalize(const struct osmo_ss7_pc_fmt *pc_fmt, uint32_t pc)
Definition: osmo_ss7.c:95
struct osmo_sccp_instance * osmo_ss7_get_sccp(const struct osmo_ss7_instance *inst)
Get the SCCP instance, if present.
Definition: osmo_ss7_instance.c:167
int osmo_ss7_asp_protocol_port(enum osmo_ss7_asp_protocol prot)
Definition: osmo_ss7_asp.c:178
int osmo_ss7_user_mtp_xfer_req(struct osmo_ss7_instance *inst, struct osmo_mtp_prim *omp)
Definition: osmo_ss7_hmrt.c:299
bool osmo_ss7_as_active(const struct osmo_ss7_as *as)
Determine if given AS is in the active state.
Definition: osmo_ss7_as.c:205
void osmo_ss7_asp_destroy(struct osmo_ss7_asp *asp)
Definition: osmo_ss7_asp.c:576
bool osmo_ss7_as_down(const struct osmo_ss7_as *as)
Determine if given AS is in the down state.
Definition: osmo_ss7_as.c:215
struct osmo_sccp_instance * osmo_ss7_ensure_sccp(struct osmo_ss7_instance *inst)
Allocate an SCCP instance, if not present yet.
Definition: osmo_ss7_instance.c:153
osmo_ss7_as_traffic_mode
Definition: osmo_ss7.h:175
@ OSMO_SS7_AS_TMOD_OVERRIDE
Definition: osmo_ss7.h:176
@ _NUM_OSMO_SS7_ASP_TMOD
Definition: osmo_ss7.h:180
@ OSMO_SS7_AS_TMOD_ROUNDROBIN
Definition: osmo_ss7.h:179
@ OSMO_SS7_AS_TMOD_BCAST
Definition: osmo_ss7.h:177
@ OSMO_SS7_AS_TMOD_LOADSHARE
Definition: osmo_ss7.h:178
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:126
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: osmo_ss7_instance.c:379
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: osmo_ss7_instance.c:357
bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp)
Definition: osmo_ss7_asp.c:723
struct llist_head osmo_ss7_instances
int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp)
Definition: osmo_ss7_asp.c:614
const char * osmo_ss7_asp_get_name(const struct osmo_ss7_asp *asp)
Get the name of a given ASP.
Definition: osmo_ss7_asp.c:1212
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:762
uint8_t osmo_ss7_pc_width(const struct osmo_ss7_pc_fmt *pc_fmt)
Definition: osmo_ss7.c:87
int osmo_ss7_init(void)
Definition: osmo_ss7.c:164
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: osmo_ss7_asp.c:1170
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_instance.c:300
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:741
struct osmo_ss7_asp * osmo_ss7_asp_find_by_name(struct osmo_ss7_instance *inst, const char *name)
Definition: osmo_ss7_instance.c:326
void osmo_ss7_user_set_prim_cb(struct osmo_ss7_user *user, osmo_prim_cb prim_cb)
Definition: osmo_ss7_user.c:59
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_instance.c:231
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_instance.c:214
void osmo_ss7_user_destroy(struct osmo_ss7_user *user)
Definition: osmo_ss7_user.c:49
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:806
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: osmo_ss7_as.c:104
static const char * osmo_ss7_asp_protocol_name(enum osmo_ss7_asp_protocol mode)
Definition: osmo_ss7.h:163
int osmo_ss7_vty_go_parent(struct vty *vty)
Definition: osmo_ss7_vty.c:2922
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: osmo_ss7_as.c:189
const char * osmo_ss7_instance_get_name(const struct osmo_ss7_instance *inst)
Definition: osmo_ss7_instance.c:117
int osmo_ss7_is_config_node(struct vty *vty, int node)
Definition: osmo_ss7_vty.c:2976
const char * osmo_ss7_route_print(const struct osmo_ss7_route *rt)
Definition: osmo_ss7_route.c:283
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: osmo_ss7_hmrt.c:156
int osmo_ss7_as_del_asp(struct osmo_ss7_as *as, const char *asp_name)
Delete given ASP from given AS.
Definition: osmo_ss7_as.c:144
struct osmo_ss7_instance * osmo_ss7_instance_find(uint32_t id)
Find a SS7 Instance with given ID.
Definition: osmo_ss7.c:109
const char * osmo_ss7_pointcode_print(const struct osmo_ss7_instance *inst, uint32_t pc)
Definition: osmo_ss7_instance.c:573
int osmo_ss7_find_free_rctx(struct osmo_ss7_instance *inst)
Definition: osmo_ss7_instance.c:183
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_instance.c:128
static const char * osmo_ss7_as_traffic_mode_name(enum osmo_ss7_as_traffic_mode mode)
Definition: osmo_ss7.h:186
bool osmo_ss7_as_tmode_compatible_xua(struct osmo_ss7_as *as, uint32_t m3ua_tmt)
Definition: osmo_ss7_as.c:309
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_instance.c:266
int osmo_ss7_asp_get_log_subsys(const struct osmo_ss7_asp *asp)
Get the logging subsystem for a given ASP.
Definition: osmo_ss7_asp.c:1196
const char * osmo_ss7_pointcode_print_buf(char *buf, size_t buf_len, const struct osmo_ss7_instance *inst, uint32_t pc)
Definition: osmo_ss7_instance.c:549
void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp)
Definition: osmo_ss7_asp.c:1158
enum osmo_ss7_as_traffic_mode osmo_ss7_tmode_from_xua(uint32_t in)
Definition: osmo_ss7.c:204
int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level)
Definition: xua_default_lm_fsm.c:416
void osmo_ss7_vty_init_asp(void *ctx)
Definition: osmo_ss7_vty.c:3110
void * osmo_ss7_user_get_priv(const struct osmo_ss7_user *user)
Definition: osmo_ss7_user.c:69
struct osmo_ss7_instance * osmo_ss7_instances_llist_entry(struct llist_head *list)
Definition: osmo_ss7.c:68
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:815
void osmo_ss7_as_destroy(struct osmo_ss7_as *as)
Destroy given Application Server.
Definition: osmo_ss7_as.c:168
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_route.c:300
Definition: mtp_sap.h:56
Definition: sccp_internal.h:39
Definition: ss7_as.h:31
char * name
Definition: ss7_as.h:49
enum osmo_ss7_asp_protocol proto
Definition: ss7_as.h:51
struct osmo_ss7_instance * inst
Definition: ss7_as.h:34
Definition: ss7_asp.h:28
enum osmo_ss7_asp_protocol proto
Definition: ss7_asp.h:69
struct osmo_ss7_instance * inst
Definition: ss7_asp.h:31
char * name
Definition: ss7_asp.h:67
int trans_proto
The underlaying transport protocol (one of IPPROTO_*)
Definition: ss7_asp.h:96
Definition: ss7_instance.h:20
const struct osmo_ss7_user * user[16]
Definition: ss7_instance.h:35
struct llist_head list
member of global list of instances
Definition: ss7_instance.h:22
Definition: ss7_linkset.h:13
Definition: ss7_instance.h:15
Definition: ss7_route.h:17
Definition: osmo_ss7.h:138
uint8_t si
Definition: osmo_ss7.h:143
uint32_t context
Definition: osmo_ss7.h:139
uint32_t l_rk_id
Definition: osmo_ss7.h:140
uint32_t ssn
Definition: osmo_ss7.h:144
uint32_t pc
Definition: osmo_ss7.h:142
Definition: ss7_user.h:13
const char * name
Definition: ss7_user.h:17
struct osmo_ss7_instance * inst
Definition: ss7_user.h:15
Definition: ss7_xua_srv.h:18
Definition: ss7_xua_srv.h:22