libosmo-sigtran 2.1.0.63-64c8
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
18
19extern struct llist_head osmo_ss7_instances;
20/* Get an entry pointer from a list item in osmo_ss7_instances: */
21struct osmo_ss7_instance *osmo_ss7_instances_llist_entry(struct llist_head *list);
22
23int 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
28static inline bool osmo_ss7_pc_is_valid(uint32_t pc)
29{
30 return pc <= 0x00ffffff;
31}
32
33/***********************************************************************
34 * xUA Servers
35 ***********************************************************************/
36
38
39struct osmo_xua_server;
40
41/***********************************************************************
42 * SS7 Instances
43 ***********************************************************************/
44
45struct osmo_ss7_pc_fmt;
47
48struct osmo_ss7_instance *osmo_ss7_instance_find(uint32_t id);
49struct osmo_ss7_instance *
50osmo_ss7_instance_find_or_create(void *ctx, uint32_t id);
52
53uint32_t osmo_ss7_instance_get_id(const struct osmo_ss7_instance *inst);
54const char *osmo_ss7_instance_get_name(const struct osmo_ss7_instance *inst);
55
57 uint8_t c0, uint8_t c1, uint8_t c2);
58const struct osmo_ss7_pc_fmt *
60
61uint32_t osmo_ss7_instance_get_primary_pc(const struct osmo_ss7_instance *inst);
62
65
67
68bool osmo_ss7_pc_is_local(const struct osmo_ss7_instance *inst, uint32_t pc);
69int osmo_ss7_pointcode_parse(const struct osmo_ss7_instance *inst, const char *str);
70int osmo_ss7_pointcode_parse_mask_or_len(const struct osmo_ss7_instance *inst, const char *in);
71const char *osmo_ss7_pointcode_print_buf(char *buf, size_t buf_len, const struct osmo_ss7_instance *inst, uint32_t pc);
72const char *osmo_ss7_pointcode_print(const struct osmo_ss7_instance *inst, uint32_t pc);
73const char *osmo_ss7_pointcode_print2(const struct osmo_ss7_instance *inst, uint32_t pc);
74
75uint8_t osmo_ss7_pc_width(const struct osmo_ss7_pc_fmt *pc_fmt);
76uint32_t osmo_ss7_pc_normalize(const struct osmo_ss7_pc_fmt *pc_fmt, uint32_t pc);
77
78/***********************************************************************
79 * MTP Users (Users of MTP, such as SCCP or ISUP)
80 ***********************************************************************/
81
82struct osmo_ss7_user;
83struct osmo_mtp_prim;
84
85
87void osmo_ss7_user_destroy(struct osmo_ss7_user *user);
88
90void osmo_ss7_user_set_prim_cb(struct osmo_ss7_user *user, osmo_prim_cb prim_cb);
91void osmo_ss7_user_set_priv(struct osmo_ss7_user *user, void *priv);
92void *osmo_ss7_user_get_priv(const struct osmo_ss7_user *user);
93
94int osmo_ss7_user_register(struct osmo_ss7_instance *inst, uint8_t service_ind,
95 struct osmo_ss7_user *user);
96int osmo_ss7_user_unregister(struct osmo_ss7_instance *inst, uint8_t service_ind,
97 struct osmo_ss7_user *user);
98
99/* SS7 User wants to issue MTP-TRANSFER.req */
101 struct osmo_mtp_prim *omp);
102
103
104/***********************************************************************
105 * SCCP Instance
106 ***********************************************************************/
107
108struct osmo_sccp_instance;
109
110void osmo_sccp_set_max_optional_data(struct osmo_sccp_instance *inst, int val);
111
112/***********************************************************************
113 * SS7 Links
114 ***********************************************************************/
115
116struct osmo_ss7_link;
117
118/***********************************************************************
119 * SS7 Linksets
120 ***********************************************************************/
121
122struct osmo_ss7_linkset;
123
124/***********************************************************************
125 * SS7 Routes
126 ***********************************************************************/
127
128struct osmo_ss7_route;
129
130struct osmo_ss7_route *
131osmo_ss7_route_lookup(struct osmo_ss7_instance *inst, uint32_t dpc)
132 OSMO_DEPRECATED("Use internal ss7_instance_lookup_route() instead");
133const char *osmo_ss7_route_print(const struct osmo_ss7_route *rt);
134const char *osmo_ss7_route_name(struct osmo_ss7_route *rt, bool list_asps);
135struct osmo_ss7_as *
137
138/***********************************************************************
139 * SS7 Routing key
140 ***********************************************************************/
141
143 uint32_t context;
144 uint32_t l_rk_id;
145
146 uint32_t pc;
147 uint8_t si;
148 uint32_t ssn;
149 /* FIXME: more complex routing keys */
150};
151
152
153/***********************************************************************
154 * SS7 ASP Protocols
155 ***********************************************************************/
156
164
165extern struct value_string osmo_ss7_asp_protocol_vals[];
166static inline const char *
168{
169 return get_value_string(osmo_ss7_asp_protocol_vals, mode);
170}
171
173
174
175/***********************************************************************
176 * SS7 AS Traffic Mode
177 ***********************************************************************/
178
179 /* Traffic mode implementations which can be configured on an AS, either by
180 * peer (eg. RFC4666 M3UA "Traffic Mode Type") or locally through VTY.
181 * Note: This is related but not exactly RFC4666 M3UA "Traffic Mode Type" (enum
182 * m3ua_traffic_mode). */
184 /* RFC4666 M3UA "Traffic Mode Type" "Override". Default traffic mode: */
186 /* RFC4666 M3UA "Traffic Mode Type" "Broadcast": */
188 /* RFC4666 M3UA "Traffic Mode Type" "Loadshare",
189 * traffic distribution based on OPC+SLS: */
191 /* RFC4666 M3UA "Traffic Mode Type" "Loadshare",
192 * traffic distribution implemented as round-robin: */
196
197extern struct value_string osmo_ss7_as_traffic_mode_vals[];
198
199static inline const char *
201{
202 return get_value_string(osmo_ss7_as_traffic_mode_vals, mode);
203}
204
207
208
209/***********************************************************************
210 * SS7 Application Servers
211 ***********************************************************************/
212
213struct osmo_ss7_as;
214struct osmo_ss7_asp;
215
216struct osmo_ss7_as *
218struct osmo_ss7_as *
219osmo_ss7_as_find_by_rctx(struct osmo_ss7_instance *inst, uint32_t rctx);
220struct osmo_ss7_as *
221osmo_ss7_as_find_by_l_rk_id(struct osmo_ss7_instance *inst, uint32_t l_rk_id);
224struct osmo_ss7_as *
228int osmo_ss7_as_add_asp(struct osmo_ss7_as *as, const char *asp_name);
229int osmo_ss7_as_del_asp(struct osmo_ss7_as *as, const char *asp_name);
230void osmo_ss7_as_destroy(struct osmo_ss7_as *as);
231bool osmo_ss7_as_has_asp(const struct osmo_ss7_as *as,
232 const struct osmo_ss7_asp *asp);
234bool osmo_ss7_as_down(const struct osmo_ss7_as *as);
235bool osmo_ss7_as_active(const struct osmo_ss7_as *as);
236bool osmo_ss7_as_tmode_compatible_xua(struct osmo_ss7_as *as, uint32_t m3ua_tmt);
237
238
239/***********************************************************************
240 * SS7 Application Server Processes
241 ***********************************************************************/
242
250};
251
256};
257
258extern const struct value_string osmo_ss7_asp_role_names[];
259
260struct osmo_ss7_asp;
261
263#define OSMO_SS7_ASP_QUIRK_NO_NOTIFY 0x00000001
265#define OSMO_SS7_ASP_QUIRK_DAUD_IN_ASP 0x00000002
267#define OSMO_SS7_ASP_QUIRK_SNM_INACTIVE 0x00000004
268
269
270struct osmo_ss7_asp *
272struct osmo_ss7_asp *
275struct osmo_ss7_asp *
276osmo_ss7_asp_find(struct osmo_ss7_instance *inst, const char *name,
277 uint16_t remote_port, uint16_t local_port,
279 OSMO_DEPRECATED("Use osmo_ss7_asp_find2() instead");
280struct osmo_ss7_asp *
281osmo_ss7_asp_find2(struct osmo_ss7_instance *inst, const char *name,
282 uint16_t remote_port, uint16_t local_port,
284struct osmo_ss7_asp *
286 uint16_t remote_port, uint16_t local_port,
288 OSMO_DEPRECATED("Use osmo_ss7_asp_find_or_create2() instead");
289struct osmo_ss7_asp *
291 uint16_t remote_port, uint16_t local_port,
293void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp);
294void osmo_ss7_asp_destroy(struct osmo_ss7_asp *asp);
295int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg);
296int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp);
297int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level);
298bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp);
299int osmo_ss7_asp_get_log_subsys(const struct osmo_ss7_asp *asp);
300const char *osmo_ss7_asp_get_name(const struct osmo_ss7_asp *asp);
302int osmo_ss7_asp_get_trans_proto(const struct osmo_ss7_asp *asp);
303
311typedef int osmo_ss7_asp_rx_unknown_cb(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg);
312
314
315
316/***********************************************************************
317 * Simple Client
318 ***********************************************************************/
319
320struct osmo_sccp_instance *
321osmo_sccp_simple_client(void *ctx, const char *name, uint32_t default_pc,
322 enum osmo_ss7_asp_protocol prot, int default_local_port,
323 const char *default_local_ip, int default_remote_port,
324 const char *default_remote_ip);
325
326struct osmo_sccp_instance *
327osmo_sccp_simple_client_on_ss7_id(void *ctx, uint32_t ss7_id, const char *name,
328 uint32_t default_pc,
329 enum osmo_ss7_asp_protocol prot,
330 int default_local_port,
331 const char *default_local_ip,
332 int default_remote_port,
333 const char *default_remote_ip);
334
335/***********************************************************************
336 * Simple Server
337 ***********************************************************************/
338
339struct osmo_sccp_instance *
340osmo_sccp_simple_server(void *ctx, uint32_t pc,
341 enum osmo_ss7_asp_protocol prot, int local_port,
342 const char *local_ip);
343
344struct osmo_sccp_instance *
345osmo_sccp_simple_server_on_ss7_id(void *ctx, uint32_t ss7_id, uint32_t pc,
346 enum osmo_ss7_asp_protocol prot,
347 int local_port, const char *local_ip);
348
349struct osmo_sccp_instance *
351 enum osmo_ss7_asp_protocol prot,
352 const char *name, uint32_t pc,
353 int local_port, int remote_port,
354 const char *remote_ip);
355
356/* VTY related */
357struct vty;
358void osmo_ss7_vty_init_asp(void *ctx);
359void osmo_ss7_vty_init_sg(void *ctx);
360int osmo_ss7_vty_go_parent(struct vty *vty);
361int osmo_ss7_is_config_node(struct vty *vty, int node)
362 OSMO_DEPRECATED("Implicit parent node tracking has replaced the use of this callback. "
363 "This callback is no longer called, ever, and can be left NULL.");
uint32_t dpc
Definition: m3ua.h:1
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:362
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:178
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:223
int osmo_ss7_pointcode_parse_mask_or_len(const struct osmo_ss7_instance *inst, const char *in)
Definition: osmo_ss7_instance.c:596
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:903
bool osmo_ss7_pc_is_local(const struct osmo_ss7_instance *inst, uint32_t pc)
Definition: osmo_ss7_instance.c:172
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:1264
void * osmo_ss7_user_get_priv(const struct osmo_ss7_user *user)
Definition: osmo_ss7_user.c:69
void osmo_ss7_vty_init_sg(void *ctx)
Definition: osmo_ss7_vty.c:3477
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
static bool osmo_ss7_pc_is_valid(uint32_t pc)
Definition: osmo_ss7.h:28
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_route.c:286
struct osmo_ss7_user * osmo_ss7_user_create(struct osmo_ss7_instance *inst, const char *name)
Definition: osmo_ss7_user.c:37
int osmo_ss7_pointcode_parse(const struct osmo_ss7_instance *inst, const char *str)
Definition: osmo_ss7_instance.c:524
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:519
uint32_t osmo_ss7_instance_get_id(const struct osmo_ss7_instance *inst)
Definition: osmo_ss7_instance.c:112
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:275
struct osmo_ss7_asp * osmo_ss7_asp_find_by_name(struct osmo_ss7_instance *inst, const char *name)
Definition: osmo_ss7_instance.c:335
osmo_ss7_asp_protocol
Definition: osmo_ss7.h:157
@ OSMO_SS7_ASP_PROT_SUA
Definition: osmo_ss7.h:159
@ OSMO_SS7_ASP_PROT_NONE
Definition: osmo_ss7.h:158
@ OSMO_SS7_ASP_PROT_IPA
Definition: osmo_ss7.h:161
@ OSMO_SS7_ASP_PROT_M3UA
Definition: osmo_ss7.h:160
@ _NUM_OSMO_SS7_ASP_PROT
Definition: osmo_ss7.h:162
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:50
int osmo_ss7_tmode_to_xua(enum osmo_ss7_as_traffic_mode tmod)
Definition: osmo_ss7.c:190
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:257
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:1255
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:530
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:252
@ OSMO_SS7_ASP_ROLE_SG
Definition: osmo_ss7.h:254
@ OSMO_SS7_ASP_ROLE_ASP
Definition: osmo_ss7.h:253
@ OSMO_SS7_ASP_ROLE_IPSP
Definition: osmo_ss7.h:255
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:1146
struct osmo_ss7_instance * osmo_ss7_user_get_instance(const struct osmo_ss7_user *user)
Definition: osmo_ss7_user.c:54
void osmo_ss7_instance_destroy(struct osmo_ss7_instance *inst)
Destroy a SS7 Instance.
Definition: osmo_ss7_instance.c:89
const char * osmo_ss7_route_print(const struct osmo_ss7_route *rt)
Definition: osmo_ss7_route.c:264
void osmo_ss7_user_set_priv(struct osmo_ss7_user *user, void *priv)
Definition: osmo_ss7_user.c:64
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
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:770
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:311
const struct value_string osmo_ss7_asp_role_names[]
Definition: osmo_ss7_asp.c:127
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:240
osmo_ss7_asp_admin_state
Definition: osmo_ss7.h:243
@ OSMO_SS7_ASP_ADM_S_SHUTDOWN
no SCTP association with peer
Definition: osmo_ss7.h:245
@ OSMO_SS7_ASP_ADM_S_BLOCKED
SCP association, but reject ASP-ACTIVE.
Definition: osmo_ss7.h:247
@ OSMO_SS7_ASP_ADM_S_ENABLED
in normal operation
Definition: osmo_ss7.h:249
uint32_t osmo_ss7_pc_normalize(const struct osmo_ss7_pc_fmt *pc_fmt, uint32_t pc)
Definition: osmo_ss7.c:95
int osmo_ss7_asp_protocol_port(enum osmo_ss7_asp_protocol prot)
Definition: osmo_ss7_asp.c:178
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:366
int osmo_ss7_user_mtp_xfer_req(struct osmo_ss7_instance *inst, struct osmo_mtp_prim *omp)
Definition: osmo_ss7_hmrt.c:257
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:278
void osmo_ss7_asp_destroy(struct osmo_ss7_asp *asp)
Definition: osmo_ss7_asp.c:576
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
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:288
osmo_ss7_as_traffic_mode
Definition: osmo_ss7.h:183
@ OSMO_SS7_AS_TMOD_OVERRIDE
Definition: osmo_ss7.h:185
@ _NUM_OSMO_SS7_ASP_TMOD
Definition: osmo_ss7.h:194
@ OSMO_SS7_AS_TMOD_ROUNDROBIN
Definition: osmo_ss7.h:193
@ OSMO_SS7_AS_TMOD_BCAST
Definition: osmo_ss7.h:187
@ OSMO_SS7_AS_TMOD_LOADSHARE
Definition: osmo_ss7.h:190
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:422
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:823
bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp)
Definition: osmo_ss7_asp.c:759
struct llist_head osmo_ss7_instances
int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp)
Definition: osmo_ss7_asp.c:714
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
const char * osmo_ss7_pointcode_print2(const struct osmo_ss7_instance *inst, uint32_t pc)
Definition: osmo_ss7_instance.c:590
uint8_t osmo_ss7_pc_width(const struct osmo_ss7_pc_fmt *pc_fmt)
Definition: osmo_ss7.c:87
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:558
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:1204
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
void osmo_ss7_user_set_prim_cb(struct osmo_ss7_user *user, osmo_prim_cb prim_cb)
Definition: osmo_ss7_user.c:59
void osmo_ss7_user_destroy(struct osmo_ss7_user *user)
Definition: osmo_ss7_user.c:49
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:143
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: osmo_ss7_route.c:345
const struct osmo_ss7_pc_fmt * osmo_ss7_instance_get_pc_fmt(const struct osmo_ss7_instance *inst)
Definition: osmo_ss7_instance.c:146
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:400
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:814
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:749
int osmo_ss7_vty_go_parent(struct vty *vty)
Definition: osmo_ss7_vty.c:3274
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:247
static const char * osmo_ss7_asp_protocol_name(enum osmo_ss7_asp_protocol mode)
Definition: osmo_ss7.h:167
struct osmo_ss7_instance * osmo_ss7_instance_find(uint32_t id)
Find a SS7 Instance with given ID.
Definition: osmo_ss7.c:109
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:194
const char * osmo_ss7_pointcode_print(const struct osmo_ss7_instance *inst, uint32_t pc)
Definition: osmo_ss7_instance.c:582
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:352
int osmo_ss7_find_free_rctx(struct osmo_ss7_instance *inst)
Definition: osmo_ss7_instance.c:183
static const char * osmo_ss7_as_traffic_mode_name(enum osmo_ss7_as_traffic_mode mode)
Definition: osmo_ss7.h:200
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:1246
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
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:309
bool osmo_ss7_as_tmode_compatible_xua(struct osmo_ss7_as *as, uint32_t m3ua_tmt)
Definition: osmo_ss7_as.c:562
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:388
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:1230
void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp)
Definition: osmo_ss7_asp.c:1192
enum osmo_ss7_as_traffic_mode osmo_ss7_tmode_from_xua(uint32_t in)
Definition: osmo_ss7.c:207
int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level)
Definition: xua_default_lm_fsm.c:424
void osmo_ss7_vty_init_asp(void *ctx)
Definition: osmo_ss7_vty.c:3471
const char * osmo_ss7_instance_get_name(const struct osmo_ss7_instance *inst)
Definition: osmo_ss7_instance.c:117
struct osmo_ss7_instance * osmo_ss7_instances_llist_entry(struct llist_head *list)
Definition: osmo_ss7.c:68
void osmo_ss7_as_destroy(struct osmo_ss7_as *as)
Destroy given Application Server.
Definition: osmo_ss7_as.c:226
Definition: mtp_sap.h:56
Definition: sccp_internal.h:39
Definition: ss7_as.h:73
char * name
Definition: ss7_as.h:94
enum osmo_ss7_asp_protocol proto
Definition: ss7_as.h:96
struct osmo_ss7_instance * inst
Definition: ss7_as.h:76
Definition: ss7_asp.h:28
enum osmo_ss7_asp_protocol proto
Definition: ss7_asp.h:84
struct osmo_ss7_instance * inst
Definition: ss7_asp.h:31
char * name
Definition: ss7_asp.h:82
int trans_proto
The underlaying transport protocol (one of IPPROTO_*)
Definition: ss7_asp.h:111
Definition: ss7_instance.h:21
const struct osmo_ss7_user * user[16]
Definition: ss7_instance.h:36
struct llist_head list
member of global list of instances
Definition: ss7_instance.h:23
Definition: ss7_linkset.h:13
Definition: ss7_instance.h:16
Definition: ss7_route.h:17
Definition: osmo_ss7.h:142
uint8_t si
Definition: osmo_ss7.h:147
uint32_t context
Definition: osmo_ss7.h:143
uint32_t l_rk_id
Definition: osmo_ss7.h:144
uint32_t ssn
Definition: osmo_ss7.h:148
uint32_t pc
Definition: osmo_ss7.h:146
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