libosmo-sigtran 2.0.0.52-6412
Osmocom SIGTRAN library
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

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)
 
struct osmo_ss7_asipa_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 More...
 

Function Documentation

◆ ipa_find_as_for_asp()

struct osmo_ss7_as * ipa_find_as_for_asp ( struct osmo_ss7_asp asp)

◆ 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]aspApplication Server Process receiving msg
[in]msgreceived message buffer. Callee takes ownership!
[in]slsThe 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

◆ ipa_rx_msg_sccp()

◆ 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]asApplication Server through which to send xua
[in]xuaxUA message to be sent
Returns
0 on success; negative on error

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

◆ 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