Loading...
Searching...
No Matches
xua_internal.h
Go to the documentation of this file.
#pragma once
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/xua_msg.h>
struct osmo_sccp_addr;
struct m3ua_data_hdr;
int sua_addr_parse_part(struct osmo_sccp_addr *out,
const struct xua_msg_part *param);
int sua_addr_parse(struct osmo_sccp_addr *out, struct xua_msg *xua, uint16_t iei);
int sua_parse_gt(struct osmo_sccp_gt *gt, const uint8_t *data, unsigned int datalen);
struct xua_msg *osmo_sccp_to_xua(struct msgb *msg);
struct msgb *osmo_sua_to_sccp(struct xua_msg *xua);
int sua_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg);
int sua_tx_xua_as(struct osmo_ss7_as *as, struct xua_msg *xua);
void sua_tx_snm_available(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx,
const uint32_t *aff_pc, unsigned int num_aff_pc, const uint32_t *aff_ssn,
const uint32_t *smi, const char *info_string, bool available);
void sua_tx_snm_congestion(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx,
const uint32_t *aff_pc, unsigned int num_aff_pc, const uint32_t *ssn,
const uint8_t cong_level, const char *info_string);
void sua_tx_dupu(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx,
uint32_t dpc, uint16_t user, uint16_t cause, const char *info_str);
struct osmo_mtp_prim *m3ua_to_xfer_ind(struct xua_msg *xua);
int m3ua_hmdc_rx_from_l2(struct osmo_ss7_instance *inst, struct xua_msg *xua);
int m3ua_tx_xua_as(struct osmo_ss7_as *as, struct xua_msg *xua);
void m3ua_tx_snm_available(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx,
const uint32_t *aff_pc, unsigned int num_aff_pc,
const char *info_string, bool available);
void m3ua_tx_snm_congestion(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx,
const uint32_t *aff_pc, unsigned int num_aff_pc,
const uint32_t *concerned_dpc, const uint8_t *cong_level,
const char *info_string);
void m3ua_tx_dupu(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx,
uint32_t dpc, uint16_t user, uint16_t cause, const char *info_str);
void xua_snm_rx_daud(struct osmo_ss7_asp *asp, struct xua_msg *xua);
void xua_snm_rx_duna(struct osmo_ss7_asp *asp, struct osmo_ss7_as *as, struct xua_msg *xua);
void xua_snm_rx_dava(struct osmo_ss7_asp *asp, struct osmo_ss7_as *as, struct xua_msg *xua);
void xua_snm_rx_dupu(struct osmo_ss7_asp *asp, struct osmo_ss7_as *as, struct xua_msg *xua);
void xua_snm_rx_scon(struct osmo_ss7_asp *asp, struct osmo_ss7_as *as, struct xua_msg *xua);
int m3ua_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg);
struct msgb *m3ua_msgb_alloc(const char *name);
struct xua_msg *m3ua_xfer_from_data(const struct m3ua_data_hdr *data_hdr,
const uint8_t *data, unsigned int data_len);
struct m3ua_data_hdr *data_hdr_from_m3ua(struct xua_msg *xua);
void m3ua_dh_to_xfer_param(struct osmo_mtp_transfer_param *param,
const struct m3ua_data_hdr *mdh);
void mtp_xfer_param_to_m3ua_dh(struct m3ua_data_hdr *mdh,
const struct osmo_mtp_transfer_param *param);
extern const struct xua_msg_class m3ua_msg_class_mgmt;
extern const struct xua_msg_class m3ua_msg_class_snm;
extern const struct xua_msg_class m3ua_msg_class_rkm;
extern const struct xua_msg_class m3ua_msg_class_aspsm;
extern const struct xua_msg_class m3ua_msg_class_asptm;
extern const struct value_string m3ua_err_names[];
extern const struct value_string m3ua_ntfy_type_names[];
extern const struct value_string m3ua_ntfy_stchg_names[];
extern const struct value_string m3ua_ntfy_other_names[];
struct xua_msg *m3ua_encode_notify(const struct osmo_xlm_prim_notify *npar);
int m3ua_decode_notify(struct osmo_xlm_prim_notify *npar, void *ctx,
const struct xua_msg *xua);
int m3ua_rx_rkm(struct osmo_ss7_asp *asp, struct xua_msg *xua);
void xua_rkm_cleanup_dyn_as_for_asp(struct osmo_ss7_asp *asp);
struct osmo_xlm_prim *xua_xlm_prim_alloc(enum osmo_xlm_prim_type prim_type,
enum osmo_prim_operation op);
void xua_asp_send_xlm_prim(struct osmo_ss7_asp *asp, struct osmo_xlm_prim *prim);
void xua_asp_send_xlm_prim_simple(struct osmo_ss7_asp *asp,
enum osmo_xlm_prim_type prim_type,
enum osmo_prim_operation op);
void xua_snm_pc_available(struct osmo_ss7_as *as, const uint32_t *aff_pc,
unsigned int num_aff_pc, const char *info_str, bool available);
extern struct osmo_fsm xua_default_lm_fsm;
extern const struct value_string m3ua_rkm_reg_status_vals[];
extern const struct value_string m3ua_rkm_dereg_status_vals[];
#define CS7_STR "ITU-T Signaling System 7\n"
#define PC_STR "Point Code\n"
#define INST_STR "An instance of the SS7 stack\n"
int xua_as_transmit_msg(struct osmo_ss7_as *as, struct msgb *msg);
int xua_find_as_for_asp(struct osmo_ss7_as **as, const struct osmo_ss7_asp *asp,
const struct xua_msg_part *rctx_ie);
int ipa_tx_xua_as(struct osmo_ss7_as *as, struct xua_msg *xua);
int ipa_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg);
int osmo_isup_party_parse(char *out_digits, const uint8_t *in,
unsigned int in_num_bytes, bool odd);
int osmo_sccp_addr_parse(struct osmo_sccp_addr *out,
const uint8_t *addr, unsigned int addrlen);
int osmo_sccp_addr_encode(struct msgb *msg, const struct osmo_sccp_addr *in);
int ss7_asp_rx_unknown(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg);
dpc
uint32_t dpc
Definition m3ua.h:1
osmo_ss7.h
smi
uint8_t smi
Definition sccp_scmg.h:3
osmo_xlm_prim_type
osmo_xlm_prim_type
Definition sigtran_sap.h:13
m3ua_data_hdr
Definition m3ua.h:95
osmo_mtp_prim
Definition mtp_sap.h:56
osmo_mtp_transfer_param
Definition mtp_sap.h:36
osmo_sccp_addr
Definition sccp_sap.h:170
osmo_sccp_gt
Definition sccp_sap.h:162
osmo_ss7_as
Definition osmo_ss7.h:300
osmo_ss7_asp
Definition osmo_ss7.h:387
osmo_ss7_instance
Definition osmo_ss7.h:73
osmo_xlm_prim_notify
Definition sigtran_sap.h:37
osmo_xlm_prim
Definition sigtran_sap.h:66
xua_msg_class
Definition xua_msg.h:48
xua_msg_part
Definition xua_msg.h:38
xua_msg
Definition xua_msg.h:31
m3ua_rkm_reg_status_vals
const struct value_string m3ua_rkm_reg_status_vals[]
Definition xua_rkm.c:35
m3ua_ntfy_type_names
const struct value_string m3ua_ntfy_type_names[]
Definition m3ua.c:80
xua_snm_rx_scon
void xua_snm_rx_scon(struct osmo_ss7_asp *asp, struct osmo_ss7_as *as, struct xua_msg *xua)
Definition xua_snm.c:458
m3ua_err_names
const struct value_string m3ua_err_names[]
Definition m3ua.c:56
xua_snm_rx_dupu
void xua_snm_rx_dupu(struct osmo_ss7_asp *asp, struct osmo_ss7_as *as, struct xua_msg *xua)
Definition xua_snm.c:424
sua_addr_parse
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:500
m3ua_tx_dupu
void m3ua_tx_dupu(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx, uint32_t dpc, uint16_t user, uint16_t cause, const char *info_str)
Transmit SSNM DUPU message indicating user unavailability.
Definition m3ua.c:909
xua_find_as_for_asp
int xua_find_as_for_asp(struct osmo_ss7_as **as, const struct osmo_ss7_asp *asp, const struct xua_msg_part *rctx_ie)
Find the AS for given ASP + optional routing context IE.
Definition xua_shared.c:68
xua_xlm_prim_alloc
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:91
m3ua_xfer_from_data
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:324
m3ua_tx_snm_available
void m3ua_tx_snm_available(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx, const uint32_t *aff_pc, unsigned int num_aff_pc, const char *info_string, bool available)
Transmit SSNM DUNA/DAVA message indicating [un]availability of certain point code[s].
Definition m3ua.c:852
m3ua_to_xfer_ind
struct osmo_mtp_prim * m3ua_to_xfer_ind(struct xua_msg *xua)
Definition osmo_ss7_hmrt.c:41
sua_tx_snm_available
void sua_tx_snm_available(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx, const uint32_t *aff_pc, unsigned int num_aff_pc, const uint32_t *aff_ssn, const uint32_t *smi, const char *info_string, bool available)
Transmit SSNM DUNA/DAVA message indicating [un]availability of certain point code[s].
Definition sua.c:864
m3ua_tx_xua_as
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:491
m3ua_ntfy_stchg_names
const struct value_string m3ua_ntfy_stchg_names[]
Definition m3ua.c:86
m3ua_msg_class_snm
const struct xua_msg_class m3ua_msg_class_snm
Definition m3ua.c:176
m3ua_rx_msg
int m3ua_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg)
process M3UA message received from socket
Definition m3ua.c:689
osmo_isup_party_parse
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
data_hdr_from_m3ua
struct m3ua_data_hdr * data_hdr_from_m3ua(struct xua_msg *xua)
Definition m3ua.c:519
m3ua_decode_notify
int m3ua_decode_notify(struct osmo_xlm_prim_notify *npar, void *ctx, const struct xua_msg *xua)
Definition m3ua.c:410
ipa_tx_xua_as
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:58
xua_snm_rx_dava
void xua_snm_rx_dava(struct osmo_ss7_asp *asp, struct osmo_ss7_as *as, struct xua_msg *xua)
Definition xua_snm.c:389
xua_rkm_cleanup_dyn_as_for_asp
void xua_rkm_cleanup_dyn_as_for_asp(struct osmo_ss7_asp *asp)
Definition xua_rkm.c:587
m3ua_rkm_dereg_status_vals
const struct value_string m3ua_rkm_dereg_status_vals[]
Definition xua_rkm.c:52
ss7_asp_rx_unknown
int ss7_asp_rx_unknown(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg)
Definition osmo_ss7.c:2390
sua_rx_msg
int sua_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg)
process SUA message received from socket
Definition sua.c:675
mtp_xfer_param_to_m3ua_dh
void mtp_xfer_param_to_m3ua_dh(struct m3ua_data_hdr *mdh, const struct osmo_mtp_transfer_param *param)
Definition m3ua.c:289
xua_default_lm_fsm
struct osmo_fsm xua_default_lm_fsm
Definition xua_default_lm_fsm.c:338
xua_asp_send_xlm_prim
void xua_asp_send_xlm_prim(struct osmo_ss7_asp *asp, struct osmo_xlm_prim *prim)
Definition xua_asp_fsm.c:106
sua_tx_xua_as
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:303
ipa_rx_msg
int ipa_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg)
process M3UA message received from socket
Definition ipa.c:296
sua_tx_snm_congestion
void sua_tx_snm_congestion(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx, const uint32_t *aff_pc, unsigned int num_aff_pc, const uint32_t *ssn, const uint8_t cong_level, const char *info_string)
Transmit SSNM SCON message indicating congestion.
Definition sua.c:888
m3ua_msg_class_rkm
const struct xua_msg_class m3ua_msg_class_rkm
Definition m3ua.c:260
sua_addr_parse_part
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:372
m3ua_hmdc_rx_from_l2
int m3ua_hmdc_rx_from_l2(struct osmo_ss7_instance *inst, struct xua_msg *xua)
Definition osmo_ss7_hmrt.c:272
m3ua_encode_notify
struct xua_msg * m3ua_encode_notify(const struct osmo_xlm_prim_notify *npar)
Definition m3ua.c:381
m3ua_msg_class_aspsm
const struct xua_msg_class m3ua_msg_class_aspsm
Definition m3ua.c:199
m3ua_msg_class_asptm
const struct xua_msg_class m3ua_msg_class_asptm
Definition m3ua.c:212
osmo_sccp_to_xua
struct xua_msg * osmo_sccp_to_xua(struct msgb *msg)
convert SCCP message to a SUA message
Definition sccp2sua.c:1409
m3ua_ntfy_other_names
const struct value_string m3ua_ntfy_other_names[]
Definition m3ua.c:94
xua_snm_pc_available
void xua_snm_pc_available(struct osmo_ss7_as *as, const uint32_t *aff_pc, unsigned int num_aff_pc, const char *info_str, bool available)
Definition xua_snm.c:169
m3ua_rx_rkm
int m3ua_rx_rkm(struct osmo_ss7_asp *asp, struct xua_msg *xua)
Definition xua_rkm.c:527
osmo_sua_to_sccp
struct msgb * osmo_sua_to_sccp(struct xua_msg *xua)
convert parsed SUA message to SCCP message
Definition sccp2sua.c:1515
m3ua_msgb_alloc
struct msgb * m3ua_msgb_alloc(const char *name)
Definition m3ua.c:316
m3ua_dh_to_xfer_param
void m3ua_dh_to_xfer_param(struct osmo_mtp_transfer_param *param, const struct m3ua_data_hdr *mdh)
Definition m3ua.c:301
m3ua_msg_class_mgmt
const struct xua_msg_class m3ua_msg_class_mgmt
Definition m3ua.c:230
osmo_sccp_addr_encode
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
m3ua_tx_snm_congestion
void m3ua_tx_snm_congestion(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx, const uint32_t *aff_pc, unsigned int num_aff_pc, const uint32_t *concerned_dpc, const uint8_t *cong_level, const char *info_string)
Transmit SSNM SCON message indicating congestion.
Definition m3ua.c:876
sua_parse_gt
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:335
osmo_sccp_addr_parse
int osmo_sccp_addr_parse(struct osmo_sccp_addr *out, const uint8_t *addr, unsigned int addrlen)
Parse wire-encoded SCCP address into osmo_sccp_addr.
Definition sccp2sua.c:118
xua_asp_send_xlm_prim_simple
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:121
xua_snm_rx_duna
void xua_snm_rx_duna(struct osmo_ss7_asp *asp, struct osmo_ss7_as *as, struct xua_msg *xua)
Definition xua_snm.c:354
sua_tx_dupu
void sua_tx_dupu(struct osmo_ss7_asp *asp, const uint32_t *rctx, unsigned int num_rctx, uint32_t dpc, uint16_t user, uint16_t cause, const char *info_str)
Transmit SSNM DUPU message indicating user unavailability.
Definition sua.c:915
xua_snm_rx_daud
void xua_snm_rx_daud(struct osmo_ss7_asp *asp, struct xua_msg *xua)
Definition xua_snm.c:309
xua_as_transmit_msg
int xua_as_transmit_msg(struct osmo_ss7_as *as, struct msgb *msg)
Definition xua_as_fsm.c:152
xua_msg.h
data
uint8_t data[0]
Definition xua_types.h:5