libosmo-sigtran 2.0.0.52-6412
Osmocom SIGTRAN library
|
#include <errno.h>
#include <osmocom/core/fsm.h>
#include <osmocom/core/logging.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/sigtran_sap.h>
#include <osmocom/sigtran/protocol/m3ua.h>
#include "xua_internal.h"
#include "xua_asp_fsm.h"
#include "ss7_as.h"
#include "ss7_asp.h"
#include "ss7_xua_srv.h"
Data Structures | |
struct | lm_fsm_priv |
Macros | |
#define | S(x) (1 << (x)) |
#define | lm_fsm_state_chg(fi, NEXT_STATE) |
Enumerations | |
enum | lm_state { S_IDLE , S_WAIT_ASP_UP , S_WAIT_NOTIFY , S_RKM_REG , S_ACTIVE } |
enum | lm_event { LM_E_SCTP_EST_IND , LM_E_ASP_UP_CONF , LM_E_NOTIFY_IND , LM_E_AS_INACTIVE_IND , LM_E_AS_ACTIVE_IND , LM_E_AS_STATUS_IND , LM_E_RKM_REG_CONF , LM_E_SCTP_DISC_IND } |
Functions | |
osmo_static_assert (ARRAY_SIZE(ss7_asp_lm_timer_defaults)==(SS7_ASP_LM_TIMERS_LEN) &&ARRAY_SIZE(ss7_asp_lm_timer_names)==(SS7_ASP_LM_TIMERS_LEN), assert_ss7_asp_lm_timer_count) | |
static struct osmo_ss7_as * | find_first_as_in_asp (struct osmo_ss7_asp *asp) |
static int | handle_reg_conf (struct osmo_fsm_inst *fi, uint32_t l_rk_id, uint32_t rctx) |
static void | restart_asp (struct osmo_fsm_inst *fi) |
static void | lm_idle (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | lm_wait_asp_up (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static int | lm_timer_cb (struct osmo_fsm_inst *fi) |
static void | lm_wait_notify (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | lm_rkm_reg (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | lm_active (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | lm_allstate (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static int | default_lm_prim_cb (struct osmo_prim_hdr *oph, void *_asp) |
int | osmo_ss7_asp_use_default_lm (struct osmo_ss7_asp *asp, int log_level) |
Variables | |
static const struct value_string | lm_event_names [] |
const struct osmo_tdef | ss7_asp_lm_timer_defaults [SS7_ASP_LM_TIMERS_LEN] |
const struct value_string | ss7_asp_lm_timer_names [] |
static const struct osmo_tdef_state_timeout | lm_fsm_timeouts [32] |
static const struct osmo_fsm_state | lm_states [] |
static const struct osmo_prim_event_map | lm_event_map [] |
struct osmo_fsm | xua_default_lm_fsm |
static const struct osmo_xua_layer_manager | default_layer_manager |
#define lm_fsm_state_chg | ( | fi, | |
NEXT_STATE | |||
) |
#define S | ( | x | ) | (1 << (x)) |
enum lm_event |
enum lm_state |
|
static |
References lm_event_map, osmo_ss7_asp::lm_priv, and osmo_xlm_prim_name().
|
static |
References osmo_ss7_instance::as_list, osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::inst, and osmo_ss7_as::list.
Referenced by lm_timer_cb().
|
static |
References lm_fsm_priv::asp, osmo_ss7_as::cfg, osmo_ss7_routing_key::context, osmo_ss7_as::fi, osmo_ss7_asp::inst, osmo_ss7_as_find_by_l_rk_id(), and osmo_ss7_as::routing_key.
Referenced by lm_rkm_reg().
|
static |
References lm_fsm_priv::asp, data, osmo_ss7_asp::fi, LM_E_AS_INACTIVE_IND, LM_E_NOTIFY_IND, M3UA_NOTIFY_I_AS_ACT, M3UA_NOTIFY_T_STATCHG, osmo_xlm_prim::notify, osmo_xlm_prim::oph, OSMO_XLM_PRIM_M_NOTIFY, restart_asp(), osmo_xlm_prim_notify::status_info, osmo_xlm_prim_notify::status_type, osmo_xlm_prim::u, and XUA_ASP_E_M_ASP_ACTIVE_REQ.
|
static |
References LM_E_SCTP_DISC_IND, and restart_asp().
|
static |
References lm_fsm_priv::asp, osmo_ss7_asp::fi, LM_E_SCTP_EST_IND, lm_fsm_state_chg, S_WAIT_ASP_UP, and XUA_ASP_E_M_ASP_UP_REQ.
|
static |
References lm_fsm_priv::asp, osmo_ss7_asp::cfg, osmo_ss7_routing_key::context, data, handle_reg_conf(), osmo_xlm_prim_rk_reg::key, osmo_ss7_routing_key::l_rk_id, LM_E_RKM_REG_CONF, M3UA_RKM_REG_SUCCESS, restart_asp(), osmo_xlm_prim::rk_reg, S_WAIT_NOTIFY, SS7_ASP_LM_T_WAIT_NOTIY_RKM, osmo_xlm_prim_rk_reg::status, osmo_ss7_asp::T_defs_lm, and osmo_xlm_prim::u.
|
static |
References lm_fsm_priv::asp, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_as::fi, find_first_as_in_asp(), osmo_xlm_prim_rk_reg::key, LM_E_AS_INACTIVE_IND, lm_fsm_state_chg, osmo_ss7_as::mode, osmo_xlm_prim::oph, OSMO_SS7_ASP_QUIRK_NO_NOTIFY, OSMO_XLM_PRIM_M_RK_REG, osmo_xlm_sap_down(), osmo_ss7_asp::quirks, restart_asp(), osmo_xlm_prim::rk_reg, osmo_ss7_as::routing_key, S_RKM_REG, SS7_ASP_LM_T_WAIT_ASP_UP, SS7_ASP_LM_T_WAIT_NOTIFY, SS7_ASP_LM_T_WAIT_NOTIY_RKM, SS7_ASP_LM_T_WAIT_RK_REG_RESP, osmo_xlm_prim_rk_reg::traf_mode, osmo_xlm_prim::u, and xua_xlm_prim_alloc().
|
static |
References LM_E_ASP_UP_CONF, lm_fsm_state_chg, and S_WAIT_NOTIFY.
|
static |
References lm_fsm_priv::asp, data, osmo_ss7_asp::fi, LM_E_AS_INACTIVE_IND, LM_E_NOTIFY_IND, lm_fsm_state_chg, M3UA_NOTIFY_I_AS_INACT, M3UA_NOTIFY_I_AS_PEND, M3UA_NOTIFY_T_STATCHG, osmo_xlm_prim::notify, osmo_xlm_prim::oph, OSMO_XLM_PRIM_M_NOTIFY, S_ACTIVE, osmo_xlm_prim_notify::status_info, osmo_xlm_prim_notify::status_type, osmo_xlm_prim::u, and XUA_ASP_E_M_ASP_ACTIVE_REQ.
int osmo_ss7_asp_use_default_lm | ( | struct osmo_ss7_asp * | asp, |
int | log_level | ||
) |
References lm_fsm_priv::asp, osmo_ss7_asp::cfg, default_layer_manager, osmo_ss7_asp::lm, osmo_ss7_asp::lm_priv, osmo_ss7_asp::name, and xua_default_lm_fsm.
Referenced by osmo_sccp_simple_client_on_ss7_id(), and restart_asp().
osmo_static_assert | ( | ARRAY_SIZE(ss7_asp_lm_timer_defaults) | = =(SS7_ASP_LM_TIMERS_LEN) &&ARRAY_SIZE(ss7_asp_lm_timer_names)==(SS7_ASP_LM_TIMERS_LEN) , |
assert_ss7_asp_lm_timer_count | |||
) |
|
static |
References lm_fsm_priv::asp, osmo_ss7_asp::fi, osmo_ss7_asp_restart(), and osmo_ss7_asp_use_default_lm().
Referenced by lm_active(), lm_allstate(), lm_rkm_reg(), and lm_timer_cb().
|
static |
Referenced by osmo_ss7_asp_use_default_lm().
|
static |
Referenced by default_lm_prim_cb().
|
static |
|
static |
|
static |
const struct osmo_tdef ss7_asp_lm_timer_defaults[SS7_ASP_LM_TIMERS_LEN] |
Referenced by gen_asp_timer_cmd_strs(), and ss7_asp_alloc().
const struct value_string ss7_asp_lm_timer_names[] |
Referenced by DEFUN_ATTR(), gen_asp_timer_cmd_strs(), ss7_asp_lm_timer_name(), and write_asp_timers().
struct osmo_fsm xua_default_lm_fsm |
Referenced by osmo_ss7_asp_use_default_lm(), and osmo_ss7_init().