Loading...
Searching...
No Matches
ipa.c File Reference
`#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 "xua_msg.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 "xua_internal.h"`
`#include "ss7_as.h"`
`#include "ss7_asp.h"`
`#include "ss7_internal.h"`
`#include "xua_asp_fsm.h"`

## Functions

static 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".
static int | ipa_rx_msg_ccm (struct osmo_ss7_asp *asp, struct msgb *msg)
struct osmo_ss7_as * | ipa_find_as_for_asp (struct osmo_ss7_asp *asp)
static struct msgb * | patch_sccp_with_pc (struct osmo_ss7_asp *asp, struct msgb *sccp_msg_in, uint32_t opc, uint32_t dpc)
static int | ipa_rx_msg_sccp (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

## Function Documentation

## ipa_find_as_for_asp()

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

## 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. Callee takes ownership!
  [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_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().

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

static int ipa_rx_msg_sccp | ( | 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, ipa_find_as_for_asp(), osmo_ss7_asp::is_server, LOGPASP, m3ua_dh_to_xfer_param(), m3ua_hmdc_rx_from_l2(), m3ua_xfer_from_data(), xua_msg::mtp, MTP_SI_SCCP, osmo_ss7_instance::network_indicator, m3ua_data_hdr::ni, opc, m3ua_data_hdr::opc, OSMO_SS7_PATCH_BOTH, patch_sccp_with_pc(), osmo_ss7_routing_key::pc, osmo_ss7_as::pc_override, osmo_ss7_as::routing_key, osmo_ss7_as::sccp_mode, m3ua_data_hdr::si, sls, m3ua_data_hdr::sls, SS7_AS_CTR_RX_MSU_TOTAL, and xua_msg_free().

Referenced by ipa_rx_msg().

## ipa_to_msg()

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

static

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

Referenced by ipa_tx_xua_as().

## 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, ipa_to_msg(), LOGPAS, OSMO_SS7_ASP_PROT_IPA, osmo_ss7_as::proto, and xua_as_transmit_msg().

Referenced by hmrt_message_for_routing().

## patch_sccp_with_pc()

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

static

References dpc, LOGPASP, 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_sccp().