libosmo-sigtran 2.0.0.52-6412
Osmocom SIGTRAN library
|
Go to the source code of this file.
Macros | |
#define | M3UA_MSG_SIZE 2048 |
#define | M3UA_MSG_HEADROOM 512 |
#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" |
Enumerations | |
enum | ss7_asp_lm_timer { SS7_ASP_LM_T_WAIT_ASP_UP = 1 , SS7_ASP_LM_T_WAIT_NOTIFY , SS7_ASP_LM_T_WAIT_NOTIY_RKM , SS7_ASP_LM_T_WAIT_RK_REG_RESP , SS7_ASP_LM_TIMERS_LEN } |
Functions | |
int | sua_addr_parse_part (struct osmo_sccp_addr *out, const struct xua_msg_part *param) |
parse SCCP address from given xUA message part More... | |
int | sua_addr_parse (struct osmo_sccp_addr *out, struct xua_msg *xua, uint16_t iei) |
parse SCCP address from given xUA message IE More... | |
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. More... | |
struct xua_msg * | osmo_sccp_to_xua (struct msgb *msg) |
convert SCCP message to a SUA message More... | |
struct msgb * | osmo_sua_to_sccp (struct xua_msg *xua) |
convert parsed SUA message to SCCP message More... | |
int | sua_rx_msg (struct osmo_ss7_asp *asp, struct msgb *msg) |
process SUA message received from socket More... | |
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. More... | |
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]. More... | |
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. More... | |
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. More... | |
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) |
Send a given xUA message via a given M3UA Application Server. More... | |
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]. More... | |
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. More... | |
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. More... | |
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) |
process M3UA message received from socket More... | |
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) |
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) |
static const char * | ss7_asp_lm_timer_name (enum ss7_asp_lm_timer val) |
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) |
Find the AS for given ASP + optional routing context IE. More... | |
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". More... | |
int | ipa_rx_msg (struct osmo_ss7_asp *asp, struct msgb *msg, uint8_t sls) |
process M3UA message received from socket More... | |
struct osmo_ss7_as * | ipa_find_as_for_asp (struct osmo_ss7_asp *asp) |
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. More... | |
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. More... | |
int | osmo_sccp_addr_encode (struct msgb *msg, const struct osmo_sccp_addr *in) |
encode a SCCP address from parsed format to wire format More... | |
int | ss7_asp_rx_unknown (struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg) |
Variables | |
const struct xua_msg_class | m3ua_msg_class_mgmt |
const struct xua_msg_class | m3ua_msg_class_snm |
const struct xua_msg_class | m3ua_msg_class_rkm |
const struct xua_msg_class | m3ua_msg_class_aspsm |
const struct xua_msg_class | m3ua_msg_class_asptm |
const struct value_string | m3ua_err_names [] |
const struct value_string | m3ua_ntfy_type_names [] |
const struct value_string | m3ua_ntfy_stchg_names [] |
const struct value_string | m3ua_ntfy_other_names [] |
const struct osmo_tdef | ss7_asp_lm_timer_defaults [SS7_ASP_LM_TIMERS_LEN] |
const struct value_string | ss7_asp_lm_timer_names [] |
struct osmo_fsm | xua_default_lm_fsm |
const struct value_string | m3ua_rkm_reg_status_vals [] |
const struct value_string | m3ua_rkm_dereg_status_vals [] |
#define CS7_STR "ITU-T Signaling System 7\n" |
#define INST_STR "An instance of the SS7 stack\n" |
#define M3UA_MSG_HEADROOM 512 |
#define M3UA_MSG_SIZE 2048 |
#define PC_STR "Point Code\n" |
enum ss7_asp_lm_timer |
struct m3ua_data_hdr * data_hdr_from_m3ua | ( | struct xua_msg * | xua | ) |
References xua_msg_part::dat, xua_msg::hdr, M3UA_IEI_PROT_DATA, M3UA_MSGC_XFER, M3UA_XFER_DATA, xua_common_hdr::msg_class, xua_common_hdr::msg_type, and xua_msg_find_tag().
Referenced by hmdt_message_for_distribution(), and m3ua_rx_xfer().
struct osmo_ss7_as * ipa_find_as_for_asp | ( | struct osmo_ss7_asp * | asp | ) |
References osmo_ss7_instance::as_list, osmo_ss7_asp::inst, osmo_ss7_as::list, and osmo_ss7_as_has_asp().
Referenced by ipa_asp_fsm_start(), and ipa_rx_msg_sccp().
int ipa_rx_msg | ( | struct osmo_ss7_asp * | asp, |
struct msgb * | msg, | ||
uint8_t | sls | ||
) |
process M3UA message received from socket
[in] | asp | Application Server Process receiving msg |
[in] | msg | received message buffer. Callee takes ownership! |
[in] | sls | The SLS (signaling link selector) field to use in the generated M3UA header |
References osmo_ss7_asp::cfg, ipa_rx_msg_ccm(), ipa_rx_msg_sccp(), OSMO_SS7_ASP_PROT_IPA, osmo_ss7_asp::proto, sls, and ss7_asp_rx_unknown().
Referenced by ipa_cli_read_cb(), and ss7_asp_ipa_srv_conn_rx_cb().
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".
[in] | as | Application Server through which to send xua |
[in] | xua | xUA message to be sent |
References osmo_ss7_as::cfg, xua_msg_part::dat, xua_msg_part::len, LOGPAS, M3UA_IEI_PROT_DATA, MTP_SI_SCCP, OSMO_SS7_ASP_PROT_IPA, osmo_ss7_as::proto, m3ua_data_hdr::si, xua_as_transmit_msg(), and xua_msg_find_tag().
Referenced by hmrt_message_for_routing().
int m3ua_decode_notify | ( | struct osmo_xlm_prim_notify * | npar, |
void * | ctx, | ||
const struct xua_msg * | xua | ||
) |
References osmo_xlm_prim_notify::asp_id, xua_msg_part::dat, osmo_xlm_prim_notify::info_string, xua_msg_part::len, M3UA_IEI_ASP_ID, M3UA_IEI_INFO_STRING, M3UA_IEI_ROUTE_CTX, M3UA_IEI_STATUS, NOTIFY_PAR_P_ASP_ID, NOTIFY_PAR_P_ROUTE_CTX, osmo_xlm_prim_notify::presence, osmo_xlm_prim_notify::route_ctx, osmo_xlm_prim_notify::status_info, osmo_xlm_prim_notify::status_type, xua_msg_find_tag(), and xua_msg_part_get_u32().
Referenced by m3ua_rx_mgmt_ntfy(), and sua_rx_mgmt_ntfy().
void m3ua_dh_to_xfer_param | ( | struct osmo_mtp_transfer_param * | param, |
const struct m3ua_data_hdr * | mdh | ||
) |
References osmo_mtp_transfer_param::dpc, m3ua_data_hdr::dpc, m3ua_data_hdr::mp, m3ua_data_hdr::ni, osmo_mtp_transfer_param::opc, m3ua_data_hdr::opc, m3ua_data_hdr::si, osmo_mtp_transfer_param::sio, osmo_mtp_transfer_param::sls, and m3ua_data_hdr::sls.
Referenced by ipa_rx_msg_sccp(), m3ua_rx_xfer(), and m3ua_to_xfer_ind().
struct xua_msg * m3ua_encode_notify | ( | const struct osmo_xlm_prim_notify * | npar | ) |
References osmo_xlm_prim_notify::asp_id, xua_msg::hdr, osmo_xlm_prim_notify::info_string, M3UA_IEI_ASP_ID, M3UA_IEI_INFO_STRING, M3UA_IEI_ROUTE_CTX, M3UA_IEI_STATUS, M3UA_MGMT_NTFY, M3UA_MSGC_MGMT, M3UA_NOTIFY, NOTIFY_PAR_P_ASP_ID, NOTIFY_PAR_P_ROUTE_CTX, osmo_xlm_prim_notify::presence, osmo_xlm_prim_notify::route_ctx, osmo_xlm_prim_notify::status_info, osmo_xlm_prim_notify::status_type, XUA_HDR, xua_msg_add_data(), xua_msg_add_u32(), and xua_msg_alloc().
Referenced by encode_notify().
int m3ua_hmdc_rx_from_l2 | ( | struct osmo_ss7_instance * | inst, |
struct xua_msg * | xua | ||
) |
struct msgb * m3ua_msgb_alloc | ( | const char * | name | ) |
References M3UA_MSG_HEADROOM, and M3UA_MSG_SIZE.
Referenced by m3ua_rx_rkm_dereg_req(), m3ua_rx_rkm_reg_req(), m3ua_to_xfer_ind(), xua_rkm_send_dereg_req(), and xua_rkm_send_reg_req().
int m3ua_rx_msg | ( | struct osmo_ss7_asp * | asp, |
struct msgb * | msg | ||
) |
process M3UA message received from socket
[in] | asp | Application Server Process receiving msg |
[in] | msg | received message buffer |
References osmo_ss7_asp::cfg, xua_common_hdr::data, xua_msg::hdr, LOGPASP, M3UA_ERR_INVAL_STREAM_ID, M3UA_ERR_INVALID_VERSION, M3UA_ERR_MISSING_PARAM, M3UA_ERR_PARAM_FIELD_ERR, M3UA_ERR_UNSUPP_MSG_CLASS, m3ua_gen_error_msg(), M3UA_MSGC_ASPSM, M3UA_MSGC_ASPTM, M3UA_MSGC_MGMT, M3UA_MSGC_RKM, M3UA_MSGC_SNM, M3UA_MSGC_XFER, m3ua_rx_asp(), m3ua_rx_mgmt(), m3ua_rx_rkm(), m3ua_rx_snm(), m3ua_rx_xfer(), m3ua_tx_xua_asp(), M3UA_VERSION, xua_common_hdr::msg_class, OSMO_SS7_ASP_PROT_M3UA, osmo_ss7_asp::proto, xua_common_hdr::version, xua_dialect_check_all_mand_ies(), xua_dialect_m3ua, xua_from_msg(), xua_hdr_dump(), and xua_msg_free().
Referenced by ss7_asp_m3ua_tcp_srv_conn_rx_cb(), ss7_asp_xua_srv_conn_rx_cb(), and xua_cli_read_cb().
int m3ua_rx_rkm | ( | struct osmo_ss7_asp * | asp, |
struct xua_msg * | xua | ||
) |
struct osmo_mtp_prim * m3ua_to_xfer_ind | ( | struct xua_msg * | xua | ) |
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.
[in] | asp | ASP through which to transmit message. Must be ACTIVE. |
[in] | rctx | array of Routing Contexts in network byte order. |
[in] | num_rctx | number of rctx |
[in] | dpc | affected point code |
[in] | user | the user (SI) that is unavailable |
[in] | cause | the cause of the user unavailability |
[in] | info_string | optional information string (can be NULL). |
References dpc, m3ua_encode_dupu(), m3ua_tx_xua_asp(), and xua_msg_free().
Referenced by xua_tx_upu().
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].
[in] | asp | ASP through which to transmit message. Must be ACTIVE. |
[in] | rctx | array of Routing Contexts in network byte order. |
[in] | num_rctx | number of rctx |
[in] | aff_pc | array of 'Affected Point Code' in network byte order. |
[in] | num_aff_pc | number of aff_pc |
[in] | info_string | optional information string (can be NULL). |
[in] | available | are aff_pc now available (true) or unavailable (false) |
References m3ua_encode_dava(), m3ua_encode_duna(), m3ua_tx_xua_asp(), and xua_msg_free().
Referenced by xua_tx_snm_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 | ||
) |
Transmit SSNM SCON message indicating congestion.
[in] | asp | ASP through which to transmit message. Must be ACTIVE. |
[in] | rctx | array of Routing Contexts in network byte order. |
[in] | num_rctx | number of rctx |
[in] | aff_pc | array of 'Affected Point Code' in network byte order. |
[in] | num_aff_pc | number of aff_pc |
[in] | concerned_dpc | optional concerned DPC (can be NULL) |
[in] | cong_level | optional congestion level (can be NULL) |
[in] | info_string | optional information string (can be NULL). |
References xua_msg::hdr, M3UA_IEI_AFFECTED_PC, M3UA_IEI_CONC_DEST, M3UA_IEI_CONG_IND, M3UA_IEI_INFO_STRING, M3UA_IEI_ROUTE_CTX, M3UA_MSGC_SNM, M3UA_SNM_SCON, m3ua_tx_xua_asp(), M3UA_VERSION, xua_common_hdr::version, XUA_HDR, xua_msg_add_data(), xua_msg_add_u32(), xua_msg_alloc(), and xua_msg_free().
Referenced by xua_tx_scon().
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.
[in] | as | Application Server through which to send xua |
[in] | xua | xUA message to be sent |
References osmo_ss7_as::cfg, osmo_ss7_routing_key::context, osmo_ss7_as::fi, M3UA_IEI_ROUTE_CTX, m3ua_to_msg(), OSMO_SS7_ASP_PROT_M3UA, osmo_ss7_as::proto, osmo_ss7_as::routing_key, XUA_AS_E_TRANSFER_REQ, and xua_msg_add_u32().
Referenced by hmrt_message_for_routing().
struct xua_msg * m3ua_xfer_from_data | ( | const struct m3ua_data_hdr * | data_hdr, |
const uint8_t * | data, | ||
unsigned int | data_len | ||
) |
References xua_msg_part::dat, data, xua_msg_part::entry, xua_msg::hdr, xua_msg::headers, xua_msg_part::len, M3UA_IEI_PROT_DATA, M3UA_MSGC_XFER, M3UA_XFER_DATA, xua_msg_part::tag, XUA_HDR, and xua_msg_alloc().
Referenced by ipa_rx_msg_sccp(), and mtp_prim_to_m3ua().
void mtp_xfer_param_to_m3ua_dh | ( | struct m3ua_data_hdr * | mdh, |
const struct osmo_mtp_transfer_param * | param | ||
) |
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.
[out] | out_digits | user-allocated buffer for ASCII digits |
[in] | in | BCD-encoded digits |
[in] | in_num_bytes | Size of in in bytes |
[in] | odd | Odd (true) or even (false) number of digits |
Referenced by osmo_sccp_addr_parse().
int osmo_sccp_addr_encode | ( | struct msgb * | msg, |
const struct osmo_sccp_addr * | in | ||
) |
encode a SCCP address from parsed format to wire format
[out] | msg | message buffer to which address is to be appended |
[in] | in | data structure describing SCCP address |
References osmo_sccp_gt::digits, osmo_sccp_addr::gt, osmo_sccp_gt::gti, msgb_put_u16le(), osmo_sccp_gt::nai, osmo_sccp_gt::npi, osmo_isup_party_encode(), OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_SSN, OSMO_SCCP_GTI_NAI_ONLY, OSMO_SCCP_GTI_NO_GT, OSMO_SCCP_GTI_TT_NPL_ENC, OSMO_SCCP_GTI_TT_NPL_ENC_NAI, OSMO_SCCP_GTI_TT_ONLY, OSMO_SCCP_RI_GT, OSMO_SCCP_RI_SSN_PC, osmo_sccp_addr::pc, osmo_sccp_addr::presence, osmo_sccp_addr::ri, osmo_sccp_addr::ssn, and osmo_sccp_gt::tt.
Referenced by sua_addr_to_sccp().
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.
[out] | out | user-allocated output data structure |
[in] | addr | wire-encoded SCCP address |
[in] | addrlen | Size of addr in bytes |
References osmo_sccp_gt::digits, osmo_sccp_addr::gt, osmo_sccp_gt::gti, osmo_sccp_gt::nai, osmo_sccp_gt::npi, osmo_isup_party_parse(), OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_SSN, OSMO_SCCP_GTI_NAI_ONLY, OSMO_SCCP_GTI_NO_GT, OSMO_SCCP_GTI_TT_NPL_ENC, OSMO_SCCP_GTI_TT_NPL_ENC_NAI, OSMO_SCCP_GTI_TT_ONLY, OSMO_SCCP_RI_GT, OSMO_SCCP_RI_SSN_PC, osmo_sccp_addr::pc, osmo_sccp_addr::presence, osmo_sccp_addr::ri, osmo_sccp_addr::ssn, and osmo_sccp_gt::tt.
Referenced by sccp_addr_to_sua().
struct xua_msg * osmo_sccp_to_xua | ( | struct msgb * | msg | ) |
convert SCCP message to a SUA message
[in] | msg | message buffer holding SCCP message at l2h |
References xua_msg::hdr, sccp_to_xua_cc(), sccp_to_xua_cr(), sccp_to_xua_cref(), sccp_to_xua_dt1(), sccp_to_xua_err(), sccp_to_xua_it(), sccp_to_xua_ludt(), sccp_to_xua_ludts(), sccp_to_xua_rlc(), sccp_to_xua_rlsd(), sccp_to_xua_udt(), sccp_to_xua_udts(), sccp_to_xua_xudt(), sccp_to_xua_xudts(), SUA_CL_CLDR, SUA_CL_CLDT, SUA_CO_COAK, SUA_CO_CODT, SUA_CO_COERR, SUA_CO_COIT, SUA_CO_CORE, SUA_CO_COREF, SUA_CO_RELCO, SUA_CO_RELRE, SUA_MSGC_CL, SUA_MSGC_CO, XUA_HDR, xua_msg_alloc(), and xua_msg_free().
Referenced by mtp_user_prim_cb(), and patch_sccp_with_pc().
struct msgb * osmo_sua_to_sccp | ( | struct xua_msg * | xua | ) |
convert parsed SUA message to SCCP message
[in] | xua | parsed SUA message to be converted |
References xua_msg::hdr, xua_common_hdr::msg_class, xua_common_hdr::msg_type, sccp_msgb_alloc(), SUA_CL_CLDR, SUA_CL_CLDT, SUA_CO_COAK, SUA_CO_CODT, SUA_CO_COERR, SUA_CO_COIT, SUA_CO_CORE, SUA_CO_COREF, SUA_CO_RELCO, SUA_CO_RELRE, SUA_MSGC_CL, SUA_MSGC_CO, sua_to_sccp_cc(), sua_to_sccp_cr(), sua_to_sccp_cref(), sua_to_sccp_dt1(), sua_to_sccp_err(), sua_to_sccp_it(), sua_to_sccp_rlc(), sua_to_sccp_rlsd(), sua_to_sccp_udt(), sua_to_sccp_udts(), xua_dialect_sua, and xua_hdr_dump().
Referenced by patch_sccp_with_pc(), and sua2sccp_tx_m3ua().
|
inlinestatic |
References ss7_asp_lm_timer_names.
int ss7_asp_rx_unknown | ( | struct osmo_ss7_asp * | asp, |
int | ppid_mux, | ||
struct msgb * | msg | ||
) |
References osmo_ss7_asp::cfg, osmo_ss7_asp::ctrg, g_osmo_ss7_asp_rx_unknown_cb, LOGPASP, OSMO_SS7_ASP_PROT_IPA, osmo_ss7_asp::proto, and SS7_ASP_CTR_PKT_RX_UNKNOWN.
Referenced by ipa_rx_msg(), ss7_asp_xua_srv_conn_rx_cb(), and xua_cli_read_cb().
int sua_addr_parse | ( | struct osmo_sccp_addr * | out, |
struct xua_msg * | xua, | ||
uint16_t | iei | ||
) |
parse SCCP address from given xUA message IE
[out] | out | caller-allocated decoded SCCP address struct |
[in] | xua | xUA message |
[in] | iei | Information Element Identifier inside xua |
References sua_addr_parse_part(), and xua_msg_find_tag().
Referenced by ensure_opc_in_calling_ssn(), gen_ret_msg(), patch_sccp_with_pc(), sccp_find_user(), sccp_scrc_rx_sclc_msg(), sccp_scrc_rx_scoc_conn_msg(), sclc_rx_cldr(), sclc_rx_cldt(), scoc_fsm_idle(), scrc_rx_mtp_xfer_ind_xua(), and scu_gen_encode_and_send().
int sua_addr_parse_part | ( | struct osmo_sccp_addr * | out, |
const struct xua_msg_part * | param | ||
) |
parse SCCP address from given xUA message part
[out] | out | caller-allocated decoded SCCP address struct |
[in] | param | xUA message part containing address |
References xua_msg_part::dat, osmo_sccp_addr::gt, osmo_sccp_addr::ip, xua_msg_part::len, xua_parameter_hdr::len, OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_IPv4, OSMO_SCCP_ADDR_T_IPv6, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_SSN, OSMO_SCCP_RI_GT, OSMO_SCCP_RI_SSN_IP, OSMO_SCCP_RI_SSN_PC, osmo_sccp_addr::pc, osmo_sccp_addr::presence, osmo_sccp_addr::ri, osmo_sccp_addr::ssn, SUA_IEI_GT, SUA_IEI_IPv4, SUA_IEI_IPv6, SUA_IEI_PC, SUA_IEI_SSN, sua_parse_gt(), SUA_RI_GT, SUA_RI_HOST, SUA_RI_SSN_IP, SUA_RI_SSN_PC, xua_msg_part::tag, xua_parameter_hdr::tag, osmo_sccp_addr::v4, and osmo_sccp_addr::v6.
Referenced by sua_addr_parse(), and sua_addr_to_sccp().
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.
[out] | gt | User-allocated structure for decoded output |
[in] | data | binary-encoded data |
[in] | datalen | length of data in octets |
References data, osmo_sccp_gt::digits, osmo_sccp_gt::gti, osmo_sccp_gt::nai, osmo_sccp_gt::npi, and osmo_sccp_gt::tt.
Referenced by sua_addr_parse_part().
int sua_rx_msg | ( | struct osmo_ss7_asp * | asp, |
struct msgb * | msg | ||
) |
process SUA message received from socket
[in] | asp | Application Server Process receiving msg |
[in] | msg | received message buffer |
References osmo_ss7_asp::cfg, xua_common_hdr::data, osmo_mtp_transfer_param::dpc, xua_msg::hdr, osmo_ss7_asp::inst, LOGPASP, xua_common_hdr::msg_class, xua_msg::mtp, MTP_SI_SCCP, osmo_mtp_transfer_param::opc, OSMO_SS7_ASP_PROT_SUA, osmo_ss7_asp::proto, osmo_ss7_instance::sccp, osmo_mtp_transfer_param::sio, SUA_ERR_INVAL_STREAM_ID, SUA_ERR_INVALID_VERSION, SUA_ERR_MISSING_PARAM, SUA_ERR_PARAM_FIELD_ERR, SUA_ERR_UNSUPP_MSG_CLASS, sua_gen_error_msg(), SUA_MSGC_ASPSM, SUA_MSGC_ASPTM, SUA_MSGC_CL, SUA_MSGC_CO, SUA_MSGC_MGMT, SUA_MSGC_RKM, SUA_MSGC_SNM, sua_rx_asp(), sua_rx_cl(), sua_rx_co(), sua_rx_mgmt(), sua_rx_snm(), sua_tx_xua_asp(), SUA_VERSION, xua_common_hdr::version, xua_dialect_check_all_mand_ies(), xua_dialect_sua, xua_from_msg(), xua_hdr_dump(), and xua_msg_free().
Referenced by ss7_asp_xua_srv_conn_rx_cb(), and xua_cli_read_cb().
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.
[in] | asp | ASP through which to transmit message. Must be ACTIVE. |
[in] | rctx | array of Routing Contexts in network byte order. |
[in] | num_rctx | number of rctx |
[in] | dpc | affected point code |
[in] | user | the user (SI) that is unavailable |
[in] | cause | the cause of the user unavailability |
[in] | info_string | optional information string (can be NULL). |
References dpc, sua_encode_dupu(), and sua_tx_xua_asp().
Referenced by xua_tx_upu().
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].
[in] | asp | ASP through whihc to transmit message. Must be ACTIVE. |
[in] | rctx | array of Routing Contexts in network byte order. |
[in] | num_rctx | number of rctx |
[in] | aff_pc | array of 'Affected Point Code' in network byte order. |
[in] | num_aff_pc | number of aff_pc |
[in] | aff_ssn | affected SSN (optional) |
[in] | smi | subsystem multiplicity indicator (optional) |
[in] | info_string | optional information strng (can be NULL). |
[in] | available | are aff_pc now available (true) or unavailable (false) |
References smi, sua_encode_dava(), sua_encode_duna(), and sua_tx_xua_asp().
Referenced by sua_snm_ssn_available(), and xua_tx_snm_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 | ||
) |
Transmit SSNM SCON message indicating congestion.
[in] | asp | ASP through which to transmit message. Must be ACTIVE. |
[in] | rctx | array of Routing Contexts in network byte order. |
[in] | num_rctx | number of rctx |
[in] | aff_pc | array of 'Affected Point Code' in network byte order. |
[in] | num_aff_pc | number of aff_pc |
[in] | ssn | optional SSN (can be NULL) |
[in] | cong_level | optional congestion level (can be NULL) |
[in] | info_string | optional information string (can be NULL). |
References xua_msg::hdr, SUA_IEI_AFFECTED_PC, SUA_IEI_CONG_LEVEL, SUA_IEI_INFO_STRING, SUA_IEI_ROUTE_CTX, SUA_IEI_SSN, SUA_MSGC_SNM, SUA_SNM_SCON, SUA_VERSION, xua_common_hdr::version, XUA_HDR, xua_msg_add_data(), xua_msg_add_u32(), and xua_msg_alloc().
Referenced by xua_tx_scon().
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.
[in] | as | Application Server through which to send xua |
[in] | xua | xUA message to be sent |
References osmo_ss7_as::cfg, osmo_ss7_routing_key::context, osmo_ss7_as::fi, OSMO_SS7_ASP_PROT_SUA, osmo_ss7_as::proto, osmo_ss7_as::routing_key, SUA_IEI_ROUTE_CTX, sua_to_msg(), XUA_AS_E_TRANSFER_REQ, and xua_msg_add_u32().
Referenced by gen_mtp_transfer_req_xua().
int xua_as_transmit_msg | ( | struct osmo_ss7_as * | as, |
struct msgb * | msg | ||
) |
References _NUM_OSMO_SS7_ASP_TMOD, osmo_ss7_as::cfg, osmo_ss7_as::fi, osmo_ss7_as::mode, osmo_ss7_as_select_asp(), OSMO_SS7_AS_TMOD_BCAST, OSMO_SS7_AS_TMOD_LOADSHARE, OSMO_SS7_AS_TMOD_OVERRIDE, OSMO_SS7_AS_TMOD_ROUNDROBIN, osmo_ss7_asp_send(), and xua_as_transmit_msg_broadcast().
Referenced by ipa_tx_xua_as(), xua_as_fsm_active(), and xua_as_fsm_pending().
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 | ||
) |
References xua_asp_send_xlm_prim(), and xua_xlm_prim_alloc().
Referenced by send_xlm_prim_simple(), ss7_asp_xua_srv_conn_closed_cb(), ss7_asp_xua_srv_conn_rx_cb(), xua_accept_cb(), xua_cli_close(), xua_cli_connect_cb(), and xua_cli_read_cb().
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.
if rctx_ie == NULL, we assume that this ASP is only part of a single AS; if rctx_ie is given, then we look-up the ASP based on the routing context, and verify that this ASP is part of it.
[out] | as | caller-provided address-of-pointer to store the found AS |
[in] | asp | ASP for which we want to look-up the AS |
[in] | rctx_ie | routing context IE (may be NULL) to use for look-up |
References osmo_ss7_asp::cfg, find_single_as_for_asp(), osmo_ss7_asp::inst, LOGPASP, M3UA_ERR_INVAL_ROUT_CTX, M3UA_ERR_NO_CONFGD_AS_FOR_ASP, osmo_ss7_asp::name, osmo_ss7_as_find_by_rctx(), osmo_ss7_as_has_asp(), osmo_ss7_asp_get_log_subsys(), and xua_msg_part_get_u32().
Referenced by m3ua_rx_snm_asp(), m3ua_rx_xfer(), sua_rx_cl(), sua_rx_co(), and sua_rx_snm_asp().
void xua_rkm_cleanup_dyn_as_for_asp | ( | struct osmo_ss7_asp * | asp | ) |
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 | ||
) |
References osmo_ss7_instance::asp_list, osmo_ss7_asp::cfg, get_all_rctx_for_asp(), osmo_ss7_as::inst, osmo_ss7_asp::list, osmo_ss7_asp_active(), OSMO_SS7_ASP_ROLE_SG, osmo_ss7_asp::role, osmo_ss7_instance::sccp, xua_snm_pc_available_to_sccp(), and xua_tx_snm_available().
Referenced by xua_snm_rx_dava(), and xua_snm_rx_duna().
void xua_snm_rx_daud | ( | struct osmo_ss7_asp * | asp, |
struct xua_msg * | xua | ||
) |
References xua_msg_part::dat, format_affected_pcs_c(), get_all_rctx_for_asp(), osmo_ss7_asp::inst, xua_msg_part::len, LOGPASP, M3UA_IEI_AFFECTED_PC, M3UA_IEI_INFO_STRING, osmo_ss7_asp_get_log_subsys(), osmo_ss7_route_lookup(), xua_msg_find_tag(), xua_msg_get_str(), and xua_tx_snm_available().
Referenced by m3ua_rx_snm_asp(), m3ua_rx_snm_sg(), sua_rx_snm_asp(), and sua_rx_snm_sg().
void xua_snm_rx_dava | ( | struct osmo_ss7_asp * | asp, |
struct osmo_ss7_as * | as, | ||
struct xua_msg * | xua | ||
) |
References osmo_ss7_asp::cfg, xua_msg_part::dat, format_affected_pcs_c(), osmo_ss7_asp::inst, xua_msg_part::len, LOGPASP, M3UA_IEI_AFFECTED_PC, M3UA_IEI_INFO_STRING, osmo_ss7_asp_get_log_subsys(), OSMO_SS7_ASP_PROT_SUA, OSMO_SS7_ASP_ROLE_ASP, osmo_ss7_asp::proto, osmo_ss7_asp::role, smi, SUA_IEI_SMI, SUA_IEI_SSN, sua_snm_ssn_available(), xua_msg_find_tag(), xua_msg_get_str(), xua_msg_get_u32p(), xua_msg_part_get_u32(), and xua_snm_pc_available().
Referenced by m3ua_rx_snm_asp(), and sua_rx_snm_asp().
void xua_snm_rx_duna | ( | struct osmo_ss7_asp * | asp, |
struct osmo_ss7_as * | as, | ||
struct xua_msg * | xua | ||
) |
References osmo_ss7_asp::cfg, xua_msg_part::dat, format_affected_pcs_c(), osmo_ss7_asp::inst, xua_msg_part::len, LOGPASP, M3UA_IEI_AFFECTED_PC, M3UA_IEI_INFO_STRING, osmo_ss7_asp_get_log_subsys(), OSMO_SS7_ASP_PROT_SUA, OSMO_SS7_ASP_ROLE_ASP, osmo_ss7_asp::proto, osmo_ss7_asp::role, smi, SUA_IEI_SMI, SUA_IEI_SSN, sua_snm_ssn_available(), xua_msg_find_tag(), xua_msg_get_str(), xua_msg_get_u32p(), xua_msg_part_get_u32(), and xua_snm_pc_available().
Referenced by m3ua_rx_snm_asp(), and sua_rx_snm_asp().
void xua_snm_rx_dupu | ( | struct osmo_ss7_asp * | asp, |
struct osmo_ss7_as * | as, | ||
struct xua_msg * | xua | ||
) |
References osmo_ss7_asp::cfg, osmo_ss7_asp::inst, LOGPASP, M3UA_IEI_USER_CAUSE, mtp_si_vals, osmo_ss7_asp_get_log_subsys(), OSMO_SS7_ASP_PROT_M3UA, OSMO_SS7_ASP_PROT_SUA, OSMO_SS7_ASP_ROLE_ASP, osmo_ss7_pointcode_print(), osmo_ss7_asp::proto, osmo_ss7_asp::role, SUA_IEI_AFFECTED_PC, SUA_IEI_INFO_STRING, SUA_IEI_USER_CAUSE, xua_msg_get_str(), xua_msg_get_u32(), and xua_snm_upu().
Referenced by m3ua_rx_snm_asp(), and sua_rx_snm_asp().
void xua_snm_rx_scon | ( | struct osmo_ss7_asp * | asp, |
struct osmo_ss7_as * | as, | ||
struct xua_msg * | xua | ||
) |
References xua_msg_part::dat, format_affected_pcs_c(), osmo_ss7_asp::inst, xua_msg_part::len, LOGPASP, M3UA_IEI_AFFECTED_PC, M3UA_IEI_CONC_DEST, M3UA_IEI_CONG_IND, M3UA_IEI_INFO_STRING, osmo_ss7_asp_get_log_subsys(), xua_msg_find_tag(), xua_msg_get_str(), xua_msg_get_u32p(), and xua_snm_scon().
Referenced by m3ua_rx_snm_asp().
struct osmo_xlm_prim * xua_xlm_prim_alloc | ( | enum osmo_xlm_prim_type | prim_type, |
enum osmo_prim_operation | op | ||
) |
References osmo_xlm_prim::oph, and XUA_SAP_LM.
Referenced by handle_rkey_dereg_resp(), handle_rkey_reg_resp(), lm_timer_cb(), m3ua_rx_mgmt_err(), m3ua_rx_mgmt_ntfy(), and xua_asp_send_xlm_prim_simple().
|
extern |
Referenced by m3ua_rx_mgmt_err(), peer_send_error(), and sua_rx_mgmt_err().
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Referenced by m3ua_rx_mgmt_ntfy(), and sua_rx_mgmt_ntfy().
|
extern |
Referenced by m3ua_rx_mgmt_ntfy(), and sua_rx_mgmt_ntfy().
|
extern |
Referenced by m3ua_rx_mgmt_ntfy(), and sua_rx_mgmt_ntfy().
|
extern |
Referenced by handle_rkey_dereg_resp().
|
extern |
Referenced by handle_rkey_reg_resp().
|
extern |
Referenced by gen_asp_timer_cmd_strs(), and ss7_asp_alloc().
|
extern |
Referenced by DEFUN_ATTR(), gen_asp_timer_cmd_strs(), ss7_asp_lm_timer_name(), and write_asp_timers().
|
extern |
Referenced by osmo_ss7_asp_use_default_lm(), and osmo_ss7_init().