libosmo-sigtran 2.0.0.50-b59d
Osmocom SIGTRAN library
|
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <inttypes.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/sctp.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/mtp_sap.h>
#include <osmocom/sigtran/protocol/mtp.h>
#include <osmocom/sigtran/protocol/sua.h>
#include <osmocom/sigtran/protocol/m3ua.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/select.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/socket.h>
#include <osmocom/core/sockaddr_str.h>
#include <osmocom/netif/stream.h>
#include <osmocom/netif/ipa.h>
#include <osmocom/netif/sctp.h>
#include "sccp_internal.h"
#include "xua_internal.h"
#include "ss7_as.h"
#include "ss7_asp.h"
#include "ss7_internal.h"
#include "ss7_linkset.h"
#include "ss7_route.h"
#include "ss7_route_table.h"
#include "xua_asp_fsm.h"
#include "xua_as_fsm.h"
Functions | |
LLIST_HEAD (osmo_ss7_instances) | |
struct osmo_ss7_instance * | osmo_ss7_instances_llist_entry (struct llist_head *list) |
uint8_t | osmo_ss7_pc_width (const struct osmo_ss7_pc_fmt *pc_fmt) |
uint32_t | osmo_ss7_pc_normalize (const struct osmo_ss7_pc_fmt *pc_fmt, uint32_t pc) |
struct osmo_ss7_instance * | osmo_ss7_instance_find (uint32_t id) |
Find a SS7 Instance with given ID. More... | |
struct osmo_ss7_instance * | osmo_ss7_instance_find_or_create (void *ctx, uint32_t id) |
Find or create a SS7 Instance. More... | |
bool | ss7_ipv6_sctp_supported (const char *host, bool bind) |
int | osmo_ss7_init (void) |
int | osmo_ss7_tmode_to_xua (enum osmo_ss7_as_traffic_mode tmod) |
enum osmo_ss7_as_traffic_mode | osmo_ss7_tmode_from_xua (uint32_t in) |
Variables | |
bool | ss7_initialized = false |
const struct value_string | mtp_unavail_cause_vals [] |
LLIST_HEAD | ( | osmo_ss7_instances | ) |
int osmo_ss7_init | ( | void | ) |
References ipa_asp_fsm, sccp_scoc_fsm, ss7_initialized, xua_as_fsm, xua_asp_fsm, and xua_default_lm_fsm.
struct osmo_ss7_instance * osmo_ss7_instance_find | ( | uint32_t | id | ) |
Find a SS7 Instance with given ID.
[in] | id | ID for which to search |
References osmo_ss7_instance::cfg, osmo_ss7_instance::id, osmo_ss7_instance::list, osmo_ss7_instances, and ss7_initialized.
Referenced by DEFUN(), osmo_sccp_simple_client_on_ss7_id(), osmo_ss7_instance_find_or_create(), show_asp(), show_asp_assoc_status(), and show_asp_remaddr().
struct osmo_ss7_instance * osmo_ss7_instance_find_or_create | ( | void * | ctx, |
uint32_t | id | ||
) |
Find or create a SS7 Instance.
[in] | ctx | talloc allocation context to use for allocations |
[in] | id | ID of SS7 Instance |
References osmo_ss7_instance_find(), ss7_initialized, and ss7_instance_alloc().
Referenced by DEFUN_ATTR(), osmo_sccp_simple_client_on_ss7_id(), and osmo_sccp_simple_server_on_ss7_id().
struct osmo_ss7_instance * osmo_ss7_instances_llist_entry | ( | struct llist_head * | list | ) |
References osmo_ss7_instance::list.
uint32_t osmo_ss7_pc_normalize | ( | const struct osmo_ss7_pc_fmt * | pc_fmt, |
uint32_t | pc | ||
) |
References osmo_ss7_pc_width().
Referenced by ss7_route_alloc(), ss7_route_table_find_route_by_dpc(), and ss7_route_table_find_route_by_dpc_mask().
uint8_t osmo_ss7_pc_width | ( | const struct osmo_ss7_pc_fmt * | pc_fmt | ) |
References osmo_ss7_pc_fmt::component_len.
Referenced by get_pc_comp_shift(), osmo_ss7_pc_normalize(), osmo_ss7_pointcode_parse_mask_or_len(), and osmo_ss7_route_print().
enum osmo_ss7_as_traffic_mode osmo_ss7_tmode_from_xua | ( | uint32_t | in | ) |
References M3UA_TMOD_BCAST, M3UA_TMOD_LOADSHARE, M3UA_TMOD_OVERRIDE, OSMO_SS7_AS_TMOD_BCAST, OSMO_SS7_AS_TMOD_LOADSHARE, and OSMO_SS7_AS_TMOD_OVERRIDE.
Referenced by handle_rkey_reg(), and xua_asp_fsm_inactive().
int osmo_ss7_tmode_to_xua | ( | enum osmo_ss7_as_traffic_mode | tmod | ) |
References M3UA_TMOD_BCAST, M3UA_TMOD_LOADSHARE, M3UA_TMOD_OVERRIDE, OSMO_SS7_AS_TMOD_BCAST, OSMO_SS7_AS_TMOD_LOADSHARE, and OSMO_SS7_AS_TMOD_OVERRIDE.
Referenced by peer_send(), and xua_rkm_send_reg_req().
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().
const struct value_string mtp_unavail_cause_vals[] |
Referenced by mtp_unavail_cause_str().
bool ss7_initialized = false |
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_pc_is_local(), osmo_ss7_route_lookup(), ss7_asp_find_by_socket_addr(), ss7_link_destroy(), ss7_link_find_or_create(), ss7_linkset_destroy(), ss7_linkset_find_by_name(), ss7_linkset_find_or_create(), ss7_route_alloc(), ss7_route_destroy(), ss7_route_table_find(), ss7_route_table_find_or_create(), ss7_route_table_find_route_by_dpc(), ss7_route_table_find_route_by_dpc_mask(), ss7_xua_server_create2(), ss7_xua_server_find2(), and ss7_xua_server_set_local_hosts().