libosmo-sigtran 2.2.1 Osmocom SIGTRAN library

Macros | Functions | Variables
sccp_scoc_fsm.c File Reference
`#include <errno.h>`
`#include <string.h>`
`#include <osmocom/core/msgb.h>`
`#include <osmocom/core/utils.h>`
`#include <osmocom/core/linuxlist.h>`
`#include <osmocom/core/linuxrbtree.h>`
`#include <osmocom/core/logging.h>`
`#include <osmocom/core/timer.h>`
`#include <osmocom/core/fsm.h>`
`#include <osmocom/sigtran/sccp_helpers.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_connection.h"`
`#include "sccp_instance.h"`
`#include "sccp_internal.h"`
`#include "sccp_scoc_fsm.h"`
`#include "sccp_user.h"`
`#include "ss7_internal.h"`
`#include "ss7_instance.h"`

## Macros
#define | S(x) (1 << (x))

## Functions
static void | scoc_fsm_idle (struct osmo_fsm_inst *fi, uint32_t event, void *data)
static void | scoc_fsm_idle_onenter (struct osmo_fsm_inst *fi, uint32_t old_state)
static void | scoc_fsm_conn_pend_in (struct osmo_fsm_inst *fi, uint32_t event, void *data)
static void | scoc_fsm_conn_pend_out (struct osmo_fsm_inst *fi, uint32_t event, void *data)
static void | scoc_fsm_wait_conn_conf (struct osmo_fsm_inst *fi, uint32_t event, void *data)
static void | scoc_fsm_active (struct osmo_fsm_inst *fi, uint32_t event, void *data)
static void | scoc_fsm_disconn_pend (struct osmo_fsm_inst *fi, uint32_t event, void *data)

## Variables
static const struct value_string | scoc_event_names []
static const struct osmo_fsm_state | sccp_scoc_states []
struct osmo_fsm | sccp_scoc_fsm

## Macro Definition Documentation

## ◆ S

#define S | ( |  | x | ) | (1 << (x))

## Function Documentation

## ◆ scoc_fsm_active()

static void scoc_fsm_active | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | event,
|  | void * | data
| ) |  |
| static

References data, sccp_connection::fi, sccp_connection::importance, NULL, OSMO_SCU_PRIM_N_DATA, OSMO_SCU_PRIM_N_DISCONNECT, sccp_connection::remote_ref, S_DISCONN_PEND, S_IDLE, sccp_connection::sccp_class, sccp_conn_restart_rx_inact_timer(), sccp_conn_restart_tx_inact_timer(), sccp_conn_scu_gen_encode_and_send(), sccp_conn_start_rel_timer(), sccp_conn_stop_inact_timers(), sccp_conn_xua_gen_encode_and_send(), sccp_conn_xua_gen_relre_and_send(), SCOC_E_RCOC_CC_IND, SCOC_E_RCOC_CREF_IND, SCOC_E_RCOC_DT1_IND, SCOC_E_RCOC_ERROR_IND, SCOC_E_RCOC_IT_IND, SCOC_E_RCOC_REL_COMPL_IND, SCOC_E_RCOC_RLSD_IND, SCOC_E_RCOC_ROUT_FAIL_IND, SCOC_E_SCU_N_DATA_REQ, SCOC_E_SCU_N_DISC_REQ, SCOC_E_SCU_N_EXP_DATA_REQ, SCOC_E_T_IAR_EXP, SCOC_E_T_IAS_EXP, SUA_CAUSE_T_RELEASE, SUA_CO_CODT, SUA_CO_COIT, SUA_CO_RELCO, SUA_CO_RELRE, SUA_IEI_CAUSE, SUA_IEI_IMPORTANCE, SUA_IEI_PROTO_CLASS, SUA_IEI_SRC_REF, xua_msg_add_u32(), xua_msg_alloc(), xua_msg_free(), and xua_msg_get_u32().

## ◆ scoc_fsm_conn_pend_in()

static void scoc_fsm_conn_pend_in | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | event,
|  | void * | data
| ) |  |
| static

References data, sccp_connection::fi, NULL, S_ACTIVE, S_IDLE, sccp_conn_opt_data_send_cache(), sccp_conn_start_inact_timers(), sccp_conn_xua_gen_encode_and_send(), SCOC_E_SCU_N_CONN_RESP, SCOC_E_SCU_N_DISC_REQ, SUA_CO_COAK, SUA_CO_COREF, and SUA_MSGC_CO.

## ◆ scoc_fsm_conn_pend_out()

static void scoc_fsm_conn_pend_out | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | event,
|  | void * | data
| ) |  |
| static

References osmo_scu_disconn_param::cause, data, osmo_scu_prim::disconnect, sccp_connection::fi, xua_msg::hdr, xua_common_hdr::msg_class, xua_msg::mtp, NULL, osmo_mtp_transfer_param::opc, OSMO_SCU_PRIM_N_CONNECT, OSMO_SCU_PRIM_N_DISCONNECT, sccp_connection::release_cause, sccp_connection::remote_pc, sccp_connection::remote_ref, S_ACTIVE, S_IDLE, S_WAIT_CONN_CONF, sccp_conn_opt_data_send_cache(), sccp_conn_scu_gen_encode_and_send(), sccp_conn_start_connect_timer(), sccp_conn_start_inact_timers(), sccp_conn_stop_connect_timer(), sccp_conn_xua_gen_encode_and_send(), SCOC_E_CONN_TMR_EXP, SCOC_E_RCOC_CC_IND, SCOC_E_RCOC_CREF_IND, SCOC_E_RCOC_OTHER_NPDU, SCOC_E_RCOC_RLSD_IND, SCOC_E_RCOC_ROUT_FAIL_IND, SCOC_E_SCU_N_DISC_REQ, SUA_CO_CORE, SUA_CO_RELCO, SUA_IEI_SRC_REF, osmo_scu_prim::u, and xua_msg_get_u32().

## ◆ scoc_fsm_disconn_pend()

static void scoc_fsm_disconn_pend | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | event,
|  | void * | data
| ) |  |
| static

References sccp_connection::fi, NULL, S_IDLE, sccp_conn_start_int_timer(), sccp_conn_start_rep_rel_timer(), sccp_conn_stop_release_timers(), sccp_conn_xua_gen_relre_and_send(), SCOC_E_RCOC_OTHER_NPDU, SCOC_E_RCOC_REL_COMPL_IND, SCOC_E_RCOC_RLSD_IND, SCOC_E_RCOC_ROUT_FAIL_IND, SCOC_E_T_INT_EXP, SCOC_E_T_REL_EXP, and SCOC_E_T_REP_REL_EXP.

## ◆ scoc_fsm_idle()

static void scoc_fsm_idle | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | event,
|  | void * | data
| ) |  |
| static

References osmo_scu_connect_param::called_addr, sccp_connection::called_addr, osmo_scu_connect_param::calling_addr, sccp_connection::calling_addr, osmo_scu_prim::connect, data, sccp_connection::fi, sccp_connection::importance, LOGPSCC, xua_msg::mtp, NULL, osmo_mtp_transfer_param::opc, OSMO_SCCP_ADDR_T_PC, OSMO_SCU_PRIM_N_CONNECT, osmo_sccp_addr::pc, osmo_sccp_addr::presence, sccp_connection::remote_pc, sccp_connection::remote_ref, S_CONN_PEND_IN, S_CONN_PEND_OUT, S_IDLE, osmo_scu_connect_param::sccp_class, sccp_connection::sccp_class, sccp_conn_scu_gen_encode_and_send(), sccp_conn_start_connect_timer(), sccp_conn_xua_gen_encode_and_send(), SCOC_E_RCOC_CONN_IND, SCOC_E_RCOC_OTHER_NPDU, SCOC_E_RCOC_REL_COMPL_IND, SCOC_E_RCOC_RLSD_IND, SCOC_E_SCU_N_CONN_REQ, sua_addr_parse(), SUA_CO_CORE, SUA_CO_COREF, SUA_CO_RELCO, SUA_IEI_DEST_ADDR, SUA_IEI_IMPORTANCE, SUA_IEI_PROTO_CLASS, SUA_IEI_SRC_ADDR, SUA_IEI_SRC_REF, osmo_scu_prim::u, xua_dialect_sua, xua_hdr_dump(), and xua_msg_get_u32().

## ◆ scoc_fsm_idle_onenter()

static void scoc_fsm_idle_onenter | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | old_state
| ) |  |
| static

References sccp_conn_free().

## ◆ scoc_fsm_wait_conn_conf()

static void scoc_fsm_wait_conn_conf | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | event,
|  | void * | data
| ) |  |
| static

References data, sccp_connection::fi, xua_msg::mtp, NULL, osmo_mtp_transfer_param::opc, sccp_connection::release_cause, sccp_connection::remote_pc, sccp_connection::remote_ref, S_DISCONN_PEND, S_IDLE, sccp_conn_start_rel_timer(), sccp_conn_stop_connect_timer(), sccp_conn_xua_gen_encode_and_send(), sccp_conn_xua_gen_relre_and_send(), SCOC_E_CONN_TMR_EXP, SCOC_E_RCOC_CC_IND, SCOC_E_RCOC_CREF_IND, SCOC_E_RCOC_OTHER_NPDU, SCOC_E_RCOC_RLSD_IND, SCOC_E_RCOC_ROUT_FAIL_IND, SUA_CO_RELCO, SUA_IEI_SRC_REF, and xua_msg_get_u32().

## Variable Documentation

## ◆ sccp_scoc_fsm

struct osmo_fsm sccp_scoc_fsm

Initial value:
= {
.name = "SCCP-SCOC",
.states = sccp_scoc_states,
.num_states = ARRAY_SIZE(sccp_scoc_states),
.event_names = scoc_event_names,
}
scoc_event_names
static const struct value_string scoc_event_names[]
Definition: sccp_scoc_fsm.c:61
sccp_scoc_states
static const struct osmo_fsm_state sccp_scoc_states[]
Definition: sccp_scoc_fsm.c:518

Referenced by osmo_ss7_init(), and sccp_conn_alloc().

## ◆ sccp_scoc_states

const struct osmo_fsm_state sccp_scoc_states[]
| static

## ◆ scoc_event_names

const struct value_string scoc_event_names[]
| static

Initial value:
= {
{ SCOC_E_SCU_N_CONN_REQ, "N-CONNECT.req" },
{ SCOC_E_SCU_N_CONN_RESP, "N-CONNECT.resp" },
{ SCOC_E_SCU_N_DISC_REQ, "N-DISCONNECT.req" },
{ SCOC_E_SCU_N_DATA_REQ, "N-DATA.req" },
{ SCOC_E_SCU_N_EXP_DATA_REQ, "N-EXPEDITED_DATA.req" },
{ SCOC_E_RCOC_CONN_IND, "RCOC-CONNECT.ind" },
{ SCOC_E_RCOC_ROUT_FAIL_IND, "RCOC-ROUT_FAIL.ind" },
{ SCOC_E_RCOC_RLSD_IND, "RCOC-RELEASED.ind" },
{ SCOC_E_RCOC_REL_COMPL_IND, "RCOC-RELEASE_COMPLETE.ind" },
{ SCOC_E_RCOC_CREF_IND, "RCOC-CONNECT_REFUSED.ind" },
{ SCOC_E_RCOC_CC_IND, "RCOC-CONNECT_CONFIRM.ind" },
{ SCOC_E_RCOC_DT1_IND, "RCOC-DT1.ind" },
{ SCOC_E_RCOC_DT2_IND, "RCOC-DT2.ind" },
{ SCOC_E_RCOC_IT_IND, "RCOC-IT.ind" },
{ SCOC_E_RCOC_OTHER_NPDU, "RCOC-OTHER_NPDU.ind" },
{ SCOC_E_RCOC_ERROR_IND, "RCOC-ERROR.ind" },
{ SCOC_E_T_IAR_EXP, "T(iar)_expired" },
{ SCOC_E_T_IAS_EXP, "T(ias)_expired" },
{ SCOC_E_CONN_TMR_EXP, "T(conn)_expired" },
{ SCOC_E_T_REL_EXP, "T(rel)_expired" },
{ SCOC_E_T_INT_EXP, "T(int)_expired" },
{ SCOC_E_T_REP_REL_EXP, "T(rep_rel)_expired" },
{ 0, NULL }
}
NULL
int and can be left NULL
Definition: osmo_ss7.h:364
SCOC_E_SCU_N_DISC_REQ
@ SCOC_E_SCU_N_DISC_REQ
Definition: sccp_scoc_fsm.h:22
SCOC_E_RCOC_RLSD_IND
@ SCOC_E_RCOC_RLSD_IND
Definition: sccp_scoc_fsm.h:29
SCOC_E_CONN_TMR_EXP
@ SCOC_E_CONN_TMR_EXP
Definition: sccp_scoc_fsm.h:43
SCOC_E_RCOC_CC_IND
@ SCOC_E_RCOC_CC_IND
Definition: sccp_scoc_fsm.h:32
SCOC_E_T_INT_EXP
@ SCOC_E_T_INT_EXP
Definition: sccp_scoc_fsm.h:46
SCOC_E_RCOC_REL_COMPL_IND
@ SCOC_E_RCOC_REL_COMPL_IND
Definition: sccp_scoc_fsm.h:30
SCOC_E_T_IAS_EXP
@ SCOC_E_T_IAS_EXP
Definition: sccp_scoc_fsm.h:41
SCOC_E_T_IAR_EXP
@ SCOC_E_T_IAR_EXP
Definition: sccp_scoc_fsm.h:40
SCOC_E_RCOC_IT_IND
@ SCOC_E_RCOC_IT_IND
Definition: sccp_scoc_fsm.h:35
SCOC_E_SCU_N_CONN_RESP
@ SCOC_E_SCU_N_CONN_RESP
Definition: sccp_scoc_fsm.h:21
SCOC_E_RCOC_DT1_IND
@ SCOC_E_RCOC_DT1_IND
Definition: sccp_scoc_fsm.h:33
SCOC_E_RCOC_DT2_IND
@ SCOC_E_RCOC_DT2_IND
Definition: sccp_scoc_fsm.h:34
SCOC_E_RCOC_OTHER_NPDU
@ SCOC_E_RCOC_OTHER_NPDU
Definition: sccp_scoc_fsm.h:36
SCOC_E_SCU_N_DATA_REQ
@ SCOC_E_SCU_N_DATA_REQ
Definition: sccp_scoc_fsm.h:23
SCOC_E_RCOC_CONN_IND
@ SCOC_E_RCOC_CONN_IND
Definition: sccp_scoc_fsm.h:27
SCOC_E_SCU_N_CONN_REQ
@ SCOC_E_SCU_N_CONN_REQ
Definition: sccp_scoc_fsm.h:20
SCOC_E_T_REL_EXP
@ SCOC_E_T_REL_EXP
Definition: sccp_scoc_fsm.h:45
SCOC_E_RCOC_ROUT_FAIL_IND
@ SCOC_E_RCOC_ROUT_FAIL_IND
Definition: sccp_scoc_fsm.h:28
SCOC_E_T_REP_REL_EXP
@ SCOC_E_T_REP_REL_EXP
Definition: sccp_scoc_fsm.h:47
SCOC_E_RCOC_CREF_IND
@ SCOC_E_RCOC_CREF_IND
Definition: sccp_scoc_fsm.h:31
SCOC_E_SCU_N_EXP_DATA_REQ
@ SCOC_E_SCU_N_EXP_DATA_REQ
Definition: sccp_scoc_fsm.h:24
SCOC_E_RCOC_ERROR_IND
@ SCOC_E_RCOC_ERROR_IND
Definition: sccp_scoc_fsm.h:37