libosmo-sigtran  1.9.0.4-dc82
Osmocom SIGTRAN library
sccp_sclc.c File Reference
#include <string.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/fsm.h>
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/protocol/sua.h>
#include <osmocom/sccp/sccp_types.h>
#include "xua_internal.h"
#include "sccp_internal.h"

Functions

static struct xua_msgxua_gen_msg_cl (uint32_t event, struct osmo_scu_prim *prim, int msg_type)
 
static int xua_gen_encode_and_send (struct osmo_sccp_user *scu, uint32_t event, struct osmo_scu_prim *prim, int msg_type)
 
int sccp_sclc_user_sap_down_nofree (struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph)
 Main entrance function for primitives from SCCP User. More...
 
int sccp_sclc_user_sap_down (struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph)
 Main entrance function for primitives from SCCP User. More...
 
static int sclc_rx_cldt (struct osmo_sccp_instance *inst, struct xua_msg *xua)
 
static int sclc_rx_cldr (struct osmo_sccp_instance *inst, struct xua_msg *xua)
 
int sccp_sclc_rx_from_scrc (struct osmo_sccp_instance *inst, struct xua_msg *xua)
 SCRC -> SCLC (connectionless message) More...
 
static struct xua_msggen_ret_msg (struct osmo_sccp_instance *inst, const struct xua_msg *xua_in, uint32_t ret_cause)
 
void sccp_sclc_rx_scrc_rout_fail (struct osmo_sccp_instance *inst, struct xua_msg *xua_in, uint32_t cause)
 SCRC -> SCLC (Routing Failure. More...
 

Function Documentation

◆ gen_ret_msg()

◆ sccp_sclc_rx_from_scrc()

int sccp_sclc_rx_from_scrc ( struct osmo_sccp_instance inst,
struct xua_msg xua 
)

SCRC -> SCLC (connectionless message)

Parameters
[in]instSCCP Instance in which we operate
[in]xuaSUA connectionless message
Returns
0 on success; negative on error

References xua_msg::hdr, xua_common_hdr::msg_class, xua_common_hdr::msg_type, sclc_rx_cldr(), sclc_rx_cldt(), SUA_CL_CLDR, SUA_CL_CLDT, SUA_MSGC_CL, xua_dialect_sua, and xua_hdr_dump().

Referenced by scrc_node_6(), and scrc_translate_node_9().

◆ sccp_sclc_rx_scrc_rout_fail()

void sccp_sclc_rx_scrc_rout_fail ( struct osmo_sccp_instance inst,
struct xua_msg xua_in,
uint32_t  cause 
)

SCRC -> SCLC (Routing Failure.

Parameters
[in]instSCCP Instance in which we operate
[in]xua_inMessage that failed to be routed
[in]causeSCCP Return Cause

References gen_ret_msg(), xua_msg::hdr, xua_common_hdr::msg_type, xua_msg::mtp, osmo_mtp_transfer_param::opc, osmo_ss7_pc_is_local(), sccp_scrc_rx_sclc_msg(), sclc_rx_cldr(), osmo_sccp_instance::ss7, SUA_CL_CLDR, SUA_CL_CLDT, and xua_msg_free().

Referenced by scrc_node_4(), scrc_node_6(), and scrc_translate_node_9().

◆ sccp_sclc_user_sap_down()

int sccp_sclc_user_sap_down ( struct osmo_sccp_user scu,
struct osmo_prim_hdr *  oph 
)

Main entrance function for primitives from SCCP User.

Implies a msgb_free(oph->msg), otherwise the same as sccp_sclc_user_sap_down_nofree().

Parameters
[in]scuSCCP User who is sending the primitive

References osmo_scu_prim::oph, and sccp_sclc_user_sap_down_nofree().

◆ sccp_sclc_user_sap_down_nofree()

int sccp_sclc_user_sap_down_nofree ( struct osmo_sccp_user scu,
struct osmo_prim_hdr *  oph 
)

Main entrance function for primitives from SCCP User.

The caller is required to free oph->msg, otherwise the same as sccp_sclc_user_sap_down().

Parameters
[in]scuSCCP User who is sending the primitive

References osmo_scu_prim::oph, OSMO_SCU_PRIM_N_UNITDATA, osmo_scu_prim_name(), SUA_CL_CLDT, and xua_gen_encode_and_send().

Referenced by osmo_sccp_user_sap_down_nofree(), and sccp_sclc_user_sap_down().

◆ sclc_rx_cldr()

◆ sclc_rx_cldt()

◆ xua_gen_encode_and_send()

static int xua_gen_encode_and_send ( struct osmo_sccp_user scu,
uint32_t  event,
struct osmo_scu_prim prim,
int  msg_type 
)
static

◆ xua_gen_msg_cl()