libosmo-sigtran 2.0.0.52-6412
Osmocom SIGTRAN library
|
#include <string.h>
#include <arpa/inet.h>
#include <osmocom/core/fsm.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/prim.h>
#include <osmocom/core/logging.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/sigtran_sap.h>
#include "xua_msg.h"
#include <osmocom/sigtran/protocol/sua.h>
#include <osmocom/sigtran/protocol/m3ua.h>
#include "ss7_as.h"
#include "ss7_asp.h"
#include "ss7_route.h"
#include "ss7_route_table.h"
#include "xua_asp_fsm.h"
#include "xua_as_fsm.h"
#include "xua_internal.h"
Data Structures | |
struct | xua_as_fsm_priv |
Macros | |
#define | S(x) (1 << (x)) |
#define | MSEC_TO_S_US(x) (x/1000), ((x%1000)*10) |
Functions | |
static struct msgb * | encode_notify (const struct osmo_xlm_prim_notify *npar) |
static int | as_notify_all_asp (struct osmo_ss7_as *as, struct osmo_xlm_prim_notify *npar) |
static int | get_local_role (struct osmo_ss7_as *as) |
int | xua_as_transmit_msg_broadcast (struct osmo_ss7_as *as, struct msgb *msg) |
int | xua_as_transmit_msg (struct osmo_ss7_as *as, struct msgb *msg) |
static bool | is_single_ipa_asp (struct osmo_ss7_as *as) |
static void | ipa_add_route (struct osmo_fsm_inst *fi) |
static void | ipa_del_route (struct osmo_fsm_inst *fi) |
static bool | check_any_other_asp_not_down (struct osmo_ss7_as *as, struct osmo_ss7_asp *asp_cmp) |
static bool | check_any_other_asp_in_active (struct osmo_ss7_as *as, struct osmo_ss7_asp *asp_cmp) |
static void | notify_any_other_active_asp_as_inactive (struct osmo_ss7_as *as, struct osmo_ss7_asp *asp_cmp) |
static void | t_r_callback (void *_fi) |
static void | xua_as_fsm_down (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | xua_as_fsm_onenter (struct osmo_fsm_inst *fi, uint32_t old_state) |
static void | xua_as_fsm_inactive (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | xua_as_fsm_active (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | xua_as_fsm_pending (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | xua_as_fsm_cleanup (struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) |
struct osmo_fsm_inst * | xua_as_fsm_start (struct osmo_ss7_as *as, int log_level) |
Start an AS FSM for a given Application Server. More... | |
Variables | |
static const struct value_string | xua_as_event_names [] |
static const struct osmo_fsm_state | xua_as_fsm_states [] |
struct osmo_fsm | xua_as_fsm |
#define MSEC_TO_S_US | ( | x | ) | (x/1000), ((x%1000)*10) |
#define S | ( | x | ) | (1 << (x)) |
|
static |
References osmo_xlm_prim_notify::asp_id, osmo_ss7_asp::asp_id, osmo_ss7_asp::asp_id_present, osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, encode_notify(), osmo_ss7_asp::fi, NOTIFY_PAR_P_ASP_ID, OSMO_SS7_ASP_PROT_IPA, OSMO_SS7_ASP_ROLE_ASP, osmo_ss7_asp_send(), osmo_xlm_prim_notify::presence, osmo_ss7_as::proto, osmo_ss7_asp::role, and XUA_ASP_S_DOWN.
|
static |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::fi, and XUA_ASP_S_ACTIVE.
Referenced by xua_as_fsm_active().
|
static |
References xua_as_fsm_priv::as, osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::fi, and XUA_ASP_S_DOWN.
Referenced by xua_as_fsm_inactive(), and xua_as_fsm_pending().
|
static |
References m3ua_encode_notify(), M3UA_VERSION, xua_msg_free(), and xua_to_msg().
Referenced by as_notify_all_asp(), and notify_any_other_active_asp_as_inactive().
|
static |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, and osmo_ss7_asp::role.
|
static |
|
static |
|
static |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, OSMO_SS7_ASP_PROT_IPA, and osmo_ss7_asp::proto.
|
static |
References osmo_xlm_prim_notify::asp_id, osmo_ss7_asp::asp_id, osmo_ss7_asp::asp_id_present, osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, encode_notify(), osmo_ss7_asp::fi, M3UA_NOTIFY_I_OT_ALT_ASP_ACT, M3UA_NOTIFY_T_OTHER, osmo_ss7_asp_active(), OSMO_SS7_ASP_PROT_IPA, osmo_ss7_asp_send(), osmo_ss7_asp::proto, osmo_xlm_prim_notify::status_type, and XUA_ASP_S_INACTIVE.
Referenced by xua_as_fsm_active().
|
static |
References XUA_AS_E_RECOVERY_EXPD.
Referenced by xua_as_fsm_start().
|
static |
References xua_as_fsm_priv::as, osmo_ss7_as::cfg, check_any_other_asp_in_active(), data, osmo_ss7_as::mode, MSEC_TO_S_US, notify_any_other_active_asp_as_inactive(), OSMO_SS7_AS_TMOD_OVERRIDE, xua_as_fsm_priv::recovery, osmo_ss7_as::recovery_timeout_msec, xua_as_fsm_priv::t_r, XUA_AS_E_TRANSFER_REQ, XUA_AS_S_PENDING, xua_as_transmit_msg(), XUA_ASPAS_ASP_ACTIVE_IND, XUA_ASPAS_ASP_DOWN_IND, and XUA_ASPAS_ASP_INACTIVE_IND.
|
static |
References xua_as_fsm_priv::recovery, and xua_as_fsm_priv::t_r.
|
static |
References XUA_AS_S_INACTIVE, XUA_ASPAS_ASP_DOWN_IND, and XUA_ASPAS_ASP_INACTIVE_IND.
|
static |
|
static |
References xua_as_fsm_priv::as, M3UA_NOTIFY_T_STATCHG, and osmo_xlm_prim_notify::status_type.
|
static |
References xua_as_fsm_priv::as, check_any_other_asp_not_down(), data, xua_as_fsm_priv::queued_msgs, xua_as_fsm_priv::recovery, xua_as_fsm_priv::t_r, XUA_AS_E_RECOVERY_EXPD, XUA_AS_E_TRANSFER_REQ, XUA_AS_S_ACTIVE, XUA_AS_S_DOWN, XUA_AS_S_INACTIVE, xua_as_transmit_msg(), XUA_ASPAS_ASP_ACTIVE_IND, XUA_ASPAS_ASP_DOWN_IND, and XUA_ASPAS_ASP_INACTIVE_IND.
struct osmo_fsm_inst * xua_as_fsm_start | ( | struct osmo_ss7_as * | as, |
int | log_level | ||
) |
Start an AS FSM for a given Application Server.
[in] | as | Application Server for which to start the AS FSM |
[in] | log_level | Logging level for logging of this FSM |
References xua_as_fsm_priv::as, osmo_ss7_as::cfg, osmo_ss7_as::name, xua_as_fsm_priv::queued_msgs, xua_as_fsm_priv::recovery, xua_as_fsm_priv::t_r, t_r_callback(), and xua_as_fsm.
Referenced by ss7_as_alloc().
int xua_as_transmit_msg | ( | struct osmo_ss7_as * | as, |
struct msgb * | msg | ||
) |
References _NUM_OSMO_SS7_ASP_TMOD, osmo_ss7_as::cfg, osmo_ss7_as::fi, osmo_ss7_as::mode, osmo_ss7_as_select_asp(), OSMO_SS7_AS_TMOD_BCAST, OSMO_SS7_AS_TMOD_LOADSHARE, OSMO_SS7_AS_TMOD_OVERRIDE, OSMO_SS7_AS_TMOD_ROUNDROBIN, osmo_ss7_asp_send(), and xua_as_transmit_msg_broadcast().
Referenced by ipa_tx_xua_as(), xua_as_fsm_active(), and xua_as_fsm_pending().
int xua_as_transmit_msg_broadcast | ( | struct osmo_ss7_as * | as, |
struct msgb * | msg | ||
) |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp_active(), and osmo_ss7_asp_send().
Referenced by xua_as_transmit_msg().
|
static |
struct osmo_fsm xua_as_fsm |
Referenced by osmo_ss7_init(), and xua_as_fsm_start().
|
static |