libosmo-sigtran 2.2.1.95-893c Osmocom SIGTRAN library

Data Structures | Macros | Enumerations | Functions | Variables
xua_default_lm_fsm.c File Reference
`#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 "xua_lm_sap.h"`
`#include "ss7_as.h"`
`#include "ss7_asp.h"`
`#include "ss7_xua_srv.h"`

## Data Structures
struct | xua_layer_manager_default_priv

## Macros
#define | S(x) (1 << (x))
#define | lm_fsm_state_chg(fi, NEXT_STATE)
#define | ENSURE_ROLE_COND(fi, event, cond)
#define | ENSURE_IPSP(fi, event) ENSURE_ROLE_COND(fi, event, _role == OSMO_SS7_ASP_ROLE_IPSP)
#define | ENSURE_ASP_OR_IPSP(fi, event) ENSURE_ROLE_COND(fi, event, _role == OSMO_SS7_ASP_ROLE_ASP || _role == OSMO_SS7_ASP_ROLE_IPSP)
#define | ENSURE_SG_OR_IPSP(fi, event) ENSURE_ROLE_COND(fi, event, _role == OSMO_SS7_ASP_ROLE_SG || _role == OSMO_SS7_ASP_ROLE_IPSP)

## Enumerations
enum | lm_state { S_IDLE , S_WAIT_ASP_UP , S_WAIT_NOTIFY , S_RKM_REG , S_INACTIVE , S_ACTIVE }
enum | lm_event { LM_E_SCTP_EST_IND , LM_E_ASP_UP_CONF , LM_E_ASP_UP_IND , LM_E_ASP_DOWN_IND , LM_E_ASP_ACT_CONF , LM_E_ASP_ACT_IND , LM_E_ASP_INACT_CONF , LM_E_ASP_INACT_IND , LM_E_NOTIFY_IND , LM_E_ERROR_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 int | handle_reg_conf (struct osmo_fsm_inst *fi, uint32_t l_rk_id, uint32_t rctx)
static void | reg_req_all_assoc_as (struct osmo_ss7_asp *asp)
static bool | asp_act_needed (const struct osmo_ss7_asp *asp)
static void | submit_m_asp_active_req_if_needed (struct osmo_ss7_asp *asp)
static void | lm_idle (struct osmo_fsm_inst *fi, uint32_t event, void *data)
static void | lm_wait_asp_up_on_enter (struct osmo_fsm_inst *fi, uint32_t prev_state)
static void | lm_wait_asp_up (struct osmo_fsm_inst *fi, uint32_t event, void *data)
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_inactive_on_enter (struct osmo_fsm_inst *fi, uint32_t prev_state)
static void | lm_inactive (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 | lm_timer_cb (struct osmo_fsm_inst *fi)
static int | default_lm_prim_cb (struct osmo_prim_hdr *oph, void *_asp)
void | xua_layer_manager_default_free (struct osmo_xua_layer_manager *lm)
struct osmo_xua_layer_manager * | xua_layer_manager_default_alloc (struct osmo_ss7_asp *asp)

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

## Macro Definition Documentation

## ◆ ENSURE_ASP_OR_IPSP

#define ENSURE_ASP_OR_IPSP | ( |  | fi,
|  |  | event
| ) |  | ENSURE_ROLE_COND(fi, event, _role == OSMO_SS7_ASP_ROLE_ASP || _role == OSMO_SS7_ASP_ROLE_IPSP)

## ◆ ENSURE_IPSP

#define ENSURE_IPSP | ( |  | fi,
|  |  | event
| ) |  | ENSURE_ROLE_COND(fi, event, _role == OSMO_SS7_ASP_ROLE_IPSP)

## ◆ ENSURE_ROLE_COND

#define ENSURE_ROLE_COND | ( |  | fi,
|  |  | event,
|  |  | cond
| ) |  |

Value:
do { \
struct xua_layer_manager_default_priv *_lmp = fi->priv; \
enum osmo_ss7_asp_role _role = _lmp->asp->cfg.role; \
if (!(cond)) { \
LOGPFSML(fi, LOGL_ERROR, "event %s not permitted " \
"in role %s\n", \
osmo_fsm_event_name(fi->fsm, event), \
get_value_string(osmo_ss7_asp_role_names, _role));\
return; \
} \
} while (0)
osmo_ss7_asp_role
osmo_ss7_asp_role
Definition: osmo_ss7.h:243
osmo_ss7_asp_role_names
const struct value_string osmo_ss7_asp_role_names[]
Definition: ss7_asp.c:153
osmo_ss7_asp::role
enum osmo_ss7_asp_role role
Definition: ss7_asp.h:122
osmo_ss7_asp::cfg
struct osmo_ss7_asp::@27 cfg
xua_layer_manager_default_priv
Definition: xua_default_lm_fsm.c:137
xua_layer_manager_default_priv::asp
struct osmo_ss7_asp * asp
Definition: xua_default_lm_fsm.c:138

## ◆ ENSURE_SG_OR_IPSP

#define ENSURE_SG_OR_IPSP | ( |  | fi,
|  |  | event
| ) |  | ENSURE_ROLE_COND(fi, event, _role == OSMO_SS7_ASP_ROLE_SG || _role == OSMO_SS7_ASP_ROLE_IPSP)

## ◆ lm_fsm_state_chg

#define lm_fsm_state_chg | ( |  | fi,
|  |  | NEXT_STATE
| ) |  |

Value:
osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \
lm_fsm_timeouts, \
((struct xua_layer_manager_default_priv *)(fi->priv))->asp->cfg.T_defs_lm, \
-1)
lm_fsm_timeouts
static const struct osmo_tdef_state_timeout lm_fsm_timeouts[32]
Definition: xua_default_lm_fsm.c:128

## ◆ S

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

## Enumeration Type Documentation

## ◆ lm_event

enum lm_event

Enumerator
LM_E_SCTP_EST_IND |
LM_E_ASP_UP_CONF |
LM_E_ASP_UP_IND |
LM_E_ASP_DOWN_IND |
LM_E_ASP_ACT_CONF |
LM_E_ASP_ACT_IND |
LM_E_ASP_INACT_CONF |
LM_E_ASP_INACT_IND |
LM_E_NOTIFY_IND |
LM_E_ERROR_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 |

## ◆ lm_state

enum lm_state

Enumerator
S_IDLE |
S_WAIT_ASP_UP |
S_WAIT_NOTIFY |
S_RKM_REG |
S_INACTIVE |
S_ACTIVE |

## Function Documentation

## ◆ asp_act_needed()

static bool asp_act_needed | ( | const struct osmo_ss7_asp * | asp | ) |
| static

References osmo_ss7_asp::adm_state, ss7_as_asp_assoc::as, ss7_as_asp_assoc::asp, ss7_as_asp_assoc::asp_entry, osmo_ss7_asp::assoc_as_list, osmo_ss7_asp::blocked, osmo_ss7_asp::cfg, osmo_ss7_as_active(), OSMO_SS7_AS_TMOD_OVERRIDE, and ss7_asp_determine_traf_mode().

Referenced by lm_inactive(), and submit_m_asp_active_req_if_needed().

## ◆ default_lm_prim_cb()

static int default_lm_prim_cb | ( | struct osmo_prim_hdr * | oph,
|  | void * | _asp
| ) |  |
| static

References xua_layer_manager_default_priv::asp, xua_layer_manager_default_priv::fi, osmo_ss7_asp::lm, lm_event_map, osmo_xlm_prim_name(), and osmo_xua_layer_manager::priv.

Referenced by xua_layer_manager_default_alloc().

## ◆ handle_reg_conf()

static int handle_reg_conf | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | l_rk_id,
|  | uint32_t | rctx
| ) |  |
| static

References xua_layer_manager_default_priv::asp, osmo_ss7_as::cfg, osmo_ss7_routing_key::context, osmo_ss7_as::fi, xua_layer_manager_default_priv::fi, osmo_ss7_asp::inst, osmo_ss7_as_find_by_l_rk_id(), and osmo_ss7_as::routing_key.

Referenced by lm_rkm_reg().

## ◆ lm_active()

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

References osmo_ss7_asp::adm_state, xua_layer_manager_default_priv::asp, osmo_ss7_asp::blocked, osmo_ss7_asp::cfg, osmo_xlm_prim_error::code, data, ENSURE_ASP_OR_IPSP, ENSURE_IPSP, ENSURE_SG_OR_IPSP, osmo_xlm_prim::error, xua_layer_manager_default_priv::fi, LM_E_AS_INACTIVE_IND, LM_E_ASP_ACT_IND, LM_E_ASP_INACT_CONF, LM_E_ASP_INACT_IND, LM_E_ERROR_IND, LM_E_NOTIFY_IND, lm_fsm_state_chg, m3ua_err_names, M3UA_NOTIFY_I_AS_ACT, M3UA_NOTIFY_T_STATCHG, osmo_xlm_prim::notify, osmo_xlm_prim::oph, OSMO_XLM_PRIM_M_ERROR, OSMO_XLM_PRIM_M_NOTIFY, S_INACTIVE, S_WAIT_NOTIFY, osmo_xlm_prim_notify::status_info, osmo_xlm_prim_notify::status_type, submit_m_asp_active_req_if_needed(), and osmo_xlm_prim::u.

## ◆ lm_allstate()

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

References LM_E_ASP_DOWN_IND, LM_E_SCTP_DISC_IND, lm_fsm_state_chg, S_IDLE, and S_WAIT_ASP_UP.

## ◆ lm_idle()

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

References LM_E_SCTP_EST_IND, lm_fsm_state_chg, and S_WAIT_ASP_UP.

## ◆ lm_inactive()

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

References xua_layer_manager_default_priv::asp, asp_act_needed(), osmo_xlm_prim_error::code, data, ENSURE_ASP_OR_IPSP, ENSURE_SG_OR_IPSP, osmo_xlm_prim::error, xua_layer_manager_default_priv::fi, LM_E_AS_INACTIVE_IND, LM_E_ASP_ACT_CONF, LM_E_ASP_ACT_IND, LM_E_ASP_INACT_CONF, LM_E_ASP_INACT_IND, LM_E_ERROR_IND, LM_E_NOTIFY_IND, lm_fsm_state_chg, m3ua_err_names, osmo_xlm_prim::oph, OSMO_XLM_PRIM_M_ERROR, OSMO_XLM_PRIM_M_NOTIFY, S_ACTIVE, S_WAIT_NOTIFY, submit_m_asp_active_req_if_needed(), and osmo_xlm_prim::u.

## ◆ lm_inactive_on_enter()

static void lm_inactive_on_enter | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | prev_state
| ) |  |
| static

References xua_layer_manager_default_priv::asp, osmo_ss7_asp::cfg, xua_layer_manager_default_priv::fi, OSMO_SS7_ASP_ROLE_ASP, OSMO_SS7_ASP_ROLE_IPSP, osmo_ss7_asp::role, and submit_m_asp_active_req_if_needed().

## ◆ lm_rkm_reg()

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

References xua_layer_manager_default_priv::asp, osmo_ss7_asp::cfg, osmo_xlm_prim_error::code, osmo_ss7_routing_key::context, data, ENSURE_ASP_OR_IPSP, osmo_xlm_prim::error, xua_layer_manager_default_priv::fi, handle_reg_conf(), osmo_xlm_prim_rk_reg::key, osmo_ss7_routing_key::l_rk_id, LM_E_ERROR_IND, LM_E_RKM_REG_CONF, lm_fsm_state_chg, m3ua_err_names, M3UA_RKM_REG_SUCCESS, osmo_xlm_prim::oph, OSMO_XLM_PRIM_M_ERROR, OSMO_XLM_PRIM_M_SCTP_RELEASE, 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, osmo_xlm_prim::u, and xlm_sap_down_simple().

## ◆ lm_timer_cb()

static int lm_timer_cb | ( | struct osmo_fsm_inst * | fi | ) |
| static

References xua_layer_manager_default_priv::asp, osmo_ss7_asp::cfg, xua_layer_manager_default_priv::fi, LM_E_AS_INACTIVE_IND, lm_fsm_state_chg, NULL, OSMO_SS7_ASP_QUIRK_NO_NOTIFY, OSMO_XLM_PRIM_M_SCTP_RELEASE, osmo_ss7_asp::quirks, reg_req_all_assoc_as(), 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, and xlm_sap_down_simple().

## ◆ lm_wait_asp_up()

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

References xua_layer_manager_default_priv::asp, osmo_ss7_asp::cfg, osmo_xlm_prim_error::code, data, ENSURE_ASP_OR_IPSP, ENSURE_SG_OR_IPSP, osmo_xlm_prim::error, xua_layer_manager_default_priv::fi, LM_E_ASP_UP_CONF, LM_E_ASP_UP_IND, LM_E_ERROR_IND, lm_fsm_state_chg, m3ua_err_names, osmo_xlm_prim::oph, OSMO_SS7_ASP_ROLE_IPSP, OSMO_XLM_PRIM_M_ERROR, osmo_ss7_asp::role, S_INACTIVE, S_WAIT_NOTIFY, and osmo_xlm_prim::u.

## ◆ lm_wait_asp_up_on_enter()

static void lm_wait_asp_up_on_enter | ( | struct osmo_fsm_inst * | fi,
|  | uint32_t | prev_state
| ) |  |
| static

References xua_layer_manager_default_priv::asp, osmo_ss7_asp::cfg, xua_layer_manager_default_priv::fi, OSMO_SS7_ASP_ROLE_ASP, OSMO_SS7_ASP_ROLE_IPSP, OSMO_XLM_PRIM_M_ASP_UP, osmo_ss7_asp::role, and xlm_sap_down_simple().

## ◆ lm_wait_notify()

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

References data, ENSURE_ASP_OR_IPSP, ENSURE_SG_OR_IPSP, LM_E_AS_INACTIVE_IND, LM_E_ASP_ACT_IND, LM_E_ASP_UP_CONF, LM_E_NOTIFY_IND, lm_fsm_state_chg, M3UA_NOTIFY_T_STATCHG, osmo_xlm_prim::notify, osmo_xlm_prim::oph, OSMO_XLM_PRIM_M_NOTIFY, S_ACTIVE, S_INACTIVE, osmo_xlm_prim_notify::status_type, and osmo_xlm_prim::u.

## ◆ osmo_static_assert()

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

## ◆ reg_req_all_assoc_as()

static void reg_req_all_assoc_as | ( | struct osmo_ss7_asp * | asp | ) |
| static

References ss7_as_asp_assoc::as, ss7_as_asp_assoc::asp, ss7_as_asp_assoc::asp_entry, osmo_ss7_asp::assoc_as_list, osmo_ss7_as::cfg, osmo_ss7_as::mode, osmo_xlm_prim::oph, osmo_xlm_sap_down(), osmo_ss7_as::routing_key, and xua_xlm_prim_alloc_m_rk_reg_req().

Referenced by lm_timer_cb().

## ◆ submit_m_asp_active_req_if_needed()

static void submit_m_asp_active_req_if_needed | ( | struct osmo_ss7_asp * | asp | ) |
| static

References ss7_as_asp_assoc::asp, asp_act_needed(), OSMO_XLM_PRIM_M_ASP_ACTIVE, and xlm_sap_down_simple().

Referenced by lm_active(), lm_inactive(), and lm_inactive_on_enter().

## ◆ xua_layer_manager_default_alloc()

struct osmo_xua_layer_manager * xua_layer_manager_default_alloc | ( | struct osmo_ss7_asp * | asp | ) |

References xua_layer_manager_default_priv::asp, osmo_ss7_asp::cfg, default_lm_prim_cb(), xua_layer_manager_default_priv::fi, osmo_xua_layer_manager::free_func, osmo_ss7_asp::name, NULL, osmo_xua_layer_manager::prim_cb, osmo_xua_layer_manager::priv, xua_default_lm_fsm, and xua_layer_manager_default_free().

Referenced by ss7_asp_xua_layer_manager_start().

## ◆ xua_layer_manager_default_free()

void xua_layer_manager_default_free | ( | struct osmo_xua_layer_manager * | lm | ) |

References xua_layer_manager_default_priv::fi, NULL, and osmo_xua_layer_manager::priv.

Referenced by xua_layer_manager_default_alloc().

## Variable Documentation

## ◆ lm_event_map

const struct osmo_prim_event_map lm_event_map[]
| static

Initial value:
= {
{ XUA_SAP_LM, OSMO_XLM_PRIM_M_SCTP_ESTABLISH, PRIM_OP_INDICATION, LM_E_SCTP_EST_IND },
{ XUA_SAP_LM, OSMO_XLM_PRIM_M_SCTP_RELEASE, PRIM_OP_INDICATION, LM_E_SCTP_DISC_IND },
{ XUA_SAP_LM, OSMO_XLM_PRIM_M_ASP_UP, PRIM_OP_CONFIRM, LM_E_ASP_UP_CONF },
{ XUA_SAP_LM, OSMO_XLM_PRIM_M_ASP_UP, PRIM_OP_INDICATION, LM_E_ASP_UP_IND },
{ XUA_SAP_LM, OSMO_XLM_PRIM_M_ASP_DOWN, PRIM_OP_INDICATION, LM_E_ASP_DOWN_IND },
{ XUA_SAP_LM, OSMO_XLM_PRIM_M_ASP_ACTIVE, PRIM_OP_INDICATION, LM_E_ASP_ACT_IND },
{ XUA_SAP_LM, OSMO_XLM_PRIM_M_ASP_ACTIVE, PRIM_OP_CONFIRM, LM_E_ASP_ACT_CONF },
{ XUA_SAP_LM, OSMO_XLM_PRIM_M_ASP_INACTIVE, PRIM_OP_CONFIRM, LM_E_ASP_INACT_CONF },
{ XUA_SAP_LM, OSMO_XLM_PRIM_M_ASP_INACTIVE, PRIM_OP_INDICATION, LM_E_ASP_INACT_IND },
{ XUA_SAP_LM, OSMO_XLM_PRIM_M_AS_STATUS, PRIM_OP_INDICATION, LM_E_AS_STATUS_IND },
{ XUA_SAP_LM, OSMO_XLM_PRIM_M_NOTIFY, PRIM_OP_INDICATION, LM_E_NOTIFY_IND },
{ XUA_SAP_LM, OSMO_XLM_PRIM_M_ERROR, PRIM_OP_INDICATION, LM_E_ERROR_IND },
{ XUA_SAP_LM, OSMO_XLM_PRIM_M_AS_INACTIVE, PRIM_OP_INDICATION, LM_E_AS_INACTIVE_IND },
{ XUA_SAP_LM, OSMO_XLM_PRIM_M_AS_ACTIVE, PRIM_OP_INDICATION, LM_E_AS_ACTIVE_IND },
{ XUA_SAP_LM, OSMO_XLM_PRIM_M_RK_REG, PRIM_OP_CONFIRM, LM_E_RKM_REG_CONF },
{ 0, 0, 0, OSMO_NO_EVENT },
}
OSMO_XLM_PRIM_M_AS_ACTIVE
@ OSMO_XLM_PRIM_M_AS_ACTIVE
Definition: sigtran_sap.h:27
OSMO_XLM_PRIM_M_ASP_DOWN
@ OSMO_XLM_PRIM_M_ASP_DOWN
Definition: sigtran_sap.h:24
OSMO_XLM_PRIM_M_SCTP_RELEASE
@ OSMO_XLM_PRIM_M_SCTP_RELEASE
Definition: sigtran_sap.h:16
OSMO_XLM_PRIM_M_ASP_ACTIVE
@ OSMO_XLM_PRIM_M_ASP_ACTIVE
Definition: sigtran_sap.h:25
OSMO_XLM_PRIM_M_ASP_INACTIVE
@ OSMO_XLM_PRIM_M_ASP_INACTIVE
Definition: sigtran_sap.h:26
OSMO_XLM_PRIM_M_ERROR
@ OSMO_XLM_PRIM_M_ERROR
Definition: sigtran_sap.h:22
OSMO_XLM_PRIM_M_SCTP_ESTABLISH
@ OSMO_XLM_PRIM_M_SCTP_ESTABLISH
Definition: sigtran_sap.h:15
OSMO_XLM_PRIM_M_RK_REG
@ OSMO_XLM_PRIM_M_RK_REG
Definition: sigtran_sap.h:31
OSMO_XLM_PRIM_M_ASP_UP
@ OSMO_XLM_PRIM_M_ASP_UP
Definition: sigtran_sap.h:23
OSMO_XLM_PRIM_M_NOTIFY
@ OSMO_XLM_PRIM_M_NOTIFY
Definition: sigtran_sap.h:21
OSMO_XLM_PRIM_M_AS_STATUS
@ OSMO_XLM_PRIM_M_AS_STATUS
Definition: sigtran_sap.h:20
OSMO_XLM_PRIM_M_AS_INACTIVE
@ OSMO_XLM_PRIM_M_AS_INACTIVE
Definition: sigtran_sap.h:28
XUA_SAP_LM
@ XUA_SAP_LM
Definition: sigtran_sap.h:9
LM_E_AS_INACTIVE_IND
@ LM_E_AS_INACTIVE_IND
Definition: xua_default_lm_fsm.c:73
LM_E_ASP_INACT_CONF
@ LM_E_ASP_INACT_CONF
Definition: xua_default_lm_fsm.c:69
LM_E_ASP_UP_IND
@ LM_E_ASP_UP_IND
Definition: xua_default_lm_fsm.c:65
LM_E_NOTIFY_IND
@ LM_E_NOTIFY_IND
Definition: xua_default_lm_fsm.c:71
LM_E_AS_STATUS_IND
@ LM_E_AS_STATUS_IND
Definition: xua_default_lm_fsm.c:75
LM_E_ASP_INACT_IND
@ LM_E_ASP_INACT_IND
Definition: xua_default_lm_fsm.c:70
LM_E_SCTP_DISC_IND
@ LM_E_SCTP_DISC_IND
Definition: xua_default_lm_fsm.c:77
LM_E_RKM_REG_CONF
@ LM_E_RKM_REG_CONF
Definition: xua_default_lm_fsm.c:76
LM_E_ASP_DOWN_IND
@ LM_E_ASP_DOWN_IND
Definition: xua_default_lm_fsm.c:66
LM_E_ERROR_IND
@ LM_E_ERROR_IND
Definition: xua_default_lm_fsm.c:72
LM_E_AS_ACTIVE_IND
@ LM_E_AS_ACTIVE_IND
Definition: xua_default_lm_fsm.c:74
LM_E_SCTP_EST_IND
@ LM_E_SCTP_EST_IND
Definition: xua_default_lm_fsm.c:63
LM_E_ASP_UP_CONF
@ LM_E_ASP_UP_CONF
Definition: xua_default_lm_fsm.c:64
LM_E_ASP_ACT_IND
@ LM_E_ASP_ACT_IND
Definition: xua_default_lm_fsm.c:68
LM_E_ASP_ACT_CONF
@ LM_E_ASP_ACT_CONF
Definition: xua_default_lm_fsm.c:67

Referenced by default_lm_prim_cb().

## ◆ lm_event_names

const struct value_string lm_event_names[]
| static

Initial value:
= {
{ LM_E_SCTP_EST_IND, "SCTP-ESTABLISH.ind" },
{ LM_E_ASP_UP_CONF, "ASP-UP.conf" },
{ LM_E_ASP_UP_IND, "ASP-UP.ind" },
{ LM_E_ASP_DOWN_IND, "ASP-DOWN.ind" },
{ LM_E_ASP_ACT_CONF, "ASP-ACT.conf" },
{ LM_E_ASP_ACT_IND, "ASP-ACT.ind" },
{ LM_E_ASP_INACT_CONF, "ASP-INACT.conf" },
{ LM_E_ASP_INACT_IND, "ASP-INACT.ind" },
{ LM_E_NOTIFY_IND, "NOTIFY.ind" },
{ LM_E_ERROR_IND, "ERROR.ind" },
{ LM_E_AS_INACTIVE_IND, "AS-INACTIVE.ind" },
{ LM_E_AS_ACTIVE_IND, "AS-ACTIVE.ind" },
{ LM_E_AS_STATUS_IND, "AS-STATUS.ind" },
{ LM_E_RKM_REG_CONF, "RKM_REG.conf" },
{ LM_E_SCTP_DISC_IND, "SCTP-RELEASE.ind" },
{ 0, NULL }
}
NULL
int and can be left NULL
Definition: osmo_ss7.h:353

## ◆ lm_fsm_timeouts

const struct osmo_tdef_state_timeout lm_fsm_timeouts[32]
| static

Initial value:
= {
[S_IDLE] = { },
[S_WAIT_ASP_UP] = { .T = SS7_ASP_LM_T_WAIT_ASP_UP },
[S_WAIT_NOTIFY] = { .T = SS7_ASP_LM_T_WAIT_NOTIFY },
[S_RKM_REG] = { .T = SS7_ASP_LM_T_WAIT_RK_REG_RESP },
[S_INACTIVE] = { },
[S_ACTIVE] = { },
}
S_INACTIVE
@ S_INACTIVE
Definition: xua_default_lm_fsm.c:57
S_WAIT_ASP_UP
@ S_WAIT_ASP_UP
Definition: xua_default_lm_fsm.c:51
S_WAIT_NOTIFY
@ S_WAIT_NOTIFY
Definition: xua_default_lm_fsm.c:53
S_IDLE
@ S_IDLE
Definition: xua_default_lm_fsm.c:49
S_RKM_REG
@ S_RKM_REG
Definition: xua_default_lm_fsm.c:55
S_ACTIVE
@ S_ACTIVE
Definition: xua_default_lm_fsm.c:59
SS7_ASP_LM_T_WAIT_ASP_UP
@ SS7_ASP_LM_T_WAIT_ASP_UP
Definition: xua_internal.h:114
SS7_ASP_LM_T_WAIT_NOTIFY
@ SS7_ASP_LM_T_WAIT_NOTIFY
Definition: xua_internal.h:115
SS7_ASP_LM_T_WAIT_RK_REG_RESP
@ SS7_ASP_LM_T_WAIT_RK_REG_RESP
Definition: xua_internal.h:117

## ◆ lm_states

const struct osmo_fsm_state lm_states[]
| static

## ◆ ss7_asp_lm_timer_defaults

const struct osmo_tdef ss7_asp_lm_timer_defaults[SS7_ASP_LM_TIMERS_LEN]

Initial value:
= {
{ .T = SS7_ASP_LM_T_WAIT_ASP_UP, .default_val = 20, .unit = OSMO_TDEF_S,
.desc = "Restart ASP after timeout waiting for ASP UP (SG role) / ASP UP ACK (ASP role) (s)" },
{ .T = SS7_ASP_LM_T_WAIT_NOTIFY, .default_val = 2, .unit = OSMO_TDEF_S,
.desc = "Restart ASP after timeout waiting for NOTIFY (s)" },
{ .T = SS7_ASP_LM_T_WAIT_NOTIY_RKM, .default_val = 20, .unit = OSMO_TDEF_S,
.desc = "Restart ASP after timeout waiting for NOTIFY after RKM registration (s)" },
{ .T = SS7_ASP_LM_T_WAIT_RK_REG_RESP, .default_val = 10, .unit = OSMO_TDEF_S,
.desc = "Restart ASP after timeout waiting for RK_REG_RESP (s)" },
{}
}
SS7_ASP_LM_T_WAIT_NOTIY_RKM
@ SS7_ASP_LM_T_WAIT_NOTIY_RKM
Definition: xua_internal.h:116

Referenced by gen_asp_timer_lm_cmd_strs(), and ss7_asp_alloc().

## ◆ ss7_asp_lm_timer_names

const struct value_string ss7_asp_lm_timer_names[]

Initial value:
= {
{ SS7_ASP_LM_T_WAIT_ASP_UP, "wait_asp_up" },
{ SS7_ASP_LM_T_WAIT_NOTIFY, "wait_notify" },
{ SS7_ASP_LM_T_WAIT_NOTIY_RKM, "wait_notify_rkm" },
{ SS7_ASP_LM_T_WAIT_RK_REG_RESP, "wait_rk_reg_resp" },
{}
}

Referenced by DEFUN_ATTR(), gen_asp_timer_lm_cmd_strs(), ss7_asp_lm_timer_name(), and write_asp_timers_lm().

## ◆ xua_default_lm_fsm

struct osmo_fsm xua_default_lm_fsm

Initial value:
= {
.name = "xua_default_lm",
.states = lm_states,
.num_states = ARRAY_SIZE(lm_states),
.timer_cb = lm_timer_cb,
.event_names = lm_event_names,
.allstate_event_mask = S(LM_E_ASP_DOWN_IND) |
S(LM_E_SCTP_DISC_IND),
.allstate_action = lm_allstate,
.log_subsys = DLSS7,
}
lm_allstate
static void lm_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data)
Definition: xua_default_lm_fsm.c:473
lm_event_names
static const struct value_string lm_event_names[]
Definition: xua_default_lm_fsm.c:80
lm_states
static const struct osmo_fsm_state lm_states[]
Definition: xua_default_lm_fsm.c:523
lm_timer_cb
static int lm_timer_cb(struct osmo_fsm_inst *fi)
Definition: xua_default_lm_fsm.c:485
S
#define S(x)
Definition: xua_default_lm_fsm.c:45

Referenced by osmo_ss7_init(), and xua_layer_manager_default_alloc().