libosmo-sigtran 2.2.1.56-7580 Osmocom SIGTRAN library

Data Structures | Macros | Functions
sccp_connection.h File Reference
`#include <inttypes.h>`
`#include <osmocom/core/fsm.h>`
`#include <osmocom/sigtran/sccp_sap.h>`

Go to the source code of this file.

## Data Structures
struct | sccp_connection

## Macros
#define | _LOGPSCC(scc, subsys, level, fmt, args ...)
#define | LOGPSCC(scc, level, fmt, args ...) _LOGPSCC(scc, DLSCCP, level, fmt, ## args)

## Functions
struct sccp_connection * | sccp_conn_alloc (struct osmo_sccp_user *user, uint32_t conn_id)
void | sccp_conn_free (struct sccp_connection *conn)
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)
int | sccp_conn_xua_gen_encode_and_send (struct sccp_connection *conn, uint32_t event, const struct osmo_scu_prim *prim, int msg_type)
int | sccp_conn_xua_gen_relre_and_send (struct sccp_connection *conn, uint32_t cause, struct osmo_scu_prim *prim)
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)

## Macro Definition Documentation

## ◆ _LOGPSCC

#define _LOGPSCC | ( |  | scc,
|  |  | subsys,
|  |  | level,
|  |  | fmt,
|  |  | args ...
| ) |  |

Value:
_LOGPSCU((scc)->user, subsys, level, "CONN(%d,remPC=%u=%s) " fmt, \
(conn)->conn_id, (conn)->remote_pc, osmo_ss7_pointcode_print((conn)->inst->ss7, (conn)->remote_pc), ## args)
osmo_ss7_pointcode_print
const char * osmo_ss7_pointcode_print(const struct osmo_ss7_instance *inst, uint32_t pc)
Definition: ss7_instance.c:638
_LOGPSCU
#define _LOGPSCU(scu, subsys, level, fmt, args ...)
Definition: sccp_user.h:41

## ◆ LOGPSCC

#define LOGPSCC | ( |  | scc,
|  |  | level,
|  |  | fmt,
|  |  | args ...
| ) |  | _LOGPSCC(scc, DLSCCP, level, fmt, ## args)

## Function Documentation

## ◆ 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().

## ◆ sccp_conn_free()

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

## ◆ sccp_conn_opt_data_send_cache()

void sccp_conn_opt_data_send_cache | ( | struct sccp_connection * | conn,
|  | int | exp_type,
|  | uint8_t | msg_class
| ) |  |

References xua_dialect::class, sccp_connection::conn_id, LOGPSCC, msg_class, sccp_connection::opt_data_cache, osmo_sccp_tx_data(), sccp_conn_opt_data_clear_cache(), sccp_connection::user, xua_class_msg_name(), and xua_dialect_sua.

Referenced by scoc_fsm_conn_pend_in(), and scoc_fsm_conn_pend_out().

## ◆ sccp_conn_restart_rx_inact_timer()

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

## ◆ sccp_conn_restart_tx_inact_timer()

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

## ◆ sccp_conn_scu_gen_encode_and_send()

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

## ◆ sccp_conn_start_connect_timer()

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

## ◆ sccp_conn_start_inact_timers()

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

## ◆ sccp_conn_start_int_timer()

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

## ◆ sccp_conn_start_rel_timer()

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

## ◆ sccp_conn_start_rep_rel_timer()

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

## ◆ sccp_conn_stop_connect_timer()

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

## ◆ sccp_conn_stop_inact_timers()

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

## ◆ sccp_conn_stop_release_timers()

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

## ◆ sccp_conn_xua_gen_encode_and_send()

int sccp_conn_xua_gen_encode_and_send | ( | struct sccp_connection * | conn,
|  | uint32_t | event,
|  | const struct osmo_scu_prim * | prim,
|  | int | msg_type
| ) |  |

References sccp_connection::inst, msg_type, sccp_scrc_rx_scoc_conn_msg(), xua_gen_msg_co(), and xua_msg_free().

Referenced by scoc_fsm_active(), scoc_fsm_conn_pend_in(), scoc_fsm_conn_pend_out(), scoc_fsm_idle(), and scoc_fsm_wait_conn_conf().

## ◆ sccp_conn_xua_gen_relre_and_send()

int sccp_conn_xua_gen_relre_and_send | ( | struct sccp_connection * | conn,
|  | uint32_t | cause,
|  | struct osmo_scu_prim * | prim
| ) |  |

References osmo_mtp_transfer_param::dpc, sccp_connection::inst, xua_msg::mtp, sccp_connection::remote_pc, sccp_scrc_rx_scoc_conn_msg(), xua_gen_relre(), and xua_msg_free().

Referenced by scoc_fsm_active(), scoc_fsm_disconn_pend(), and scoc_fsm_wait_conn_conf().