libosmo-sigtran 2.1.0.149-fef8
Osmocom SIGTRAN library
sccp_connection.c File Reference
#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
 

Functions

static void sccp_conn_opt_data_clear_cache (struct sccp_connection *conn)
 
static void tx_inact_tmr_cb (void *data)
 
static void rx_inact_tmr_cb (void *data)
 
static void rel_tmr_cb (void *data)
 
static void int_tmr_cb (void *data)
 
static void rep_rel_tmr_cb (void *data)
 
static void conn_tmr_cb (void *data)
 
static uint8_t sccp_conn_gen_tx_co_mtp_sls (const struct sccp_connection *conn)
 
static int conn_add_node (struct osmo_sccp_instance *inst, struct sccp_connection *conn)
 
struct sccp_connectionsccp_conn_alloc (struct osmo_sccp_user *user, uint32_t conn_id)
 
void sccp_conn_free (struct sccp_connection *conn)
 
static struct msgb * scu_msgb_alloc (void)
 
static struct osmo_scu_primscu_prim_alloc (unsigned int primitive, enum osmo_prim_operation operation)
 
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)
 
static void sccp_timer_schedule (const struct sccp_connection *conn, struct osmo_timer_list *timer, enum osmo_sccp_timer timer_name)
 
void sccp_conn_restart_tx_inact_timer (struct sccp_connection *conn)
 
void sccp_conn_restart_rx_inact_timer (struct sccp_connection *conn)
 
void sccp_conn_start_inact_timers (struct sccp_connection *conn)
 
void sccp_conn_stop_inact_timers (struct sccp_connection *conn)
 
void sccp_conn_start_rel_timer (struct sccp_connection *conn)
 
void sccp_conn_start_rep_rel_timer (struct sccp_connection *conn)
 
void sccp_conn_start_int_timer (struct sccp_connection *conn)
 
void sccp_conn_stop_release_timers (struct sccp_connection *conn)
 
void sccp_conn_start_connect_timer (struct sccp_connection *conn)
 
void sccp_conn_stop_connect_timer (struct sccp_connection *conn)
 
void sccp_conn_opt_data_send_cache (struct sccp_connection *conn, int exp_type, uint8_t msg_class)
 

Macro Definition Documentation

◆ INIT_TIMER

#define INIT_TIMER (   x,
  fn,
  priv 
)    do { (x)->cb = fn; (x)->data = priv; } while (0)

◆ SCU_MSGB_SIZE

#define SCU_MSGB_SIZE   1024

Function Documentation

◆ conn_add_node()

static int conn_add_node ( struct osmo_sccp_instance inst,
struct sccp_connection conn 
)
static

◆ conn_tmr_cb()

static void conn_tmr_cb ( void *  data)
static

◆ int_tmr_cb()

static void int_tmr_cb ( void *  data)
static

References data, sccp_connection::fi, NULL, and SCOC_E_T_INT_EXP.

Referenced by sccp_conn_alloc().

◆ rel_tmr_cb()

static void rel_tmr_cb ( void *  data)
static

References data, sccp_connection::fi, NULL, and SCOC_E_T_REL_EXP.

Referenced by sccp_conn_alloc().

◆ rep_rel_tmr_cb()

static void rep_rel_tmr_cb ( void *  data)
static

◆ rx_inact_tmr_cb()

static void rx_inact_tmr_cb ( void *  data)
static

References data, sccp_connection::fi, NULL, and SCOC_E_T_IAR_EXP.

Referenced by sccp_conn_alloc().

◆ sccp_conn_alloc()

◆ sccp_conn_free()

◆ sccp_conn_gen_tx_co_mtp_sls()

static uint8_t sccp_conn_gen_tx_co_mtp_sls ( const struct sccp_connection conn)
static

References sccp_connection::conn_id, and sls.

Referenced by sccp_conn_alloc().

◆ sccp_conn_opt_data_clear_cache()

static void sccp_conn_opt_data_clear_cache ( struct sccp_connection conn)
static

◆ sccp_conn_opt_data_send_cache()

◆ sccp_conn_restart_rx_inact_timer()

void sccp_conn_restart_rx_inact_timer ( struct sccp_connection conn)

◆ sccp_conn_restart_tx_inact_timer()

void sccp_conn_restart_tx_inact_timer ( struct sccp_connection conn)

◆ sccp_conn_scu_gen_encode_and_send()

◆ sccp_conn_start_connect_timer()

void sccp_conn_start_connect_timer ( struct sccp_connection conn)

◆ sccp_conn_start_inact_timers()

void sccp_conn_start_inact_timers ( struct sccp_connection conn)

◆ sccp_conn_start_int_timer()

void sccp_conn_start_int_timer ( struct sccp_connection conn)

◆ sccp_conn_start_rel_timer()

void sccp_conn_start_rel_timer ( struct sccp_connection conn)

◆ sccp_conn_start_rep_rel_timer()

void sccp_conn_start_rep_rel_timer ( struct sccp_connection conn)

◆ sccp_conn_stop_connect_timer()

void sccp_conn_stop_connect_timer ( struct sccp_connection conn)

◆ sccp_conn_stop_inact_timers()

void sccp_conn_stop_inact_timers ( struct sccp_connection conn)

◆ sccp_conn_stop_release_timers()

void sccp_conn_stop_release_timers ( struct sccp_connection conn)

◆ sccp_timer_schedule()

◆ scu_msgb_alloc()

static struct msgb * scu_msgb_alloc ( void  )
static

References SCU_MSGB_SIZE.

Referenced by scu_prim_alloc().

◆ scu_prim_alloc()

static struct osmo_scu_prim * scu_prim_alloc ( unsigned int  primitive,
enum osmo_prim_operation  operation 
)
static

◆ tx_inact_tmr_cb()

static void tx_inact_tmr_cb ( void *  data)
static

References data, sccp_connection::fi, NULL, and SCOC_E_T_IAS_EXP.

Referenced by sccp_conn_alloc().