libosmo-sigtran: src/ipa.c File Reference

libosmo-sigtran 2.2.1.99-1c6a Osmocom SIGTRAN library

Functions
ipa.c File Reference
`#include "config.h"`
`#include <stdint.h>`
`#include <errno.h>`
`#include <unistd.h>`
`#include <string.h>`
`#include <osmocom/core/utils.h>`
`#include <osmocom/core/linuxlist.h>`
`#include <osmocom/core/write_queue.h>`
`#include <osmocom/core/logging.h>`
`#include <osmocom/core/timer.h>`
`#include <osmocom/core/socket.h>`
`#include <osmocom/core/byteswap.h>`
`#include <osmocom/gsm/ipa.h>`
`#include <osmocom/gsm/protocol/ipaccess.h>`
`#include <osmocom/netif/ipa.h>`
`#include <osmocom/sigtran/mtp_sap.h>`
`#include <osmocom/sigtran/sccp_sap.h>`
`#include <osmocom/sigtran/osmo_ss7.h>`
`#include <osmocom/sigtran/protocol/m3ua.h>`
`#include <osmocom/sigtran/protocol/sua.h>`
`#include <osmocom/sigtran/protocol/mtp.h>`
`#include "mtp3_hmdc.h"`
`#include "ss7_as.h"`
`#include "ss7_asp.h"`
`#include "ss7_internal.h"`
`#include "xua_asp_fsm.h"`
`#include "xua_internal.h"`
`#include "xua_msg.h"`

## Functions
struct msgb * | ipa_gen_ping (void)
struct msgb * | ipa_to_msg (struct xua_msg *xua)
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...
static int | ipa_rx_msg_ccm (struct osmo_ss7_asp *asp, struct msgb *msg)
static struct msgb * | patch_sccp_with_pc (const struct osmo_ss7_asp *asp, const struct msgb *sccp_msg_in, uint32_t opc, uint32_t dpc)
static int | ipa_rx_msg_up (struct osmo_ss7_asp *asp, struct msgb *msg, uint8_t sls)
int | ipa_rx_msg (struct osmo_ss7_asp *asp, struct msgb *msg, uint8_t sls)
| process M3UA message received from socket More...

## Function Documentation

## ◆ ipa_gen_ping()

struct msgb * ipa_gen_ping | ( | void |  | ) |

References NULL.

Referenced by ipa_t_beat_send().

## ◆ ipa_rx_msg()

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

process M3UA message received from socket

Parameters

  [in] | asp | Application Server Process receiving msg
  [in] | msg | received message buffer. It is kept owned by the caller.
  [in] | sls | The SLS (signaling link selector) field to use in the generated M3UA header

Returns
  0 on success; negative on error

References osmo_ss7_asp::cfg, ipa_rx_msg_ccm(), ipa_rx_msg_osmo_ext_tcap_routing(), ipa_rx_msg_up(), OSMO_SS7_ASP_PROT_IPA, osmo_ss7_asp::proto, and sls.

Referenced by ipa_cli_read_cb(), and ss7_asp_ipa_srv_conn_rx_cb().

## ◆ ipa_rx_msg_ccm()

static int ipa_rx_msg_ccm | ( | struct osmo_ss7_asp * | asp,
|  | struct msgb * | msg
| ) |  |
| static

References osmo_ss7_asp::fi, IPA_ASP_E_ID_ACK, IPA_ASP_E_ID_GET, IPA_ASP_E_ID_RESP, LOGPASP, msg_type, XUA_ASP_E_ASPSM_BEAT, and XUA_ASP_E_ASPSM_BEAT_ACK.

Referenced by ipa_rx_msg().

## ◆ ipa_rx_msg_up()

static int ipa_rx_msg_up | ( | struct osmo_ss7_asp * | asp,
|  | struct msgb * | msg,
|  | uint8_t | sls
| ) |  |
| static

References osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_instance::cfg, osmo_ss7_as::ctrg, dpc, m3ua_data_hdr::dpc, osmo_ss7_as::dpc, osmo_ss7_as::inst, osmo_ss7_asp::inst, osmo_ss7_as::loadshare, LOGPASP, m3ua_dh_to_xfer_param(), m3ua_xfer_from_data(), xua_msg::mtp, mtp3_hmdc_rx_from_l2(), MTP_SI_NI11_OSMO_IPA, MTP_SI_SCCP, osmo_ss7_instance::network_indicator, m3ua_data_hdr::ni, NULL, opc, m3ua_data_hdr::opc, osmo_ss7_as::opc, osmo_ss7_as::opc_enabled, OSMO_SS7_ASP_ROLE_ASP, OSMO_SS7_PATCH_BOTH, patch_sccp_with_pc(), osmo_ss7_routing_key::pc, osmo_ss7_as::pc_override, osmo_ss7_asp::role, osmo_ss7_as::routing_key, osmo_ss7_as::sccp_mode, m3ua_data_hdr::si, sls, m3ua_data_hdr::sls, SS7_AS_CTR_RX_MSU_SLS_0, SS7_AS_CTR_RX_MSU_TOTAL, ss7_asp_get_first_as(), and tcap_as_rx_sccp_asp().

Referenced by ipa_rx_msg().

## ◆ ipa_to_msg()

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

References xua_msg_part::dat, xua_msg_part::len, M3UA_IEI_PROT_DATA, MTP_SI_NI11_OSMO_IPA, MTP_SI_SCCP, NULL, m3ua_data_hdr::si, and xua_msg_find_tag().

Referenced by xua_as_encode_msg().

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

This function takes ownership of xua msg passed to it.

References osmo_ss7_as::cfg, OSMO_SS7_ASP_PROT_IPA, osmo_ss7_as::proto, and xua_as_transmit_msg().

Referenced by mtp3_hmrt_message_for_routing().

## ◆ patch_sccp_with_pc()

static struct msgb * patch_sccp_with_pc | ( | const struct osmo_ss7_asp * | asp,
|  | const struct msgb * | sccp_msg_in,
|  | uint32_t | opc,
|  | uint32_t | dpc
| ) |  |
| static

References dpc, LOGPASP, NULL, opc, OSMO_SCCP_ADDR_T_PC, osmo_sccp_to_xua(), osmo_sua_to_sccp(), osmo_sccp_addr::pc, osmo_sccp_addr::presence, sua_addr_parse(), SUA_IEI_DEST_ADDR, SUA_IEI_SRC_ADDR, xua_msg_add_sccp_addr(), xua_msg_free(), and xua_msg_free_tag().

Referenced by ipa_rx_msg_up().