libosmo-sigtran 2.1.0.134-a6b3
Osmocom SIGTRAN library
|
#include <stdint.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/fsm.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/tdef.h>
#include <osmocom/netif/stream.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include "ss7_asp_peer.h"
#include "ss7_internal.h"
Go to the source code of this file.
Data Structures | |
struct | osmo_ss7_asp |
Macros | |
#define | SS7_ASP_XUA_DEFAULT_T_ACK_SEC 2 |
#define | SS7_ASP_XUA_DEFAULT_T_BEAT_SEC 30 |
#define | LOGPASP(asp, subsys, level, fmt, args ...) _LOGSS7((asp)->inst, subsys, level, "ASP(%s) " fmt, (asp)->cfg.name, ## args) |
Enumerations | |
enum | ss7_asp_xua_timer { SS7_ASP_XUA_T_ACK = 1 , SS7_ASP_XUA_T_BEAT , SS7_ASP_XUA_TIMERS_LEN } |
enum | ss7_asp_ctr { SS7_ASP_CTR_PKT_RX_TOTAL , SS7_ASP_CTR_PKT_RX_UNKNOWN , SS7_ASP_CTR_PKT_TX_TOTAL } |
Functions | |
struct osmo_ss7_asp * | ss7_asp_alloc (struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, int trans_proto, enum osmo_ss7_asp_protocol proto) |
bool | ss7_asp_set_default_peer_hosts (struct osmo_ss7_asp *asp) |
bool | ss7_asp_is_started (const struct osmo_ss7_asp *asp) |
int | ss7_asp_get_fd (const struct osmo_ss7_asp *asp) |
Get the fd of a given ASP. More... | |
int | ss7_asp_disconnect_stream (struct osmo_ss7_asp *asp) |
int | ss7_asp_apply_tcp_pars (const struct osmo_ss7_asp *asp) |
int | ss7_asp_apply_peer_primary_address (const struct osmo_ss7_asp *asp) |
int | ss7_asp_apply_primary_address (const struct osmo_ss7_asp *asp) |
int | ss7_asp_apply_new_local_address (const struct osmo_ss7_asp *asp, unsigned int loc_idx) |
int | ss7_asp_apply_drop_local_address (const struct osmo_ss7_asp *asp, unsigned int loc_idx) |
void | ss7_asp_restart_after_reconfigure (struct osmo_ss7_asp *asp) |
void | osmo_ss7_asp_remove_default_lm (struct osmo_ss7_asp *asp) |
unsigned int | ss7_asp_get_all_rctx (const struct osmo_ss7_asp *asp, uint32_t *rctx, unsigned int rctx_size, const struct osmo_ss7_as *excl_as) |
unsigned int | ss7_asp_get_all_rctx_be (const struct osmo_ss7_asp *asp, uint32_t *rctx, unsigned int rctx_size, const struct osmo_ss7_as *excl_as) |
Variables | |
const struct value_string | ss7_asp_xua_timer_names [] |
const struct osmo_tdef | ss7_asp_xua_timer_defaults [SS7_ASP_XUA_TIMERS_LEN] |
#define LOGPASP | ( | asp, | |
subsys, | |||
level, | |||
fmt, | |||
args ... | |||
) | _LOGSS7((asp)->inst, subsys, level, "ASP(%s) " fmt, (asp)->cfg.name, ## args) |
#define SS7_ASP_XUA_DEFAULT_T_ACK_SEC 2 |
#define SS7_ASP_XUA_DEFAULT_T_BEAT_SEC 30 |
enum ss7_asp_ctr |
enum ss7_asp_xua_timer |
void osmo_ss7_asp_remove_default_lm | ( | struct osmo_ss7_asp * | asp | ) |
References osmo_ss7_asp::lm_priv, and NULL.
Referenced by osmo_ss7_asp_restart().
struct osmo_ss7_asp * ss7_asp_alloc | ( | struct osmo_ss7_instance * | inst, |
const char * | name, | ||
uint16_t | remote_port, | ||
uint16_t | local_port, | ||
int | trans_proto, | ||
enum osmo_ss7_asp_protocol | proto | ||
) |
References osmo_ss7_asp::adm_state, osmo_ss7_instance::asp_list, osmo_ss7_asp::cfg, osmo_ss7_asp::ctrg, g_ss7_asp_rcg_idx, osmo_ss7_asp::inst, osmo_ss7_asp::list, osmo_ss7_asp::local, osmo_ss7_asp::name, NULL, OSMO_SS7_ASP_ADM_S_ENABLED, OSMO_SS7_ASP_PROT_SUA, osmo_ss7_asp_protocol_name(), osmo_ss7_ensure_sccp(), osmo_ss7_asp_peer::port, osmo_ss7_asp::proto, osmo_ss7_asp::remote, ss7_asp_lm_timer_defaults, ss7_asp_peer_init(), ss7_asp_protocol_check_trans_proto(), ss7_asp_rcgd, ss7_asp_xua_timer_defaults, osmo_ss7_asp::T_defs_lm, osmo_ss7_asp::T_defs_xua, and osmo_ss7_asp::trans_proto.
Referenced by osmo_ss7_asp_find_or_create2().
int ss7_asp_apply_drop_local_address | ( | const struct osmo_ss7_asp * | asp, |
unsigned int | loc_idx | ||
) |
References osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp_peer::host, osmo_ss7_asp::is_server, osmo_ss7_asp::local, LOGPASP, and osmo_ss7_asp::server.
Referenced by DEFUN_ATTR().
int ss7_asp_apply_new_local_address | ( | const struct osmo_ss7_asp * | asp, |
unsigned int | loc_idx | ||
) |
References osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp_peer::host, osmo_ss7_asp::is_server, osmo_ss7_asp::local, LOGPASP, and osmo_ss7_asp::server.
Referenced by DEFUN_ATTR().
int ss7_asp_apply_peer_primary_address | ( | const struct osmo_ss7_asp * | asp | ) |
References _setsockopt_peer_primary_addr(), osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_ss7_asp_peer::idx_primary, osmo_ss7_asp::is_server, osmo_ss7_asp::local, LOGPASP, osmo_ss7_asp_peer::port, and osmo_ss7_asp::server.
Referenced by DEFUN_ATTR(), xua_accept_cb(), and xua_cli_connect_cb().
int ss7_asp_apply_primary_address | ( | const struct osmo_ss7_asp * | asp | ) |
References _setsockopt_primary_addr(), osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_ss7_asp_peer::idx_primary, osmo_ss7_asp::is_server, LOGPASP, osmo_ss7_asp_peer::port, osmo_ss7_asp::remote, and osmo_ss7_asp::server.
Referenced by asp_handle_sctp_notif_monitor_primary_address(), DEFUN_ATTR(), xua_accept_cb(), and xua_cli_connect_cb().
int ss7_asp_apply_tcp_pars | ( | const struct osmo_ss7_asp * | asp | ) |
References ss7_asp_apply_tcp_keepalive(), and ss7_asp_apply_tcp_user_timeout().
Referenced by ss7_asp_start_client(), and xua_accept_cb().
int ss7_asp_disconnect_stream | ( | struct osmo_ss7_asp * | asp | ) |
References osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp::is_server, NULL, and osmo_ss7_asp::server.
Referenced by ipa_t_beat_cb(), lm_rkm_reg(), lm_timer_cb(), osmo_ss7_asp_restart(), and xua_t_beat_cb().
unsigned int ss7_asp_get_all_rctx | ( | const struct osmo_ss7_asp * | asp, |
uint32_t * | rctx, | ||
unsigned int | rctx_size, | ||
const struct osmo_ss7_as * | excl_as | ||
) |
References _ss7_asp_get_all_rctx().
Referenced by fill_notify_route_ctx().
unsigned int ss7_asp_get_all_rctx_be | ( | const struct osmo_ss7_asp * | asp, |
uint32_t * | rctx, | ||
unsigned int | rctx_size, | ||
const struct osmo_ss7_as * | excl_as | ||
) |
References _ss7_asp_get_all_rctx().
Referenced by sua_snm_ssn_available(), xua_msg_add_asp_rctx(), xua_snm_pc_available(), xua_snm_rx_daud(), xua_snm_scon(), and xua_snm_upu().
int ss7_asp_get_fd | ( | const struct osmo_ss7_asp * | asp | ) |
Get the fd of a given ASP.
[in] | asp | The ASP for which the fd is requested |
References osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp::is_server, and osmo_ss7_asp::server.
Referenced by show_one_asp(), show_one_asp_assoc_status_tcp(), and show_one_asp_remaddr_tcp().
bool ss7_asp_is_started | ( | const struct osmo_ss7_asp * | asp | ) |
References osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp::is_server, and osmo_ss7_asp::server.
Referenced by DEFUN_ATTR().
void ss7_asp_restart_after_reconfigure | ( | struct osmo_ss7_asp * | asp | ) |
References osmo_ss7_asp_restart(), and ss7_asp_set_default_peer_hosts().
Referenced by DEFUN_ATTR(), osmo_sccp_simple_client_on_ss7_id(), and ss7_vty_node_asp_go_parent().
bool ss7_asp_set_default_peer_hosts | ( | struct osmo_ss7_asp * | asp | ) |
|
extern |
Referenced by gen_asp_timer_xua_cmd_strs(), and ss7_asp_alloc().
|
extern |
Referenced by DEFUN_ATTR(), gen_asp_timer_xua_cmd_strs(), and write_asp_timers_xua().