libosmo-sigtran  0.10.0
Osmocom SIGTRAN library
sccp_internal.h File Reference
#include <osmocom/core/fsm.h>
#include <osmocom/core/prim.h>
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/osmo_ss7.h>

Go to the source code of this file.

Data Structures

struct  osmo_sccp_instance
 
struct  osmo_sccp_user
 

Functions

struct osmo_sccp_usersccp_user_find (struct osmo_sccp_instance *inst, uint16_t ssn, uint32_t pc)
 Find a SCCP User registered for given PC+SSN or SSN only. More...
 
int sccp_scrc_rx_scoc_conn_msg (struct osmo_sccp_instance *inst, struct xua_msg *xua)
 
int sccp_scrc_rx_sclc_msg (struct osmo_sccp_instance *inst, struct xua_msg *xua)
 
int scrc_rx_mtp_xfer_ind_xua (struct osmo_sccp_instance *inst, struct xua_msg *xua)
 
void sccp_scoc_rx_from_scrc (struct osmo_sccp_instance *inst, struct xua_msg *xua)
 Main entrance function for primitives from the SCRC (Routing Control) More...
 
void sccp_scoc_rx_scrc_rout_fail (struct osmo_sccp_instance *inst, struct xua_msg *xua, uint32_t cause)
 SCOC: Receive SCRC Routing Failure. More...
 
void sccp_scoc_flush_connections (struct osmo_sccp_instance *inst)
 
int sccp_sclc_rx_from_scrc (struct osmo_sccp_instance *inst, struct xua_msg *xua)
 SCRC -> SCLC (connectionless message) More...
 
void sccp_sclc_rx_scrc_rout_fail (struct osmo_sccp_instance *inst, struct xua_msg *xua, uint32_t cause)
 SCRC -> SCLC (Routing Failure. More...
 
int sccp_user_prim_up (struct osmo_sccp_user *scut, struct osmo_scu_prim *prim)
 Send a SCCP User SAP Primitive up to the 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...
 
struct msgb * sccp_msgb_alloc (const char *name)
 
void sccp_scoc_show_connections (struct vty *vty, struct osmo_sccp_instance *inst)
 

Variables

int DSCCP
 
struct osmo_fsm sccp_scoc_fsm
 

Function Documentation

◆ sccp_msgb_alloc()

struct msgb* sccp_msgb_alloc ( const char *  name)

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

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

◆ sccp_scoc_flush_connections()

void sccp_scoc_flush_connections ( struct osmo_sccp_instance inst)

◆ sccp_scoc_rx_from_scrc()

◆ sccp_scoc_rx_scrc_rout_fail()

void sccp_scoc_rx_scrc_rout_fail ( struct osmo_sccp_instance inst,
struct xua_msg xua,
uint32_t  return_cause 
)

SCOC: Receive SCRC Routing Failure.

Parameters
[in]instSCCP Instance on which we operate
[in]xuaSUA message that was failed to route
[in]return_causeReason (cause) for routing failure

References conn_find_by_id(), sccp_connection::conn_id, sccp_connection::fi, gen_coref_without_conn(), get_cref_cause_for_ret(), sccp_scrc_rx_scoc_conn_msg(), SCOC_E_RCOC_ROUT_FAIL_IND, SUA_IEI_DEST_REF, xua_msg_free(), and xua_msg_get_u32().

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

◆ sccp_scoc_show_connections()

void sccp_scoc_show_connections ( struct vty *  vty,
struct osmo_sccp_instance inst 
)

◆ sccp_scrc_rx_sclc_msg()

◆ sccp_scrc_rx_scoc_conn_msg()

◆ sccp_user_find()

struct osmo_sccp_user* sccp_user_find ( struct osmo_sccp_instance inst,
uint16_t  ssn,
uint32_t  pc 
)

Find a SCCP User registered for given PC+SSN or SSN only.

Parameters
[in]instSCCP Instance in which to search
[in]ssnSub-System Number to search for
[in]pcPoint Code to search for
Returns
Matching SCCP User; NULL if none found

References osmo_sccp_user::list, osmo_ss7_pc_is_valid(), osmo_sccp_user::pc, osmo_sccp_user::ssn, and osmo_sccp_instance::users.

Referenced by DEFUN(), sccp_find_user(), sccp_user_bind_pc(), sclc_rx_cldr(), sclc_rx_cldt(), and scrc_node_6().

◆ sccp_user_prim_up()

int sccp_user_prim_up ( struct osmo_sccp_user scu,
struct osmo_scu_prim prim 
)

Send a SCCP User SAP Primitive up to the User.

Parameters
[in]scuSCCP User to whom to send the primitive
[in]primPrimitive to send to the user
Returns
return value of the SCCP User's prim_cb() function

References osmo_sccp_user::name, osmo_scu_prim::oph, osmo_scu_prim_name(), and osmo_sccp_user::prim_cb.

Referenced by sclc_rx_cldr(), sclc_rx_cldt(), and scu_gen_encode_and_send().

◆ scrc_rx_mtp_xfer_ind_xua()

Variable Documentation

◆ DSCCP

int DSCCP

◆ sccp_scoc_fsm

struct osmo_fsm sccp_scoc_fsm

Referenced by osmo_ss7_init().