libosmo-sigtran 2.0.0.50-b59d
Osmocom SIGTRAN library
|
#include <string.h>
#include <arpa/inet.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/linuxlist.h>
#include "xua_msg.h"
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/protocol/m3ua.h>
#include "ss7_as.h"
#include "ss7_asp.h"
#include "ss7_internal.h"
#include "ss7_route.h"
#include "ss7_route_table.h"
#include "xua_internal.h"
#include "xua_as_fsm.h"
#include "xua_asp_fsm.h"
Macros | |
#define | MAX_NEW_AS 16 |
Functions | |
static void | msgb_push_m3ua_hdr (struct msgb *msg, uint8_t msg_class, uint8_t msg_type) |
static int | msgb_append_reg_res (struct msgb *msg, uint32_t local_rk_id, uint32_t status, uint32_t rctx) |
static int | msgb_append_dereg_res (struct msgb *msg, uint32_t status, uint32_t rctx) |
static void | xua_rkm_send_reg_req (struct osmo_ss7_asp *asp, const struct osmo_ss7_routing_key *rkey, enum osmo_ss7_as_traffic_mode traf_mode) |
static void | xua_rkm_send_dereg_req (struct osmo_ss7_asp *asp, uint32_t route_ctx) |
static int | handle_rkey_reg (struct osmo_ss7_asp *asp, struct xua_msg *inner, struct msgb *resp, struct osmo_ss7_as **newly_assigned_as, unsigned int max_nas_idx, unsigned int *nas_idx) |
static int | m3ua_rx_rkm_reg_req (struct osmo_ss7_asp *asp, struct xua_msg *xua) |
static int | handle_rkey_dereg (struct osmo_ss7_asp *asp, uint32_t rctx, struct msgb *resp) |
static int | m3ua_rx_rkm_dereg_req (struct osmo_ss7_asp *asp, struct xua_msg *xua) |
static int | handle_rkey_reg_resp (struct osmo_ss7_asp *asp, struct xua_msg *inner) |
static int | m3ua_rx_rkm_reg_rsp (struct osmo_ss7_asp *asp, struct xua_msg *xua) |
static int | handle_rkey_dereg_resp (struct osmo_ss7_asp *asp, struct xua_msg *inner) |
static int | m3ua_rx_rkm_dereg_rsp (struct osmo_ss7_asp *asp, struct xua_msg *xua) |
int | m3ua_rx_rkm (struct osmo_ss7_asp *asp, struct xua_msg *xua) |
int | osmo_xlm_sap_down (struct osmo_ss7_asp *asp, struct osmo_prim_hdr *oph) |
void | xua_rkm_cleanup_dyn_as_for_asp (struct osmo_ss7_asp *asp) |
Variables | |
const struct value_string | m3ua_rkm_reg_status_vals [] |
const struct value_string | m3ua_rkm_dereg_status_vals [] |
#define MAX_NEW_AS 16 |
|
static |
References osmo_ss7_route::as, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_as::fi, osmo_ss7_asp::fi, osmo_ss7_asp::inst, LOGPASP, M3UA_RKM_DEREG_ERR_ASP_ACTIVE, M3UA_RKM_DEREG_ERR_INVAL_RCTX, M3UA_RKM_DEREG_ERR_NOT_REGD, M3UA_RKM_DEREG_ERR_UNKNOWN, M3UA_RKM_DEREG_SUCCESS, msgb_append_dereg_res(), osmo_ss7_asp::name, osmo_ss7_as_del_asp(), osmo_ss7_as_destroy(), osmo_ss7_as_find_by_rctx(), osmo_ss7_as_has_asp(), osmo_ss7_pointcode_print(), osmo_ss7_routing_key::pc, osmo_ss7_as::rkm_dyn_allocated, osmo_ss7_as::routing_key, osmo_ss7_instance::rtable_system, ss7_route_destroy(), ss7_route_table_find_route_by_dpc(), XUA_ASP_S_ACTIVE, and XUA_ASPAS_ASP_DOWN_IND.
Referenced by m3ua_rx_rkm_dereg_req().
|
static |
References osmo_ss7_routing_key::context, osmo_xlm_prim_rk_reg::key, LOGPASP, M3UA_IEI_DEREG_STATUS, M3UA_IEI_ROUTE_CTX, m3ua_rkm_dereg_status_vals, OSMO_XLM_PRIM_M_RK_DEREG, osmo_xlm_prim::rk_dereg, osmo_xlm_prim::rk_reg, osmo_xlm_prim_rk_dereg::route_ctx, osmo_xlm_prim_rk_dereg::status, osmo_xlm_prim::u, xua_asp_send_xlm_prim(), xua_msg_find_tag(), xua_msg_get_u32(), and xua_xlm_prim_alloc().
Referenced by m3ua_rx_rkm_dereg_rsp().
|
static |
References osmo_ss7_route::as, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_instance::cfg, osmo_ss7_routing_key::context, osmo_ss7_as::description, dpc, osmo_ss7_as::inst, osmo_ss7_asp::inst, LOGPAS, LOGPASP, M3UA_IEI_DEST_PC, M3UA_IEI_LOC_RKEY_ID, M3UA_IEI_NET_APPEAR, M3UA_IEI_ORIG_PC, M3UA_IEI_ROUTE_CTX, M3UA_IEI_SVC_IND, M3UA_IEI_TRAF_MODE_TYP, M3UA_RKM_REG_ERR_CANT_SUPP_UNQ_RT, M3UA_RKM_REG_ERR_INSUFF_RESRC, M3UA_RKM_REG_ERR_INVAL_NET_APPEAR, M3UA_RKM_REG_ERR_INVAL_RKEY, M3UA_RKM_REG_ERR_PERM_DENIED, M3UA_RKM_REG_ERR_UNSUPP_RK_PARAM, M3UA_RKM_REG_ERR_UNSUPP_TRAF_MODE, M3UA_RKM_REG_SUCCESS, M3UA_TMOD_BCAST, M3UA_TMOD_LOADSHARE, M3UA_TMOD_OVERRIDE, osmo_ss7_as::mode, osmo_ss7_as::mode_set_by_peer, osmo_ss7_as::mode_set_by_vty, msgb_append_reg_res(), osmo_ss7_asp::name, osmo_ss7_as_add_asp(), osmo_ss7_as_destroy(), osmo_ss7_as_find_by_rctx(), osmo_ss7_as_find_or_create(), osmo_ss7_as_tmode_compatible_xua(), osmo_ss7_as_traffic_mode_name(), OSMO_SS7_ASP_PROT_M3UA, osmo_ss7_find_free_rctx(), osmo_ss7_pointcode_print(), osmo_ss7_tmode_from_xua(), osmo_ss7_routing_key::pc, osmo_ss7_instance::permit_dyn_rkm_alloc, osmo_ss7_as::rkm_dyn_allocated, osmo_ss7_as::routing_key, osmo_ss7_instance::rtable_system, ss7_route_create(), ss7_route_destroy(), xua_msg_find_tag(), and xua_msg_get_u32().
Referenced by m3ua_rx_rkm_reg_req().
|
static |
References osmo_ss7_routing_key::context, osmo_xlm_prim_rk_reg::key, osmo_ss7_routing_key::l_rk_id, LOGPASP, M3UA_IEI_LOC_RKEY_ID, M3UA_IEI_REG_STATUS, M3UA_IEI_ROUTE_CTX, m3ua_rkm_reg_status_vals, OSMO_XLM_PRIM_M_RK_REG, osmo_xlm_prim::rk_reg, osmo_xlm_prim_rk_reg::status, osmo_xlm_prim::u, xua_asp_send_xlm_prim(), xua_msg_find_tag(), xua_msg_get_u32(), and xua_xlm_prim_alloc().
Referenced by m3ua_rx_rkm_reg_rsp().
int m3ua_rx_rkm | ( | struct osmo_ss7_asp * | asp, |
struct xua_msg * | xua | ||
) |
|
static |
References xua_msg_part::dat, handle_rkey_dereg(), xua_msg_part::len, M3UA_IEI_ROUTE_CTX, m3ua_msgb_alloc(), M3UA_MSGC_RKM, M3UA_RKM_DEREG_RSP, msgb_push_m3ua_hdr(), osmo_ss7_asp_send(), and xua_msg_find_tag().
Referenced by m3ua_rx_rkm().
|
static |
References handle_rkey_dereg_resp(), xua_msg::headers, xua_msg_part::len, M3UA_IEI_DEREG_RESULT, xua_msg_part::tag, xua_from_nested(), and xua_msg_free().
Referenced by m3ua_rx_rkm().
|
static |
References osmo_ss7_as::fi, handle_rkey_reg(), xua_msg::headers, LOGPASP, M3UA_IEI_ROUT_KEY, m3ua_msgb_alloc(), M3UA_MSGC_RKM, M3UA_RKM_REG_RSP, MAX_NEW_AS, msgb_push_m3ua_hdr(), osmo_ss7_asp_send(), xua_msg_part::tag, XUA_ASPAS_ASP_INACTIVE_IND, xua_from_nested(), and xua_msg_free().
Referenced by m3ua_rx_rkm().
|
static |
References handle_rkey_reg_resp(), xua_msg::headers, xua_msg_part::len, M3UA_IEI_REG_RESULT, xua_msg_part::tag, xua_from_nested(), and xua_msg_free().
Referenced by m3ua_rx_rkm().
|
static |
References M3UA_IEI_DEREG_RESULT, M3UA_IEI_DEREG_STATUS, M3UA_IEI_ROUTE_CTX, and msgb_t16l16vp_put_u32().
Referenced by handle_rkey_dereg().
|
static |
References M3UA_IEI_LOC_RKEY_ID, M3UA_IEI_REG_RESULT, M3UA_IEI_REG_STATUS, M3UA_IEI_ROUTE_CTX, and msgb_t16l16vp_put_u32().
Referenced by handle_rkey_reg().
|
static |
int osmo_xlm_sap_down | ( | struct osmo_ss7_asp * | asp, |
struct osmo_prim_hdr * | oph | ||
) |
References osmo_xlm_prim_rk_reg::key, LOGPASP, osmo_xlm_prim::oph, OSMO_XLM_PRIM_M_RK_DEREG, OSMO_XLM_PRIM_M_RK_REG, osmo_xlm_prim_name(), osmo_xlm_prim::rk_dereg, osmo_xlm_prim::rk_reg, osmo_xlm_prim_rk_dereg::route_ctx, osmo_xlm_prim_rk_reg::traf_mode, osmo_xlm_prim::u, xua_rkm_send_dereg_req(), and xua_rkm_send_reg_req().
Referenced by lm_timer_cb().
void xua_rkm_cleanup_dyn_as_for_asp | ( | struct osmo_ss7_asp * | asp | ) |
|
static |
References M3UA_IEI_ROUTE_CTX, m3ua_msgb_alloc(), M3UA_MSGC_RKM, M3UA_RKM_DEREG_REQ, msgb_push_m3ua_hdr(), msgb_t16l16vp_put_u32(), and osmo_ss7_asp_send().
Referenced by osmo_xlm_sap_down().
|
static |
References osmo_ss7_routing_key::context, osmo_ss7_routing_key::l_rk_id, M3UA_IEI_DEST_PC, M3UA_IEI_LOC_RKEY_ID, M3UA_IEI_ROUT_KEY, M3UA_IEI_ROUTE_CTX, M3UA_IEI_TRAF_MODE_TYP, m3ua_msgb_alloc(), M3UA_MSGC_RKM, M3UA_RKM_REG_REQ, msgb_push_m3ua_hdr(), msgb_t16l16vp_put_u32(), osmo_ss7_asp_send(), osmo_ss7_tmode_to_xua(), and osmo_ss7_routing_key::pc.
Referenced by osmo_xlm_sap_down().
const struct value_string m3ua_rkm_dereg_status_vals[] |
Referenced by handle_rkey_dereg_resp().
const struct value_string m3ua_rkm_reg_status_vals[] |
Referenced by handle_rkey_reg_resp().