libosmo-sigtran
1.9.0.4-dc82
Osmocom SIGTRAN library
|
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <inttypes.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/logging.h>
#include "ss7_internal.h"
#include "xua_as_fsm.h"
#include "xua_asp_fsm.h"
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... | |
int | osmo_ss7_as_add_asp (struct osmo_ss7_as *as, const char *asp_name) |
Add given ASP to given AS. More... | |
int | osmo_ss7_as_del_asp (struct osmo_ss7_as *as, const char *asp_name) |
Delete given ASP from given AS. More... | |
void | osmo_ss7_as_destroy (struct osmo_ss7_as *as) |
Destroy given Application Server. More... | |
bool | osmo_ss7_as_has_asp (const struct osmo_ss7_as *as, const struct osmo_ss7_asp *asp) |
Determine if given AS contains ASP. More... | |
bool | osmo_ss7_as_active (const struct osmo_ss7_as *as) |
Determine if given AS is in the active state. More... | |
bool | osmo_ss7_as_down (const struct osmo_ss7_as *as) |
Determine if given AS is in the down state. More... | |
Variables | |
struct value_string | osmo_ss7_as_traffic_mode_vals [] |
static const struct rate_ctr_desc | ss7_as_rcd [] |
static const struct rate_ctr_group_desc | ss7_as_rcgd |
static unsigned int | g_ss7_as_rcg_idx |
bool osmo_ss7_as_active | ( | const struct osmo_ss7_as * | as | ) |
Determine if given AS is in the active state.
[in] | as | Application Server. |
References osmo_ss7_as::fi, and XUA_AS_S_ACTIVE.
Referenced by DEFUN().
int osmo_ss7_as_add_asp | ( | struct osmo_ss7_as * | as, |
const char * | asp_name | ||
) |
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 osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_asp::fi, osmo_ss7_as::inst, LOGPAS, osmo_ss7_asp::name, osmo_ss7_as_has_asp(), osmo_ss7_asp_find_by_name(), ss7_initialized, and XUA_ASP_E_AS_ASSIGNED.
Referenced by DEFUN_ATTR(), handle_rkey_reg(), ipa_asp_fsm_wait_id_resp(), osmo_sccp_simple_client_on_ss7_id(), and osmo_sccp_simple_server_add_clnt().
int osmo_ss7_as_del_asp | ( | struct osmo_ss7_as * | as, |
const char * | asp_name | ||
) |
Delete given ASP from given AS.
[in] | as | Application Server from which asp is deleted |
[in] | asp | Application Server Process to delete from as |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_as::inst, LOGPAS, osmo_ss7_asp::name, osmo_ss7_asp_find_by_name(), and ss7_initialized.
Referenced by DEFUN_ATTR(), and handle_rkey_dereg().
void osmo_ss7_as_destroy | ( | struct osmo_ss7_as * | as | ) |
Destroy given Application Server.
[in] | as | Application Server to destroy |
References osmo_ss7_route::as, osmo_ss7_as::ctrg, osmo_ss7_route::dest, osmo_ss7_as::fi, osmo_ss7_as::inst, osmo_ss7_route::list, osmo_ss7_as::list, LOGPAS, osmo_ss7_route_destroy(), osmo_ss7_route_table::routes, osmo_ss7_instance::rtable_system, and ss7_initialized.
Referenced by DEFUN_ATTR(), handle_rkey_dereg(), handle_rkey_reg(), osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_simple_server_add_clnt(), osmo_ss7_instance_destroy(), and xua_rkm_cleanup_dyn_as_for_asp().
bool osmo_ss7_as_down | ( | const struct osmo_ss7_as * | as | ) |
Determine if given AS is in the down state.
[in] | as | Application Server. |
References osmo_ss7_as::fi, and XUA_AS_S_DOWN.
Referenced by hmrt_message_for_routing().
bool osmo_ss7_as_has_asp | ( | const struct osmo_ss7_as * | as, |
const struct osmo_ss7_asp * | asp | ||
) |
Determine if given AS contains ASP.
[in] | as | Application Server in which to look for asp |
[in] | asp | Application Server Process to look for in as |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, and ss7_initialized.
Referenced by as_list_for_asp(), determine_traf_mode(), dispatch_to_all_as(), find_single_as_for_asp(), get_all_rctx_for_asp(), handle_rkey_dereg(), ipa_find_as_for_asp(), osmo_sccp_simple_client_on_ss7_id(), osmo_ss7_as_add_asp(), xua_asp_fsm_inactive(), xua_find_as_for_asp(), xua_msg_add_asp_rctx(), and xua_rkm_cleanup_dyn_as_for_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::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().
|
static |
Referenced by ss7_as_alloc().
struct value_string osmo_ss7_as_traffic_mode_vals[] |
Referenced by DEFUN_USRATTR(), and osmo_ss7_as_traffic_mode_name().
|
static |
|
static |
Referenced by ss7_as_alloc().