sccp_scoc.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"`
`#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_COUNT, assert_osmo_sccp_timers_count)
const struct osmo_sccp_timer_val * | osmo_sccp_timer_get (const struct osmo_sccp_instance *inst, enum osmo_sccp_timer timer, bool default_if_unset)
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_connection * | conn_find_by_id (struct osmo_sccp_instance *inst, uint32_t id)
static struct sccp_connection * | conn_create_id (struct osmo_sccp_user *user, uint32_t conn_id)
static struct sccp_connection * | conn_create (struct osmo_sccp_user *user)
static struct msgb * | scu_msgb_alloc (void)
static struct xua_msg * | xua_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 struct xua_msg * | xua_gen_msg_co (struct sccp_connection *conn, uint32_t event, struct osmo_scu_prim *prim, int msg_type)
static int | xua_gen_encode_and_send (struct sccp_connection *conn, uint32_t event, struct osmo_scu_prim *prim, int msg_type)
static struct osmo_scu_prim * | scu_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_msg * | gen_coref_without_conn (struct osmo_sccp_instance *inst, struct xua_msg *xua_in, uint32_t ref_cause)
static struct osmo_sccp_user * | sccp_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_msg * | gen_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_msg * | gen_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_msg * | gen_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 value_string | osmo_sccp_timer_names []
const struct value_string | osmo_sccp_timer_descriptions []
const struct osmo_sccp_timer_val | osmo_sccp_timer_defaults []
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)

## S

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

## SCU_MSGB_SIZE

#define SCU_MSGB_SIZE 1024

## Enumeration Type Documentation

## sccp_connection_state

enum 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

enum 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_create()

static struct sccp_connection* conn_create | ( | struct osmo_sccp_user * | user | ) |

static

References conn_create_id(), conn_find_by_id(), sccp_connection::conn_id, osmo_sccp_user::inst, osmo_sccp_instance::next_id, and sccp_connection::user.

Referenced by sccp_scoc_rx_from_scrc().

## conn_create_id()

static struct sccp_connection* conn_create_id | ( | struct osmo_sccp_user * | user,
|  | uint32_t | conn_id
| ) |  |

static

References sccp_connection::conn_id, conn_tmr_cb(), osmo_sccp_instance::connections, sccp_connection::fi, INIT_TIMER, osmo_sccp_user::inst, sccp_connection::inst, int_tmr_cb(), sccp_connection::list, rel_tmr_cb(), rep_rel_tmr_cb(), rx_inact_tmr_cb(), sccp_scoc_fsm, sccp_connection::t_conn, sccp_connection::t_iar, sccp_connection::t_ias, sccp_connection::t_int, sccp_connection::t_rel, sccp_connection::t_rep_rel, tx_inact_tmr_cb(), and sccp_connection::user.

Referenced by conn_create(), and osmo_sccp_user_sap_down_nofree().

## conn_destroy()

static void conn_destroy | ( | struct sccp_connection * | conn | ) |

static

References conn_stop_connect_timer(), conn_stop_inact_timers(), conn_stop_release_timers(), sccp_connection::fi, and sccp_connection::list.

Referenced by sccp_scoc_flush_connections(), and scoc_fsm_idle_onenter().

## conn_find_by_id()

static struct sccp_connection* conn_find_by_id | ( | struct osmo_sccp_instance * | inst,
|  | uint32_t | id
| ) |  |

static

References sccp_connection::conn_id, osmo_sccp_instance::connections, sccp_connection::inst, and sccp_connection::list.

Referenced by conn_create(), osmo_sccp_user_sap_down_nofree(), sccp_scoc_rx_from_scrc(), and sccp_scoc_rx_scrc_rout_fail().

## conn_restart_rx_inact_timer()

static void conn_restart_rx_inact_timer | ( | struct sccp_connection * | conn | ) |

static

References OSMO_SCCP_TIMER_IAR, sccp_timer_schedule(), and sccp_connection::t_iar.

Referenced by conn_start_inact_timers(), and scoc_fsm_active().

## conn_restart_tx_inact_timer()

static void conn_restart_tx_inact_timer | ( | struct sccp_connection * | conn | ) |

static

References OSMO_SCCP_TIMER_IAS, sccp_timer_schedule(), and sccp_connection::t_ias.

Referenced by conn_start_inact_timers(), and scoc_fsm_active().

## conn_start_connect_timer()

static void conn_start_connect_timer | ( | struct sccp_connection * | conn | ) |

static

References OSMO_SCCP_TIMER_CONN_EST, sccp_timer_schedule(), and sccp_connection::t_conn.

Referenced by scoc_fsm_conn_pend_out(), and scoc_fsm_idle().

## conn_start_inact_timers()

static void conn_start_inact_timers | ( | struct sccp_connection * | conn | ) |

static

References conn_restart_rx_inact_timer(), and conn_restart_tx_inact_timer().

Referenced by scoc_fsm_conn_pend_in(), and scoc_fsm_conn_pend_out().

## conn_start_int_timer()

static void conn_start_int_timer | ( | struct sccp_connection * | conn | ) |

static

References OSMO_SCCP_TIMER_INT, sccp_timer_schedule(), and sccp_connection::t_int.

## conn_start_rel_timer()

static void conn_start_rel_timer | ( | struct sccp_connection * | conn | ) |

static

References OSMO_SCCP_TIMER_REL, sccp_timer_schedule(), and sccp_connection::t_rel.

Referenced by scoc_fsm_active(), and scoc_fsm_wait_conn_conf().

## conn_start_rep_rel_timer()

static void conn_start_rep_rel_timer | ( | struct sccp_connection * | conn | ) |

static

References OSMO_SCCP_TIMER_REPEAT_REL, sccp_timer_schedule(), and sccp_connection::t_rep_rel.

## conn_stop_connect_timer()

static void conn_stop_connect_timer | ( | struct sccp_connection * | conn | ) |

static

References sccp_connection::t_conn.

Referenced by conn_destroy(), scoc_fsm_conn_pend_out(), and scoc_fsm_wait_conn_conf().

## conn_stop_inact_timers()

static void conn_stop_inact_timers | ( | struct sccp_connection * | conn | ) |

static

References sccp_connection::t_iar, and sccp_connection::t_ias.

Referenced by conn_destroy(), and scoc_fsm_active().

## conn_stop_release_timers()

static void conn_stop_release_timers | ( | struct sccp_connection * | conn | ) |

static

References sccp_connection::t_int, sccp_connection::t_rel, and sccp_connection::t_rep_rel.

Referenced by conn_destroy().

## conn_tmr_cb()

static void conn_tmr_cb | ( | void * | data | ) |

static

References data, sccp_connection::fi, and SCOC_E_CONN_TMR_EXP.

Referenced by conn_create_id().

## gen_coerr()

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

static

References xua_msg::hdr, SUA_CAUSE_T_ERROR, SUA_CO_COERR, SUA_IEI_CAUSE, SUA_IEI_DEST_REF, SUA_IEI_ROUTE_CTX, SUA_MSGC_CO, XUA_HDR, xua_msg_add_u32(), and xua_msg_alloc().

Referenced by tx_coerr_from_xua().

## gen_coref_without_conn()

static struct xua_msg* gen_coref_without_conn | ( | struct osmo_sccp_instance * | inst,
|  | struct xua_msg * | xua_in,
|  | uint32_t | ref_cause
| ) |  |

static

References xua_msg::hdr, osmo_sccp_instance::route_ctx, SUA_CAUSE_T_REFUSAL, SUA_CO_COREF, SUA_IEI_CAUSE, SUA_IEI_DATA, SUA_IEI_DEST_ADDR, SUA_IEI_DEST_REF, SUA_IEI_IMPORTANCE, SUA_IEI_ROUTE_CTX, SUA_IEI_SRC_ADDR, SUA_IEI_SRC_REF, SUA_MSGC_CO, XUA_HDR, xua_msg_add_u32(), xua_msg_alloc(), and xua_msg_copy_part().

Referenced by sccp_scoc_rx_scrc_rout_fail().

## gen_relco()

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

static

References xua_msg::hdr, SUA_CO_RELCO, SUA_IEI_DEST_REF, SUA_IEI_ROUTE_CTX, SUA_IEI_SRC_REF, SUA_MSGC_CO, XUA_HDR, xua_msg_add_u32(), and xua_msg_alloc().

Referenced by tx_relco_from_xua().

## gen_rlsd()

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

static

References xua_msg::hdr, SUA_CO_RELRE, SUA_IEI_DEST_REF, SUA_IEI_ROUTE_CTX, SUA_IEI_SRC_REF, SUA_MSGC_CO, XUA_HDR, xua_msg_add_u32(), and xua_msg_alloc().

Referenced by tx_rlsd_from_xua_twoway().

## 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_timer_get()

const struct osmo_sccp_timer_val* osmo_sccp_timer_get | ( | const struct osmo_sccp_instance * | inst,
|  | enum osmo_sccp_timer | timer,
|  | bool | default_if_unset
| ) |  |

References osmo_sccp_timer_defaults, osmo_sccp_timer_val::s, osmo_sccp_instance::timers, and osmo_sccp_timer_val::us.

Referenced by sccp_timer_schedule(), and write_sccp_timers().

## 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] | scu | SCCP User sending us the primitive
  [in] | oph | Osmocom 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(), and osmo_sccp_tx_unitdata().

## 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] | scu | SCCP User sending us the primitive
  [in] | oph | Osmocom 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().

## osmo_static_assert()

osmo_static_assert | ( | ARRAY_SIZE(osmo_sccp_timer_defaults) | = `=OSMO_SCCP_TIMERS_COUNT`,
|  | 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

References data, sccp_connection::fi, and SCOC_E_T_REP_REL_EXP.

Referenced by conn_create_id().

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

static struct osmo_sccp_user* sccp_find_user | ( | struct osmo_sccp_instance * | inst,
|  | struct xua_msg * | xua
| ) |  |

static

References OSMO_SCCP_ADDR_T_SSN, osmo_sccp_addr::pc, osmo_sccp_addr::presence, sccp_user_find(), osmo_sccp_addr::ssn, sua_addr_parse(), SUA_IEI_DEST_ADDR, xua_dialect_sua, and xua_hdr_dump().

Referenced by sccp_scoc_rx_from_scrc().

## sccp_scoc_flush_connections()

void sccp_scoc_flush_connections | ( | struct osmo_sccp_instance * | inst | ) |

References conn_destroy(), osmo_sccp_instance::connections, sccp_connection::inst, and sccp_connection::list.

Referenced by osmo_sccp_instance_destroy().

## sccp_scoc_rx_from_scrc()

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)

Parameters

  [in] | inst | SCCP Instance in which we operate
  [in] | xua | SUA message in xua_msg format

References conn_create(), conn_find_by_id(), sccp_connection::conn_id, sccp_connection::fi, xua_msg::hdr, sccp_connection::incoming, osmo_sccp_user::inst, xua_common_hdr::msg_type, xua_msg::mtp, osmo_mtp_transfer_param::opc, sccp_connection::remote_pc, sccp_connection::remote_ref, sccp_find_user(), sccp_scoc_rx_inval_opc(), sccp_scoc_rx_inval_src_ref(), sccp_scoc_rx_unass_local_ref(), SUA_CO_COAK, SUA_CO_CORE, SUA_CO_COREF, SUA_IEI_DEST_REF, SUA_IEI_SRC_REF, sua_scoc_event_map, xua_dialect_sua, xua_hdr_dump(), xua_msg_event_map(), xua_msg_find_tag(), and xua_msg_get_u32().

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

## sccp_scoc_rx_inval_opc()

static void sccp_scoc_rx_inval_opc | ( | struct sccp_connection * | conn,
|  | struct xua_msg * | xua
| ) |  |

static

References xua_msg::hdr, sccp_connection::inst, xua_common_hdr::msg_type, xua_msg::mtp, osmo_mtp_transfer_param::opc, osmo_ss7_pointcode_print(), osmo_ss7_pointcode_print2(), sccp_connection::remote_pc, osmo_sccp_instance::ss7, SUA_CO_CODA, SUA_CO_CODT, SUA_CO_COERR, SUA_CO_RELCO, SUA_CO_RELRE, SUA_CO_RESCO, SUA_CO_RESRE, tx_coerr_from_xua(), xua_dialect_sua, and xua_hdr_dump().

Referenced by sccp_scoc_rx_from_scrc().

## sccp_scoc_rx_inval_src_ref()

static void sccp_scoc_rx_inval_src_ref | ( | struct sccp_connection * | conn,
|  | struct xua_msg * | xua,
|  | uint32_t | inval_src_ref
| ) |  |

static

References xua_msg::hdr, sccp_connection::inst, xua_common_hdr::msg_type, sccp_connection::remote_ref, SUA_CO_COIT, SUA_CO_RELCO, SUA_CO_RELRE, SUA_CO_RESCO, SUA_CO_RESRE, tx_coerr_from_xua(), tx_rlsd_from_xua_twoway(), xua_dialect_sua, and xua_hdr_dump().

Referenced by 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] | inst | SCCP Instance on which we operate
  [in] | xua | SUA message that was failed to route
  [in] | return_cause | Reason (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_connection::inst, 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()

static void sccp_scoc_rx_unass_local_ref | ( | struct osmo_sccp_instance * | inst,
|  | struct xua_msg * | xua
| ) |  |

static

References xua_msg::hdr, xua_common_hdr::msg_type, SUA_CO_COAK, SUA_CO_CODA, SUA_CO_CODT, SUA_CO_COERR, SUA_CO_COIT, SUA_CO_COREF, SUA_CO_RELCO, SUA_CO_RELRE, SUA_CO_RESCO, SUA_CO_RESRE, tx_coerr_from_xua(), tx_relco_from_xua(), xua_dialect_sua, and xua_hdr_dump().

Referenced by sccp_scoc_rx_from_scrc().

## sccp_scoc_show_connections()

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

Referenced by DEFUN().

## 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

References sccp_connection::inst, osmo_sccp_timer_get(), osmo_sccp_timer_val::s, and osmo_sccp_timer_val::us.

Referenced by conn_restart_rx_inact_timer(), conn_restart_tx_inact_timer(), conn_start_connect_timer(), conn_start_int_timer(), conn_start_rel_timer(), and conn_start_rep_rel_timer().

## scoc_fsm_active()

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

static

References conn_restart_rx_inact_timer(), conn_restart_tx_inact_timer(), conn_start_rel_timer(), conn_stop_inact_timers(), data, sccp_connection::fi, sccp_connection::importance, OSMO_SCU_PRIM_N_DATA, OSMO_SCU_PRIM_N_DISCONNECT, sccp_connection::remote_ref, S_DISCONN_PEND, S_IDLE, sccp_connection::sccp_class, 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, scu_gen_encode_and_send(), 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_gen_encode_and_send(), xua_gen_relre_and_send(), xua_msg_add_u32(), xua_msg_alloc(), 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 conn_start_inact_timers(), data, sccp_connection::fi, S_ACTIVE, S_IDLE, SCOC_E_SCU_N_CONN_RESP, SCOC_E_SCU_N_DISC_REQ, SUA_CO_COAK, SUA_CO_COREF, and xua_gen_encode_and_send().

## 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, conn_start_connect_timer(), conn_start_inact_timers(), conn_stop_connect_timer(), data, osmo_scu_prim::disconnect, sccp_connection::fi, xua_msg::mtp, 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, 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, scu_gen_encode_and_send(), SUA_CO_RELCO, SUA_IEI_SRC_REF, osmo_scu_prim::u, xua_gen_encode_and_send(), 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

## 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, conn_start_connect_timer(), osmo_scu_prim::connect, data, sccp_connection::fi, sccp_connection::importance, xua_msg::mtp, 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, osmo_scu_connect_param::sccp_class, sccp_connection::sccp_class, 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, scu_gen_encode_and_send(), sua_addr_parse(), SUA_CO_CORE, 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_gen_encode_and_send(), 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 conn_destroy().

## scoc_fsm_wait_conn_conf()

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

static

References conn_start_rel_timer(), conn_stop_connect_timer(), data, sccp_connection::fi, sccp_connection::release_cause, sccp_connection::remote_ref, S_DISCONN_PEND, S_IDLE, 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, xua_gen_encode_and_send(), xua_gen_relre_and_send(), and xua_msg_get_u32().

## scu_gen_encode_and_send()

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

References osmo_scu_connect_param::called_addr, sccp_connection::called_addr, osmo_scu_connect_param::calling_addr, sccp_connection::calling_addr, osmo_scu_disconn_param::cause, osmo_scu_connect_param::conn_id, osmo_scu_data_param::conn_id, osmo_scu_disconn_param::conn_id, sccp_connection::conn_id, osmo_scu_prim::connect, xua_msg_part::dat, osmo_scu_prim::data, osmo_scu_prim::disconnect, sccp_connection::fi, osmo_scu_connect_param::importance, osmo_scu_data_param::importance, osmo_scu_disconn_param::importance, sccp_connection::importance, xua_msg_part::len, osmo_scu_prim::oph, osmo_scu_disconn_param::originator, OSMO_SCCP_ORIG_UNDEFINED, OSMO_SCU_PRIM_N_CONNECT, OSMO_SCU_PRIM_N_DATA, OSMO_SCU_PRIM_N_DISCONNECT, osmo_scu_disconn_param::responding_addr, osmo_scu_connect_param::sccp_class, sccp_connection::sccp_class, sccp_user_prim_up(), scu_prim_alloc(), sua_addr_parse(), SUA_IEI_CAUSE, SUA_IEI_DATA, SUA_IEI_IMPORTANCE, SUA_IEI_PROTO_CLASS, SUA_IEI_SRC_ADDR, osmo_scu_prim::u, sccp_connection::user, xua_msg_find_tag(), and xua_msg_get_u32().

Referenced by scoc_fsm_active(), scoc_fsm_conn_pend_out(), and scoc_fsm_idle().

## 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

References osmo_scu_prim::oph, SCCP_SAP_USER, and scu_msgb_alloc().

Referenced by scu_gen_encode_and_send().

## scu_prim_conn_id()

static uint32_t scu_prim_conn_id | ( | const struct osmo_scu_prim * | prim | ) |

static

References osmo_scu_connect_param::conn_id, osmo_scu_data_param::conn_id, osmo_scu_disconn_param::conn_id, osmo_scu_reset_param::conn_id, osmo_scu_prim::connect, osmo_scu_prim::data, osmo_scu_prim::disconnect, 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::reset, and osmo_scu_prim::u.

Referenced by osmo_sccp_user_sap_down_nofree().

## tx_coerr_from_xua()

static void tx_coerr_from_xua | ( | struct osmo_sccp_instance * | inst,
|  | struct xua_msg * | in,
|  | uint32_t | err_cause
| ) |  |

static

References osmo_mtp_transfer_param::dpc, gen_coerr(), xua_msg::mtp, osmo_mtp_transfer_param::opc, sccp_scrc_rx_scoc_conn_msg(), osmo_mtp_transfer_param::sio, SUA_IEI_ROUTE_CTX, SUA_IEI_SRC_REF, xua_msg_free(), and xua_msg_get_u32().

Referenced by sccp_scoc_rx_inval_opc(), sccp_scoc_rx_inval_src_ref(), and sccp_scoc_rx_unass_local_ref().

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

static void tx_relco_from_xua | ( | struct osmo_sccp_instance * | inst,
|  | struct xua_msg * | in
| ) |  |

static

References osmo_mtp_transfer_param::dpc, gen_relco(), xua_msg::mtp, osmo_mtp_transfer_param::opc, sccp_scrc_rx_scoc_conn_msg(), osmo_mtp_transfer_param::sio, SUA_IEI_DEST_REF, SUA_IEI_ROUTE_CTX, SUA_IEI_SRC_REF, xua_msg_free(), and xua_msg_get_u32().

Referenced by sccp_scoc_rx_unass_local_ref().

## tx_rlsd_from_xua_twoway()

static void tx_rlsd_from_xua_twoway | ( | struct sccp_connection * | conn,
|  | struct xua_msg * | in
| ) |  |

static

References sccp_connection::conn_id, osmo_mtp_transfer_param::dpc, sccp_connection::fi, gen_rlsd(), sccp_connection::inst, xua_msg::mtp, osmo_mtp_transfer_param::opc, sccp_connection::remote_pc, sccp_connection::remote_ref, osmo_sccp_instance::route_ctx, sccp_scrc_rx_scoc_conn_msg(), SCOC_E_RCOC_RLSD_IND, osmo_mtp_transfer_param::sio, SUA_IEI_DEST_REF, SUA_IEI_ROUTE_CTX, SUA_IEI_SRC_REF, xua_msg_free(), and xua_msg_get_u32().

Referenced by sccp_scoc_rx_inval_src_ref().

## vty_show_connection()

static void vty_show_connection | ( | struct vty * | vty,
|  | struct sccp_connection * | conn
| ) |  |

static

References sccp_connection::called_addr, sccp_connection::calling_addr, osmo_ss7_instance::cfg, sccp_connection::conn_id, sccp_connection::fi, sccp_connection::incoming, sccp_connection::inst, OSMO_SS7_PC_INVALID, osmo_ss7_pc_is_valid(), osmo_ss7_pointcode_print(), osmo_sccp_user::pc, osmo_ss7_instance::primary_pc, sccp_connection::remote_pc, sccp_connection::remote_ref, osmo_sccp_instance::ss7, osmo_sccp_addr::ssn, osmo_sccp_user::ssn, and sccp_connection::user.

## xua_gen_encode_and_send()

static int xua_gen_encode_and_send | ( | struct sccp_connection * | conn,
|  | uint32_t | event,
|  | struct osmo_scu_prim * | prim,
|  | int | msg_type
| ) |  |

static

References osmo_mtp_transfer_param::dpc, sccp_connection::inst, msg_type, xua_msg::mtp, sccp_connection::remote_pc, sccp_scrc_rx_scoc_conn_msg(), xua_gen_msg_co(), and xua_msg_free().

Referenced by scoc_fsm_active(), scoc_fsm_conn_pend_in(), scoc_fsm_conn_pend_out(), scoc_fsm_idle(), and scoc_fsm_wait_conn_conf().

## xua_gen_msg_co()

static struct xua_msg* xua_gen_msg_co | ( | struct sccp_connection * | conn,
|  | uint32_t | event,
|  | struct osmo_scu_prim * | prim,
|  | int | msg_type
| ) |  |

static

References sccp_connection::called_addr, sccp_connection::calling_addr, osmo_scu_disconn_param::cause, sccp_connection::conn_id, osmo_scu_prim::disconnect, xua_msg::hdr, sccp_connection::inst, msg_type, osmo_scu_prim::oph, osmo_sccp_addr::presence, sccp_connection::remote_ref, osmo_sccp_instance::route_ctx, sccp_connection::sccp_class, SUA_CAUSE_T_REFUSAL, SUA_CAUSE_T_RELEASE, SUA_CO_COAK, SUA_CO_CODT, SUA_CO_COIT, SUA_CO_CORE, SUA_CO_COREF, SUA_CO_RELCO, SUA_CO_RELRE, SUA_IEI_CAUSE, SUA_IEI_DATA, SUA_IEI_DEST_ADDR, SUA_IEI_DEST_REF, SUA_IEI_PROTO_CLASS, SUA_IEI_ROUTE_CTX, SUA_IEI_SEQ_CTRL, SUA_IEI_SRC_ADDR, SUA_IEI_SRC_REF, SUA_MSGC_CO, osmo_scu_prim::u, XUA_HDR, xua_msg_add_data(), xua_msg_add_sccp_addr(), xua_msg_add_u32(), xua_msg_alloc(), and xua_msg_free().

Referenced by xua_gen_encode_and_send().

## xua_gen_relre()

static struct xua_msg* xua_gen_relre | ( | struct sccp_connection * | conn,
|  | uint32_t | cause,
|  | struct osmo_scu_prim * | prim
| ) |  |

static

References sccp_connection::conn_id, xua_msg::hdr, sccp_connection::inst, osmo_scu_prim::oph, sccp_connection::remote_ref, osmo_sccp_instance::route_ctx, SUA_CAUSE_T_RELEASE, SUA_CO_RELRE, SUA_IEI_CAUSE, SUA_IEI_DATA, SUA_IEI_DEST_REF, SUA_IEI_ROUTE_CTX, SUA_IEI_SRC_REF, SUA_MSGC_CO, XUA_HDR, xua_msg_add_data(), xua_msg_add_u32(), and xua_msg_alloc().

Referenced by xua_gen_relre_and_send().

## xua_gen_relre_and_send()

static int xua_gen_relre_and_send | ( | struct sccp_connection * | conn,
|  | uint32_t | cause,
|  | struct osmo_scu_prim * | prim
| ) |  |

static

References osmo_mtp_transfer_param::dpc, sccp_connection::inst, xua_msg::mtp, sccp_connection::remote_pc, sccp_scrc_rx_scoc_conn_msg(), xua_gen_relre(), and xua_msg_free().

Referenced by scoc_fsm_active(), and scoc_fsm_wait_conn_conf().

## 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_sccp_timer_val osmo_sccp_timer_defaults[]

Initial value:
= {
[OSMO_SCCP_TIMER_CONN_EST] = { .s = 1 * 60, },
[OSMO_SCCP_TIMER_IAS] = { .s = 7 * 60, },
[OSMO_SCCP_TIMER_IAR] = { .s = 15 * 60, },
[OSMO_SCCP_TIMER_REL] = { .s = 10, },
[OSMO_SCCP_TIMER_REPEAT_REL] = { .s = 10, },
[OSMO_SCCP_TIMER_INT] = { .s = 1 * 60, },
[OSMO_SCCP_TIMER_GUARD] = { .s = 23 * 60, },
[OSMO_SCCP_TIMER_RESET] = { .s = 10, },
[OSMO_SCCP_TIMER_REASSEMBLY] = { .s = 10, },
}
OSMO_SCCP_TIMER_REPEAT_REL
@ OSMO_SCCP_TIMER_REPEAT_REL
Definition: sccp_internal.h:16
OSMO_SCCP_TIMER_INT
@ OSMO_SCCP_TIMER_INT
Definition: sccp_internal.h:17
OSMO_SCCP_TIMER_GUARD
@ OSMO_SCCP_TIMER_GUARD
Definition: sccp_internal.h:18
OSMO_SCCP_TIMER_REASSEMBLY
@ OSMO_SCCP_TIMER_REASSEMBLY
Definition: sccp_internal.h:20
OSMO_SCCP_TIMER_REL
@ OSMO_SCCP_TIMER_REL
Definition: sccp_internal.h:15
OSMO_SCCP_TIMER_IAS
@ OSMO_SCCP_TIMER_IAS
Definition: sccp_internal.h:13
OSMO_SCCP_TIMER_CONN_EST
@ OSMO_SCCP_TIMER_CONN_EST
Definition: sccp_internal.h:12
OSMO_SCCP_TIMER_RESET
@ OSMO_SCCP_TIMER_RESET
Definition: sccp_internal.h:19
OSMO_SCCP_TIMER_IAR
@ OSMO_SCCP_TIMER_IAR
Definition: sccp_internal.h:14

Referenced by gen_sccp_timer_cmd_strs(), and osmo_sccp_timer_get().

## osmo_sccp_timer_descriptions

const struct value_string osmo_sccp_timer_descriptions[]

Initial value:
= {
{ OSMO_SCCP_TIMER_CONN_EST,
"Waiting for connection confirm message, 1 to 2 minutes" },
{ OSMO_SCCP_TIMER_IAS,
"Send keep-alive: on an idle connection, delay before sending an Idle Timer message,"
" 5 to 10 minutes" },
{ OSMO_SCCP_TIMER_IAR,
"Receive keep-alive: on an idle connection, delay until considering a connection as stale,"
" 11 to 21 minutes" },
{ OSMO_SCCP_TIMER_REL,
"Waiting for release complete message, 10 to 20 seconds" },
{ OSMO_SCCP_TIMER_REPEAT_REL,
"Waiting for release complete message; or to repeat sending released message after the initial"
" expiry, 10 to 20 seconds" },
{ OSMO_SCCP_TIMER_INT,
"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" },
{ OSMO_SCCP_TIMER_GUARD,
"Waiting to resume normal procedure for temporary connection sections during the restart"
" procedure, 23 to 25 minutes" },
{ OSMO_SCCP_TIMER_RESET,
"Waiting to release temporary connection section or alert maintenance function after reset"
" request message is sent, 10 to 20 seconds" },
{ OSMO_SCCP_TIMER_REASSEMBLY,
"Waiting to receive all the segments of the remaining segments, single segmented message after"
" receiving the first segment, 10 to 20 seconds" },
{}
}

Referenced by osmo_sccp_timer_description().

## 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" },
{}
}

Referenced by DEFUN(), gen_sccp_timer_cmd_strs(), and osmo_sccp_timer_name().

## 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.c:169
sccp_scoc_states
static const struct osmo_fsm_state sccp_scoc_states[]
Definition: sccp_scoc.c:1201

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 }
}
SCOC_E_SCU_N_DISC_REQ
@ SCOC_E_SCU_N_DISC_REQ
Definition: sccp_scoc.c:141
SCOC_E_RCOC_RLSD_IND
@ SCOC_E_RCOC_RLSD_IND
Definition: sccp_scoc.c:148
SCOC_E_CONN_TMR_EXP
@ SCOC_E_CONN_TMR_EXP
Definition: sccp_scoc.c:162
SCOC_E_RCOC_CC_IND
@ SCOC_E_RCOC_CC_IND
Definition: sccp_scoc.c:151
SCOC_E_T_INT_EXP
@ SCOC_E_T_INT_EXP
Definition: sccp_scoc.c:165
SCOC_E_RCOC_REL_COMPL_IND
@ SCOC_E_RCOC_REL_COMPL_IND
Definition: sccp_scoc.c:149
SCOC_E_T_IAS_EXP
@ SCOC_E_T_IAS_EXP
Definition: sccp_scoc.c:160
SCOC_E_T_IAR_EXP
@ SCOC_E_T_IAR_EXP
Definition: sccp_scoc.c:159
SCOC_E_RCOC_IT_IND
@ SCOC_E_RCOC_IT_IND
Definition: sccp_scoc.c:154
SCOC_E_SCU_N_CONN_RESP
@ SCOC_E_SCU_N_CONN_RESP
Definition: sccp_scoc.c:140
SCOC_E_RCOC_DT1_IND
@ SCOC_E_RCOC_DT1_IND
Definition: sccp_scoc.c:152
SCOC_E_RCOC_DT2_IND
@ SCOC_E_RCOC_DT2_IND
Definition: sccp_scoc.c:153
SCOC_E_RCOC_OTHER_NPDU
@ SCOC_E_RCOC_OTHER_NPDU
Definition: sccp_scoc.c:155
SCOC_E_SCU_N_DATA_REQ
@ SCOC_E_SCU_N_DATA_REQ
Definition: sccp_scoc.c:142
SCOC_E_RCOC_CONN_IND
@ SCOC_E_RCOC_CONN_IND
Definition: sccp_scoc.c:146
SCOC_E_SCU_N_CONN_REQ
@ SCOC_E_SCU_N_CONN_REQ
Definition: sccp_scoc.c:139
SCOC_E_T_REL_EXP
@ SCOC_E_T_REL_EXP
Definition: sccp_scoc.c:164
SCOC_E_RCOC_ROUT_FAIL_IND
@ SCOC_E_RCOC_ROUT_FAIL_IND
Definition: sccp_scoc.c:147
SCOC_E_T_REP_REL_EXP
@ SCOC_E_T_REP_REL_EXP
Definition: sccp_scoc.c:166
SCOC_E_RCOC_CREF_IND
@ SCOC_E_RCOC_CREF_IND
Definition: sccp_scoc.c:150
SCOC_E_SCU_N_EXP_DATA_REQ
@ SCOC_E_SCU_N_EXP_DATA_REQ
Definition: sccp_scoc.c:143
SCOC_E_RCOC_ERROR_IND
@ SCOC_E_RCOC_ERROR_IND
Definition: sccp_scoc.c:156

## 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_REQUEST,
SCOC_E_SCU_N_CONN_REQ },
{ SCCP_SAP_USER, OSMO_SCU_PRIM_N_CONNECT, PRIM_OP_RESPONSE,
SCOC_E_SCU_N_CONN_RESP },
{ SCCP_SAP_USER, OSMO_SCU_PRIM_N_DATA, PRIM_OP_REQUEST,
SCOC_E_SCU_N_DATA_REQ },
{ SCCP_SAP_USER, OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_REQUEST,
SCOC_E_SCU_N_DISC_REQ },
{ SCCP_SAP_USER, OSMO_SCU_PRIM_N_EXPEDITED_DATA, PRIM_OP_REQUEST,
SCOC_E_SCU_N_EXP_DATA_REQ },
{ 0, 0, 0, OSMO_NO_EVENT }
}
OSMO_SCU_PRIM_N_CONNECT
@ OSMO_SCU_PRIM_N_CONNECT
Definition: sccp_sap.h:34
OSMO_SCU_PRIM_N_EXPEDITED_DATA
@ OSMO_SCU_PRIM_N_EXPEDITED_DATA
Definition: sccp_sap.h:36
OSMO_SCU_PRIM_N_DISCONNECT
@ OSMO_SCU_PRIM_N_DISCONNECT
Definition: sccp_sap.h:37
OSMO_SCU_PRIM_N_DATA
@ OSMO_SCU_PRIM_N_DATA
Definition: sccp_sap.h:35
SCCP_SAP_USER
@ SCCP_SAP_USER
Definition: sigtran_sap.h:7

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:
= {
{ SUA_MSGC_CO, SUA_CO_CORE, SCOC_E_RCOC_CONN_IND },
{ SUA_MSGC_CO, SUA_CO_RELRE, SCOC_E_RCOC_RLSD_IND },
{ SUA_MSGC_CO, SUA_CO_RELCO, SCOC_E_RCOC_REL_COMPL_IND },
{ SUA_MSGC_CO, SUA_CO_COREF, SCOC_E_RCOC_CREF_IND },
{ SUA_MSGC_CO, SUA_CO_COAK, SCOC_E_RCOC_CC_IND },
{ SUA_MSGC_CO, SUA_CO_CODT, SCOC_E_RCOC_DT1_IND },
{ SUA_MSGC_CO, SUA_CO_COIT, SCOC_E_RCOC_IT_IND },
{ SUA_MSGC_CO, SUA_CO_COERR, SCOC_E_RCOC_ERROR_IND },
}
SUA_CO_CORE
#define SUA_CO_CORE
Definition: sua.h:70
SUA_CO_COREF
#define SUA_CO_COREF
Definition: sua.h:72
SUA_MSGC_CO
#define SUA_MSGC_CO
Definition: sua.h:36
SUA_CO_RELCO
#define SUA_CO_RELCO
Definition: sua.h:74
SUA_CO_COIT
#define SUA_CO_COIT
Definition: sua.h:80
SUA_CO_COERR
#define SUA_CO_COERR
Definition: sua.h:79
SUA_CO_RELRE
#define SUA_CO_RELRE
Definition: sua.h:73
SUA_CO_CODT
#define SUA_CO_CODT
Definition: sua.h:77
SUA_CO_COAK
#define SUA_CO_COAK
Definition: sua.h:71

Referenced by sccp_scoc_rx_from_scrc().