libosmo-sigtran
1.9.0.1-797d
Osmocom SIGTRAN library
|
Go to the source code of this file.
Enumerations | |
enum | ss7_as_ctr { SS7_AS_CTR_RX_MSU_TOTAL, SS7_AS_CTR_TX_MSU_TOTAL } |
enum | ss7_asp_ctr { SS7_ASP_CTR_PKT_RX_TOTAL, SS7_ASP_CTR_PKT_RX_UNKNOWN, SS7_ASP_CTR_PKT_TX_TOTAL } |
Functions | |
uint32_t | ss7_find_free_l_rk_id (struct osmo_ss7_instance *inst) |
bool | ss7_ipv6_sctp_supported (const char *host, bool bind) |
struct osmo_ss7_as * | ss7_as_alloc (struct osmo_ss7_instance *inst, const char *name, enum osmo_ss7_asp_protocol proto) |
Allocate an Application Server. More... | |
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... | |
struct osmo_ss7_asp * | ss7_asp_find_by_socket_addr (int fd, int trans_proto) |
Find an ASP definition matching the local+remote IP/PORT of given fd. More... | |
bool | ss7_asp_protocol_check_trans_proto (enum osmo_ss7_asp_protocol proto, int trans_proto) |
int | ss7_default_trans_proto_for_asp_proto (enum osmo_ss7_asp_protocol proto) |
int | ss7_asp_ipa_srv_conn_rx_cb (struct osmo_stream_srv *conn, int res, struct msgb *msg) |
int | ss7_asp_xua_srv_conn_rx_cb (struct osmo_stream_srv *conn, int res, struct msgb *msg) |
int | ss7_asp_m3ua_tcp_srv_conn_rx_cb (struct osmo_stream_srv *conn, int res, struct msgb *msg) |
int | ss7_asp_xua_srv_conn_closed_cb (struct osmo_stream_srv *srv) |
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) |
bool | ss7_asp_peer_match_host (const struct osmo_ss7_asp_peer *peer, const char *host, bool host_is_v6) |
int | ss7_asp_peer_find_host (const struct osmo_ss7_asp_peer *peer, const char *host) |
Find the exact IP address match and return its index in the array. More... | |
bool | ss7_xua_server_set_default_local_hosts (struct osmo_xua_server *oxs) |
int | xua_tcp_segmentation_cb (struct msgb *msg) |
Variables | |
bool | ss7_initialized |
enum ss7_as_ctr |
enum ss7_asp_ctr |
struct osmo_ss7_as* ss7_as_alloc | ( | struct osmo_ss7_instance * | inst, |
const char * | name, | ||
enum osmo_ss7_asp_protocol | proto | ||
) |
Allocate an Application Server.
[in] | inst | SS7 Instance on which we operate |
[in] | name | Name of Application Server |
[in] | proto | Protocol of Application Server |
References osmo_ss7_instance::as_list, osmo_ss7_as::cfg, osmo_ss7_as::ctrg, osmo_ss7_as::fi, g_ss7_as_rcg_idx, osmo_ss7_as::inst, osmo_ss7_routing_key::l_rk_id, osmo_ss7_as::list, osmo_ss7_as::mode, osmo_ss7_as::name, OSMO_SS7_AS_TMOD_OVERRIDE, osmo_ss7_as::proto, osmo_ss7_as::recovery_timeout_msec, osmo_ss7_as::routing_key, ss7_as_rcgd, ss7_find_free_l_rk_id(), and xua_as_fsm_start().
Referenced by osmo_ss7_as_find_or_create().
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_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, osmo_ss7_asp_peer_init(), 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_protocol_check_trans_proto(), ss7_asp_rcgd, osmo_ss7_asp::T_defs_lm, 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().
struct osmo_ss7_asp* ss7_asp_find_by_socket_addr | ( | int | fd, |
int | trans_proto | ||
) |
Find an ASP definition matching the local+remote IP/PORT of given fd.
[in] | fd | socket descriptor of given socket |
References osmo_ss7_instance::asp_list, osmo_ss7_asp::cfg, chop_v4_mapped_on_v6_prefix(), get_in_port(), osmo_ss7_asp_peer::host_cnt, osmo_ss7_asp::list, osmo_ss7_asp::local, osmo_ss7_instances, osmo_ss7_asp_peer::port, osmo_ss7_asp::remote, ss7_asp_peer_match_host(), ss7_initialized, and osmo_ss7_asp::trans_proto.
Referenced by xua_accept_cb().
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().
int ss7_asp_ipa_srv_conn_rx_cb | ( | struct osmo_stream_srv * | conn, |
int | res, | ||
struct msgb * | msg | ||
) |
References osmo_ss7_asp::asp_id, osmo_ss7_asp::ctrg, ipa_rx_msg(), and SS7_ASP_CTR_PKT_RX_TOTAL.
Referenced by xua_accept_cb().
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().
int ss7_asp_m3ua_tcp_srv_conn_rx_cb | ( | struct osmo_stream_srv * | conn, |
int | res, | ||
struct msgb * | msg | ||
) |
References osmo_ss7_asp::ctrg, xua_common_hdr::data, M3UA_MSGC_XFER, m3ua_rx_msg(), xua_common_hdr::msg_class, and SS7_ASP_CTR_PKT_RX_TOTAL.
Referenced by xua_accept_cb().
int ss7_asp_peer_find_host | ( | const struct osmo_ss7_asp_peer * | peer, |
const char * | host | ||
) |
Find the exact IP address match and return its index in the array.
[in] | peer | Application Server Process peer where the address is looked up. |
[in] | host | string containing an IP address. |
References osmo_ss7_asp_peer::host, and osmo_ss7_asp_peer::host_cnt.
Referenced by DEFUN_ATTR().
bool ss7_asp_peer_match_host | ( | const struct osmo_ss7_asp_peer * | peer, |
const char * | host, | ||
bool | host_is_v6 | ||
) |
References osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, and host_is_ip_anyaddr().
Referenced by ss7_asp_find_by_socket_addr().
bool ss7_asp_protocol_check_trans_proto | ( | enum osmo_ss7_asp_protocol | proto, |
int | trans_proto | ||
) |
References OSMO_SS7_ASP_PROT_IPA, OSMO_SS7_ASP_PROT_M3UA, OSMO_SS7_ASP_PROT_NONE, and OSMO_SS7_ASP_PROT_SUA.
Referenced by osmo_ss7_xua_server_create2(), and ss7_asp_alloc().
bool ss7_asp_set_default_peer_hosts | ( | struct osmo_ss7_asp * | asp | ) |
int ss7_asp_xua_srv_conn_closed_cb | ( | struct osmo_stream_srv * | srv | ) |
References osmo_ss7_asp::cfg, osmo_ss7_asp::dyn_allocated, osmo_ss7_asp::fi, osmo_ss7_asp::name, osmo_ss7_asp_destroy(), OSMO_XLM_PRIM_M_SCTP_RELEASE, osmo_ss7_asp::server, XUA_ASP_E_SCTP_COMM_DOWN_IND, xua_asp_send_xlm_prim_simple(), and xua_rkm_cleanup_dyn_as_for_asp().
Referenced by xua_accept_cb().
int ss7_asp_xua_srv_conn_rx_cb | ( | struct osmo_stream_srv * | conn, |
int | res, | ||
struct msgb * | msg | ||
) |
References asp_handle_sctp_notif_monitor_primary_address(), osmo_ss7_asp::cfg, osmo_ss7_asp::ctrg, log_sctp_notification(), LOGPASP, M3UA_PPID, m3ua_rx_msg(), OSMO_SS7_ASP_PROT_M3UA, OSMO_SS7_ASP_PROT_SUA, OSMO_XLM_PRIM_M_SCTP_RESTART, osmo_ss7_asp::proto, SS7_ASP_CTR_PKT_RX_TOTAL, ss7_asp_rx_unknown(), SUA_PPID, sua_rx_msg(), and xua_asp_send_xlm_prim_simple().
Referenced by xua_accept_cb().
int ss7_default_trans_proto_for_asp_proto | ( | enum osmo_ss7_asp_protocol | proto | ) |
References OSMO_SS7_ASP_PROT_IPA, OSMO_SS7_ASP_PROT_M3UA, and OSMO_SS7_ASP_PROT_SUA.
Referenced by DEFUN_ATTR(), osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_simple_server_add_clnt(), osmo_sccp_simple_server_on_ss7_id(), osmo_ss7_asp_find(), osmo_ss7_asp_find_or_create(), osmo_ss7_xua_server_create(), osmo_ss7_xua_server_find(), write_one_asp(), and write_one_xua().
uint32_t ss7_find_free_l_rk_id | ( | struct osmo_ss7_instance * | inst | ) |
References next_l_rk_id, and osmo_ss7_as_find_by_l_rk_id().
Referenced by ss7_as_alloc().
bool ss7_ipv6_sctp_supported | ( | const char * | host, |
bool | bind | ||
) |
Referenced by ss7_asp_set_default_peer_hosts(), and ss7_xua_server_set_default_local_hosts().
bool ss7_xua_server_set_default_local_hosts | ( | struct osmo_xua_server * | oxs | ) |
References osmo_xua_server::cfg, osmo_ss7_asp_peer::host_cnt, osmo_xua_server::local, osmo_ss7_xua_server_set_local_host(), and ss7_ipv6_sctp_supported().
Referenced by osmo_ss7_vty_go_parent().
int xua_tcp_segmentation_cb | ( | struct msgb * | msg | ) |
References xua_common_hdr::data, xua_common_hdr::msg_length, and msg_length.
Referenced by osmo_ss7_asp_restart(), and xua_accept_cb().
bool ss7_initialized |
Referenced by osmo_ss7_as_add_asp(), osmo_ss7_as_del_asp(), osmo_ss7_as_destroy(), osmo_ss7_as_find_by_l_rk_id(), osmo_ss7_as_find_by_name(), osmo_ss7_as_find_by_proto(), osmo_ss7_as_find_by_rctx(), osmo_ss7_as_find_or_create(), osmo_ss7_as_has_asp(), osmo_ss7_asp_destroy(), osmo_ss7_asp_find2(), osmo_ss7_asp_find_by_name(), osmo_ss7_asp_find_or_create2(), osmo_ss7_asp_restart(), osmo_ss7_asp_send(), osmo_ss7_init(), osmo_ss7_instance_destroy(), osmo_ss7_instance_find(), osmo_ss7_instance_find_or_create(), osmo_ss7_link_destroy(), osmo_ss7_link_find_or_create(), osmo_ss7_linkset_destroy(), osmo_ss7_linkset_find_by_name(), osmo_ss7_linkset_find_or_create(), osmo_ss7_pc_is_local(), osmo_ss7_route_create(), osmo_ss7_route_destroy(), osmo_ss7_route_find_dpc(), osmo_ss7_route_find_dpc_mask(), osmo_ss7_route_lookup(), osmo_ss7_route_table_find(), osmo_ss7_route_table_find_or_create(), osmo_ss7_xua_server_create2(), osmo_ss7_xua_server_find2(), osmo_ss7_xua_server_set_local_hosts(), and ss7_asp_find_by_socket_addr().