libosmo-sigtran 2.1.0.149-fef8
Osmocom SIGTRAN library
|
#include <errno.h>
#include <stdbool.h>
#include <string.h>
#include <limits.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/mtp_sap.h>
#include <osmocom/sigtran/protocol/mtp.h>
#include <osmocom/sigtran/protocol/sua.h>
#include <osmocom/sigtran/sccp_helpers.h>
#include <osmocom/sccp/sccp_types.h>
#include "sccp_instance.h"
#include "sccp_internal.h"
#include "sccp_connection.h"
#include "sccp_scoc_fsm.h"
#include "sccp_user.h"
#include "ss7_instance.h"
#include "xua_msg.h"
#include "xua_internal.h"
Macros | |
#define | INIT_TIMER(x, fn, priv) do { (x)->cb = fn; (x)->data = priv; } while (0) |
#define | SCU_MSGB_SIZE 1024 |
#define INIT_TIMER | ( | x, | |
fn, | |||
priv | |||
) | do { (x)->cb = fn; (x)->data = priv; } while (0) |
#define SCU_MSGB_SIZE 1024 |
|
static |
References sccp_connection::conn_id, osmo_sccp_instance::connections, sccp_connection::inst, LOGPSCI, sccp_connection::node, and NULL.
Referenced by sccp_conn_alloc().
|
static |
References data, sccp_connection::fi, NULL, and SCOC_E_CONN_TMR_EXP.
Referenced by sccp_conn_alloc().
|
static |
References data, sccp_connection::fi, NULL, and SCOC_E_T_INT_EXP.
Referenced by sccp_conn_alloc().
|
static |
References data, sccp_connection::fi, NULL, and SCOC_E_T_REL_EXP.
Referenced by sccp_conn_alloc().
|
static |
References data, sccp_connection::fi, NULL, and SCOC_E_T_REP_REL_EXP.
Referenced by sccp_conn_alloc().
|
static |
References data, sccp_connection::fi, NULL, and SCOC_E_T_IAR_EXP.
Referenced by sccp_conn_alloc().
struct sccp_connection * sccp_conn_alloc | ( | struct osmo_sccp_user * | user, |
uint32_t | conn_id | ||
) |
References conn_add_node(), sccp_connection::conn_id, conn_tmr_cb(), osmo_sccp_instance::connections, sccp_connection::fi, INIT_TIMER, sccp_connection::inst, osmo_sccp_user::inst, int_tmr_cb(), sccp_connection::node, NULL, rel_tmr_cb(), rep_rel_tmr_cb(), rx_inact_tmr_cb(), sccp_conn_gen_tx_co_mtp_sls(), 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, sccp_connection::tx_co_mtp_sls, tx_inact_tmr_cb(), and sccp_connection::user.
Referenced by conn_create(), and osmo_sccp_user_sap_down_nofree().
void sccp_conn_free | ( | struct sccp_connection * | conn | ) |
References osmo_sccp_instance::connections, sccp_connection::fi, sccp_connection::inst, sccp_connection::node, NULL, sccp_conn_opt_data_clear_cache(), sccp_conn_stop_connect_timer(), sccp_conn_stop_inact_timers(), and sccp_conn_stop_release_timers().
Referenced by sccp_user_flush_connections(), and scoc_fsm_idle_onenter().
|
static |
References sccp_connection::conn_id, and sls.
Referenced by sccp_conn_alloc().
|
static |
References NULL, and sccp_connection::opt_data_cache.
Referenced by sccp_conn_free(), and sccp_conn_opt_data_send_cache().
void sccp_conn_opt_data_send_cache | ( | struct sccp_connection * | conn, |
int | exp_type, | ||
uint8_t | msg_class | ||
) |
void sccp_conn_restart_rx_inact_timer | ( | struct sccp_connection * | conn | ) |
References OSMO_SCCP_TIMER_IAR, sccp_timer_schedule(), and sccp_connection::t_iar.
Referenced by sccp_conn_start_inact_timers(), and scoc_fsm_active().
void sccp_conn_restart_tx_inact_timer | ( | struct sccp_connection * | conn | ) |
References OSMO_SCCP_TIMER_IAS, sccp_timer_schedule(), and sccp_connection::t_ias.
Referenced by sccp_conn_start_inact_timers(), and scoc_fsm_active().
void sccp_conn_scu_gen_encode_and_send | ( | struct sccp_connection * | conn, |
uint32_t | event, | ||
struct xua_msg * | xua, | ||
unsigned int | primitive, | ||
enum osmo_prim_operation | operation | ||
) |
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, LOGPSCC, 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_dialect_sua, xua_hdr_dump(), xua_msg_find_tag(), and xua_msg_get_u32().
Referenced by scoc_fsm_active(), scoc_fsm_conn_pend_out(), and scoc_fsm_idle().
void sccp_conn_start_connect_timer | ( | struct sccp_connection * | conn | ) |
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().
void sccp_conn_start_inact_timers | ( | struct sccp_connection * | conn | ) |
References sccp_conn_restart_rx_inact_timer(), and sccp_conn_restart_tx_inact_timer().
Referenced by scoc_fsm_conn_pend_in(), and scoc_fsm_conn_pend_out().
void sccp_conn_start_int_timer | ( | struct sccp_connection * | conn | ) |
References OSMO_SCCP_TIMER_INT, sccp_timer_schedule(), and sccp_connection::t_int.
Referenced by scoc_fsm_disconn_pend().
void sccp_conn_start_rel_timer | ( | struct sccp_connection * | conn | ) |
References OSMO_SCCP_TIMER_REL, sccp_timer_schedule(), and sccp_connection::t_rel.
Referenced by scoc_fsm_active(), and scoc_fsm_wait_conn_conf().
void sccp_conn_start_rep_rel_timer | ( | struct sccp_connection * | conn | ) |
References OSMO_SCCP_TIMER_REPEAT_REL, sccp_timer_schedule(), and sccp_connection::t_rep_rel.
Referenced by scoc_fsm_disconn_pend().
void sccp_conn_stop_connect_timer | ( | struct sccp_connection * | conn | ) |
References sccp_connection::t_conn.
Referenced by sccp_conn_free(), scoc_fsm_conn_pend_out(), and scoc_fsm_wait_conn_conf().
void sccp_conn_stop_inact_timers | ( | struct sccp_connection * | conn | ) |
References sccp_connection::t_iar, and sccp_connection::t_ias.
Referenced by sccp_conn_free(), and scoc_fsm_active().
void sccp_conn_stop_release_timers | ( | struct sccp_connection * | conn | ) |
References sccp_connection::t_int, sccp_connection::t_rel, and sccp_connection::t_rep_rel.
Referenced by sccp_conn_free(), and scoc_fsm_disconn_pend().
|
static |
|
static |
References SCU_MSGB_SIZE.
Referenced by scu_prim_alloc().
|
static |
References osmo_scu_prim::oph, SCCP_SAP_USER, and scu_msgb_alloc().
Referenced by sccp_conn_scu_gen_encode_and_send().
|
static |
References data, sccp_connection::fi, NULL, and SCOC_E_T_IAS_EXP.
Referenced by sccp_conn_alloc().