libosmo-sigtran  1.9.0.4-dc82
Osmocom SIGTRAN library
sccp_scoc.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_internal.h"
#include <osmocom/vty/vty.h>

Data Structures

struct  sccp_connection
 

Macros

#define S(x)   (1 << (x))
 
#define SCU_MSGB_SIZE   1024
 
#define INIT_TIMER(x, fn, priv)   do { (x)->cb = fn; (x)->data = priv; } while (0)
 

Enumerations

enum  sccp_connection_state {
  S_IDLE, S_CONN_PEND_IN, S_CONN_PEND_OUT, S_ACTIVE,
  S_DISCONN_PEND, S_RESET_IN, S_RESET_OUT, S_BOTHWAY_RESET,
  S_WAIT_CONN_CONF
}
 
enum  sccp_scoc_event {
  SCOC_E_SCU_N_CONN_REQ, SCOC_E_SCU_N_CONN_RESP, SCOC_E_SCU_N_DISC_REQ, SCOC_E_SCU_N_DATA_REQ,
  SCOC_E_SCU_N_EXP_DATA_REQ, SCOC_E_RCOC_CONN_IND, SCOC_E_RCOC_ROUT_FAIL_IND, SCOC_E_RCOC_RLSD_IND,
  SCOC_E_RCOC_REL_COMPL_IND, SCOC_E_RCOC_CREF_IND, SCOC_E_RCOC_CC_IND, SCOC_E_RCOC_DT1_IND,
  SCOC_E_RCOC_DT2_IND, SCOC_E_RCOC_IT_IND, SCOC_E_RCOC_OTHER_NPDU, SCOC_E_RCOC_ERROR_IND,
  SCOC_E_T_IAR_EXP, SCOC_E_T_IAS_EXP, SCOC_E_CONN_TMR_EXP, SCOC_E_T_REL_EXP,
  SCOC_E_T_INT_EXP, SCOC_E_T_REP_REL_EXP
}
 

Functions

 osmo_static_assert (ARRAY_SIZE(osmo_sccp_timer_defaults)==(OSMO_SCCP_TIMERS_LEN) &&ARRAY_SIZE(osmo_sccp_timer_names)==(OSMO_SCCP_TIMERS_LEN), assert_osmo_sccp_timers_count)
 
static void sccp_timer_schedule (const struct sccp_connection *conn, struct osmo_timer_list *timer, enum osmo_sccp_timer timer_name)
 
static void tx_inact_tmr_cb (void *data)
 
static void rx_inact_tmr_cb (void *data)
 
static void rel_tmr_cb (void *data)
 
static void int_tmr_cb (void *data)
 
static void rep_rel_tmr_cb (void *data)
 
static void conn_tmr_cb (void *data)
 
static void conn_restart_tx_inact_timer (struct sccp_connection *conn)
 
static void conn_restart_rx_inact_timer (struct sccp_connection *conn)
 
static void conn_start_inact_timers (struct sccp_connection *conn)
 
static void conn_stop_inact_timers (struct sccp_connection *conn)
 
static void conn_start_rel_timer (struct sccp_connection *conn)
 
static void conn_start_rep_rel_timer (struct sccp_connection *conn)
 
static void conn_start_int_timer (struct sccp_connection *conn)
 
static void conn_stop_release_timers (struct sccp_connection *conn)
 
static void conn_start_connect_timer (struct sccp_connection *conn)
 
static void conn_stop_connect_timer (struct sccp_connection *conn)
 
static void conn_destroy (struct sccp_connection *conn)
 
static struct sccp_connectionconn_find_by_id (const struct osmo_sccp_instance *inst, uint32_t id)
 
static int conn_add_node (struct osmo_sccp_instance *inst, struct sccp_connection *conn)
 
bool osmo_sccp_conn_id_exists (const struct osmo_sccp_instance *inst, uint32_t id)
 
static struct sccp_connectionconn_create_id (struct osmo_sccp_user *user, uint32_t conn_id)
 
int osmo_sccp_instance_next_conn_id (struct osmo_sccp_instance *sccp)
 
static struct sccp_connectionconn_create (struct osmo_sccp_user *user)
 
static void conn_opt_data_clear_cache (struct sccp_connection *conn)
 
static struct msgb * scu_msgb_alloc (void)
 
static struct xua_msgxua_gen_relre (struct sccp_connection *conn, uint32_t cause, struct osmo_scu_prim *prim)
 
static int xua_gen_relre_and_send (struct sccp_connection *conn, uint32_t cause, struct osmo_scu_prim *prim)
 
static void xua_opt_data_send_cache (struct sccp_connection *conn, int exp_type, uint8_t msg_class)
 
static bool xua_drop_data_check_drop (const struct osmo_scu_prim *prim, unsigned lim, const char *message)
 
static bool xua_opt_data_cache_keep (struct sccp_connection *conn, const struct osmo_scu_prim *prim, int msg_type)
 
static bool xua_opt_data_length_lim (struct sccp_connection *conn, const struct osmo_scu_prim *prim, int msg_type)
 
static struct xua_msgxua_gen_msg_co (struct sccp_connection *conn, uint32_t event, const struct osmo_scu_prim *prim, int msg_type)
 
static int xua_gen_encode_and_send (struct sccp_connection *conn, uint32_t event, const struct osmo_scu_prim *prim, int msg_type)
 
static struct osmo_scu_primscu_prim_alloc (unsigned int primitive, enum osmo_prim_operation operation)
 
static void scu_gen_encode_and_send (struct sccp_connection *conn, uint32_t event, struct xua_msg *xua, unsigned int primitive, enum osmo_prim_operation operation)
 
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)
 
static uint8_t get_cref_cause_for_ret (uint8_t ret_cause)
 
static struct xua_msggen_coref_without_conn (struct osmo_sccp_instance *inst, struct xua_msg *xua_in, uint32_t ref_cause)
 
static struct osmo_sccp_usersccp_find_user (struct osmo_sccp_instance *inst, struct xua_msg *xua)
 
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. More...
 
static struct xua_msggen_coerr (uint32_t route_ctx, uint32_t dest_ref, uint32_t err_cause)
 
static void tx_coerr_from_xua (struct osmo_sccp_instance *inst, struct xua_msg *in, uint32_t err_cause)
 
static struct xua_msggen_relco (uint32_t route_ctx, uint32_t dest_ref, uint32_t src_ref)
 
static void tx_relco_from_xua (struct osmo_sccp_instance *inst, struct xua_msg *in)
 
static struct xua_msggen_rlsd (uint32_t route_ctx, uint32_t dest_ref, uint32_t src_ref)
 
static void tx_rlsd_from_xua_twoway (struct sccp_connection *conn, struct xua_msg *in)
 
static void sccp_scoc_rx_unass_local_ref (struct osmo_sccp_instance *inst, struct xua_msg *xua)
 
static void sccp_scoc_rx_inval_src_ref (struct sccp_connection *conn, struct xua_msg *xua, uint32_t inval_src_ref)
 
static void sccp_scoc_rx_inval_opc (struct sccp_connection *conn, 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...
 
static uint32_t scu_prim_conn_id (const struct osmo_scu_prim *prim)
 
int osmo_sccp_user_sap_down_nofree (struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph)
 Main entrance function for primitives from SCCP User. More...
 
int osmo_sccp_user_sap_down (struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph)
 Main entrance function for primitives from SCCP User. More...
 
void sccp_scoc_flush_connections (struct osmo_sccp_instance *inst)
 
static void vty_show_connection (struct vty *vty, struct sccp_connection *conn)
 
void sccp_scoc_show_connections (struct vty *vty, struct osmo_sccp_instance *inst)
 

Variables

static const struct value_string scoc_event_names []
 
static const struct xua_msg_event_map sua_scoc_event_map []
 
static const struct osmo_prim_event_map scu_scoc_event_map []
 
const struct osmo_tdef osmo_sccp_timer_defaults [OSMO_SCCP_TIMERS_LEN]
 
const struct value_string osmo_sccp_timer_names []
 
static const struct osmo_fsm_state sccp_scoc_states []
 
struct osmo_fsm sccp_scoc_fsm
 
static const uint8_t cause_map_cref []
 

Macro Definition Documentation

◆ INIT_TIMER

#define INIT_TIMER (   x,
  fn,
  priv 
)    do { (x)->cb = fn; (x)->data = priv; } while (0)

Referenced by conn_create_id().

◆ S

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

◆ SCU_MSGB_SIZE

#define SCU_MSGB_SIZE   1024

Referenced by scu_msgb_alloc().

Enumeration Type Documentation

◆ sccp_connection_state

Enumerator
S_IDLE 
S_CONN_PEND_IN 
S_CONN_PEND_OUT 
S_ACTIVE 
S_DISCONN_PEND 
S_RESET_IN 
S_RESET_OUT 
S_BOTHWAY_RESET 
S_WAIT_CONN_CONF 

◆ sccp_scoc_event

Enumerator
SCOC_E_SCU_N_CONN_REQ 
SCOC_E_SCU_N_CONN_RESP 
SCOC_E_SCU_N_DISC_REQ 
SCOC_E_SCU_N_DATA_REQ 
SCOC_E_SCU_N_EXP_DATA_REQ 
SCOC_E_RCOC_CONN_IND 
SCOC_E_RCOC_ROUT_FAIL_IND 
SCOC_E_RCOC_RLSD_IND 
SCOC_E_RCOC_REL_COMPL_IND 
SCOC_E_RCOC_CREF_IND 
SCOC_E_RCOC_CC_IND 
SCOC_E_RCOC_DT1_IND 
SCOC_E_RCOC_DT2_IND 
SCOC_E_RCOC_IT_IND 
SCOC_E_RCOC_OTHER_NPDU 
SCOC_E_RCOC_ERROR_IND 
SCOC_E_T_IAR_EXP 
SCOC_E_T_IAS_EXP 
SCOC_E_CONN_TMR_EXP 
SCOC_E_T_REL_EXP 
SCOC_E_T_INT_EXP 
SCOC_E_T_REP_REL_EXP 

Function Documentation

◆ conn_add_node()

static int conn_add_node ( struct osmo_sccp_instance inst,
struct sccp_connection conn 
)
static

◆ conn_create()

◆ conn_create_id()

◆ conn_destroy()

◆ conn_find_by_id()

◆ conn_opt_data_clear_cache()

static void conn_opt_data_clear_cache ( struct sccp_connection conn)
static

◆ conn_restart_rx_inact_timer()

static void conn_restart_rx_inact_timer ( struct sccp_connection conn)
static

◆ conn_restart_tx_inact_timer()

static void conn_restart_tx_inact_timer ( struct sccp_connection conn)
static

◆ conn_start_connect_timer()

static void conn_start_connect_timer ( struct sccp_connection conn)
static

◆ conn_start_inact_timers()

static void conn_start_inact_timers ( struct sccp_connection conn)
static

◆ conn_start_int_timer()

static void conn_start_int_timer ( struct sccp_connection conn)
static

◆ conn_start_rel_timer()

static void conn_start_rel_timer ( struct sccp_connection conn)
static

◆ conn_start_rep_rel_timer()

static void conn_start_rep_rel_timer ( struct sccp_connection conn)
static

◆ conn_stop_connect_timer()

static void conn_stop_connect_timer ( struct sccp_connection conn)
static

◆ conn_stop_inact_timers()

static void conn_stop_inact_timers ( struct sccp_connection conn)
static

◆ conn_stop_release_timers()

static void conn_stop_release_timers ( struct sccp_connection conn)
static

◆ conn_tmr_cb()

static void conn_tmr_cb ( void *  data)
static

◆ gen_coerr()

static struct xua_msg* gen_coerr ( uint32_t  route_ctx,
uint32_t  dest_ref,
uint32_t  err_cause 
)
static

◆ gen_coref_without_conn()

◆ gen_relco()

static struct xua_msg* gen_relco ( uint32_t  route_ctx,
uint32_t  dest_ref,
uint32_t  src_ref 
)
static

◆ gen_rlsd()

static struct xua_msg* gen_rlsd ( uint32_t  route_ctx,
uint32_t  dest_ref,
uint32_t  src_ref 
)
static

◆ get_cref_cause_for_ret()

static uint8_t get_cref_cause_for_ret ( uint8_t  ret_cause)
static

References cause_map_cref.

Referenced by sccp_scoc_rx_scrc_rout_fail().

◆ int_tmr_cb()

static void int_tmr_cb ( void *  data)
static

References data, sccp_connection::fi, and SCOC_E_T_INT_EXP.

Referenced by conn_create_id().

◆ osmo_sccp_conn_id_exists()

bool osmo_sccp_conn_id_exists ( const struct osmo_sccp_instance inst,
uint32_t  id 
)

◆ osmo_sccp_instance_next_conn_id()

int osmo_sccp_instance_next_conn_id ( struct osmo_sccp_instance sccp)

◆ osmo_sccp_user_sap_down()

int osmo_sccp_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 osmo_sccp_user_sap().

Parameters
[in]scuSCCP User sending us the primitive
[in]ophOsmocom primitive sent by the user
Returns
0 on success; negative on error

References osmo_scu_prim::oph, and osmo_sccp_user_sap_down_nofree().

Referenced by osmo_sccp_tx_conn_req(), osmo_sccp_tx_conn_resp_msg(), osmo_sccp_tx_data(), osmo_sccp_tx_disconn_data(), osmo_sccp_tx_unitdata(), osmo_scu_prim_type_name(), and sccp_scmg_tx().

◆ osmo_sccp_user_sap_down_nofree()

int osmo_sccp_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 osmo_sccp_user_sap_down().

Parameters
[in]scuSCCP User sending us the primitive
[in]ophOsmocom primitive sent by the user
Returns
0 on success; negative on error

References conn_create_id(), conn_find_by_id(), osmo_scu_connect_param::conn_id, osmo_scu_prim::connect, sccp_connection::fi, osmo_sccp_user::inst, sccp_connection::inst, osmo_scu_prim::oph, OSMO_SCU_PRIM_N_CONNECT, OSMO_SCU_PRIM_N_DATA, OSMO_SCU_PRIM_N_DISCONNECT, OSMO_SCU_PRIM_N_RESET, OSMO_SCU_PRIM_N_UNITDATA, osmo_scu_prim_name(), sccp_sclc_user_sap_down_nofree(), scu_prim_conn_id(), scu_scoc_event_map, and osmo_scu_prim::u.

Referenced by osmo_sccp_user_sap_down(), and osmo_scu_prim_type_name().

◆ osmo_static_assert()

osmo_static_assert ( ARRAY_SIZE(osmo_sccp_timer_defaults = =(OSMO_SCCP_TIMERS_LEN) &&ARRAY_SIZE(osmo_sccp_timer_names)==(OSMO_SCCP_TIMERS_LEN),
assert_osmo_sccp_timers_count   
)

◆ rel_tmr_cb()

static void rel_tmr_cb ( void *  data)
static

References data, sccp_connection::fi, and SCOC_E_T_REL_EXP.

Referenced by conn_create_id().

◆ rep_rel_tmr_cb()

static void rep_rel_tmr_cb ( void *  data)
static

◆ rx_inact_tmr_cb()

static void rx_inact_tmr_cb ( void *  data)
static

References data, sccp_connection::fi, and SCOC_E_T_IAR_EXP.

Referenced by conn_create_id().

◆ sccp_find_user()

◆ sccp_scoc_flush_connections()

void sccp_scoc_flush_connections ( struct osmo_sccp_instance inst)

◆ sccp_scoc_rx_from_scrc()

◆ sccp_scoc_rx_inval_opc()

◆ sccp_scoc_rx_inval_src_ref()

◆ 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_dialect_sua, xua_hdr_dump(), xua_msg_free(), and xua_msg_get_u32().

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

◆ sccp_scoc_rx_unass_local_ref()

◆ sccp_scoc_show_connections()

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

◆ sccp_timer_schedule()

static void sccp_timer_schedule ( const struct sccp_connection conn,
struct osmo_timer_list *  timer,
enum osmo_sccp_timer  timer_name 
)
static

◆ scoc_fsm_active()

◆ scoc_fsm_conn_pend_in()

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

◆ scoc_fsm_conn_pend_out()

◆ scoc_fsm_disconn_pend()

◆ scoc_fsm_idle()

◆ scoc_fsm_idle_onenter()

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

References conn_destroy().

◆ scoc_fsm_wait_conn_conf()

◆ scu_gen_encode_and_send()

◆ scu_msgb_alloc()

static struct msgb* scu_msgb_alloc ( void  )
static

References SCU_MSGB_SIZE.

Referenced by scu_prim_alloc().

◆ scu_prim_alloc()

static struct osmo_scu_prim* scu_prim_alloc ( unsigned int  primitive,
enum osmo_prim_operation  operation 
)
static

◆ scu_prim_conn_id()

◆ tx_coerr_from_xua()

◆ tx_inact_tmr_cb()

static void tx_inact_tmr_cb ( void *  data)
static

References data, sccp_connection::fi, and SCOC_E_T_IAS_EXP.

Referenced by conn_create_id().

◆ tx_relco_from_xua()

◆ tx_rlsd_from_xua_twoway()

◆ vty_show_connection()

◆ xua_drop_data_check_drop()

static bool xua_drop_data_check_drop ( const struct osmo_scu_prim prim,
unsigned  lim,
const char *  message 
)
static

◆ xua_gen_encode_and_send()

◆ xua_gen_msg_co()

◆ xua_gen_relre()

◆ xua_gen_relre_and_send()

◆ xua_opt_data_cache_keep()

static bool xua_opt_data_cache_keep ( struct sccp_connection conn,
const struct osmo_scu_prim prim,
int  msg_type 
)
static

◆ xua_opt_data_length_lim()

◆ xua_opt_data_send_cache()

Variable Documentation

◆ cause_map_cref

const uint8_t cause_map_cref[]
static
Initial value:
= {
[SCCP_RETURN_CAUSE_SUBSYSTEM_CONGESTION] =
SCCP_REFUSAL_SUBSYTEM_CONGESTION,
[SCCP_RETURN_CAUSE_SUBSYSTEM_FAILURE] =
SCCP_REFUSAL_SUBSYSTEM_FAILURE,
[SCCP_RETURN_CAUSE_UNEQUIPPED_USER] =
SCCP_REFUSAL_UNEQUIPPED_USER,
[SCCP_RETURN_CAUSE_UNQUALIFIED] =
SCCP_REFUSAL_UNQUALIFIED,
[SCCP_RETURN_CAUSE_SCCP_FAILURE] =
SCCP_REFUSAL_SCCP_FAILURE,
[SCCP_RETURN_CAUSE_HOP_COUNTER_VIOLATION] =
SCCP_REFUSAL_HOP_COUNTER_VIOLATION,
}

Referenced by get_cref_cause_for_ret().

◆ osmo_sccp_timer_defaults

const struct osmo_tdef osmo_sccp_timer_defaults[OSMO_SCCP_TIMERS_LEN]
Initial value:
= {
{ .T = OSMO_SCCP_TIMER_CONN_EST, .default_val = 1*60, .unit = OSMO_TDEF_S,
.desc = "Waiting for connection confirm message, 1 to 2 minutes" },
{ .T = OSMO_SCCP_TIMER_IAS, .default_val = 7*60, .unit = OSMO_TDEF_S,
.desc = "Send keep-alive: on an idle connection, delay before sending an Idle Timer message, 5 to 10 minutes" },
{ .T = OSMO_SCCP_TIMER_IAR, .default_val = 15*60, .unit = OSMO_TDEF_S,
.desc = "Receive keep-alive: on an idle connection, delay until considering a connection as stale, 11 to 21 minutes" },
{ .T = OSMO_SCCP_TIMER_REL, .default_val = 10, .unit = OSMO_TDEF_S,
.desc = "Waiting for release complete message, 10 to 20 seconds" },
{ .T = OSMO_SCCP_TIMER_REPEAT_REL, .default_val = 10, .unit = OSMO_TDEF_S,
.desc = "Waiting for release complete message; or to repeat sending released message after the initial expiry, 10 to 20 seconds" },
{ .T = OSMO_SCCP_TIMER_INT, .default_val = 1*60, .unit = OSMO_TDEF_S,
.desc = "Waiting for release complete message; or to release connection resources, freeze the LRN and "
"alert a maintenance function after the initial expiry, extending to 1 minute" },
{ .T = OSMO_SCCP_TIMER_GUARD, .default_val = 23*60, .unit = OSMO_TDEF_S,
.desc = "Waiting to resume normal procedure for temporary connection sections during the restart procedure, 23 to 25 minutes" },
{ .T = OSMO_SCCP_TIMER_RESET, .default_val = 10, .unit = OSMO_TDEF_S,
.desc = "Waiting to release temporary connection section or alert maintenance function after reset request message is sent, 10 to 20 seconds" },
{ .T = OSMO_SCCP_TIMER_REASSEMBLY, .default_val = 10, .unit = OSMO_TDEF_S,
.desc = "Waiting to receive all the segments of the remaining segments, single segmented message after receiving the first segment, 10 to 20 seconds" },
{}
}
Definition: sccp_internal.h:24
Definition: sccp_internal.h:18
Definition: sccp_internal.h:17
Definition: sccp_internal.h:21
Definition: sccp_internal.h:19
Definition: sccp_internal.h:23
Definition: sccp_internal.h:22
Definition: sccp_internal.h:20
Definition: sccp_internal.h:25

Referenced by gen_sccp_timer_cmd_strs(), and osmo_sccp_instance_create().

◆ osmo_sccp_timer_names

const struct value_string osmo_sccp_timer_names[]
Initial value:
= {
{ OSMO_SCCP_TIMER_CONN_EST, "conn_est" },
{ OSMO_SCCP_TIMER_IAS, "ias" },
{ OSMO_SCCP_TIMER_IAR, "iar" },
{ OSMO_SCCP_TIMER_REL, "rel" },
{ OSMO_SCCP_TIMER_REPEAT_REL, "repeat_rel" },
{ OSMO_SCCP_TIMER_INT, "int" },
{ OSMO_SCCP_TIMER_GUARD, "guard" },
{ OSMO_SCCP_TIMER_RESET, "reset" },
{ OSMO_SCCP_TIMER_REASSEMBLY, "reassembly" },
{}
}
Definition: sccp_internal.h:24
Definition: sccp_internal.h:18
Definition: sccp_internal.h:17
Definition: sccp_internal.h:21
Definition: sccp_internal.h:19
Definition: sccp_internal.h:23
Definition: sccp_internal.h:22
Definition: sccp_internal.h:20
Definition: sccp_internal.h:25

Referenced by DEFUN_ATTR(), gen_sccp_timer_cmd_strs(), osmo_sccp_timer_name(), and write_sccp_timers().

◆ 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,
}
static const struct value_string scoc_event_names[]
Definition: sccp_scoc.c:174
static const struct osmo_fsm_state sccp_scoc_states[]
Definition: sccp_scoc.c:1360

Referenced by conn_create_id(), and osmo_ss7_init().

◆ 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 }
}
Definition: sccp_scoc.c:156
Definition: sccp_scoc.c:146
Definition: sccp_scoc.c:161
Definition: sccp_scoc.c:165
Definition: sccp_scoc.c:154
Definition: sccp_scoc.c:157
Definition: sccp_scoc.c:152
Definition: sccp_scoc.c:147
Definition: sccp_scoc.c:170
Definition: sccp_scoc.c:159
Definition: sccp_scoc.c:153
Definition: sccp_scoc.c:164
Definition: sccp_scoc.c:169
Definition: sccp_scoc.c:167
Definition: sccp_scoc.c:145
Definition: sccp_scoc.c:160
Definition: sccp_scoc.c:151
Definition: sccp_scoc.c:158
Definition: sccp_scoc.c:144
Definition: sccp_scoc.c:171
Definition: sccp_scoc.c:155
Definition: sccp_scoc.c:148

◆ scu_scoc_event_map

const struct osmo_prim_event_map scu_scoc_event_map[]
static
Initial value:
= {
{ SCCP_SAP_USER, OSMO_SCU_PRIM_N_CONNECT, PRIM_OP_RESPONSE,
{ SCCP_SAP_USER, OSMO_SCU_PRIM_N_DATA, PRIM_OP_REQUEST,
{ 0, 0, 0, OSMO_NO_EVENT }
}
Definition: sccp_scoc.c:146
Definition: sigtran_sap.h:7
Definition: sccp_sap.h:36
Definition: sccp_scoc.c:147
Definition: sccp_sap.h:34
Definition: sccp_scoc.c:145
Definition: sccp_scoc.c:144
Definition: sccp_sap.h:35
Definition: sccp_sap.h:37
Definition: sccp_scoc.c:148

Referenced by osmo_sccp_user_sap_down_nofree().

◆ sua_scoc_event_map

const struct xua_msg_event_map sua_scoc_event_map[]
static
Initial value:
= {
}
Definition: sccp_scoc.c:156
#define SUA_CO_RELCO
Definition: sua.h:74
#define SUA_CO_CODT
Definition: sua.h:77
Definition: sccp_scoc.c:161
Definition: sccp_scoc.c:154
Definition: sccp_scoc.c:157
#define SUA_MSGC_CO
Definition: sua.h:36
#define SUA_CO_COREF
Definition: sua.h:72
#define SUA_CO_RELRE
Definition: sua.h:73
Definition: sccp_scoc.c:159
Definition: sccp_scoc.c:153
#define SUA_CO_COAK
Definition: sua.h:71
#define SUA_CO_COIT
Definition: sua.h:80
#define SUA_CO_CORE
Definition: sua.h:70
Definition: sccp_scoc.c:151
#define SUA_CO_COERR
Definition: sua.h:79
Definition: sccp_scoc.c:155