libosmo-sigtran  0.10.0
Osmocom SIGTRAN library
xua_internal.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 struct osmo_sccp_addr;
7 struct m3ua_data_hdr;
8 
9 int sua_addr_parse_part(struct osmo_sccp_addr *out,
10  const struct xua_msg_part *param);
11 int sua_addr_parse(struct osmo_sccp_addr *out, struct xua_msg *xua, uint16_t iei);
12 
13 int sua_parse_gt(struct osmo_sccp_gt *gt, const uint8_t *data, unsigned int datalen);
14 
15 struct xua_msg *osmo_sccp_to_xua(struct msgb *msg);
16 struct msgb *osmo_sua_to_sccp(struct xua_msg *xua);
17 
18 int sua_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg);
19 
20 int sua_tx_xua_as(struct osmo_ss7_as *as, struct xua_msg *xua);
21 
22 struct osmo_mtp_prim *m3ua_to_xfer_ind(struct xua_msg *xua);
23 int m3ua_hmdc_rx_from_l2(struct osmo_ss7_instance *inst, struct xua_msg *xua);
24 int m3ua_tx_xua_as(struct osmo_ss7_as *as, struct xua_msg *xua);
25 int m3ua_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg);
26 
27 struct msgb *m3ua_msgb_alloc(const char *name);
28 struct xua_msg *m3ua_xfer_from_data(const struct m3ua_data_hdr *data_hdr,
29  const uint8_t *data, unsigned int data_len);
30 struct m3ua_data_hdr *data_hdr_from_m3ua(struct xua_msg *xua);
32  const struct m3ua_data_hdr *mdh);
34  const struct osmo_mtp_transfer_param *param);
35 
36 
37 extern const struct xua_msg_class m3ua_msg_class_mgmt;
38 extern const struct xua_msg_class m3ua_msg_class_snm;
39 extern const struct xua_msg_class m3ua_msg_class_rkm;
40 extern const struct xua_msg_class m3ua_msg_class_aspsm;
41 extern const struct xua_msg_class m3ua_msg_class_asptm;
42 
43 extern const struct value_string m3ua_err_names[];
44 extern const struct value_string m3ua_ntfy_type_names[];
45 extern const struct value_string m3ua_ntfy_stchg_names[];
46 extern const struct value_string m3ua_ntfy_other_names[];
47 
48 struct xua_msg *m3ua_encode_notify(const struct osmo_xlm_prim_notify *npar);
49 int m3ua_decode_notify(struct osmo_xlm_prim_notify *npar, void *ctx,
50  const struct xua_msg *xua);
51 int m3ua_rx_rkm(struct osmo_ss7_asp *asp, struct xua_msg *xua);
53 
55  enum osmo_prim_operation op);
56 
57 void xua_asp_send_xlm_prim(struct osmo_ss7_asp *asp, struct osmo_xlm_prim *prim);
59  enum osmo_xlm_prim_type prim_type,
60  enum osmo_prim_operation op);
61 
62 extern struct osmo_fsm xua_default_lm_fsm;
63 extern const struct value_string m3ua_rkm_reg_status_vals[];
64 extern const struct value_string m3ua_rkm_dereg_status_vals[];
65 
66 #define CS7_STR "ITU-T Signaling System 7\n"
67 #define PC_STR "Point Code\n"
68 #define INST_STR "An instance of the SS7 stack\n"
69 
70 int xua_as_transmit_msg(struct osmo_ss7_as *as, struct msgb *msg);
71 
72 
73 int ipa_tx_xua_as(struct osmo_ss7_as *as, struct xua_msg *xua);
74 int ipa_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg);
75 
76 int osmo_isup_party_parse(char *out_digits, const uint8_t *in,
77  unsigned int in_num_bytes, bool odd);
78 int osmo_sccp_addr_parse(struct osmo_sccp_addr *out,
79  const uint8_t *addr, unsigned int addrlen);
80 int osmo_sccp_addr_encode(struct msgb *msg, const struct osmo_sccp_addr *in);
81 
82 int ss7_asp_rx_unknown(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg);
struct msgb * osmo_sua_to_sccp(struct xua_msg *xua)
convert parsed SUA message to SCCP message
Definition: sccp2sua.c:1357
struct msgb * m3ua_msgb_alloc(const char *name)
Definition: m3ua.c:315
int m3ua_rx_rkm(struct osmo_ss7_asp *asp, struct xua_msg *xua)
Definition: xua_rkm.c:493
int sua_tx_xua_as(struct osmo_ss7_as *as, struct xua_msg *xua)
Send a given xUA message via a given SUA Application Server.
Definition: sua.c:302
const struct value_string m3ua_err_names[]
Definition: m3ua.c:55
struct osmo_fsm xua_default_lm_fsm
Definition: xua_default_lm_fsm.c:330
struct xua_msg * osmo_sccp_to_xua(struct msgb *msg)
convert SCCP message to a SUA message
Definition: sccp2sua.c:1289
struct xua_msg * m3ua_encode_notify(const struct osmo_xlm_prim_notify *npar)
Definition: m3ua.c:380
struct m3ua_data_hdr * data_hdr_from_m3ua(struct xua_msg *xua)
Definition: m3ua.c:518
int m3ua_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg)
process M3UA message received from socket
Definition: m3ua.c:696
int sua_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg)
process SUA message received from socket
Definition: sua.c:647
Definition: xua_msg.h:38
Definition: sigtran_sap.h:66
int xua_as_transmit_msg(struct osmo_ss7_as *as, struct msgb *msg)
Definition: xua_as_fsm.c:75
struct xua_msg * m3ua_xfer_from_data(const struct m3ua_data_hdr *data_hdr, const uint8_t *data, unsigned int data_len)
Definition: m3ua.c:323
struct osmo_xlm_prim * xua_xlm_prim_alloc(enum osmo_xlm_prim_type prim_type, enum osmo_prim_operation op)
Definition: xua_asp_fsm.c:102
const struct xua_msg_class m3ua_msg_class_asptm
Definition: m3ua.c:211
int ss7_asp_rx_unknown(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg)
Definition: osmo_ss7.c:1918
void xua_rkm_cleanup_dyn_as_for_asp(struct osmo_ss7_asp *asp)
Definition: xua_rkm.c:553
void xua_asp_send_xlm_prim(struct osmo_ss7_asp *asp, struct osmo_xlm_prim *prim)
Definition: xua_asp_fsm.c:117
int ipa_tx_xua_as(struct osmo_ss7_as *as, struct xua_msg *xua)
Send a given xUA message via a given IPA "Application Server".
Definition: ipa.c:57
struct osmo_mtp_prim * m3ua_to_xfer_ind(struct xua_msg *xua)
Definition: osmo_ss7_hmrt.c:40
const struct xua_msg_class m3ua_msg_class_aspsm
Definition: m3ua.c:198
int m3ua_hmdc_rx_from_l2(struct osmo_ss7_instance *inst, struct xua_msg *xua)
Definition: osmo_ss7_hmrt.c:269
const struct value_string m3ua_ntfy_other_names[]
Definition: m3ua.c:93
const struct xua_msg_class m3ua_msg_class_snm
Definition: m3ua.c:175
void xua_asp_send_xlm_prim_simple(struct osmo_ss7_asp *asp, enum osmo_xlm_prim_type prim_type, enum osmo_prim_operation op)
Definition: xua_asp_fsm.c:132
Definition: sigtran_sap.h:37
const struct value_string m3ua_rkm_reg_status_vals[]
Definition: xua_rkm.c:34
int osmo_isup_party_parse(char *out_digits, const uint8_t *in, unsigned int in_num_bytes, bool odd)
Parse ISUP style address of BCD digets.
Definition: sccp2sua.c:72
osmo_xlm_prim_type
Definition: sigtran_sap.h:13
int m3ua_tx_xua_as(struct osmo_ss7_as *as, struct xua_msg *xua)
Send a given xUA message via a given M3UA Application Server.
Definition: m3ua.c:490
Definition: xua_msg.h:48
Definition: m3ua.h:95
int osmo_sccp_addr_parse(struct osmo_sccp_addr *out, const uint8_t *addr, unsigned int addrlen)
Parse wire-encoded SCCP address into omso_sccp_addr.
Definition: sccp2sua.c:118
const struct xua_msg_class m3ua_msg_class_mgmt
Definition: m3ua.c:229
const struct value_string m3ua_rkm_dereg_status_vals[]
Definition: xua_rkm.c:51
const struct xua_msg_class m3ua_msg_class_rkm
Definition: m3ua.c:259
Definition: mtp_sap.h:36
Definition: osmo_ss7.h:352
Definition: sccp_sap.h:151
Definition: sccp_sap.h:143
int sua_parse_gt(struct osmo_sccp_gt *gt, const uint8_t *data, unsigned int datalen)
Decode SUA Global Title according to RFC3868 Section 3.10.2.3.
Definition: sua.c:334
const struct value_string m3ua_ntfy_type_names[]
Definition: m3ua.c:79
int sua_addr_parse_part(struct osmo_sccp_addr *out, const struct xua_msg_part *param)
parse SCCP address from given xUA message part
Definition: sua.c:371
void mtp_xfer_param_to_m3ua_dh(struct m3ua_data_hdr *mdh, const struct osmo_mtp_transfer_param *param)
Definition: m3ua.c:288
Definition: xua_msg.h:31
uint8_t data[0]
Definition: xua_types.h:72
Definition: osmo_ss7.h:70
int sua_addr_parse(struct osmo_sccp_addr *out, struct xua_msg *xua, uint16_t iei)
parse SCCP address from given xUA message IE
Definition: sua.c:492
const struct value_string m3ua_ntfy_stchg_names[]
Definition: m3ua.c:85
int ipa_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg)
process M3UA message received from socket
Definition: ipa.c:276
void m3ua_dh_to_xfer_param(struct osmo_mtp_transfer_param *param, const struct m3ua_data_hdr *mdh)
Definition: m3ua.c:300
int osmo_sccp_addr_encode(struct msgb *msg, const struct osmo_sccp_addr *in)
encode a SCCP address from parsed format to wire format
Definition: sccp2sua.c:224
Definition: osmo_ss7.h:288
Definition: mtp_sap.h:56
int m3ua_decode_notify(struct osmo_xlm_prim_notify *npar, void *ctx, const struct xua_msg *xua)
Definition: m3ua.c:409