libosmogb 1.10.0.64-ff3d
Osmocom Gb library
|
VTY interface for our GPRS Networks Service (NS) implementation. More...
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <stdint.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <osmocom/core/byteswap.h>
#include <osmocom/core/fsm.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/osmo_io.h>
#include <osmocom/core/rate_ctr.h>
#include <osmocom/core/select.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/sockaddr_str.h>
#include <osmocom/core/socket.h>
#include <osmocom/gprs/frame_relay.h>
#include <osmocom/gprs/gprs_ns2.h>
#include <osmocom/gsm/tlv.h>
#include <osmocom/vty/command.h>
#include <osmocom/vty/logging.h>
#include <osmocom/vty/misc.h>
#include <osmocom/vty/telnet_interface.h>
#include <osmocom/vty/vty.h>
#include "gprs_ns2_internal.h"
Data Structures | |
struct | vty_bind |
struct | vty_nse |
struct | vty_nse_bind |
Macros | |
#define | SHOW_NS_STR "Display information about the NS protocol\n" |
#define | NSVCI_STR "NS Virtual Connection ID (NS-VCI)\n" |
#define | DLCI_STR "Data Link connection identifier\n" |
Functions | |
static struct vty_bind * | vty_bind_by_name (const char *name) |
static struct vty_bind * | vty_bind_alloc (const char *name) |
static void | vty_bind_free (struct vty_bind *vbind) |
static struct vty_nse * | vty_nse_by_nsei (uint16_t nsei) |
static struct vty_nse * | vty_nse_alloc (uint16_t nsei) |
static void | vty_nse_free (struct vty_nse *vnse) |
static int | vty_nse_add_vbind (struct vty_nse *vnse, struct vty_bind *vbind) |
static int | vty_nse_remove_vbind (struct vty_nse *vnse, struct vty_bind *vbind) |
static bool | vty_nse_check_sns (struct gprs_ns2_nse *nse) |
DEFUN (cfg_ns, cfg_ns_cmd, "ns", "Configure the GPRS Network Service") | |
DEFUN (cfg_ns_timer, cfg_ns_timer_cmd, "timer " NS_TIMERS " <0-65535>", "Network Service Timer\n" NS_TIMERS_HELP "Timer Value\n") | |
DEFUN (cfg_ns_nsei, cfg_ns_nsei_cmd, "nse <0-65535> [ip-sns-role-sgsn]", "Persistent NS Entity\n" "NS Entity ID (NSEI)\n" "Create NSE in SGSN role (default: BSS)\n") | |
DEFUN (cfg_no_ns_nsei, cfg_no_ns_nsei_cmd, "no nse <0-65535>", NO_STR "Delete a Persistent NS Entity\n" "NS Entity ID (NSEI)\n") | |
DEFUN (cfg_ns_bind, cfg_ns_bind_cmd, "bind (fr|udp) ID", "Configure local Bind\n" "Frame Relay\n" "UDP/IP\n" "Unique identifier for this bind (to reference from NS-VCs, NSEs, ...)\n") | |
DEFUN (cfg_no_ns_bind, cfg_no_ns_bind_cmd, "no bind ID", NO_STR "Delete a bind\n" "Unique identifier for this bind\n") | |
static void | config_write_vbind (struct vty *vty, struct vty_bind *vbind) |
static void | config_write_nsvc (struct vty *vty, const struct gprs_ns2_vc *nsvc) |
static void | _config_write_ns_nse (struct vty *vty, struct gprs_ns2_nse *nse) |
static int | config_write_ns_nse (struct vty *vty) |
static int | config_write_ns_bind (struct vty *vty) |
static int | config_write_ns (struct vty *vty) |
DEFUN (cfg_ns_bind_listen, cfg_ns_bind_listen_cmd, "listen " VTY_IPV46_CMD " <1-65535>", "Configure local IP + Port of this bind\n" "Local IPv4 Address\n" "Local IPv6 Address\n" "Local UDP Port\n") | |
DEFUN (cfg_no_ns_bind_listen, cfg_no_ns_bind_listen_cmd, "no listen", NO_STR "Delete a IP/Port assignment\n") | |
DEFUN (cfg_ns_bind_dscp, cfg_ns_bind_dscp_cmd, "dscp <0-63>", "Set DSCP/TOS on the UDP socket\n" "DSCP Value\n") | |
DEFUN (cfg_no_ns_bind_dscp, cfg_no_ns_bind_dscp_cmd, "no dscp", "Set DSCP/TOS on the UDP socket\n" "DSCP Value\n") | |
DEFUN (cfg_ns_bind_priority, cfg_ns_bind_priority_cmd, "socket-priority <0-255>", "Set socket priority on the UDP socket\n" "Priority Value (>6 requires CAP_NET_ADMIN)\n") | |
DEFUN (cfg_ns_bind_ipaccess, cfg_ns_bind_ipaccess_cmd, "accept-ipaccess", "Allow to create dynamic NS Entity by NS Reset PDU on UDP (ip.access style)\n") | |
DEFUN (cfg_no_ns_bind_ipaccess, cfg_no_ns_bind_ipaccess_cmd, "no accept-ipaccess", NO_STR "Reject NS Reset PDU on UDP (ip.access style)\n") | |
DEFUN (cfg_ns_bind_accept_sns, cfg_ns_bind_accept_sns_cmd, "accept-dynamic-ip-sns", "Allow to create dynamic NS Entities by IP-SNS PDUs\n") | |
DEFUN (cfg_no_ns_bind_accept_sns, cfg_no_ns_bind_accept_sns_cmd, "no accept-dynamic-ip-sns", NO_STR "Disable dynamic creation of NS Entities by IP-SNS PDUs\n") | |
DEFUN (cfg_ns_bind_ip_sns_weight, cfg_ns_bind_ip_sns_weight_cmd, "ip-sns signalling-weight <0-254> data-weight <0-254>", "IP SNS\n" "signalling weight used by IP-SNS dynamic configuration\n" "signalling weight used by IP-SNS dynamic configuration\n" "data weight used by IP-SNS dynamic configuration\n" "data weight used by IP-SNS dynamic configuration\n") | |
DEFUN (cfg_ns_bind_fr, cfg_ns_bind_fr_cmd, "fr NETIF (fr|frnet)", "frame relay\n" IFNAME_STR "fr (user) is used by BSS or SGSN attached to UNI of a FR network\n" "frnet (network) is used by SGSN if BSS is directly attached\n") | |
DEFUN (cfg_no_ns_bind_fr, cfg_no_ns_bind_fr_cmd, "no fr NETIF", NO_STR "Delete a frame relay link\n" "Delete a frame relay link\n" IFNAME_STR) | |
DEFUN (cfg_ns_nse_nsvc_fr, cfg_ns_nse_nsvc_fr_cmd, "nsvc fr NETIF dlci <16-1007> nsvci <0-65535>", "NS Virtual Connection\n" "frame relay\n" "frame relay interface. Must be registered via fr vty\n" NSVCI_STR NSVCI_STR DLCI_STR DLCI_STR) | |
DEFUN (cfg_no_ns_nse_nsvc_fr_dlci, cfg_no_ns_nse_nsvc_fr_dlci_cmd, "no nsvc fr NETIF dlci <16-1007>", NO_STR "Delete frame relay NS-VC\n" "frame relay\n" "frame relay interface. Must be registered via fr vty\n" DLCI_STR DLCI_STR) | |
DEFUN (cfg_no_ns_nse_nsvci, cfg_no_ns_nse_nsvci_cmd, "no nsvc nsvci <0-65535>", NO_STR "Delete NSVC\n" NSVCI_STR NSVCI_STR) | |
static int | ns_nse_nsvc_udp_cmds (struct vty *vty, const char *bind_name, const char *remote_char, uint16_t port, uint16_t sig_weight, uint16_t data_weight) |
DEFUN (cfg_ns_nse_nsvc_udp, cfg_ns_nse_nsvc_udp_cmd, "nsvc udp BIND " VTY_IPV46_CMD " <1-65535>", "NS Virtual Connection\n" "NS over UDP\n" "A unique bind identifier created by ns bind\n" "Remote IPv4 Address\n" "Remote IPv6 Address\n" "Remote UDP Port\n") | |
DEFUN (cfg_ns_nse_nsvc_udp_weights, cfg_ns_nse_nsvc_udp_weights_cmd, "nsvc udp BIND " VTY_IPV46_CMD " <1-65535> signalling-weight <0-254> data-weight <0-254>", "NS Virtual Connection\n" "NS over UDP\n" "A unique bind identifier created by ns bind\n" "Remote IPv4 Address\n" "Remote IPv6 Address\n" "Remote UDP Port\n" "Signalling weight of the NSVC (default = 1)\n" "Signalling weight of the NSVC (default = 1)\n" "Data weight of the NSVC (default = 1)\n" "Data weight of the NSVC (default = 1)\n") | |
DEFUN (cfg_no_ns_nse_nsvc_udp, cfg_no_ns_nse_nsvc_udp_cmd, "no nsvc udp BIND " VTY_IPV46_CMD " <1-65535>", NO_STR "Delete a NS Virtual Connection\n" "NS over UDP\n" "A unique bind identifier created by ns bind\n" "Remote IPv4 Address\n" "Remote IPv6 Address\n" "Remote UDP Port\n") | |
DEFUN (cfg_ns_nse_nsvc_ipa, cfg_ns_nse_nsvc_ipa_cmd, "nsvc ipa BIND " VTY_IPV46_CMD " <1-65535> nsvci <0-65535>", "NS Virtual Connection\n" "NS over UDP ip.access style (uses RESET/BLOCK)\n" "A unique bind identifier created by ns bind\n" "Remote IPv4 Address\n" "Remote IPv6 Address\n" "Remote UDP Port\n" NSVCI_STR NSVCI_STR) | |
DEFUN (cfg_no_ns_nse_nsvc_ipa, cfg_no_ns_nse_nsvc_ipa_cmd, "no nsvc ipa BIND " VTY_IPV46_CMD " <1-65535> nsvci <0-65535>", NO_STR "Delete a NS Virtual Connection\n" "NS over UDP\n" "A unique bind identifier created by ns bind\n" "Remote IPv4 Address\n" "Remote IPv6 Address\n" "Remote UDP Port\n" NSVCI_STR NSVCI_STR) | |
DEFUN (cfg_ns_nse_ip_sns_remote, cfg_ns_nse_ip_sns_remote_cmd, "ip-sns-remote " VTY_IPV46_CMD " <1-65535>", "SNS Initial Endpoint\n" "SGSN IPv4 Address\n" "SGSN IPv6 Address\n" "SGSN UDP Port\n") | |
DEFUN (cfg_no_ns_nse_ip_sns_remote, cfg_no_ns_nse_ip_sns_remote_cmd, "no ip-sns-remote " VTY_IPV46_CMD " <1-65535>", NO_STR "Delete a SNS Initial Endpoint\n" "SGSN IPv4 Address\n" "SGSN IPv6 Address\n" "SGSN UDP Port\n") | |
int | ns2_sns_add_sns_default_binds (struct gprs_ns2_nse *nse) |
DEFUN (cfg_ns_ip_sns_default_bind, cfg_ns_ip_sns_default_bind_cmd, "ip-sns-default bind ID", "Defaults for dynamically created NSEs created by IP-SNS in SGSN role\n" "IP SNS binds\n" "Name of NS udp bind whose IP endpoint will be used as IP-SNS local endpoint. Can be given multiple times.\n") | |
DEFUN (cfg_no_ns_ip_sns_default_bind, cfg_no_ns_ip_sns_default_bind_cmd, "no ip-sns-default bind ID", NO_STR "Defaults for dynamically created NSEs created by IP-SNS in SGSN role\n" "IP SNS binds\n" "Name of NS udp bind whose IP endpoint will be removed as IP-SNS local endpoint.\n") | |
DEFUN (cfg_ns_txqueue_max_length, cfg_ns_txqueue_max_length_cmd, "txqueue-max-length <1-4096>", "Set the maximum length of the txqueue (for UDP)\n" "Maximum length of the txqueue\n") | |
DEFUN (cfg_ns_nse_ip_sns_bind, cfg_ns_nse_ip_sns_bind_cmd, "ip-sns-bind BINDID", "IP SNS binds\n" "Name of NS udp bind whose IP endpoint will be used as IP-SNS local endpoint. Can be given multiple times.\n") | |
DEFUN (cfg_no_ns_nse_ip_sns_bind, cfg_no_ns_nse_ip_sns_bind_cmd, "no ip-sns-bind BINDID", NO_STR "IP SNS binds\n" "Name of NS udp bind whose IP endpoint will not be used as IP-SNS local endpoint\n") | |
void | ns2_vty_dump_nsvc (struct vty *vty, struct gprs_ns2_vc *nsvc, bool stats) |
static void | dump_nse (struct vty *vty, const struct gprs_ns2_nse *nse, bool stats, bool persistent_only) |
static void | dump_bind (struct vty *vty, const struct gprs_ns2_vc_bind *bind, bool stats) |
static void | dump_ns_bind (struct vty *vty, const struct gprs_ns2_inst *nsi, bool stats) |
static void | dump_ns_entities (struct vty *vty, const struct gprs_ns2_inst *nsi, bool stats, bool persistent_only) |
DEFUN_HIDDEN (show_ns, show_ns_cmd, "show ns", SHOW_STR SHOW_NS_STR) | |
DEFUN (show_ns_binds, show_ns_binds_cmd, "show ns binds [stats]", SHOW_STR SHOW_NS_STR "Display information about the NS protocol binds\n" "Include statistic\n") | |
DEFUN (show_ns_entities, show_ns_entities_cmd, "show ns entities [stats]", SHOW_STR SHOW_NS_STR "Display information about the NS protocol entities (NSEs)\n" "Include statistics\n") | |
DEFUN (show_ns_pers, show_ns_pers_cmd, "show ns persistent", SHOW_STR SHOW_NS_STR "Show only persistent NS\n") | |
DEFUN (show_nse, show_nse_cmd, "show ns (nsei|nsvc) <0-65535> [stats]", SHOW_STR SHOW_NS_STR "Select one NSE by its NSE Identifier\n" "Select one NSE by its NS-VC Identifier\n" "The Identifier of selected type\n" "Include Statistics\n") | |
static int | nsvc_force_unconf_cb (struct gprs_ns2_vc *nsvc, void *ctx) |
DEFUN_HIDDEN (nsvc_force_unconf, nsvc_force_unconf_cmd, "nsvc nsei <0-65535> force-unconfigured", "NS Virtual Connection\n" "The NSEI\n" "Reset the NSVCs back to initial state\n") | |
DEFUN (nse_restart_sns, nse_restart_sns_cmd, "nse <0-65535> restart-sns", "NSE specific commands\n" "NS Entity ID (NSEI)\n" "Restart SNS procedure\n") | |
DEFUN (nsvc_block, nsvc_block_cmd, "nsvc <0-65535> (block|unblock|reset)", "NS Virtual Connection\n" NSVCI_STR "Block a NSVC. As cause code O&M intervention will be used.\n" "Unblock a NSVC. As cause code O&M intervention will be used.\n" "Reset a NSVC. As cause code O&M intervention will be used.\n") | |
static void | log_set_nse_filter (struct log_target *target, struct gprs_ns2_nse *nse) |
static void | log_set_nsvc_filter (struct log_target *target, struct gprs_ns2_vc *nsvc) |
DEFUN (logging_fltr_nse, logging_fltr_nse_cmd, "logging filter nse nsei <0-65535>", LOGGING_STR FILTER_STR "Filter based on NS Entity\n" "Identify NSE by NSEI\n" "Numeric identifier\n") | |
DEFUN (logging_fltr_nsvc, logging_fltr_nsvc_cmd, "logging filter nsvc nsvci <0-65535>", LOGGING_STR FILTER_STR "Filter based on NS Virtual Connection\n" "Identify NS-VC by NSVCI\n" "Numeric identifier\n") | |
int | gprs_ns2_vty_init_reduced (struct gprs_ns2_inst *nsi) |
initialized a reduced vty interface which excludes the configuration nodes besides timeouts. More... | |
int | gprs_ns2_vty_init (struct gprs_ns2_inst *nsi) |
Variables | |
static struct gprs_ns2_inst * | vty_nsi = NULL |
static struct osmo_fr_network * | vty_fr_network = NULL |
static struct llist_head | binds |
static struct llist_head | nses |
static struct llist_head | ip_sns_default_binds |
const struct value_string | gprs_ns_timer_strs [] |
const struct value_string | vty_fr_role_names [] |
const struct value_string | vty_ll_names [] |
static struct cmd_node | ns_node |
static struct cmd_node | ns_bind_node |
static struct cmd_node | ns_nse_node |
VTY interface for our GPRS Networks Service (NS) implementation.
#define DLCI_STR "Data Link connection identifier\n" |
#define NSVCI_STR "NS Virtual Connection ID (NS-VCI)\n" |
#define SHOW_NS_STR "Display information about the NS protocol\n" |
|
static |
References vty_nse::binds, config_write_nsvc(), gprs_ns2_nse::dialect, GPRS_NS2_DIALECT_SNS, gprs_ns2_nse::ip_sns_role_sgsn, list, llist_for_each_entry, vty_bind::name, ns2_sns_write_vty(), gprs_ns2_nse::nsei, gprs_ns2_nse::nsvc, OSMO_ASSERT, vty_nse_bind::vbind, VTY_NEWLINE, vty_nse_by_nsei(), and vty_out().
Referenced by config_write_ns_nse().
|
static |
References ARRAY_SIZE, config_write_ns_bind(), config_write_ns_nse(), get_value_string(), gprs_ns_timer_strs, ip_sns_default_binds, list, llist_for_each_entry, vty_bind::name, NS_DEFAULT_TXQUEUE_MAX_LENGTH, gprs_ns2_inst::timeout, gprs_ns2_inst::txqueue_max_length, vty_nse_bind::vbind, VTY_NEWLINE, vty_nsi, and vty_out().
Referenced by gprs_ns2_vty_init_reduced().
|
static |
References binds, config_write_vbind(), list, and llist_for_each_entry.
Referenced by config_write_ns().
|
static |
References _config_write_ns_nse(), list, llist_for_each_entry, gprs_ns2_inst::nse, gprs_ns2_nse::persistent, and vty_nsi.
Referenced by config_write_ns().
|
static |
References gprs_ns2_vc::bind, gprs_ns2_nse::dialect, GPRS_NS2_DIALECT_IPACCESS, GPRS_NS2_DIALECT_STATIC_ALIVE, gprs_ns2_fr_bind_netif(), gprs_ns2_fr_nsvc_dlci(), gprs_ns2_ip_vc_remote(), GPRS_NS2_LL_FR, GPRS_NS2_LL_FR_GRE, GPRS_NS2_LL_UDP, GPRS_NS2_LL_UNDEF, osmo_sockaddr_str::ip, gprs_ns2_nse::ll, gprs_ns2_vc_bind::name, gprs_ns2_vc::nse, gprs_ns2_vc::nsvci, gprs_ns2_vc::nsvci_is_valid, OSMO_ASSERT, osmo_sockaddr_str_from_sockaddr(), osmo_sockaddr_str::port, osmo_sockaddr::sas, osmo_sockaddr::u, VTY_NEWLINE, and vty_out().
Referenced by _config_write_ns_nse().
References vty_bind::accept_ipaccess, vty_bind::accept_sns, vty_bind::dscp, get_value_string_or_null(), gprs_ns2_bind_by_name(), gprs_ns2_fr_bind_netif(), gprs_ns2_fr_bind_role(), gprs_ns2_ip_bind_sockaddr(), GPRS_NS2_LL_FR, GPRS_NS2_LL_UDP, osmo_sockaddr_str::ip, vty_bind::ip_sns_data_weight, vty_bind::ip_sns_sig_weight, vty_bind::ll, vty_bind::name, osmo_sockaddr_str_from_sockaddr(), osmo_sockaddr_str::port, vty_bind::priority, osmo_sockaddr::sas, osmo_sockaddr::u, vty_fr_role_names, vty_ll_names, VTY_NEWLINE, vty_nsi, and vty_out().
Referenced by config_write_ns_bind().
DEFUN | ( | cfg_no_ns_bind | , |
cfg_no_ns_bind_cmd | , | ||
"no bind ID" | , | ||
NO_STR "Delete a bind\n" "Unique identifier for this bind\n" | |||
) |
References argv, CMD_SUCCESS, CMD_WARNING, gprs_ns2_bind_by_name(), gprs_ns2_free_bind(), name, vty_bind_by_name(), vty_bind_free(), VTY_NEWLINE, vty_nsi, and vty_out().
DEFUN | ( | cfg_no_ns_bind_listen | , |
cfg_no_ns_bind_listen_cmd | , | ||
"no listen" | , | ||
NO_STR "Delete a IP/Port assignment\n" | |||
) |
DEFUN | ( | cfg_no_ns_ip_sns_default_bind | , |
cfg_no_ns_ip_sns_default_bind_cmd | , | ||
"no ip-sns-default bind ID" | , | ||
NO_STR "Defaults for dynamically created NSEs created by IP-SNS in SGSN role\n" "IP SNS binds\n" "Name of NS udp bind whose IP endpoint will be removed as IP-SNS local endpoint.\n" | |||
) |
DEFUN | ( | cfg_no_ns_nse_ip_sns_bind | , |
cfg_no_ns_nse_ip_sns_bind_cmd | , | ||
"no ip-sns-bind BINDID" | , | ||
NO_STR "IP SNS binds\n" "Name of NS udp bind whose IP endpoint will not be used as IP-SNS local endpoint\n" | |||
) |
References argv, CMD_SUCCESS, CMD_WARNING, gprs_ns2_nse::dialect, gprs_ns2_bind_by_name(), GPRS_NS2_DIALECT_SNS, GPRS_NS2_DIALECT_UNDEF, GPRS_NS2_LL_UDP, GPRS_NS2_LL_UNDEF, gprs_ns2_sns_del_bind(), vty::index, gprs_ns2_nse::ll, vty_bind::ll, name, ns2_nse_set_dialect(), gprs_ns2_nse::nsei, OSMO_ASSERT, vty_bind_by_name(), VTY_NEWLINE, vty_nse_by_nsei(), vty_nse_check_sns(), vty_nse_remove_vbind(), vty_nsi, and vty_out().
DEFUN | ( | cfg_no_ns_nse_ip_sns_remote | , |
cfg_no_ns_nse_ip_sns_remote_cmd | , | ||
"no ip-sns-remote " VTY_IPV46_CMD " <1-65535>" | , | ||
NO_STR "Delete a SNS Initial Endpoint\n" "SGSN IPv4 Address\n" "SGSN IPv6 Address\n" "SGSN UDP Port\n" | |||
) |
References argv, CMD_SUCCESS, CMD_WARNING, gprs_ns2_nse::dialect, GPRS_NS2_DIALECT_SNS, GPRS_NS2_DIALECT_UNDEF, GPRS_NS2_LL_UDP, GPRS_NS2_LL_UNDEF, gprs_ns2_sns_del_endpoint(), vty::index, gprs_ns2_nse::ll, ns2_nse_set_dialect(), osmo_sockaddr_str_from_str(), osmo_sockaddr_str_to_sockaddr(), osmo_sockaddr::sas, osmo_sockaddr::u, VTY_NEWLINE, vty_nse_check_sns(), and vty_out().
DEFUN | ( | cfg_no_ns_nse_nsvc_fr_dlci | , |
cfg_no_ns_nse_nsvc_fr_dlci_cmd | , | ||
"no nsvc fr NETIF dlci <16-1007>" | , | ||
NO_STR "Delete frame relay NS-VC\n" "frame relay\n" "frame relay interface. Must be registered via fr vty\n" DLCI_STR | DLCI_STR | ||
) |
References argv, CMD_ERR_NOTHING_TODO, CMD_SUCCESS, CMD_WARNING, GPRS_NS2_DIALECT_UNDEF, gprs_ns2_fr_bind_by_netif(), gprs_ns2_fr_nsvc_by_dlci(), gprs_ns2_free_nsvc(), GPRS_NS2_LL_FR, GPRS_NS2_LL_UNDEF, vty::index, gprs_ns2_nse::ll, llist_empty(), ns2_nse_set_dialect(), gprs_ns2_nse::nsei, gprs_ns2_nse::nsvc, VTY_NEWLINE, vty_nsi, and vty_out().
DEFUN | ( | cfg_no_ns_nse_nsvc_ipa | , |
cfg_no_ns_nse_nsvc_ipa_cmd | , | ||
"no nsvc ipa BIND " VTY_IPV46_CMD " <1-65535> nsvci <0-65535>" | , | ||
NO_STR "Delete a NS Virtual Connection\n" "NS over UDP\n" "A unique bind identifier created by ns bind\n" "Remote IPv4 Address\n" "Remote IPv6 Address\n" "Remote UDP Port\n" NSVCI_STR | NSVCI_STR | ||
) |
References argv, CMD_SUCCESS, CMD_WARNING, gprs_ns2_nse::dialect, gprs_ns2_bind_by_name(), GPRS_NS2_DIALECT_IPACCESS, GPRS_NS2_DIALECT_UNDEF, gprs_ns2_free_nsvc(), GPRS_NS2_LL_UDP, GPRS_NS2_LL_UNDEF, gprs_ns2_nsvc_by_sockaddr_bind(), vty::index, osmo_sockaddr_str::ip, gprs_ns2_nse::ll, gprs_ns2_vc_bind::ll, llist_empty(), ns2_nse_set_dialect(), gprs_ns2_vc::nse, gprs_ns2_nse::nsvc, gprs_ns2_vc::nsvci, gprs_ns2_vc::nsvci_is_valid, osmo_sockaddr_str_from_str(), osmo_sockaddr_str_to_sockaddr(), gprs_ns2_vc::persistent, osmo_sockaddr_str::port, osmo_sockaddr::sas, osmo_sockaddr::u, VTY_NEWLINE, vty_nsi, and vty_out().
DEFUN | ( | cfg_no_ns_nse_nsvc_udp | , |
cfg_no_ns_nse_nsvc_udp_cmd | , | ||
"no nsvc udp BIND " VTY_IPV46_CMD " <1-65535>" | , | ||
NO_STR "Delete a NS Virtual Connection\n" "NS over UDP\n" "A unique bind identifier created by ns bind\n" "Remote IPv4 Address\n" "Remote IPv6 Address\n" "Remote UDP Port\n" | |||
) |
References argv, CMD_SUCCESS, CMD_WARNING, gprs_ns2_nse::dialect, gprs_ns2_bind_by_name(), GPRS_NS2_DIALECT_STATIC_ALIVE, GPRS_NS2_DIALECT_UNDEF, gprs_ns2_free_nsvc(), GPRS_NS2_LL_UDP, GPRS_NS2_LL_UNDEF, gprs_ns2_nsvc_by_sockaddr_bind(), vty::index, osmo_sockaddr_str::ip, gprs_ns2_nse::ll, gprs_ns2_vc_bind::ll, llist_empty(), ns2_nse_set_dialect(), gprs_ns2_vc::nse, gprs_ns2_nse::nsvc, osmo_sockaddr_str_from_str(), osmo_sockaddr_str_to_sockaddr(), gprs_ns2_vc::persistent, osmo_sockaddr_str::port, osmo_sockaddr::sas, osmo_sockaddr::u, VTY_NEWLINE, vty_nsi, and vty_out().
DEFUN | ( | cfg_no_ns_nse_nsvci | , |
cfg_no_ns_nse_nsvci_cmd | , | ||
"no nsvc nsvci <0-65535>" | , | ||
NO_STR "Delete NSVC\n" NSVCI_STR | NSVCI_STR | ||
) |
References argv, CMD_SUCCESS, CMD_WARNING, gprs_ns2_nse::dialect, GPRS_NS2_DIALECT_IPACCESS, GPRS_NS2_DIALECT_SNS, GPRS_NS2_DIALECT_STATIC_ALIVE, GPRS_NS2_DIALECT_STATIC_RESETBLOCK, GPRS_NS2_DIALECT_UNDEF, gprs_ns2_free_nsvc(), GPRS_NS2_LL_UNDEF, gprs_ns2_nsvc_by_nsvci(), vty::index, gprs_ns2_nse::ll, llist_empty(), ns2_nse_set_dialect(), gprs_ns2_nse::nsvc, VTY_NEWLINE, vty_nsi, and vty_out().
DEFUN | ( | cfg_ns | , |
cfg_ns_cmd | , | ||
"ns" | , | ||
"Configure the GPRS Network Service" | |||
) |
References CMD_SUCCESS, L_NS_NODE, and vty::node.
DEFUN | ( | cfg_ns_bind_accept_sns | , |
cfg_ns_bind_accept_sns_cmd | , | ||
"accept-dynamic-ip-sns" | , | ||
"Allow to create dynamic NS Entities by IP-SNS PDUs\n" | |||
) |
DEFUN | ( | cfg_ns_bind_fr | , |
cfg_ns_bind_fr_cmd | , | ||
"fr NETIF (fr|frnet)" | , | ||
"frame relay\n" IFNAME_STR "fr (user) is used by BSS or SGSN attached to UNI of a FR network\n" "frnet (network) is used by SGSN if BSS is directly attached\n" | |||
) |
DEFUN | ( | cfg_ns_bind_ip_sns_weight | , |
cfg_ns_bind_ip_sns_weight_cmd | , | ||
"ip-sns signalling-weight <0-254> data-weight <0-254>" | , | ||
"IP SNS\n" "signalling weight used by IP-SNS dynamic configuration\n" "signalling weight used by IP-SNS dynamic configuration\n" "data weight used by IP-SNS dynamic configuration\n" "data weight used by IP-SNS dynamic configuration\n" | |||
) |
DEFUN | ( | cfg_ns_bind_ipaccess | , |
cfg_ns_bind_ipaccess_cmd | , | ||
"accept-ipaccess" | , | ||
"Allow to create dynamic NS Entity by NS Reset PDU on UDP (ip.access style)\n" | |||
) |
DEFUN | ( | cfg_ns_bind_listen | , |
cfg_ns_bind_listen_cmd | , | ||
"listen " VTY_IPV46_CMD " <1-65535>" | , | ||
"Configure local IP + Port of this bind\n" "Local IPv4 Address\n" "Local IPv6 Address\n" "Local UDP Port\n" | |||
) |
References gprs_ns2_vc_bind::accept_ipaccess, vty_bind::accept_ipaccess, gprs_ns2_vc_bind::accept_sns, vty_bind::accept_sns, argv, CMD_SUCCESS, CMD_WARNING, vty_bind::dscp, gprs_ns2_ip_bind(), gprs_ns2_ip_bind_by_sockaddr(), GPRS_NS2_LL_UDP, vty::index, vty_bind::ll, vty_bind::name, osmo_sockaddr_str_from_str(), osmo_sockaddr_str_to_sockaddr(), osmo_sockaddr::sas, osmo_sockaddr::u, VTY_NEWLINE, vty_nsi, and vty_out().
DEFUN | ( | cfg_ns_nse_ip_sns_bind | , |
cfg_ns_nse_ip_sns_bind_cmd | , | ||
"ip-sns-bind BINDID" | , | ||
"IP SNS binds\n" "Name of NS udp bind whose IP endpoint will be used as IP-SNS local endpoint. Can be given multiple times.\n" | |||
) |
References argv, CMD_SUCCESS, CMD_WARNING, gprs_ns2_nse::dialect, gprs_ns2_bind_by_name(), GPRS_NS2_DIALECT_SNS, GPRS_NS2_DIALECT_UNDEF, GPRS_NS2_LL_UDP, GPRS_NS2_LL_UNDEF, gprs_ns2_sns_add_bind(), vty::index, gprs_ns2_nse::ll, vty_bind::ll, name, ns2_nse_set_dialect(), gprs_ns2_nse::nsei, OSMO_ASSERT, vty_bind_by_name(), VTY_NEWLINE, vty_nse_add_vbind(), vty_nse_by_nsei(), vty_nsi, and vty_out().
DEFUN | ( | cfg_ns_nse_ip_sns_remote | , |
cfg_ns_nse_ip_sns_remote_cmd | , | ||
"ip-sns-remote " VTY_IPV46_CMD " <1-65535>" | , | ||
"SNS Initial Endpoint\n" "SGSN IPv4 Address\n" "SGSN IPv6 Address\n" "SGSN UDP Port\n" | |||
) |
References argv, CMD_SUCCESS, CMD_WARNING, gprs_ns2_nse::dialect, GPRS_NS2_DIALECT_SNS, GPRS_NS2_DIALECT_UNDEF, GPRS_NS2_LL_UDP, GPRS_NS2_LL_UNDEF, gprs_ns2_sns_add_endpoint(), vty::index, gprs_ns2_nse::ll, ns2_nse_set_dialect(), osmo_sockaddr_str_from_str(), osmo_sockaddr_str_to_sockaddr(), osmo_sockaddr::sas, osmo_sockaddr::u, VTY_NEWLINE, and vty_out().
DEFUN | ( | cfg_ns_nse_nsvc_fr | , |
cfg_ns_nse_nsvc_fr_cmd | , | ||
"nsvc fr NETIF dlci <16-1007> nsvci <0-65535>" | , | ||
"NS Virtual Connection\n" "frame relay\n" "frame relay interface. Must be registered via fr vty\n" NSVCI_STR NSVCI_STR DLCI_STR | DLCI_STR | ||
) |
References argv, CMD_SUCCESS, CMD_WARNING, gprs_ns2_nse::dialect, GPRS_NS2_DIALECT_STATIC_RESETBLOCK, GPRS_NS2_DIALECT_UNDEF, gprs_ns2_fr_bind_by_netif(), gprs_ns2_fr_connect(), gprs_ns2_fr_nsvc_by_dlci(), GPRS_NS2_LL_FR, GPRS_NS2_LL_UNDEF, gprs_ns2_nsvc_by_nsvci(), vty::index, gprs_ns2_nse::ll, ns2_nse_set_dialect(), gprs_ns2_nse::nsvc, VTY_NEWLINE, vty_nsi, and vty_out().
DEFUN | ( | cfg_ns_nse_nsvc_ipa | , |
cfg_ns_nse_nsvc_ipa_cmd | , | ||
"nsvc ipa BIND " VTY_IPV46_CMD " <1-65535> nsvci <0-65535>" | , | ||
"NS Virtual Connection\n" "NS over UDP ip.access style (uses RESET/BLOCK)\n" "A unique bind identifier created by ns bind\n" "Remote IPv4 Address\n" "Remote IPv6 Address\n" "Remote UDP Port\n" NSVCI_STR | NSVCI_STR | ||
) |
References argv, CMD_SUCCESS, CMD_WARNING, gprs_ns2_nse::dialect, gprs_ns2_bind_by_name(), GPRS_NS2_DIALECT_IPACCESS, GPRS_NS2_DIALECT_UNDEF, gprs_ns2_ip_connect(), GPRS_NS2_LL_UDP, GPRS_NS2_LL_UNDEF, vty::index, gprs_ns2_nse::ll, gprs_ns2_vc_bind::ll, ns2_nse_set_dialect(), osmo_sockaddr_str_from_str(), osmo_sockaddr_str_to_sockaddr(), gprs_ns2_vc::persistent, osmo_sockaddr::sas, osmo_sockaddr::u, VTY_NEWLINE, vty_nsi, and vty_out().
DEFUN | ( | cfg_ns_nse_nsvc_udp | , |
cfg_ns_nse_nsvc_udp_cmd | , | ||
"nsvc udp BIND " VTY_IPV46_CMD " <1-65535>" | , | ||
"NS Virtual Connection\n" "NS over UDP\n" "A unique bind identifier created by ns bind\n" "Remote IPv4 Address\n" "Remote IPv6 Address\n" "Remote UDP Port\n" | |||
) |
References argv, data_weight, ns_nse_nsvc_udp_cmds(), and sig_weight.
DEFUN | ( | cfg_ns_nse_nsvc_udp_weights | , |
cfg_ns_nse_nsvc_udp_weights_cmd | , | ||
"nsvc udp BIND " VTY_IPV46_CMD " <1-65535> signalling-weight <0-254> data-weight <0-254>" | , | ||
"NS Virtual Connection\n" "NS over UDP\n" "A unique bind identifier created by ns bind\n" "Remote IPv4 Address\n" "Remote IPv6 Address\n" "Remote UDP Port\n" "Signalling weight of the NSVC (default = 1)\n" "Signalling weight of the NSVC (default = 1)\n" "Data weight of the NSVC (default = 1)\n" "Data weight of the NSVC (default = 1)\n" | |||
) |
References argv, data_weight, ns_nse_nsvc_udp_cmds(), and sig_weight.
DEFUN | ( | cfg_ns_timer | , |
cfg_ns_timer_cmd | , | ||
"timer " NS_TIMERS " <0-65535>" | , | ||
"Network Service Timer\n" NS_TIMERS_HELP "Timer Value\n" | |||
) |
References argv, ARRAY_SIZE, CMD_SUCCESS, CMD_WARNING, get_string_value(), gprs_ns_timer_strs, gprs_ns2_inst::timeout, and vty_nsi.
DEFUN | ( | logging_fltr_nse | , |
logging_fltr_nse_cmd | , | ||
"logging filter nse nsei <0-65535>" | , | ||
LOGGING_STR FILTER_STR "Filter based on NS Entity\n" "Identify NSE by NSEI\n" "Numeric identifier\n" | |||
) |
DEFUN | ( | logging_fltr_nsvc | , |
logging_fltr_nsvc_cmd | , | ||
"logging filter nsvc nsvci <0-65535>" | , | ||
LOGGING_STR FILTER_STR "Filter based on NS Virtual Connection\n" "Identify NS-VC by NSVCI\n" "Numeric identifier\n" | |||
) |
DEFUN | ( | nse_restart_sns | , |
nse_restart_sns_cmd | , | ||
"nse <0-65535> restart-sns" | , | ||
"NSE specific commands\n" "NS Entity ID (NSEI)\n" "Restart SNS procedure\n" | |||
) |
DEFUN | ( | nsvc_block | , |
nsvc_block_cmd | , | ||
"nsvc <0-65535> (block|unblock|reset)" | , | ||
"NS Virtual Connection\n" NSVCI_STR "Block a NSVC. As cause code O&M intervention will be used.\n" "Unblock a NSVC. As cause code O&M intervention will be used.\n" "Reset a NSVC. As cause code O&M intervention will be used.\n" | |||
) |
References argv, CMD_ERR_NOTHING_TODO, CMD_SUCCESS, CMD_WARNING, gprs_ns2_nsvc_by_nsvci(), ns2_vc_block(), ns2_vc_reset(), ns2_vc_unblock(), VTY_NEWLINE, vty_nsi, and vty_out().
DEFUN | ( | show_ns_binds | , |
show_ns_binds_cmd | , | ||
"show ns binds " | [stats], | ||
SHOW_STR SHOW_NS_STR "Display information about the NS protocol binds\n" "Include statistic\n" | |||
) |
References argc, CMD_SUCCESS, dump_ns_bind(), and vty_nsi.
DEFUN | ( | show_ns_entities | , |
show_ns_entities_cmd | , | ||
"show ns entities " | [stats], | ||
SHOW_STR SHOW_NS_STR "Display information about the NS protocol entities (NSEs)\n" "Include statistics\n" | |||
) |
References argc, CMD_SUCCESS, dump_ns_entities(), and vty_nsi.
DEFUN | ( | show_ns_pers | , |
show_ns_pers_cmd | , | ||
"show ns persistent" | , | ||
SHOW_STR SHOW_NS_STR "Show only persistent NS\n" | |||
) |
References CMD_SUCCESS, dump_ns_entities(), and vty_nsi.
DEFUN | ( | show_nse | , |
show_nse_cmd | , | ||
"show ns (nsei|nsvc) <0-65535> " | [stats], | ||
SHOW_STR SHOW_NS_STR "Select one NSE by its NSE Identifier\n" "Select one NSE by its NS-VC Identifier\n" "The Identifier of selected type\n" "Include Statistics\n" | |||
) |
References argc, argv, CMD_SUCCESS, CMD_WARNING, dump_nse(), gprs_ns2_nse_by_nsei(), gprs_ns2_nsvc_by_nsvci(), ns2_vty_dump_nsvc(), gprs_ns2_vc::nse, VTY_NEWLINE, vty_nsi, and vty_out().
DEFUN_HIDDEN | ( | nsvc_force_unconf | , |
nsvc_force_unconf_cmd | , | ||
"nsvc nsei <0-65535> force-unconfigured" | , | ||
"NS Virtual Connection\n" "The NSEI\n" "Reset the NSVCs back to initial state\n" | |||
) |
DEFUN_HIDDEN | ( | show_ns | , |
show_ns_cmd | , | ||
"show ns" | , | ||
SHOW_STR | SHOW_NS_STR | ||
) |
|
static |
References gprs_ns2_vc::bind, gprs_ns2_vc_bind::dump_vty, gprs_ns2_vc_bind::statg, and vty_out_stat_item_group().
Referenced by dump_ns_bind().
|
static |
References gprs_ns2_inst::binding, dump_bind(), list, llist_for_each_entry, and gprs_ns2_vc_bind::nsi.
Referenced by DEFUN(), and DEFUN_HIDDEN().
|
static |
References dump_nse(), list, llist_for_each_entry, gprs_ns2_inst::nse, and gprs_ns2_nse::nsi.
Referenced by DEFUN(), and DEFUN_HIDDEN().
|
static |
References gprs_ns2_nse::alive, gprs_ns2_lltype_str(), list, gprs_ns2_nse::ll, llist_for_each_entry, ns2_sns_dump_vty(), ns2_vty_dump_nsvc(), gprs_ns2_vc::nse, gprs_ns2_nse::nsei, gprs_ns2_nse::nsvc, gprs_ns2_nse::persistent, gprs_ns2_nse::ts_alive_change, VTY_NEWLINE, vty_out(), vty_out_newline(), and vty_out_uptime().
Referenced by DEFUN(), and dump_ns_entities().
int gprs_ns2_vty_init | ( | struct gprs_ns2_inst * | nsi | ) |
int gprs_ns2_vty_init_reduced | ( | struct gprs_ns2_inst * | nsi | ) |
initialized a reduced vty interface which excludes the configuration nodes besides timeouts.
This can be used by the PCU which can be only configured by the BTS/BSC and not by the vty.
[in] | nsi | NS instance on which we operate |
References binds, CFG_LOG_NODE, CONFIG_NODE, config_write_ns(), ENABLE_NODE, INIT_LLIST_HEAD, install_lib_element(), install_lib_element_ve(), install_node(), ip_sns_default_binds, L_NS_NODE, ns_node, nses, osmo_fr_network_alloc(), vty_fr_network, and vty_nsi.
Referenced by gprs_ns2_vty_init().
|
static |
References log_target::filter_data, log_target::filter_map, LOG_FLT_GB_NSE, and gprs_ns2_vc::nse.
Referenced by DEFUN().
|
static |
References log_target::filter_data, log_target::filter_map, and LOG_FLT_GB_NSVC.
Referenced by DEFUN().
int ns2_sns_add_sns_default_binds | ( | struct gprs_ns2_nse * | nse | ) |
void ns2_vty_dump_nsvc | ( | struct vty * | vty, |
struct gprs_ns2_vc * | nsvc, | ||
bool | stats | ||
) |
References gprs_ns2_vc::ctrg, gprs_ns2_vc::data_weight, gprs_ns2_vc::fi, gprs_ns2_ll_str(), ns2_vc_is_unblocked(), gprs_ns2_vc::nsvci, gprs_ns2_vc::nsvci_is_valid, gprs_ns2_vc::om_blocked, osmo_fsm_inst_state_name(), gprs_ns2_vc::persistent, gprs_ns2_vc::sig_weight, gprs_ns2_vc::statg, gprs_ns2_vc::ts_alive_change, vty_out(), vty_out_newline(), vty_out_rate_ctr_group(), vty_out_stat_item_group(), and vty_out_uptime().
Referenced by DEFUN(), dump_nse(), and dump_vty().
|
static |
References CMD_SUCCESS, CMD_WARNING, data_weight, gprs_ns2_vc::data_weight, gprs_ns2_nse::dialect, gprs_ns2_bind_by_name(), GPRS_NS2_DIALECT_STATIC_ALIVE, GPRS_NS2_DIALECT_UNDEF, gprs_ns2_ip_connect(), GPRS_NS2_LL_UDP, GPRS_NS2_LL_UNDEF, gprs_ns2_nsvc_by_sockaddr_bind(), vty::index, gprs_ns2_nse::ll, gprs_ns2_vc_bind::ll, ns2_nse_set_dialect(), gprs_ns2_vc::nse, gprs_ns2_nse::nsei, osmo_sockaddr_str_from_str(), osmo_sockaddr_str_to_sockaddr(), gprs_ns2_vc::persistent, osmo_sockaddr::sas, sig_weight, gprs_ns2_vc::sig_weight, osmo_sockaddr::u, VTY_NEWLINE, vty_nsi, and vty_out().
Referenced by DEFUN().
|
static |
References ns2_vc_force_unconfigured(), and ns2_vc_fsm_start().
Referenced by DEFUN_HIDDEN().
|
static |
References binds, vty_bind::ip_sns_data_weight, vty_bind::ip_sns_sig_weight, vty_bind::list, llist_add_tail(), name, vty_bind::name, and vty_nsi.
Referenced by DEFUN().
|
static |
References binds, list, llist_for_each_entry, name, and vty_bind::name.
Referenced by DEFUN().
|
static |
References vty_bind::list, and llist_del().
Referenced by DEFUN().
References vty_nse::binds, GPRS_NS2_LL_UDP, list, vty_nse_bind::list, vty_bind::ll, llist_add_tail(), llist_for_each_entry, and vty_nse_bind::vbind.
Referenced by DEFUN().
|
static |
References vty_nse::binds, INIT_LLIST_HEAD, vty_nse::list, llist_add_tail(), nsei, vty_nse::nsei, nses, and vty_nsi.
Referenced by DEFUN().
|
static |
References list, llist_for_each_entry, nsei, vty_nse::nsei, and nses.
Referenced by _config_write_ns_nse(), DEFUN(), and vty_nse_check_sns().
|
static |
References vty_nse::binds, gprs_ns2_sns_count(), llist_empty(), gprs_ns2_nse::nsei, and vty_nse_by_nsei().
Referenced by DEFUN().
|
static |
References vty_nse::list, and llist_del().
Referenced by DEFUN().
References vty_nse::binds, GPRS_NS2_LL_UDP, list, vty_nse_bind::list, vty_bind::ll, llist_del(), llist_for_each_entry_safe, and vty_nse_bind::vbind.
Referenced by DEFUN().
|
static |
Referenced by config_write_ns_bind(), gprs_ns2_vty_init_reduced(), vty_bind_alloc(), and vty_bind_by_name().
const struct value_string gprs_ns_timer_strs[] |
Referenced by config_write_ns(), and DEFUN().
|
static |
Referenced by config_write_ns(), DEFUN(), gprs_ns2_vty_init_reduced(), and ns2_sns_add_sns_default_binds().
|
static |
Referenced by gprs_ns2_vty_init().
|
static |
Referenced by gprs_ns2_vty_init_reduced().
|
static |
Referenced by gprs_ns2_vty_init().
|
static |
Referenced by gprs_ns2_vty_init_reduced(), vty_nse_alloc(), and vty_nse_by_nsei().
|
static |
Referenced by DEFUN(), DEFUN_HIDDEN(), and gprs_ns2_vty_init_reduced().
const struct value_string vty_fr_role_names[] |
Referenced by config_write_vbind().
const struct value_string vty_ll_names[] |
Referenced by config_write_vbind(), and DEFUN().
|
static |