|
libosmo-sigtran 2.2.1.56-7580
Osmocom SIGTRAN library
|
#include "config.h"#include <stdint.h>#include <osmocom/core/linuxlist.h>#include <osmocom/core/fsm.h>#include <osmocom/core/hashtable.h>#include <osmocom/core/msgb.h>#include <osmocom/core/tdef.h>#include <osmocom/netif/stream.h>#include <osmocom/sigtran/osmo_ss7.h>#include "ss7_internal.h"#include "xua_msg.h"Go to the source code of this file.
Data Structures | |
| struct | osmo_ss7_as_esls_entry |
| struct | ss7_as_asp_assoc |
| struct | osmo_ss7_as |
Macros | |
| #define | NUM_AS_EXT_SLS 128 |
| #define | ss7_as_asp_assoc_llist_round_robin(as, state) ss7_llist_round_robin(&(as)->assoc_asp_list, (void **)state, struct ss7_as_asp_assoc, as_entry) |
| #define | LOGPAS(as, subsys, level, fmt, args ...) _LOGSS7((as)->inst, subsys, level, "AS(%s) " fmt, (as)->cfg.name, ## args) |
Typedefs | |
| typedef uint8_t | as_ext_sls_t |
Functions | |
| 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_as_select_asp (struct osmo_ss7_as *as, const struct xua_msg *xua) |
| Select an AS to transmit a message, according to AS configuration and ASP availability. More... | |
| int | ss7_as_add_asp (struct osmo_ss7_as *as, struct osmo_ss7_asp *asp) |
| Add given ASP to given AS. More... | |
| int | ss7_as_del_asp (struct osmo_ss7_as *as, struct osmo_ss7_asp *asp) |
| Delete given ASP from given AS. More... | |
| int | ss7_as_get_local_role (const struct osmo_ss7_as *as) |
| struct osmo_ss7_asp * | ss7_as_find_asp_by_remote_asp_id (const struct osmo_ss7_as *as, uint32_t asp_id, const struct osmo_ss7_asp *excl_asp) |
| Find ASP with a given announced remote ASP Id. More... | |
| void | ss7_as_loadshare_binding_table_reset (struct osmo_ss7_as *as) |
| void | ss7_as_del_asp_update_llist_round_robin (struct osmo_ss7_as *as, struct osmo_ss7_asp *asp, struct ss7_as_asp_assoc **state) |
| #define LOGPAS | ( | as, | |
| subsys, | |||
| level, | |||
| fmt, | |||
| args ... | |||
| ) | _LOGSS7((as)->inst, subsys, level, "AS(%s) " fmt, (as)->cfg.name, ## args) |
| #define NUM_AS_EXT_SLS 128 |
| #define ss7_as_asp_assoc_llist_round_robin | ( | as, | |
| state | |||
| ) | ss7_llist_round_robin(&(as)->assoc_asp_list, (void **)state, struct ss7_as_asp_assoc, as_entry) |
| typedef uint8_t as_ext_sls_t |
| enum ss7_as_ctr |
| int ss7_as_add_asp | ( | struct osmo_ss7_as * | as, |
| struct osmo_ss7_asp * | asp | ||
| ) |
Add given ASP to given AS.
| [in] | as | Application Server to which asp is added |
| [in] | asp | Application Server Process to be added to as |
References ss7_as_asp_assoc::as, ss7_as_asp_assoc::asp, osmo_ss7_asp::cfg, osmo_ss7_asp::fi, LOGPAS, osmo_ss7_asp::name, osmo_ss7_as_has_asp(), ss7_as_asp_assoc_alloc(), and XUA_ASP_E_AS_ASSIGNED.
Referenced by handle_rkey_reg(), ipa_asp_fsm_wait_id_resp(), osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_simple_server_add_clnt(), and osmo_ss7_as_add_asp().
| 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::assoc_asp_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::loadshare, osmo_ss7_as::mode, osmo_ss7_as::name, NULL, 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().
| int ss7_as_del_asp | ( | struct osmo_ss7_as * | as, |
| struct osmo_ss7_asp * | asp | ||
| ) |
Delete given ASP from given AS.
| [in] | as | Application Server from which asp is deleted |
| [in] | asp | Application Server Process to delete from as |
as may be freed during the function call.
References osmo_ss7_as::aesls_table, osmo_ss7_as_esls_entry::alt_asp, ss7_as_asp_assoc::as, ss7_as_asp_assoc::asp, osmo_ss7_as::assoc_asp_list, osmo_ss7_asp::cfg, osmo_ss7_as::last_asp_idx_assigned, osmo_ss7_as::last_asp_idx_sent, LOGPAS, osmo_ss7_asp::name, osmo_ss7_as_esls_entry::normal_asp, NULL, osmo_ss7_as_destroy(), osmo_ss7_as::rkm_dyn_allocated, ss7_as_asp_assoc_find(), ss7_as_asp_assoc_free(), ss7_as_del_asp_update_llist_round_robin(), and tcap_as_del_asp().
Referenced by common_asp_fsm_down_onenter(), handle_rkey_dereg(), osmo_ss7_as_del_asp(), and osmo_ss7_asp_destroy().
| void ss7_as_del_asp_update_llist_round_robin | ( | struct osmo_ss7_as * | as, |
| struct osmo_ss7_asp * | asp, | ||
| struct ss7_as_asp_assoc ** | state | ||
| ) |
References ss7_as_asp_assoc::as, ss7_as_asp_assoc::asp, NULL, and ss7_as_asp_assoc_llist_round_robin.
Referenced by ss7_as_del_asp(), and tcap_as_del_asp().
| struct osmo_ss7_asp * ss7_as_find_asp_by_remote_asp_id | ( | const struct osmo_ss7_as * | as, |
| uint32_t | asp_id, | ||
| const struct osmo_ss7_asp * | excl_asp | ||
| ) |
Find ASP with a given announced remote ASP Id.
| [in] | as | Application Server in which to look for asp |
| [in] | asp_id | M3UA/SUA ASP Identifier |
| [in] | excl_asp | If not NULL, skip this asp from the candidates. |
References ss7_as_asp_assoc::as, ss7_as_asp_assoc::as_entry, ss7_as_asp_assoc::asp, osmo_ss7_as::assoc_asp_list, NULL, osmo_ss7_asp::remote_asp_id, and osmo_ss7_asp::remote_asp_id_present.
Referenced by ss7_asp_check_remote_asp_id_unique().
| int ss7_as_get_local_role | ( | const struct osmo_ss7_as * | as | ) |
References ss7_as_asp_assoc::as, ss7_as_asp_assoc::as_entry, ss7_as_asp_assoc::asp, osmo_ss7_as::assoc_asp_list, osmo_ss7_asp::cfg, and osmo_ss7_asp::role.
Referenced by ss7_vty_node_as_go_parent(), and xua_as_fsm_onenter().
| void ss7_as_loadshare_binding_table_reset | ( | struct osmo_ss7_as * | as | ) |
References osmo_ss7_as::aesls_table, ss7_as_asp_assoc::as, osmo_ss7_as::last_asp_idx_assigned, and NULL.
Referenced by DEFUN_ATTR().
| struct osmo_ss7_asp * ss7_as_select_asp | ( | struct osmo_ss7_as * | as, |
| const struct xua_msg * | xua | ||
| ) |
Select an AS to transmit a message, according to AS configuration and ASP availability.
| [in] | as | Application Server. |
This function returns NULL too if multiple ASPs would be selected, ie. AS is configured in broadcast mode and more than one ASP is configured.
References _NUM_OSMO_SS7_ASP_TMOD, osmo_ss7_as::cfg, osmo_ss7_as::fi, osmo_ss7_as::loadshare, osmo_ss7_as::mode, xua_msg::mtp, NULL, OSMO_SS7_AS_TMOD_BCAST, OSMO_SS7_AS_TMOD_LOADSHARE, OSMO_SS7_AS_TMOD_OVERRIDE, OSMO_SS7_AS_TMOD_ROUNDROBIN, ss7_as_select_asp_broadcast(), ss7_as_select_asp_loadshare(), ss7_as_select_asp_override(), ss7_as_select_asp_roundrobin(), and tcap_as_select_asp_loadshare().
Referenced by xua_as_transmit_msg().