#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.
|
| #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) |
| |
|
| enum | osmo_ss7_as_patch_sccp_mode { OSMO_SS7_PATCH_NONE
, OSMO_SS7_PATCH_BOTH
} |
| |
| enum | ss7_as_ctr {
SS7_AS_CTR_RX_MSU_DISCARD
, SS7_AS_CTR_RX_MSU_TOTAL
, SS7_AS_CTR_RX_MSU_SLS_0
, SS7_AS_CTR_RX_MSU_SLS_1
,
SS7_AS_CTR_RX_MSU_SLS_2
, SS7_AS_CTR_RX_MSU_SLS_3
, SS7_AS_CTR_RX_MSU_SLS_4
, SS7_AS_CTR_RX_MSU_SLS_5
,
SS7_AS_CTR_RX_MSU_SLS_6
, SS7_AS_CTR_RX_MSU_SLS_7
, SS7_AS_CTR_RX_MSU_SLS_8
, SS7_AS_CTR_RX_MSU_SLS_9
,
SS7_AS_CTR_RX_MSU_SLS_10
, SS7_AS_CTR_RX_MSU_SLS_11
, SS7_AS_CTR_RX_MSU_SLS_12
, SS7_AS_CTR_RX_MSU_SLS_13
,
SS7_AS_CTR_RX_MSU_SLS_14
, SS7_AS_CTR_RX_MSU_SLS_15
, SS7_AS_CTR_TX_MSU_TOTAL
, SS7_AS_CTR_TX_MSU_SLS_0
,
SS7_AS_CTR_TX_MSU_SLS_1
, SS7_AS_CTR_TX_MSU_SLS_2
, SS7_AS_CTR_TX_MSU_SLS_3
, SS7_AS_CTR_TX_MSU_SLS_4
,
SS7_AS_CTR_TX_MSU_SLS_5
, SS7_AS_CTR_TX_MSU_SLS_6
, SS7_AS_CTR_TX_MSU_SLS_7
, SS7_AS_CTR_TX_MSU_SLS_8
,
SS7_AS_CTR_TX_MSU_SLS_9
, SS7_AS_CTR_TX_MSU_SLS_10
, SS7_AS_CTR_TX_MSU_SLS_11
, SS7_AS_CTR_TX_MSU_SLS_12
,
SS7_AS_CTR_TX_MSU_SLS_13
, SS7_AS_CTR_TX_MSU_SLS_14
, SS7_AS_CTR_TX_MSU_SLS_15
} |
| |
| enum | ss7_as_tcap_unroutable { SS7_AS_TCAP_UNROUTABLE_REJECT_UDTS
, SS7_AS_TCAP_UNROUTABLE_LOAD_SHARE_AS
, SS7_AS_TCAP_UNROUTABLE_ROUTE_FALLBACK
} |
| |
|
| 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) |
| |
◆ LOGPAS
| #define LOGPAS |
( |
|
as, |
|
|
|
subsys, |
|
|
|
level, |
|
|
|
fmt, |
|
|
|
args ... |
|
) |
| _LOGSS7((as)->inst, subsys, level, "AS(%s) " fmt, (as)->cfg.name, ## args) |
◆ NUM_AS_EXT_SLS
| #define NUM_AS_EXT_SLS 128 |
◆ ss7_as_asp_assoc_llist_round_robin
◆ as_ext_sls_t
◆ osmo_ss7_as_patch_sccp_mode
| Enumerator |
|---|
| OSMO_SS7_PATCH_NONE | |
| OSMO_SS7_PATCH_BOTH | |
◆ ss7_as_ctr
| Enumerator |
|---|
| SS7_AS_CTR_RX_MSU_DISCARD | |
| SS7_AS_CTR_RX_MSU_TOTAL | |
| SS7_AS_CTR_RX_MSU_SLS_0 | |
| SS7_AS_CTR_RX_MSU_SLS_1 | |
| SS7_AS_CTR_RX_MSU_SLS_2 | |
| SS7_AS_CTR_RX_MSU_SLS_3 | |
| SS7_AS_CTR_RX_MSU_SLS_4 | |
| SS7_AS_CTR_RX_MSU_SLS_5 | |
| SS7_AS_CTR_RX_MSU_SLS_6 | |
| SS7_AS_CTR_RX_MSU_SLS_7 | |
| SS7_AS_CTR_RX_MSU_SLS_8 | |
| SS7_AS_CTR_RX_MSU_SLS_9 | |
| SS7_AS_CTR_RX_MSU_SLS_10 | |
| SS7_AS_CTR_RX_MSU_SLS_11 | |
| SS7_AS_CTR_RX_MSU_SLS_12 | |
| SS7_AS_CTR_RX_MSU_SLS_13 | |
| SS7_AS_CTR_RX_MSU_SLS_14 | |
| SS7_AS_CTR_RX_MSU_SLS_15 | |
| SS7_AS_CTR_TX_MSU_TOTAL | |
| SS7_AS_CTR_TX_MSU_SLS_0 | |
| SS7_AS_CTR_TX_MSU_SLS_1 | |
| SS7_AS_CTR_TX_MSU_SLS_2 | |
| SS7_AS_CTR_TX_MSU_SLS_3 | |
| SS7_AS_CTR_TX_MSU_SLS_4 | |
| SS7_AS_CTR_TX_MSU_SLS_5 | |
| SS7_AS_CTR_TX_MSU_SLS_6 | |
| SS7_AS_CTR_TX_MSU_SLS_7 | |
| SS7_AS_CTR_TX_MSU_SLS_8 | |
| SS7_AS_CTR_TX_MSU_SLS_9 | |
| SS7_AS_CTR_TX_MSU_SLS_10 | |
| SS7_AS_CTR_TX_MSU_SLS_11 | |
| SS7_AS_CTR_TX_MSU_SLS_12 | |
| SS7_AS_CTR_TX_MSU_SLS_13 | |
| SS7_AS_CTR_TX_MSU_SLS_14 | |
| SS7_AS_CTR_TX_MSU_SLS_15 | |
◆ ss7_as_tcap_unroutable
| Enumerator |
|---|
| SS7_AS_TCAP_UNROUTABLE_REJECT_UDTS | |
| SS7_AS_TCAP_UNROUTABLE_LOAD_SHARE_AS | reject the unroutable TCAP message with a UDTS
|
| SS7_AS_TCAP_UNROUTABLE_ROUTE_FALLBACK | fallback to round robin load-share over all available ASP
|
◆ ss7_as_add_asp()
Add given ASP to given AS.
- Parameters
-
| [in] | as | Application Server to which asp is added |
| [in] | asp | Application Server Process to be added to as |
- Returns
- 0 on success; negative in case of error
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().
◆ ss7_as_alloc()
Allocate an Application Server.
- Parameters
-
| [in] | inst | SS7 Instance on which we operate |
| [in] | name | Name of Application Server |
| [in] | proto | Protocol of Application Server |
- Returns
- pointer to Application Server on success; NULL otherwise
Referenced by osmo_ss7_as_find_or_create().
◆ ss7_as_del_asp()
Delete given ASP from given AS.
- Parameters
-
| [in] | as | Application Server from which asp is deleted |
| [in] | asp | Application Server Process to delete from as |
- Returns
- 0 on success; negative in case of error
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().
◆ ss7_as_del_asp_update_llist_round_robin()
◆ ss7_as_find_asp_by_remote_asp_id()
◆ ss7_as_get_local_role()
| int ss7_as_get_local_role |
( |
const struct osmo_ss7_as * |
as | ) |
|
◆ ss7_as_loadshare_binding_table_reset()
| void ss7_as_loadshare_binding_table_reset |
( |
struct osmo_ss7_as * |
as | ) |
|
◆ ss7_as_select_asp()
Select an AS to transmit a message, according to AS configuration and ASP availability.
- Parameters
-
| [in] | as | Application Server. |
- Returns
- asp to send the message to, NULL if no possible asp found
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().
◆ osmo_ss7_as_tcap_unroutable_vals
| struct value_string osmo_ss7_as_tcap_unroutable_vals[] |
|
extern |