xua_internal.h File Reference
`#include <osmocom/sigtran/osmo_ss7.h>`
`#include <osmocom/sigtran/xua_msg.h>`

Go to the source code of this file.

## Macros

#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"

## 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...
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...
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)
int | xua_as_transmit_msg (struct osmo_ss7_as *as, struct msgb *msg)
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)
| process M3UA message received from socket More...
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 omso_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 []
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 []

## Macro Definition Documentation

## CS7_STR

#define CS7_STR "ITU-T Signaling System 7\n"

## INST_STR

#define INST_STR "An instance of the SS7 stack\n"

## PC_STR

#define PC_STR "Point Code\n"

## Function Documentation

## data_hdr_from_m3ua()

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().

## ipa_rx_msg()

int ipa_rx_msg | ( | struct osmo_ss7_asp * | asp,
|  | struct msgb * | msg
| ) |  |

process M3UA message received from socket

Parameters

  [in] | asp | Application Server Process receiving msg
  [in] | msg | received message buffer. Callee takes ownership!

Returns
  0 on success; negative on error

References osmo_ss7_asp::cfg, ipa_rx_msg_ccm(), ipa_rx_msg_sccp(), OSMO_SS7_ASP_PROT_IPA, osmo_ss7_asp::proto, and ss7_asp_rx_unknown().

Referenced by ipa_cli_read_cb(), and ipa_srv_conn_cb().

## 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".

Parameters

  [in] | as | Application Server through which to send xua
  [in] | xua | xUA message to be sent

Returns
  0 on success; negative on error

References osmo_ss7_as::cfg, xua_msg_part::dat, xua_msg_part::len, M3UA_IEI_PROT_DATA, OSMO_SS7_ASP_PROT_IPA, osmo_ss7_as::proto, xua_as_transmit_msg(), and xua_msg_find_tag().

Referenced by hmrt_message_for_routing().

## m3ua_decode_notify()

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().

## m3ua_dh_to_xfer_param()

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().

## m3ua_encode_notify()

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().

## m3ua_hmdc_rx_from_l2()

int m3ua_hmdc_rx_from_l2 | ( | struct osmo_ss7_instance * | inst,
|  | struct xua_msg * | xua
| ) |  |

References osmo_mtp_transfer_param::dpc, dpc, hmdt_message_for_distribution(), hmrt_message_for_routing(), xua_msg::mtp, osmo_ss7_pc_is_local(), and osmo_ss7_pointcode_print().

Referenced by ipa_rx_msg_sccp(), m3ua_rx_xfer(), and osmo_ss7_user_mtp_xfer_req().

## m3ua_msgb_alloc()

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_cli_read_cb(), xua_rkm_send_dereg_req(), xua_rkm_send_reg_req(), and xua_srv_conn_cb().

## m3ua_rx_msg()

int m3ua_rx_msg | ( | struct osmo_ss7_asp * | asp,
|  | struct msgb * | msg
| ) |  |

process M3UA message received from socket

Parameters

  [in] | asp | Application Server Process receiving msg
  [in] | msg | received message buffer

Returns
  0 on success; negative on error

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_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_from_msg(), xua_hdr_dump(), and xua_msg_free().

Referenced by xua_cli_read_cb(), and xua_srv_conn_cb().

## m3ua_rx_rkm()

int m3ua_rx_rkm | ( | struct osmo_ss7_asp * | asp,
|  | struct xua_msg * | xua
| ) |  |

References xua_msg::hdr, LOGPASP, M3UA_RKM_DEREG_REQ, M3UA_RKM_DEREG_RSP, M3UA_RKM_REG_REQ, M3UA_RKM_REG_RSP, m3ua_rx_rkm_dereg_req(), m3ua_rx_rkm_dereg_rsp(), m3ua_rx_rkm_reg_req(), m3ua_rx_rkm_reg_rsp(), and xua_common_hdr::msg_type.

Referenced by m3ua_rx_msg().

## m3ua_to_xfer_ind()

struct osmo_mtp_prim* m3ua_to_xfer_ind | ( | struct xua_msg * | xua | ) |

References xua_msg_part::dat, xua_msg_part::len, m3ua_dh_to_xfer_param(), M3UA_IEI_PROT_DATA, m3ua_msgb_alloc(), MTP_SAP_USER, osmo_mtp_prim::oph, OSMO_MTP_PRIM_TRANSFER, osmo_mtp_prim::transfer, osmo_mtp_prim::u, and xua_msg_find_tag().

Referenced by deliver_to_mtp_user().

## 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.

Parameters

  [in] | as | Application Server through which to send xua
  [in] | xua | xUA message to be sent

Returns
  0 on success; negative on error

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().

## 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
| ) |  |

References xua_msg_part::dat, 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().

## 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
| ) |  |

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 mtp_prim_to_m3ua().

## 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.

Parameters

  [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

Returns
  number of digits generated

Referenced by osmo_sccp_addr_parse().

## 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

Parameters

  [out] | msg | message buffer to which address is to be appended
  [in] | in | data structure describing SCCP address

Returns
  number of bytes written to msg

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().

## 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 omso_sccp_addr.

Parameters

  [out] | out | user-allocated output data structure
  [in] | addr | wire-encoded SCCP address
  [in] | addrlen | Size of addr in bytes

Returns
  0 in case of success, negative on error According to Q.713/3.4 and RFC3868/3.10.2

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().

## osmo_sccp_to_xua()

struct xua_msg* osmo_sccp_to_xua | ( | struct msgb * | msg | ) |

convert SCCP message to a SUA message

Parameters

  [in] | msg | message buffer holding SCCP message at l2h

Returns
  callee-allocated xUA message on success; NULL on error

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_rlc(), sccp_to_xua_rlsd(), sccp_to_xua_udt(), sccp_to_xua_udts(), 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().

## osmo_sua_to_sccp()

struct msgb* osmo_sua_to_sccp | ( | struct xua_msg * | xua | ) |

convert parsed SUA message to SCCP message

Parameters

  [in] | xua | parsed SUA message to be converted

Returns
  callee-allocated msgb containing encoded SCCP message

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().

## ss7_asp_rx_unknown()

int ss7_asp_rx_unknown | ( | struct osmo_ss7_asp * | asp,
|  | int | ppid_mux,
|  | struct msgb * | msg
| ) |  |

References osmo_ss7_asp::cfg, g_osmo_ss7_asp_rx_unknown_cb, LOGPASP, OSMO_SS7_ASP_PROT_IPA, and osmo_ss7_asp::proto.

Referenced by ipa_rx_msg(), xua_cli_read_cb(), and xua_srv_conn_cb().

## 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

Parameters

  [out] | out | caller-allocated decoded SCCP address struct
  [in] | xua | xUA message
  [in] | iei | Information Element Identifier inside xua

Returns
  0 on success; negative on error

References sua_addr_parse_part(), and xua_msg_find_tag().

Referenced by 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().

## 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

Parameters

  [out] | out | caller-allocated decoded SCCP address struct
  [in] | param | xUA message part containing address

Returns
  0 on success; negative on error

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_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_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, and osmo_sccp_addr::v4.

Referenced by sua_addr_parse(), and sua_addr_to_sccp().

## 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.

Parameters

  [out] | gt | User-allocated structure for decoded output
  [in] | data | binary-encoded data
  [in] | datalen | length of data in octets

References 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().

## sua_rx_msg()

int sua_rx_msg | ( | struct osmo_ss7_asp * | asp,
|  | struct msgb * | msg
| ) |  |

process SUA message received from socket

Parameters

  [in] | asp | Application Server Process receiving msg
  [in] | msg | received message buffer

Returns
  0 on success; negative on error

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_tx_xua_asp(), SUA_VERSION, xua_common_hdr::version, xua_dialect_check_all_mand_ies(), xua_from_msg(), xua_hdr_dump(), and xua_msg_free().

Referenced by xua_cli_read_cb(), and xua_srv_conn_cb().

## 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.

Parameters

  [in] | as | Application Server through which to send xua
  [in] | xua | xUA message to be sent

Returns
  0 on success; negative on error

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().

## xua_as_transmit_msg()

int xua_as_transmit_msg | ( | struct osmo_ss7_as * | as,
|  | struct msgb * | msg
| ) |  |

References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_as::fi, and osmo_ss7_asp_send().

Referenced by ipa_tx_xua_as(), xua_as_fsm_active(), and xua_as_fsm_pending().

## xua_asp_send_xlm_prim()

void xua_asp_send_xlm_prim | ( | struct osmo_ss7_asp * | asp,
|  | struct osmo_xlm_prim * | prim
| ) |  |

References osmo_ss7_asp::lm, LOGPASP, osmo_xlm_prim::oph, osmo_xlm_prim_name(), and osmo_xua_layer_manager::prim_cb.

Referenced by handle_rkey_dereg_resp(), handle_rkey_reg_resp(), m3ua_rx_mgmt_err(), m3ua_rx_mgmt_ntfy(), and xua_asp_send_xlm_prim_simple().

## 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
| ) |  |

References xua_asp_send_xlm_prim(), and xua_xlm_prim_alloc().

Referenced by send_xlm_prim_simple(), xua_accept_cb(), xua_cli_close(), xua_cli_connect_cb(), xua_cli_read_cb(), xua_srv_conn_cb(), and xua_srv_conn_closed_cb().

## xua_rkm_cleanup_dyn_as_for_asp()

void xua_rkm_cleanup_dyn_as_for_asp | ( | struct osmo_ss7_asp * | asp | ) |

References osmo_ss7_instance::as_list, osmo_ss7_asp::inst, osmo_ss7_as::list, osmo_ss7_as_destroy(), osmo_ss7_as_has_asp(), and osmo_ss7_as::rkm_dyn_allocated.

Referenced by xua_srv_conn_closed_cb().

## xua_xlm_prim_alloc()

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().

## Variable Documentation

## m3ua_err_names

const struct value_string m3ua_err_names[]

Referenced by m3ua_rx_mgmt_err(), and sua_rx_mgmt_err().

## m3ua_msg_class_aspsm

const struct xua_msg_class m3ua_msg_class_aspsm

## m3ua_msg_class_asptm

const struct xua_msg_class m3ua_msg_class_asptm

## m3ua_msg_class_mgmt

const struct xua_msg_class m3ua_msg_class_mgmt

## m3ua_msg_class_rkm

const struct xua_msg_class m3ua_msg_class_rkm

## m3ua_msg_class_snm

const struct xua_msg_class m3ua_msg_class_snm

## m3ua_ntfy_other_names

const struct value_string m3ua_ntfy_other_names[]

Referenced by m3ua_rx_mgmt_ntfy(), and sua_rx_mgmt_ntfy().

## m3ua_ntfy_stchg_names

const struct value_string m3ua_ntfy_stchg_names[]

Referenced by m3ua_rx_mgmt_ntfy(), and sua_rx_mgmt_ntfy().

## m3ua_ntfy_type_names

const struct value_string m3ua_ntfy_type_names[]

Referenced by m3ua_rx_mgmt_ntfy(), and sua_rx_mgmt_ntfy().

## m3ua_rkm_dereg_status_vals

const struct value_string m3ua_rkm_dereg_status_vals[]

Referenced by handle_rkey_dereg_resp().

## m3ua_rkm_reg_status_vals

const struct value_string m3ua_rkm_reg_status_vals[]

Referenced by handle_rkey_reg_resp().

## xua_default_lm_fsm

struct osmo_fsm xua_default_lm_fsm

Referenced by osmo_ss7_asp_use_default_lm(), and osmo_ss7_init().