libosmogb 1.10.0.64-ff3d
Osmocom Gb library
|
NS Sub-Network Service Protocol implementation 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05) as well as its successor 3GPP TS 48.016. More...
#include <errno.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdint.h>
#include <osmocom/core/fsm.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/socket.h>
#include <osmocom/core/sockaddr_str.h>
#include <osmocom/core/talloc.h>
#include <osmocom/gsm/tlv.h>
#include <osmocom/gprs/gprs_msgb.h>
#include <osmocom/gprs/gprs_ns2.h>
#include <osmocom/gprs/protocol/gsm_08_16.h>
#include "gprs_ns2_internal.h"
#include <osmocom/vty/vty.h>
#include <osmocom/vty/misc.h>
Data Structures | |
struct | sns_endpoint |
struct | ns2_sns_bind |
struct | ns2_sns_procedure |
struct | ns2_sns_elems |
struct | ns2_sns_state |
Macros | |
#define | S(x) (1 << (x)) |
#define | GPRS_SNS_FLAG_KEEP_SELECT_ENDPOINT_ORDER (void *) 1 |
#define | sns_failed(fi, reason) _sns_failed(fi, reason, __FILE__, __LINE__) |
#define | ip4_weight_sum_data(elems) ip4_weight_sum(elems, true) |
#define | ip4_weight_sum_sig(elems) ip4_weight_sum(elems, false) |
#define | ip6_weight_sum_data(elems) ip6_weight_sum(elems, true) |
#define | ip6_weight_sum_sig(elems) ip6_weight_sum(elems, false) |
#define | ip46_weight_sum_data(elems) ip46_weight_sum(elems, true) |
#define | ip46_weight_sum_sig(elems) ip46_weight_sum(elems, false) |
Functions | |
static struct gprs_ns2_nse * | nse_inst_from_fi (struct osmo_fsm_inst *fi) |
static void | _sns_failed (struct osmo_fsm_inst *fi, const char *reason, const char *file, int line) |
static int | ip4_weight_sum (const struct ns2_sns_elems *elems, bool data_weight) |
static int | ip6_weight_sum (const struct ns2_sns_elems *elems, bool data_weight) |
static int | ip46_weight_sum (const struct ns2_sns_elems *elems, bool data_weight) |
static struct gprs_ns2_vc * | nsvc_by_ip4_elem (struct gprs_ns2_nse *nse, const struct gprs_ns_ie_ip4_elem *ip4) |
static struct gprs_ns2_vc * | nsvc_by_ip6_elem (struct gprs_ns2_nse *nse, const struct gprs_ns_ie_ip6_elem *ip6) |
const struct osmo_sockaddr * | gprs_ns2_nse_sns_remote (struct gprs_ns2_nse *nse) |
Return the initial SNS remote socket address. More... | |
void | ns2_sns_replace_nsvc (struct gprs_ns2_vc *nsvc) |
called when a nsvc is beeing freed or the nsvc became dead More... | |
static void | ns2_clear_elems (struct ns2_sns_elems *elems) |
static void | ns2_clear_procedures (struct ns2_sns_state *gss) |
static void | ns2_vc_create_ip (struct osmo_fsm_inst *fi, struct gprs_ns2_nse *nse, const struct osmo_sockaddr *remote, uint8_t sig_weight, uint8_t data_weight) |
static void | ns2_nsvc_create_ip4 (struct osmo_fsm_inst *fi, struct gprs_ns2_nse *nse, const struct gprs_ns_ie_ip4_elem *ip4) |
static void | ns2_nsvc_create_ip6 (struct osmo_fsm_inst *fi, struct gprs_ns2_nse *nse, const struct gprs_ns_ie_ip6_elem *ip6) |
static struct gprs_ns2_vc * | nsvc_for_bind_and_remote (struct gprs_ns2_nse *nse, struct gprs_ns2_vc_bind *bind, const struct osmo_sockaddr *remote) |
static int | create_missing_nsvcs (struct osmo_fsm_inst *fi) |
static int | add_ip4_elem (struct ns2_sns_state *gss, struct ns2_sns_elems *elems, const struct gprs_ns_ie_ip4_elem *ip4) |
static int | remove_ip4_elem (struct ns2_sns_state *gss, struct ns2_sns_elems *elems, const struct gprs_ns_ie_ip4_elem *ip4) |
static int | update_ip4_elem (struct ns2_sns_state *gss, struct ns2_sns_elems *elems, const struct gprs_ns_ie_ip4_elem *ip4) |
static int | add_ip6_elem (struct ns2_sns_state *gss, struct ns2_sns_elems *elems, const struct gprs_ns_ie_ip6_elem *ip6) |
static int | remove_ip6_elem (struct ns2_sns_state *gss, struct ns2_sns_elems *elems, const struct gprs_ns_ie_ip6_elem *ip6) |
static int | update_ip6_elem (struct ns2_sns_state *gss, struct ns2_sns_elems *elems, const struct gprs_ns_ie_ip6_elem *ip6) |
static int | remove_bind_elem (struct ns2_sns_state *gss, struct ns2_sns_elems *elems, struct ns2_sns_bind *sbind) |
static int | do_sns_change_weight (struct osmo_fsm_inst *fi, const struct gprs_ns_ie_ip4_elem *ip4, const struct gprs_ns_ie_ip6_elem *ip6) |
static int | do_sns_delete (struct osmo_fsm_inst *fi, const struct gprs_ns_ie_ip4_elem *ip4, const struct gprs_ns_ie_ip6_elem *ip6) |
static int | do_sns_add (struct osmo_fsm_inst *fi, const struct gprs_ns_ie_ip4_elem *ip4, const struct gprs_ns_ie_ip6_elem *ip6) |
static void | ns2_sns_st_bss_unconfigured (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | ns2_sns_st_bss_size (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static int | ns2_sns_count_num_local_ep (struct osmo_fsm_inst *fi, int ip_proto) |
static int | ns2_sns_copy_local_endpoints (struct ns2_sns_state *gss) |
static void | ns2_sns_compute_local_ep_from_binds (struct osmo_fsm_inst *fi) |
static void | ns2_sns_choose_next_bind (struct ns2_sns_state *gss) |
static void | ns2_sns_st_bss_size_onenter (struct osmo_fsm_inst *fi, uint32_t old_state) |
static void | ns2_sns_st_bss_config_bss (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | ns2_sns_st_bss_config_bss_onenter (struct osmo_fsm_inst *fi, uint32_t old_state) |
static int | ns_sns_configured_timeout (struct osmo_fsm_inst *fi) |
static int | ns_sns_append_remote_eps (struct osmo_fsm_inst *fi, const struct tlv_parsed *tp) |
static void | ns2_sns_st_bss_config_sgsn_onenter (struct osmo_fsm_inst *fi, uint32_t old_state) |
static void | ns2_sns_st_bss_config_sgsn (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | ns2_sns_st_configured_add (struct osmo_fsm_inst *fi, struct ns2_sns_state *gss, struct tlv_parsed *tp) |
static void | ns2_sns_st_configured_delete (struct osmo_fsm_inst *fi, struct ns2_sns_state *gss, struct tlv_parsed *tp) |
static void | ns2_sns_st_configured_change (struct osmo_fsm_inst *fi, struct ns2_sns_state *gss, struct tlv_parsed *tp) |
static void | ns2_sns_st_configured (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | ns2_sns_st_configured_onenter (struct osmo_fsm_inst *fi, uint32_t old_state) |
static void | ns2_sns_st_local_procedure_onenter (struct osmo_fsm_inst *fi, uint32_t old_state) |
static void | create_nsvc_for_new_sbind (struct ns2_sns_state *gss, struct ns2_sns_bind *sbind) |
static void | ns2_sns_st_local_procedure (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static int | ns2_sns_fsm_bss_timer_cb (struct osmo_fsm_inst *fi) |
static struct gprs_ns_ie_ip4_elem * | ns2_get_sbind_ip4_entry (struct ns2_sns_state *gss, struct ns2_sns_bind *sbind, struct ns2_sns_elems *endpoints) |
static struct gprs_ns_ie_ip6_elem * | ns2_get_sbind_ip6_entry (struct ns2_sns_state *gss, struct ns2_sns_bind *sbind, struct ns2_sns_elems *endpoints) |
static int | ns2_update_weight_entry (struct ns2_sns_state *gss, struct ns2_sns_bind *sbind, struct ns2_sns_elems *endpoints) |
static void | ns2_add_procedure (struct ns2_sns_state *gss, struct ns2_sns_bind *sbind, enum sns_procedure procedure_type) |
static int | ns2_sns_add_elements (struct ns2_sns_state *gss, struct ns2_sns_bind *sbind, struct ns2_sns_elems *elems) |
static void | ns2_sns_st_all_action (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static int | ns2_sns_bss_valid_configuration (struct ns2_sns_state *gss) |
static void | ns2_sns_st_all_action_bss (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
struct osmo_fsm_inst * | ns2_sns_bss_fsm_alloc (struct gprs_ns2_nse *nse, const char *id) |
Allocate an IP-SNS FSM for the BSS side. More... | |
int | ns2_sns_rx (struct gprs_ns2_vc *nsvc, struct msgb *msg, struct tlv_parsed *tp) |
main entry point for receiving SNS messages from the network. More... | |
static void | vty_dump_sns_ip4 (struct vty *vty, const char *prefix, const struct gprs_ns_ie_ip4_elem *ip4) |
static void | vty_dump_sns_ip6 (struct vty *vty, const char *prefix, const struct gprs_ns_ie_ip6_elem *ip6) |
void | ns2_sns_dump_vty (struct vty *vty, const char *prefix, const struct gprs_ns2_nse *nse, bool stats) |
Dump the IP-SNS state to a vty. More... | |
void | ns2_sns_write_vty (struct vty *vty, const struct gprs_ns2_nse *nse) |
write IP-SNS to a vty More... | |
static struct sns_endpoint * | ns2_get_sns_endpoint (struct ns2_sns_state *state, const struct osmo_sockaddr *saddr) |
int | gprs_ns2_sns_add_endpoint (struct gprs_ns2_nse *nse, const struct osmo_sockaddr *saddr) |
gprs_ns2_sns_add_endpoint More... | |
int | gprs_ns2_sns_del_endpoint (struct gprs_ns2_nse *nse, const struct osmo_sockaddr *saddr) |
gprs_ns2_sns_del_endpoint More... | |
int | gprs_ns2_sns_count (struct gprs_ns2_nse *nse) |
gprs_ns2_sns_count More... | |
void | ns2_sns_notify_alive (struct gprs_ns2_nse *nse, struct gprs_ns2_vc *nsvc, bool alive) |
int | gprs_ns2_sns_add_bind (struct gprs_ns2_nse *nse, struct gprs_ns2_vc_bind *bind) |
int | gprs_ns2_sns_del_bind (struct gprs_ns2_nse *nse, struct gprs_ns2_vc_bind *bind) |
void | ns2_sns_update_weights (struct gprs_ns2_vc_bind *bind) |
static void | ns2_clear_sgsn (struct ns2_sns_state *gss, struct gprs_ns2_vc *size_nsvc) |
static void | ns2_sns_st_sgsn_unconfigured_onenter (struct osmo_fsm_inst *fi, uint32_t old_state) |
static void | ns2_sns_st_sgsn_unconfigured (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | ns2_sns_st_sgsn_wait_config (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | ns2_sns_st_sgsn_wait_config_ack_onenter (struct osmo_fsm_inst *fi, uint32_t old_state) |
static void | ns2_sns_st_sgsn_wait_config_ack (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static int | ns2_sns_fsm_sgsn_timer_cb (struct osmo_fsm_inst *fi) |
static void | ns2_sns_st_all_action_sgsn (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
struct osmo_fsm_inst * | ns2_sns_sgsn_fsm_alloc (struct gprs_ns2_nse *nse, const char *id) |
Allocate an IP-SNS FSM for the SGSN side. More... | |
static | __attribute__ ((constructor)) |
Variables | |
static const struct value_string | gprs_sns_event_names [] |
static const struct osmo_fsm_state | ns2_sns_bss_states [] |
static struct osmo_fsm | gprs_ns2_sns_bss_fsm |
static const struct osmo_fsm_state | ns2_sns_sgsn_states [] |
static struct osmo_fsm | gprs_ns2_sns_sgsn_fsm |
NS Sub-Network Service Protocol implementation 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05) as well as its successor 3GPP TS 48.016.
#define GPRS_SNS_FLAG_KEEP_SELECT_ENDPOINT_ORDER (void *) 1 |
#define ip46_weight_sum_data | ( | elems | ) | ip46_weight_sum(elems, true) |
#define ip46_weight_sum_sig | ( | elems | ) | ip46_weight_sum(elems, false) |
#define ip4_weight_sum_data | ( | elems | ) | ip4_weight_sum(elems, true) |
#define ip4_weight_sum_sig | ( | elems | ) | ip4_weight_sum(elems, false) |
#define ip6_weight_sum_data | ( | elems | ) | ip6_weight_sum(elems, true) |
#define ip6_weight_sum_sig | ( | elems | ) | ip6_weight_sum(elems, false) |
#define sns_failed | ( | fi, | |
reason | |||
) | _sns_failed(fi, reason, __FILE__, __LINE__) |
enum gprs_sns_bss_state |
enum ns2_sns_role |
enum sns_procedure |
|
static |
References gprs_ns2_sns_bss_fsm, gprs_ns2_sns_sgsn_fsm, OSMO_ASSERT, and osmo_fsm_register().
|
static |
References _osmo_fsm_inst_dispatch(), _osmo_fsm_inst_state_chg(), ns2_sns_state::alive, file(), gprs_ns2_free_nse(), GPRS_SNS_ROLE_SGSN, GPRS_SNS_ST_UNCONFIGURED, LOGL_ERROR, LOGPFSMLSRC, NS2_SNS_EV_REQ_SELECT_ENDPOINT, ns2_sns_state::nse, gprs_ns2_nse::nsei, gprs_ns2_nse::persistent, osmo_fsm_inst::priv, and ns2_sns_state::role.
|
static |
References ns2_sns_elems::ip4, gprs_ns_ie_ip4_elem::ip_addr, ns2_sns_elems::num_ip4, and gprs_ns_ie_ip4_elem::udp_port.
Referenced by do_sns_add(), ns2_sns_add_elements(), and ns2_sns_st_local_procedure().
|
static |
References ns2_sns_elems::ip6, gprs_ns_ie_ip6_elem::ip_addr, ns2_sns_elems::num_ip6, and gprs_ns_ie_ip6_elem::udp_port.
Referenced by do_sns_add(), ns2_sns_add_elements(), and ns2_sns_st_local_procedure().
|
static |
References ns2_sns_bind::bind, ns2_sns_state::binds, gprs_ns_ie_ip4_elem::data_weight, gprs_ns_ie_ip6_elem::data_weight, gprs_ns2_ip_connect_inactive(), GPRS_NS2_LL_UDP, ns2_sns_elems::ip4, ns2_sns_elems::ip6, gprs_ns_ie_ip4_elem::ip_addr, gprs_ns_ie_ip6_elem::ip_addr, list, gprs_ns2_vc_bind::ll, llist_for_each_entry, ns2_sns_state::nse, nse_inst_from_fi(), gprs_ns2_vc_bind::nsvc, nsvc_for_bind_and_remote(), ns2_sns_elems::num_ip4, ns2_sns_elems::num_ip6, osmo_fsm_inst::priv, ns2_sns_state::remote, gprs_ns_ie_ip4_elem::sig_weight, gprs_ns_ie_ip6_elem::sig_weight, osmo_sockaddr::sin, osmo_sockaddr::sin6, osmo_sockaddr::u, gprs_ns_ie_ip4_elem::udp_port, and gprs_ns_ie_ip6_elem::udp_port.
Referenced by ns2_sns_st_bss_config_sgsn(), and ns2_sns_st_sgsn_wait_config_ack().
|
static |
References ns2_sns_bind::bind, gprs_ns_ie_ip4_elem::data_weight, gprs_ns_ie_ip6_elem::data_weight, gprs_ns2_vc::data_weight, gprs_ns2_ip_connect_inactive(), GPRS_NS2_LL_UDP, ns2_sns_elems::ip4, ns2_sns_elems::ip6, gprs_ns_ie_ip4_elem::ip_addr, gprs_ns_ie_ip6_elem::ip_addr, gprs_ns2_vc_bind::ll, ns2_sns_state::nse, nsvc_for_bind_and_remote(), ns2_sns_elems::num_ip4, ns2_sns_elems::num_ip6, ns2_sns_state::remote, gprs_ns_ie_ip4_elem::sig_weight, gprs_ns_ie_ip6_elem::sig_weight, gprs_ns2_vc::sig_weight, osmo_sockaddr::sin, osmo_sockaddr::sin6, gprs_ns2_vc::sns_only, osmo_sockaddr::u, gprs_ns_ie_ip4_elem::udp_port, and gprs_ns_ie_ip6_elem::udp_port.
Referenced by ns2_sns_st_local_procedure().
|
static |
References add_ip4_elem(), add_ip6_elem(), ns2_sns_state::family, gprs_ns2_vc::fi, ns2_nsvc_create_ip4(), ns2_nsvc_create_ip6(), NS_CAUSE_INVAL_NR_NS_VC, NS_CAUSE_PROTO_ERR_UNSPEC, gprs_ns2_vc::nse, ns2_sns_state::nse, nse_inst_from_fi(), nsvc_by_ip4_elem(), nsvc_by_ip6_elem(), ns2_sns_elems::num_ip4, ns2_sns_elems::num_ip6, ns2_sns_state::num_max_ip4_remote, ns2_sns_state::num_max_ip6_remote, OSMO_ASSERT, osmo_fsm_inst::priv, and ns2_sns_state::remote.
Referenced by ns2_sns_st_configured_add().
|
static |
References gprs_ns_ie_ip4_elem::data_weight, gprs_ns_ie_ip6_elem::data_weight, gprs_ns2_vc::data_weight, gprs_ns2_ip_vc_remote(), gprs_ns2_ll_str(), gprs_ns_ie_ip4_elem::ip_addr, gprs_ns_ie_ip6_elem::ip_addr, list, llist_for_each_entry, LOGL_INFO, LOGPFSML, NS_CAUSE_UNKN_IP_EP, ns2_sns_state::nse, nse_inst_from_fi(), OSMO_ASSERT, osmo_sockaddr_cmp(), osmo_fsm_inst::priv, ns2_sns_state::remote, osmo_sockaddr::sa, gprs_ns_ie_ip4_elem::sig_weight, gprs_ns_ie_ip6_elem::sig_weight, gprs_ns2_vc::sig_weight, gprs_ns_ie_ip4_elem::udp_port, gprs_ns_ie_ip6_elem::udp_port, update_ip4_elem(), and update_ip6_elem().
Referenced by ns2_sns_st_configured_change().
|
static |
References gprs_ns2_free_nsvc(), gprs_ns2_ip_vc_remote(), gprs_ns2_ll_str(), gprs_ns_ie_ip4_elem::ip_addr, gprs_ns_ie_ip6_elem::ip_addr, list, llist_for_each_entry_safe, LOGL_INFO, LOGPFSML, NS_CAUSE_UNKN_IP_EP, ns2_sns_state::nse, nse_inst_from_fi(), OSMO_ASSERT, osmo_sockaddr_cmp(), osmo_fsm_inst::priv, ns2_sns_state::remote, remove_ip4_elem(), remove_ip6_elem(), osmo_sockaddr::sa, gprs_ns_ie_ip4_elem::udp_port, and gprs_ns_ie_ip6_elem::udp_port.
Referenced by ns2_sns_st_configured_add(), and ns2_sns_st_configured_delete().
const struct osmo_sockaddr * gprs_ns2_nse_sns_remote | ( | struct gprs_ns2_nse * | nse | ) |
Return the initial SNS remote socket address.
nse | NS Entity |
References gprs_ns2_nse::bss_sns_fi, ns2_sns_state::initial, ns2_sns_state::nse, osmo_fsm_inst::priv, and sns_endpoint::saddr.
int gprs_ns2_sns_add_bind | ( | struct gprs_ns2_nse * | nse, |
struct gprs_ns2_vc_bind * | bind | ||
) |
References ns2_sns_bind::bind, ns2_sns_state::binds, gprs_ns2_nse::bss_sns_fi, gprs_ns2_is_ip_bind(), list, ns2_sns_bind::list, llist_add_tail(), llist_empty(), llist_for_each_entry, NS2_SNS_EV_REQ_ADD_BIND, OSMO_ASSERT, osmo_fsm_inst_dispatch, and osmo_fsm_inst::priv.
Referenced by DEFUN(), ns2_create_vc_sns(), and ns2_sns_add_sns_default_binds().
int gprs_ns2_sns_add_endpoint | ( | struct gprs_ns2_nse * | nse, |
const struct osmo_sockaddr * | saddr | ||
) |
gprs_ns2_sns_add_endpoint
[in] | nse | |
[in] | sockaddr |
References gprs_ns2_nse::bss_sns_fi, gprs_ns2_nse::dialect, GPRS_NS2_DIALECT_SNS, GPRS_NS2_LL_UDP, sns_endpoint::list, gprs_ns2_nse::ll, llist_add_tail(), llist_empty(), ns2_get_sns_endpoint(), NS2_SNS_EV_REQ_SELECT_ENDPOINT, osmo_fsm_inst_dispatch, osmo_fsm_inst::priv, sns_endpoint::saddr, and ns2_sns_state::sns_endpoints.
Referenced by DEFUN().
int gprs_ns2_sns_count | ( | struct gprs_ns2_nse * | nse | ) |
gprs_ns2_sns_count
[in] | nse | NS Entity whose IP-SNS endpoints shall be printed |
References gprs_ns2_nse::bss_sns_fi, gprs_ns2_nse::dialect, GPRS_NS2_DIALECT_SNS, GPRS_NS2_LL_UDP, list, gprs_ns2_nse::ll, llist_for_each_entry, osmo_fsm_inst::priv, and ns2_sns_state::sns_endpoints.
Referenced by vty_nse_check_sns().
int gprs_ns2_sns_del_bind | ( | struct gprs_ns2_nse * | nse, |
struct gprs_ns2_vc_bind * | bind | ||
) |
References ns2_sns_bind::bind, ns2_sns_state::binds, gprs_ns2_nse::bss_sns_fi, ns2_sns_state::initial_bind, list, ns2_sns_bind::list, llist_del(), llist_entry, llist_for_each_entry_safe, NS2_SNS_EV_REQ_DELETE_BIND, osmo_fsm_inst_dispatch, llist_head::prev, and osmo_fsm_inst::priv.
Referenced by DEFUN(), and gprs_ns2_free_bind().
int gprs_ns2_sns_del_endpoint | ( | struct gprs_ns2_nse * | nse, |
const struct osmo_sockaddr * | saddr | ||
) |
gprs_ns2_sns_del_endpoint
[in] | nse | |
[in] | sockaddr |
References gprs_ns2_nse::bss_sns_fi, gprs_ns2_nse::dialect, GPRS_NS2_DIALECT_SNS, gprs_ns2_free_nsvcs(), GPRS_NS2_LL_UDP, ns2_sns_state::initial, list, sns_endpoint::list, gprs_ns2_nse::ll, llist_del(), llist_entry, LOGL_INFO, LOGNSE, llist_head::next, ns2_get_sns_endpoint(), llist_head::prev, osmo_fsm_inst::priv, sns_endpoint::saddr, and ns2_sns_state::sns_endpoints.
Referenced by DEFUN().
|
static |
References data_weight, ip4_weight_sum(), and ip6_weight_sum().
Referenced by ns2_sns_st_all_action().
|
static |
References data_weight, gprs_ns_ie_ip4_elem::data_weight, ns2_sns_elems::ip4, ns2_sns_elems::num_ip4, and gprs_ns_ie_ip4_elem::sig_weight.
Referenced by ip46_weight_sum().
|
static |
References data_weight, gprs_ns_ie_ip6_elem::data_weight, ns2_sns_elems::ip6, ns2_sns_elems::num_ip6, and gprs_ns_ie_ip6_elem::sig_weight.
Referenced by ip46_weight_sum().
|
static |
References ns2_sns_bind::bind, gprs_ns2_nse::bss_sns_fi, gprs_ns_ie_ip4_elem::data_weight, gprs_ns_ie_ip6_elem::data_weight, ns2_sns_procedure::data_weight, ns2_sns_state::family, gprs_ns2_ip_bind_sockaddr(), GPRS_SNS_ST_CONFIGURED, GPRS_SNS_ST_LOCAL_PROCEDURE, ns2_sns_procedure::ip4, ns2_sns_procedure::ip6, gprs_ns_ie_ip4_elem::ip_addr, gprs_ns_ie_ip6_elem::ip_addr, list, ns2_sns_procedure::list, llist_add_tail(), llist_for_each_entry, NS_TOUT_TSNS_PROV, ns2_sns_state::nse, gprs_ns2_nse::nsi, OSMO_ASSERT, osmo_fsm_inst_state_chg, ns2_sns_procedure::procedure, ns2_sns_state::procedures, ns2_sns_procedure::running, osmo_sockaddr::sa, ns2_sns_procedure::sbind, gprs_ns_ie_ip4_elem::sig_weight, gprs_ns_ie_ip6_elem::sig_weight, ns2_sns_procedure::sig_weight, osmo_sockaddr::sin, osmo_sockaddr::sin6, gprs_ns2_vc_bind::sns_data_weight, SNS_PROC_ADD, SNS_PROC_CHANGE_WEIGHT, SNS_PROC_DEL, gprs_ns2_vc_bind::sns_sig_weight, osmo_fsm_inst::state, gprs_ns2_inst::timeout, osmo_sockaddr::u, gprs_ns_ie_ip4_elem::udp_port, and gprs_ns_ie_ip6_elem::udp_port.
Referenced by ns2_sns_st_all_action().
|
static |
References ns2_sns_elems::ip4, ns2_sns_elems::ip6, ns2_sns_elems::num_ip4, and ns2_sns_elems::num_ip6.
Referenced by ns2_clear_sgsn(), ns2_sns_compute_local_ep_from_binds(), and ns2_sns_st_all_action_bss().
|
static |
References ns2_sns_state::current_procedure, list, llist_del(), llist_for_each_entry_safe, ns2_sns_procedure::procedure, and ns2_sns_state::procedures.
Referenced by ns2_clear_sgsn(), and ns2_sns_st_bss_size_onenter().
|
static |
References ns2_sns_state::block_no_nsvc_events, gprs_ns2_free_nsvc(), list, llist_for_each_entry_safe, ns2_sns_state::local, ns2_clear_elems(), ns2_clear_procedures(), ns2_sns_state::nse, gprs_ns2_nse::nsvc, and ns2_sns_state::remote.
Referenced by ns2_sns_st_all_action_sgsn(), and ns2_sns_st_sgsn_unconfigured_onenter().
|
static |
|
static |
|
static |
References list, llist_for_each_entry, osmo_sockaddr_cmp(), sns_endpoint::saddr, and ns2_sns_state::sns_endpoints.
Referenced by gprs_ns2_sns_add_endpoint(), and gprs_ns2_sns_del_endpoint().
|
static |
|
static |
|
static |
References add_ip4_elem(), add_ip6_elem(), ns2_sns_bind::bind, gprs_ns_ie_ip4_elem::data_weight, gprs_ns_ie_ip6_elem::data_weight, ns2_sns_state::family, gprs_ns2_ip_bind_sockaddr(), gprs_ns_ie_ip4_elem::ip_addr, gprs_ns_ie_ip6_elem::ip_addr, OSMO_ASSERT, osmo_sockaddr::sa, gprs_ns_ie_ip4_elem::sig_weight, gprs_ns_ie_ip6_elem::sig_weight, osmo_sockaddr::sin, osmo_sockaddr::sin6, gprs_ns2_vc_bind::sns_data_weight, gprs_ns2_vc_bind::sns_sig_weight, osmo_sockaddr::u, gprs_ns_ie_ip4_elem::udp_port, and gprs_ns_ie_ip6_elem::udp_port.
Referenced by ns2_sns_st_all_action().
struct osmo_fsm_inst * ns2_sns_bss_fsm_alloc | ( | struct gprs_ns2_nse * | nse, |
const char * | id | ||
) |
Allocate an IP-SNS FSM for the BSS side.
[in] | nse | NS Entity in which the FSM runs |
[in] | id | string identifier |
References ns2_sns_state::binds, gprs_ns2_sns_bss_fsm, GPRS_SNS_ROLE_BSS, INIT_LLIST_HEAD, LOGL_DEBUG, ns2_sns_state::nse, ns2_sns_state::num_max_ip4_remote, ns2_sns_state::num_max_ip6_remote, osmo_fsm_inst_alloc(), osmo_fsm_inst_term, OSMO_FSM_TERM_ERROR, osmo_fsm_inst::priv, ns2_sns_state::procedures, ns2_sns_state::role, and ns2_sns_state::sns_endpoints.
Referenced by ns2_nse_set_dialect().
|
static |
References ns2_sns_bind::bind, ns2_sns_state::binds, gprs_ns2_ip_bind_sockaddr(), list, llist_empty(), llist_for_each_entry, osmo_sockaddr::sa, sns_endpoint::saddr, gprs_ns2_vc_bind::sns_data_weight, ns2_sns_state::sns_endpoints, gprs_ns2_vc_bind::sns_sig_weight, and osmo_sockaddr::u.
Referenced by ns2_sns_st_all_action_bss().
|
static |
References ns2_sns_state::binds, ns2_sns_state::initial_bind, list, ns2_sns_bind::list, llist_entry, llist_first_entry_or_null, and llist_head::next.
Referenced by ns2_sns_st_bss_size_onenter().
|
static |
References ns2_sns_state::binds, ns2_sns_state::family, gprs_ns2_ip_bind_sockaddr(), gprs_ns2_ip_vc_remote(), GPRS_SNS_ROLE_BSS, ns2_sns_state::initial, ns2_sns_elems::ip4, ns2_sns_elems::ip6, list, llist_count(), llist_for_each_entry, ns2_sns_state::local, LOGL_ERROR, LOGPFSML, ns2_clear_elems(), ns2_sns_copy_local_endpoints(), ns2_sns_elems::num_ip4, ns2_sns_elems::num_ip6, ns2_sns_state::num_max_ip4_remote, ns2_sns_state::num_max_ip6_remote, ns2_sns_state::num_max_nsvcs, OSMO_MAX, osmo_sockaddr_local_ip(), osmo_fsm_inst::priv, ns2_sns_state::remote, ns2_sns_state::role, sns_endpoint::saddr, and ns2_sns_state::sns_nsvc.
Referenced by ns2_sns_st_all_action_sgsn(), and ns2_sns_st_bss_size_onenter().
|
static |
|
static |
References ns2_sns_state::binds, gprs_ns2_ip_bind_sockaddr(), list, llist_for_each_entry, osmo_fsm_inst::priv, and osmo_sockaddr::sa.
Referenced by ns2_sns_st_all_action_sgsn().
void ns2_sns_dump_vty | ( | struct vty * | vty, |
const char * | prefix, | ||
const struct gprs_ns2_nse * | nse, | ||
bool | stats | ||
) |
Dump the IP-SNS state to a vty.
[in] | vty | VTY to which the state shall be printed |
[in] | prefix | prefix to print at start of each line (typically indenting) |
[in] | nse | NS Entity whose IP-SNS state shall be printed |
[in] | stats | Whether or not statistics shall also be printed |
References gprs_ns2_nse::bss_sns_fi, ns2_sns_elems::ip4, ns2_sns_elems::ip6, ns2_sns_state::local, ns2_sns_state::nse, ns2_sns_elems::num_ip4, ns2_sns_elems::num_ip6, ns2_sns_state::num_max_ip4_remote, ns2_sns_state::num_max_ip6_remote, ns2_sns_state::num_max_nsvcs, osmo_fsm_inst::priv, ns2_sns_state::remote, vty_dump_sns_ip4(), vty_dump_sns_ip6(), VTY_NEWLINE, vty_out(), and vty_out_fsm_inst2().
Referenced by dump_nse().
|
static |
References GPRS_SNS_ST_BSS_CONFIG_BSS, GPRS_SNS_ST_BSS_CONFIG_SGSN, GPRS_SNS_ST_BSS_SIZE, GPRS_SNS_ST_LOCAL_PROCEDURE, ns2_sns_state::N, NS_TOUT_TSNS_CONFIG_RETRIES, NS_TOUT_TSNS_PROV, NS_TOUT_TSNS_SIZE_RETRIES, gprs_ns2_inst::nse, ns2_sns_state::nse, nse_inst_from_fi(), osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, sns_failed, osmo_fsm_inst::T, and gprs_ns2_inst::timeout.
|
static |
References GPRS_SNS_ST_LOCAL_PROCEDURE, GPRS_SNS_ST_SGSN_WAIT_CONFIG_ACK, GPRS_SNS_ST_UNCONFIGURED, LOGL_ERROR, LOGPFSML, ns2_sns_state::N, NS_TOUT_TSNS_CONFIG_RETRIES, NS_TOUT_TSNS_PROCEDURES_RETRIES, NS_TOUT_TSNS_PROV, gprs_ns2_inst::nse, ns2_sns_state::nse, nse_inst_from_fi(), osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, sns_failed, osmo_fsm_inst::T, and gprs_ns2_inst::timeout.
void ns2_sns_notify_alive | ( | struct gprs_ns2_nse * | nse, |
struct gprs_ns2_vc * | nsvc, | ||
bool | alive | ||
) |
References ns2_sns_state::alive, ns2_sns_state::block_no_nsvc_events, gprs_ns2_nse::bss_sns_fi, GPRS_SNS_ST_CONFIGURED, GPRS_SNS_ST_LOCAL_PROCEDURE, list, llist_for_each_entry, NS2_SNS_EV_REQ_NO_NSVC, NS2_SNS_EV_REQ_NSVC_ALIVE, ns2_sns_replace_nsvc(), ns2_vc_is_unblocked(), gprs_ns2_vc::nse, gprs_ns2_nse::nsvc, osmo_fsm_inst_dispatch, osmo_fsm_inst::priv, sns_failed, ns2_sns_state::sns_nsvc, osmo_fsm_inst::state, and gprs_ns2_nse::sum_sig_weight.
Referenced by ns2_nse_notify_unblocked().
void ns2_sns_replace_nsvc | ( | struct gprs_ns2_vc * | nsvc | ) |
called when a nsvc is beeing freed or the nsvc became dead
References ns2_sns_state::alive, ns2_sns_state::block_no_nsvc_events, gprs_ns2_nse::bss_sns_fi, if(), list, llist_for_each_entry, NS2_SNS_EV_REQ_NO_NSVC, ns2_vc_is_unblocked(), ns2_sns_state::nse, gprs_ns2_nse::nsvc, osmo_fsm_inst_dispatch, osmo_fsm_inst::priv, and ns2_sns_state::sns_nsvc.
Referenced by gprs_ns2_free_nsvc(), and ns2_sns_notify_alive().
int ns2_sns_rx | ( | struct gprs_ns2_vc * | nsvc, |
struct msgb * | msg, | ||
struct tlv_parsed * | tp | ||
) |
main entry point for receiving SNS messages from the network.
[in] | nsvc | NS-VC on which the message was received |
[in] | msg | message buffer of the IP-SNS message |
[in] | tp | parsed TLV structure of message |
References gprs_ns2_nse::bss_sns_fi, gprs_ns_hdr::data, get_value_string(), gprs_ns_pdu_strings, if(), LOGL_DEBUG, LOGL_ERROR, LOGL_NOTICE, LOGNSVC, LOGPFSML, msg, msgb_free(), NS2_SNS_EV_RX_ACK, NS2_SNS_EV_RX_ADD, NS2_SNS_EV_RX_CHANGE_WEIGHT, NS2_SNS_EV_RX_CONFIG, NS2_SNS_EV_RX_CONFIG_ACK, NS2_SNS_EV_RX_CONFIG_END, NS2_SNS_EV_RX_DELETE, NS2_SNS_EV_RX_SIZE, NS2_SNS_EV_RX_SIZE_ACK, gprs_ns2_vc::nse, nsei, gprs_ns2_nse::nsei, gprs_ns2_nse::nsvc, osmo_fsm_inst_dispatch, gprs_ns_hdr::pdu_type, osmo_fsm_inst::priv, SNS_PDUT_ACK, SNS_PDUT_ADD, SNS_PDUT_CHANGE_WEIGHT, SNS_PDUT_CONFIG, SNS_PDUT_CONFIG_ACK, SNS_PDUT_DELETE, SNS_PDUT_SIZE, and SNS_PDUT_SIZE_ACK.
struct osmo_fsm_inst * ns2_sns_sgsn_fsm_alloc | ( | struct gprs_ns2_nse * | nse, |
const char * | id | ||
) |
Allocate an IP-SNS FSM for the SGSN side.
[in] | nse | NS Entity in which the FSM runs |
[in] | id | string identifier |
References ns2_sns_state::binds, gprs_ns2_sns_sgsn_fsm, GPRS_SNS_ROLE_SGSN, INIT_LLIST_HEAD, LOGL_DEBUG, ns2_sns_state::nse, osmo_fsm_inst_alloc(), osmo_fsm_inst_term, OSMO_FSM_TERM_ERROR, osmo_fsm_inst::priv, ns2_sns_state::procedures, ns2_sns_state::role, and ns2_sns_state::sns_endpoints.
Referenced by ns2_nse_set_dialect().
|
static |
References gprs_ns2_nse::alive, ns2_sns_state::alive, ns2_sns_state::block_no_nsvc_events, gprs_ns2_nse::bss_sns_fi, data, ns2_sns_state::family, gprs_ns2_free_nsvc(), GPRS_SNS_FLAG_KEEP_SELECT_ENDPOINT_ORDER, GPRS_SNS_ROLE_BSS, GPRS_SNS_ST_BSS_CONFIG_BSS, GPRS_SNS_ST_BSS_CONFIG_SGSN, GPRS_SNS_ST_BSS_SIZE, GPRS_SNS_ST_CONFIGURED, GPRS_SNS_ST_LOCAL_PROCEDURE, GPRS_SNS_ST_UNCONFIGURED, ip46_weight_sum(), list, llist_for_each_entry, llist_for_each_entry_safe, ns2_sns_state::local, ns2_sns_state::local_procedure, LOGL_ERROR, LOGPFSML, ns2_add_procedure(), ns2_sns_add_elements(), NS2_SNS_EV_REQ_ADD_BIND, NS2_SNS_EV_REQ_CHANGE_WEIGHT, NS2_SNS_EV_REQ_DELETE_BIND, NS2_SNS_EV_REQ_SELECT_ENDPOINT, ns2_update_weight_entry(), ns2_sns_state::nse, nse_inst_from_fi(), gprs_ns2_nse::nsei, gprs_ns2_nse::nsvc, ns2_sns_elems::num_ip4, ns2_sns_elems::num_ip6, ns2_sns_state::num_max_ip4_remote, ns2_sns_state::num_max_ip6_remote, ns2_sns_state::num_max_nsvcs, osmo_fsm_inst_dispatch, osmo_fsm_inst::priv, ns2_sns_state::procedures, ns2_sns_state::remote, remove_bind_elem(), ns2_sns_state::role, sns_failed, SNS_PROC_ADD, SNS_PROC_CHANGE_WEIGHT, SNS_PROC_DEL, osmo_fsm_inst::state, and gprs_ns2_nse::sum_sig_weight.
Referenced by ns2_sns_st_all_action_bss(), and ns2_sns_st_all_action_sgsn().
|
static |
References ns2_sns_state::block_no_nsvc_events, data, ns2_sns_state::family, GPRS_NS2_AFF_CAUSE_SNS_NO_ENDPOINTS, GPRS_SNS_ST_BSS_SIZE, GPRS_SNS_ST_UNCONFIGURED, ns2_sns_state::initial, list, sns_endpoint::list, llist_entry, llist_first_entry, ns2_sns_state::local, llist_head::next, ns2_clear_elems(), ns2_free_nsvcs(), ns2_prim_status_ind(), ns2_sns_bss_valid_configuration(), NS2_SNS_EV_REQ_FREE_NSVCS, NS2_SNS_EV_REQ_NO_NSVC, NS2_SNS_EV_REQ_SELECT_ENDPOINT, ns2_sns_st_all_action(), NS_TOUT_TSNS_PROV, ns2_sns_state::nse, nse_inst_from_fi(), gprs_ns2_nse::nsi, osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, ns2_sns_state::remote, ns2_sns_state::reselection_running, osmo_sockaddr::sa, sns_endpoint::saddr, ns2_sns_state::sns_endpoints, sns_failed, gprs_ns2_inst::timeout, and osmo_sockaddr::u.
|
static |
References ns2_sns_state::block_no_nsvc_events, cause, data, gprs_ns2_vc::data_weight, ns2_sns_state::family, GPRS_SNS_ROLE_SGSN, GPRS_SNS_ST_SGSN_WAIT_CONFIG, GPRS_SNS_ST_UNCONFIGURED, ns2_sns_state::local, LOGL_ERROR, LOGPFSML, ns2_sns_state::N, ns2_clear_sgsn(), ns2_sns_compute_local_ep_from_binds(), ns2_sns_count_num_local_ep(), NS2_SNS_EV_REQ_FREE_NSVCS, NS2_SNS_EV_RX_SIZE, ns2_sns_st_all_action(), ns2_tx_sns_size_ack(), ns2_vc_force_unconfigured(), NS_CAUSE_INVAL_NR_IPv4_EP, NS_CAUSE_INVAL_NR_IPv6_EP, NS_CAUSE_INVAL_NR_NS_VC, NS_CAUSE_MISSING_ESSENT_IE, NS_IE_IPv4_EP_NR, NS_IE_IPv6_EP_NR, NS_IE_MAX_NR_NSVC, NS_IE_RESET_FLAG, ns2_sns_elems::num_ip4, ns2_sns_elems::num_ip6, ns2_sns_state::num_max_ip4_remote, ns2_sns_state::num_max_ip6_remote, ns2_sns_state::num_max_nsvcs, OSMO_ASSERT, osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, ns2_sns_state::role, gprs_ns2_vc::sig_weight, sns_failed, ns2_sns_state::sns_nsvc, osmo_fsm_inst::state, TLVP_PRES_LEN, TLVP_VAL, and tlvp_val16be().
|
static |
References data, gprs_ns2_cause_str(), GPRS_SNS_ROLE_BSS, GPRS_SNS_ST_BSS_CONFIG_SGSN, LOGL_ERROR, LOGPFSML, NS2_SNS_EV_RX_CONFIG_ACK, NS_IE_CAUSE, NS_TOUT_TSNS_PROV, ns2_sns_state::nse, nse_inst_from_fi(), OSMO_ASSERT, osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, ns2_sns_state::role, TLVP_VAL, and TLVP_VAL_MINLEN.
|
static |
References ns2_sns_state::family, GPRS_SNS_ROLE_BSS, GPRS_SNS_ST_BSS_CONFIG_BSS, ns2_sns_elems::ip4, ns2_sns_elems::ip6, ns2_sns_state::local, ns2_sns_state::N, ns2_tx_sns_config(), ns2_sns_elems::num_ip4, ns2_sns_elems::num_ip6, OSMO_ASSERT, osmo_fsm_inst::priv, ns2_sns_state::role, and ns2_sns_state::sns_nsvc.
|
static |
References cause, create_missing_nsvcs(), data, gprs_ns2_start_alive_all_nsvcs(), GPRS_SNS_ROLE_BSS, GPRS_SNS_ST_CONFIGURED, GPRS_SNS_ST_UNCONFIGURED, ip46_weight_sum_data, ip46_weight_sum_sig, NS2_SNS_EV_RX_CONFIG, NS2_SNS_EV_RX_CONFIG_END, ns2_tx_sns_config_ack(), NS_CAUSE_INVAL_WEIGH, ns_sns_append_remote_eps(), NS_TOUT_TSNS_PROV, ns2_sns_state::nse, nse_inst_from_fi(), gprs_ns2_nse::nsi, OSMO_ASSERT, osmo_fsm_inst_state_chg, osmo_timer_schedule(), osmo_fsm_inst::priv, ns2_sns_state::remote, ns2_sns_state::role, ns2_sns_state::sns_nsvc, gprs_ns2_inst::timeout, and osmo_fsm_inst::timer.
|
static |
|
static |
References data, gprs_ns2_cause_str(), GPRS_SNS_ROLE_BSS, GPRS_SNS_ST_BSS_CONFIG_BSS, LOGL_ERROR, LOGPFSML, NS2_SNS_EV_RX_SIZE_ACK, NS_IE_CAUSE, NS_TOUT_TSNS_PROV, gprs_ns2_inst::nse, ns2_sns_state::nse, nse_inst_from_fi(), OSMO_ASSERT, osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, ns2_sns_state::role, gprs_ns2_inst::timeout, TLVP_VAL, and TLVP_VAL_MINLEN.
|
static |
References ns2_sns_state::alive, ns2_sns_bind::bind, GPRS_NS2_AFF_CAUSE_SNS_FAILURE, GPRS_SNS_ROLE_BSS, GPRS_SNS_ST_BSS_SIZE, GPRS_SNS_ST_UNCONFIGURED, ns2_sns_state::initial, ns2_sns_state::initial_bind, ns2_sns_state::local, ns2_sns_state::N, ns2_clear_procedures(), ns2_ip_bind_connect(), ns2_prim_status_ind(), ns2_sns_choose_next_bind(), ns2_sns_compute_local_ep_from_binds(), ns2_tx_sns_size(), ns2_sns_state::nse, ns2_sns_elems::num_ip4, ns2_sns_elems::num_ip6, ns2_sns_state::num_max_ip4_remote, ns2_sns_state::num_max_nsvcs, OSMO_ASSERT, osmo_fsm_inst::priv, ns2_sns_state::role, sns_endpoint::saddr, ns2_sns_state::sns_nsvc, and gprs_ns2_vc::sns_only.
|
static |
References GPRS_SNS_ROLE_BSS, OSMO_ASSERT, osmo_fsm_inst::priv, and ns2_sns_state::role.
|
static |
|
static |
References cause, do_sns_add(), do_sns_delete(), ns2_sns_state::family, gprs_ns2_start_alive_all_nsvcs(), ns2_tx_sns_ack(), NS_CAUSE_INVAL_NR_IPv4_EP, NS_CAUSE_INVAL_NR_IPv6_EP, NS_IE_IPv4_LIST, NS_IE_IPv6_LIST, NS_IE_TRANS_ID, ns2_sns_state::nse, ns2_sns_state::sns_nsvc, TLVP_LEN, TLVP_PRESENT, and TLVP_VAL.
Referenced by ns2_sns_st_configured(), and ns2_sns_st_local_procedure().
|
static |
References cause, do_sns_change_weight(), ns2_tx_sns_ack(), NS_CAUSE_INVAL_NR_IPv4_EP, NS_IE_IPv4_LIST, NS_IE_IPv6_LIST, NS_IE_TRANS_ID, ns2_sns_state::sns_nsvc, TLVP_LEN, TLVP_PRESENT, and TLVP_VAL.
Referenced by ns2_sns_st_configured(), and ns2_sns_st_local_procedure().
|
static |
References cause, do_sns_delete(), ns2_sns_state::family, ns2_sns_elems::ip4, ns2_sns_elems::ip6, ip_addr, ns2_tx_sns_ack(), NS_CAUSE_INVAL_NR_IPv4_EP, NS_CAUSE_INVAL_NR_IPv6_EP, NS_CAUSE_UNKN_IP_ADDR, NS_IE_IP_ADDR, NS_IE_IPv4_LIST, NS_IE_IPv6_LIST, NS_IE_TRANS_ID, ns2_sns_elems::num_ip4, ns2_sns_elems::num_ip6, ns2_sns_state::remote, ns2_sns_state::sns_nsvc, TLVP_LEN, TLVP_PRES_LEN, TLVP_PRESENT, and TLVP_VAL.
Referenced by ns2_sns_st_configured(), and ns2_sns_st_local_procedure().
|
static |
References ns2_sns_state::alive, gprs_ns2_nse::bss_sns_fi, GPRS_NS2_AFF_CAUSE_SNS_CONFIGURED, gprs_ns2_free_nsvc(), GPRS_SNS_ST_LOCAL_PROCEDURE, list, llist_empty(), llist_for_each_entry, ns2_prim_status_ind(), ns2_vc_is_unblocked(), NS_TOUT_TSNS_PROV, ns2_sns_state::nse, nse_inst_from_fi(), gprs_ns2_nse::nsi, gprs_ns2_nse::nsvc, osmo_fsm_inst_state_chg, osmo_timer_del(), osmo_fsm_inst::priv, ns2_sns_state::procedures, ns2_sns_state::sns_nsvc, gprs_ns2_vc::sns_only, gprs_ns2_inst::timeout, and osmo_fsm_inst::timer.
|
static |
References add_ip4_elem(), add_ip6_elem(), gprs_ns2_nse::bss_sns_fi, cause, create_nsvc_for_new_sbind(), ns2_sns_state::current_procedure, data, gprs_ns_ie_ip4_elem::data_weight, gprs_ns_ie_ip6_elem::data_weight, ns2_sns_state::family, gprs_ns2_start_alive_all_nsvcs(), GPRS_SNS_ST_CONFIGURED, GPRS_SNS_ST_LOCAL_PROCEDURE, ns2_sns_procedure::ip4, ns2_sns_elems::ip4, ns2_sns_procedure::ip6, ns2_sns_elems::ip6, gprs_ns_ie_ip4_elem::ip_addr, gprs_ns_ie_ip6_elem::ip_addr, ns2_sns_procedure::list, llist_del(), llist_empty(), ns2_sns_state::local, LOGL_ERROR, LOGL_INFO, LOGPFSML, NS2_SNS_EV_RX_ACK, NS2_SNS_EV_RX_ADD, NS2_SNS_EV_RX_CHANGE_WEIGHT, NS2_SNS_EV_RX_DELETE, ns2_sns_st_configured_add(), ns2_sns_st_configured_change(), ns2_sns_st_configured_delete(), NS_IE_CAUSE, NS_IE_TRANS_ID, NS_TOUT_TSNS_PROV, ns2_sns_state::nse, nse_inst_from_fi(), gprs_ns2_nse::nsi, ns2_sns_elems::num_ip4, ns2_sns_elems::num_ip6, OSMO_ASSERT, osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, ns2_sns_procedure::procedure, ns2_sns_state::procedures, remove_ip4_elem(), remove_ip6_elem(), ns2_sns_procedure::sbind, gprs_ns_ie_ip4_elem::sig_weight, gprs_ns_ie_ip6_elem::sig_weight, sns_failed, SNS_PROC_ADD, SNS_PROC_CHANGE_WEIGHT, SNS_PROC_DEL, gprs_ns2_inst::timeout, TLVP_PRESENT, tlvp_val8(), ns2_sns_procedure::trans_id, gprs_ns_ie_ip4_elem::udp_port, and gprs_ns_ie_ip6_elem::udp_port.
|
static |
References ns2_sns_state::current_procedure, ns2_sns_state::family, GPRS_SNS_ST_CONFIGURED, if(), ns2_sns_procedure::ip4, ns2_sns_procedure::ip6, list, llist_first_entry_or_null, ns2_sns_state::N, ns2_tx_sns_add(), ns2_tx_sns_change_weight(), ns2_tx_sns_del(), osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, ns2_sns_procedure::procedure, ns2_sns_state::procedures, ns2_sns_procedure::running, ns2_sns_state::sns_nsvc, SNS_PROC_ADD, SNS_PROC_CHANGE_WEIGHT, SNS_PROC_DEL, ns2_sns_procedure::trans_id, and ns2_sns_state::trans_id.
|
static |
References GPRS_SNS_ROLE_SGSN, OSMO_ASSERT, osmo_fsm_inst::priv, and ns2_sns_state::role.
|
static |
References ns2_clear_sgsn(), and osmo_fsm_inst::priv.
|
static |
References cause, data, GPRS_SNS_ROLE_SGSN, GPRS_SNS_ST_SGSN_WAIT_CONFIG_ACK, GPRS_SNS_ST_UNCONFIGURED, ip46_weight_sum_data, ip46_weight_sum_sig, NS2_SNS_EV_RX_CONFIG, NS2_SNS_EV_RX_CONFIG_END, ns2_tx_sns_config_ack(), NS_CAUSE_INVAL_WEIGH, ns_sns_append_remote_eps(), NS_TOUT_TSNS_PROV, gprs_ns2_inst::nse, ns2_sns_state::nse, nse_inst_from_fi(), OSMO_ASSERT, osmo_fsm_inst_state_chg, osmo_timer_schedule(), osmo_fsm_inst::priv, ns2_sns_state::remote, ns2_sns_state::role, ns2_sns_state::sns_nsvc, gprs_ns2_inst::timeout, and osmo_fsm_inst::timer.
|
static |
References create_missing_nsvcs(), data, gprs_ns2_cause_str(), gprs_ns2_start_alive_all_nsvcs(), GPRS_SNS_ROLE_SGSN, GPRS_SNS_ST_CONFIGURED, GPRS_SNS_ST_UNCONFIGURED, LOGL_ERROR, LOGPFSML, NS2_SNS_EV_RX_CONFIG_ACK, NS_IE_CAUSE, ns_sns_configured_timeout(), ns2_sns_state::nse, nse_inst_from_fi(), OSMO_ASSERT, osmo_fsm_inst_state_chg, osmo_fsm_inst::priv, ns2_sns_state::role, TLVP_VAL, and TLVP_VAL_MINLEN.
|
static |
void ns2_sns_update_weights | ( | struct gprs_ns2_vc_bind * | bind | ) |
References ns2_sns_bind::bind, ns2_sns_state::binds, gprs_ns2_nse::bss_sns_fi, ns2_sns_state::family, gprs_ns2_ip_bind_sockaddr(), list, llist_for_each_entry, NS2_SNS_EV_REQ_CHANGE_WEIGHT, gprs_ns2_inst::nse, ns2_sns_state::nse, gprs_ns2_vc_bind::nsi, osmo_fsm_inst_dispatch, osmo_fsm_inst::priv, osmo_sockaddr::sa, and osmo_sockaddr::u.
Referenced by gprs_ns2_ip_bind_set_sns_weight().
void ns2_sns_write_vty | ( | struct vty * | vty, |
const struct gprs_ns2_nse * | nse | ||
) |
write IP-SNS to a vty
[in] | vty | VTY to which the state shall be printed |
[in] | nse | NS Entity whose IP-SNS state shall be printed |
References gprs_ns2_nse::bss_sns_fi, osmo_sockaddr_str::ip, list, llist_for_each_entry, ns2_sns_state::nse, osmo_sockaddr_str_from_sockaddr(), osmo_sockaddr_str::port, osmo_fsm_inst::priv, sns_endpoint::saddr, osmo_sockaddr::sas, ns2_sns_state::sns_endpoints, osmo_sockaddr::u, VTY_NEWLINE, and vty_out().
Referenced by _config_write_ns_nse().
|
static |
References ns2_sns_bind::bind, gprs_ns_ie_ip4_elem::data_weight, gprs_ns_ie_ip6_elem::data_weight, ns2_sns_state::family, ip4_weight_sum_data, ip4_weight_sum_sig, ip6_weight_sum_data, ip6_weight_sum_sig, ns2_get_sbind_ip4_entry(), ns2_get_sbind_ip6_entry(), OSMO_ASSERT, gprs_ns_ie_ip4_elem::sig_weight, gprs_ns_ie_ip6_elem::sig_weight, gprs_ns2_vc_bind::sns_data_weight, and gprs_ns2_vc_bind::sns_sig_weight.
Referenced by ns2_sns_st_all_action().
|
static |
References gprs_ns2_inst::binding, data_weight, gprs_ns2_ip_connect_inactive(), GPRS_NS2_LL_UDP, list, gprs_ns2_vc_bind::ll, llist_for_each_entry, LOGL_ERROR, LOGPFSML, gprs_ns2_inst::nse, gprs_ns2_vc_bind::nsi, gprs_ns2_vc_bind::nsvc, and sig_weight.
Referenced by ns2_nsvc_create_ip4(), and ns2_nsvc_create_ip6().
|
static |
References if(), ns2_sns_elems::ip4, ns2_sns_elems::ip6, LOGL_INFO, LOGPFSML, NS_CAUSE_INVAL_NR_IPv4_EP, NS_CAUSE_INVAL_NR_IPv6_EP, NS_IE_IPv4_LIST, NS_IE_IPv6_LIST, ns2_sns_elems::num_ip4, ns2_sns_elems::num_ip6, osmo_fsm_inst::priv, ns2_sns_state::remote, TLVP_LEN, TLVP_PRESENT, and TLVP_VAL.
Referenced by ns2_sns_st_bss_config_sgsn(), and ns2_sns_st_sgsn_wait_config().
|
inlinestatic |
References NS_TOUT_TNS_ALIVE, NS_TOUT_TNS_ALIVE_RETRIES, NS_TOUT_TNS_TEST, nse_inst_from_fi(), gprs_ns2_nse::nsi, and gprs_ns2_inst::timeout.
Referenced by ns2_sns_st_sgsn_wait_config_ack().
|
inlinestatic |
References ns2_sns_state::nse, and osmo_fsm_inst::priv.
Referenced by create_missing_nsvcs(), do_sns_add(), do_sns_change_weight(), do_sns_delete(), ns2_sns_fsm_bss_timer_cb(), ns2_sns_fsm_sgsn_timer_cb(), ns2_sns_st_all_action(), ns2_sns_st_all_action_bss(), ns2_sns_st_bss_config_bss(), ns2_sns_st_bss_config_sgsn(), ns2_sns_st_bss_size(), ns2_sns_st_configured_onenter(), ns2_sns_st_local_procedure(), ns2_sns_st_sgsn_wait_config(), ns2_sns_st_sgsn_wait_config_ack(), and ns_sns_configured_timeout().
|
static |
References gprs_ns2_nsvc_by_sockaddr_nse(), gprs_ns_ie_ip4_elem::ip_addr, osmo_sockaddr::sa, and gprs_ns_ie_ip4_elem::udp_port.
Referenced by do_sns_add().
|
static |
References gprs_ns2_nsvc_by_sockaddr_nse(), gprs_ns_ie_ip6_elem::ip_addr, osmo_sockaddr::sa, and gprs_ns_ie_ip6_elem::udp_port.
Referenced by do_sns_add().
|
static |
References gprs_ns2_vc::bind, gprs_ns2_ip_vc_remote(), list, llist_for_each_entry, gprs_ns2_vc::nse, gprs_ns2_nse::nsvc, and osmo_sockaddr_cmp().
Referenced by create_missing_nsvcs(), and create_nsvc_for_new_sbind().
|
static |
References ns2_sns_bind::bind, gprs_ns_ie_ip4_elem::data_weight, gprs_ns_ie_ip6_elem::data_weight, gprs_ns2_ip_bind_sockaddr(), gprs_ns_ie_ip4_elem::ip_addr, gprs_ns_ie_ip6_elem::ip_addr, remove_ip4_elem(), remove_ip6_elem(), osmo_sockaddr::sa, gprs_ns_ie_ip4_elem::sig_weight, gprs_ns_ie_ip6_elem::sig_weight, osmo_sockaddr::sin, osmo_sockaddr::sin6, gprs_ns2_vc_bind::sns_data_weight, gprs_ns2_vc_bind::sns_sig_weight, osmo_sockaddr::u, gprs_ns_ie_ip4_elem::udp_port, and gprs_ns_ie_ip6_elem::udp_port.
Referenced by ns2_sns_st_all_action().
|
static |
References ns2_sns_elems::ip4, gprs_ns_ie_ip4_elem::ip_addr, ns2_sns_elems::num_ip4, and gprs_ns_ie_ip4_elem::udp_port.
Referenced by do_sns_delete(), ns2_sns_st_local_procedure(), and remove_bind_elem().
|
static |
References ns2_sns_elems::ip6, gprs_ns_ie_ip6_elem::ip_addr, ns2_sns_elems::num_ip6, and gprs_ns_ie_ip6_elem::udp_port.
Referenced by do_sns_delete(), ns2_sns_st_local_procedure(), and remove_bind_elem().
|
static |
|
static |
|
static |
References gprs_ns_ie_ip4_elem::data_weight, gprs_ns_ie_ip4_elem::ip_addr, gprs_ns_ie_ip4_elem::sig_weight, gprs_ns_ie_ip4_elem::udp_port, VTY_NEWLINE, and vty_out().
Referenced by ns2_sns_dump_vty().
|
static |
References gprs_ns_ie_ip6_elem::data_weight, ip_addr, gprs_ns_ie_ip6_elem::ip_addr, gprs_ns_ie_ip6_elem::sig_weight, gprs_ns_ie_ip6_elem::udp_port, VTY_NEWLINE, and vty_out().
Referenced by ns2_sns_dump_vty().
|
static |
Referenced by __attribute__(), and ns2_sns_bss_fsm_alloc().
|
static |
Referenced by __attribute__(), and ns2_sns_sgsn_fsm_alloc().
|
static |
|
static |
|
static |