libosmogb 1.13.1.1-afb4 Osmocom Gb library

Data Structures | Macros | Functions | Variables
gprs_ns2_vty.c File Reference

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

## Detailed Description

VTY interface for our GPRS Networks Service (NS) implementation.

## Macro Definition Documentation

## ◆ DLCI_STR

#define DLCI_STR "Data Link connection identifier\n"

## ◆ NSVCI_STR

#define NSVCI_STR "NS Virtual Connection ID (NS-VCI)\n"

## ◆ SHOW_NS_STR

#define SHOW_NS_STR "Display information about the NS protocol\n"

## Function Documentation

## ◆ _config_write_ns_nse()

static void _config_write_ns_nse | ( | struct vty * | vty,
|  | struct gprs_ns2_nse * | nse
| ) |  |
| 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().

## ◆ config_write_ns()

static int config_write_ns | ( | struct vty * | vty | ) |
| 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().

## ◆ config_write_ns_bind()

static int config_write_ns_bind | ( | struct vty * | vty | ) |
| static

References binds, config_write_vbind(), list, and llist_for_each_entry.

Referenced by config_write_ns().

## ◆ config_write_ns_nse()

static int config_write_ns_nse | ( | struct vty * | vty | ) |
| 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().

## ◆ config_write_nsvc()

static void config_write_nsvc | ( | struct vty * | vty,
|  | const struct gprs_ns2_vc * | nsvc
| ) |  |
| 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().

## ◆ config_write_vbind()

static void config_write_vbind | ( | struct vty * | vty,
|  | struct vty_bind * | vbind
| ) |  |
| static

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() [1/41]

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() [2/41]

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" |
| ) |  |

References gprs_ns2_vc_bind::accept_sns, vty_bind::accept_sns, CMD_SUCCESS, CMD_WARNING, gprs_ns2_bind_by_name(), GPRS_NS2_LL_UDP, vty::index, vty_bind::ll, vty_bind::name, VTY_NEWLINE, vty_nsi, and vty_out().

## ◆ DEFUN() [3/41]

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" |
| ) |  |

References CMD_SUCCESS, CMD_WARNING, vty_bind::dscp, gprs_ns2_bind_by_name(), gprs_ns2_ip_bind_set_dscp(), GPRS_NS2_LL_UDP, vty::index, vty_bind::ll, vty_bind::name, VTY_NEWLINE, vty_nsi, and vty_out().

## ◆ DEFUN() [4/41]

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
| ) |  |

References argv, CMD_SUCCESS, CMD_WARNING, gprs_ns2_fr_bind_by_netif(), gprs_ns2_free_bind(), GPRS_NS2_LL_FR, vty::index, vty_bind::ll, gprs_ns2_vc_bind::name, vty_bind::name, VTY_NEWLINE, vty_nsi, and vty_out().

## ◆ DEFUN() [5/41]

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" |
| ) |  |

References gprs_ns2_vc_bind::accept_ipaccess, vty_bind::accept_ipaccess, CMD_SUCCESS, CMD_WARNING, gprs_ns2_bind_by_name(), GPRS_NS2_LL_UDP, vty::index, vty_bind::ll, vty_bind::name, VTY_NEWLINE, vty_nsi, and vty_out().

## ◆ DEFUN() [6/41]

DEFUN | ( | cfg_no_ns_bind_listen | ,
|  | cfg_no_ns_bind_listen_cmd | ,
|  | "no listen" | ,
|  | NO_STR "Delete a IP/Port assignment\n" |
| ) |  |

References CMD_ERR_NOTHING_TODO, CMD_SUCCESS, CMD_WARNING, gprs_ns2_bind_by_name(), gprs_ns2_free_bind(), GPRS_NS2_LL_UDP, vty::index, gprs_ns2_vc_bind::ll, vty_bind::ll, vty_bind::name, OSMO_ASSERT, VTY_NEWLINE, vty_nsi, and vty_out().

## ◆ DEFUN() [7/41]

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" |
| ) |  |

References argv, CMD_SUCCESS, CMD_WARNING, GPRS_NS2_LL_UDP, ip_sns_default_binds, list, vty_nse_bind::list, vty_bind::ll, llist_del(), llist_for_each_entry, name, vty_nse_bind::vbind, vty_bind_by_name(), VTY_NEWLINE, and vty_out().

## ◆ DEFUN() [8/41]

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() [9/41]

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() [10/41]

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() [11/41]

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() [12/41]

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() [13/41]

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() [14/41]

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" |
| ) |  |

References argv, CMD_ERR_NOTHING_TODO, CMD_SUCCESS, CMD_WARNING, gprs_ns2_free_nse(), gprs_ns2_nse_by_nsei(), nsei, gprs_ns2_nse::nsei, gprs_ns2_nse::persistent, VTY_NEWLINE, vty_nse_by_nsei(), vty_nse_free(), vty_nsi, and vty_out().

## ◆ DEFUN() [15/41]

DEFUN | ( | cfg_ns | ,
|  | cfg_ns_cmd | ,
|  | "ns" | ,
|  | "Configure the GPRS Network Service" |
| ) |  |

References CMD_SUCCESS, L_NS_NODE, and vty::node.

## ◆ DEFUN() [16/41]

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" |
| ) |  |

References argv, CMD_SUCCESS, CMD_WARNING, get_string_value(), vty::index, L_NS_BIND_NODE, vty_bind::ll, name, vty::node, osmo_identifier_valid(), vty_bind_alloc(), vty_bind_by_name(), vty_ll_names, VTY_NEWLINE, and vty_out().

## ◆ DEFUN() [17/41]

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" |
| ) |  |

References gprs_ns2_vc_bind::accept_sns, vty_bind::accept_sns, CMD_SUCCESS, CMD_WARNING, gprs_ns2_bind_by_name(), GPRS_NS2_LL_UDP, vty::index, vty_bind::ll, vty_bind::name, VTY_NEWLINE, vty_nsi, and vty_out().

## ◆ DEFUN() [18/41]

DEFUN | ( | cfg_ns_bind_dscp | ,
|  | cfg_ns_bind_dscp_cmd | ,
|  | "dscp <0-63>" | ,
|  | "Set DSCP/TOS on the UDP socket\n" "DSCP Value\n" |
| ) |  |

References argv, CMD_SUCCESS, CMD_WARNING, vty_bind::dscp, gprs_ns2_bind_by_name(), gprs_ns2_ip_bind_set_dscp(), GPRS_NS2_LL_UDP, vty::index, vty_bind::ll, vty_bind::name, VTY_NEWLINE, vty_nsi, and vty_out().

## ◆ DEFUN() [19/41]

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" |
| ) |  |

References argv, CMD_SUCCESS, CMD_WARNING, DLNS, FR_ROLE_NETWORK_EQUIPMENT, FR_ROLE_USER_EQUIPMENT, gprs_ns2_fr_bind(), gprs_ns2_fr_bind_by_netif(), GPRS_NS2_LL_FR, vty::index, vty_bind::ll, LOGL_ERROR, LOGP, vty_bind::name, vty_fr_network, VTY_NEWLINE, vty_nsi, and vty_out().

## ◆ DEFUN() [20/41]

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" |
| ) |  |

References argv, CMD_SUCCESS, CMD_WARNING, data, gprs_ns2_bind_by_name(), gprs_ns2_ip_bind_set_sns_weight(), GPRS_NS2_LL_UDP, vty::index, vty_bind::ip_sns_data_weight, vty_bind::ip_sns_sig_weight, vty_bind::ll, vty_bind::name, VTY_NEWLINE, vty_nsi, and vty_out().

## ◆ DEFUN() [21/41]

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" |
| ) |  |

References gprs_ns2_vc_bind::accept_ipaccess, vty_bind::accept_ipaccess, CMD_SUCCESS, CMD_WARNING, gprs_ns2_bind_by_name(), GPRS_NS2_LL_UDP, vty::index, vty_bind::ll, vty_bind::name, VTY_NEWLINE, vty_nsi, and vty_out().

## ◆ DEFUN() [22/41]

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() [23/41]

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" |
| ) |  |

References argv, CMD_SUCCESS, CMD_WARNING, gprs_ns2_bind_by_name(), gprs_ns2_ip_bind_set_priority(), GPRS_NS2_LL_UDP, vty::index, vty_bind::ll, vty_bind::name, vty_bind::priority, VTY_NEWLINE, vty_nsi, and vty_out().

## ◆ DEFUN() [24/41]

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" |
| ) |  |

References argv, CMD_SUCCESS, CMD_WARNING, GPRS_NS2_LL_UDP, ip_sns_default_binds, list, vty_nse_bind::list, vty_bind::ll, llist_add_tail(), llist_for_each_entry, name, vty_nse_bind::vbind, vty_bind_by_name(), VTY_NEWLINE, vty_nsi, and vty_out().

## ◆ DEFUN() [25/41]

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() [26/41]

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() [27/41]

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() [28/41]

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() [29/41]

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() [30/41]

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() [31/41]

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" |
| ) |  |

References argc, argv, CMD_ERR_INCOMPLETE, CMD_SUCCESS, gprs_ns2_create_nse2(), GPRS_NS2_DIALECT_UNDEF, GPRS_NS2_LL_UNDEF, gprs_ns2_nse_by_nsei(), vty::index, L_NS_NSE_NODE, vty::node, nsei, gprs_ns2_nse::persistent, VTY_NEWLINE, vty_nse_alloc(), vty_nse_by_nsei(), vty_nsi, and vty_out().

## ◆ DEFUN() [32/41]

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() [33/41]

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" |
| ) |  |

References argv, gprs_ns2_inst::binding, CMD_SUCCESS, gprs_ns2_is_ip_bind(), list, llist_for_each_entry, ns2_ip_set_txqueue_max_length(), gprs_ns2_inst::txqueue_max_length, and vty_nsi.

## ◆ DEFUN() [34/41]

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" |
| ) |  |

References argv, CMD_SUCCESS, CMD_WARNING, gprs_ns2_nse_by_nsei(), log_set_nse_filter(), log_tgt_mutex_lock, log_tgt_mutex_unlock, osmo_log_vty2tgt(), VTY_NEWLINE, vty_nsi, and vty_out().

## ◆ DEFUN() [35/41]

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" |
| ) |  |

References argv, CMD_SUCCESS, CMD_WARNING, gprs_ns2_nsvc_by_nsvci(), log_set_nsvc_filter(), log_tgt_mutex_lock, log_tgt_mutex_unlock, osmo_log_vty2tgt(), VTY_NEWLINE, vty_nsi, and vty_out().

## ◆ DEFUN() [36/41]

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" |
| ) |  |

References argv, CMD_SUCCESS, CMD_WARNING, gprs_ns2_nse::dialect, GPRS_NS2_DIALECT_SNS, gprs_ns2_free_nsvcs(), gprs_ns2_nse_by_nsei(), gprs_ns2_nse::nsi, VTY_NEWLINE, vty_nsi, and vty_out().

## ◆ DEFUN() [37/41]

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() [38/41]

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() [39/41]

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() [40/41]

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() [41/41]

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() [1/2]

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" |
| ) |  |

References argv, CMD_SUCCESS, CMD_WARNING, gprs_ns2_nse::dialect, GPRS_NS2_DIALECT_SNS, gprs_ns2_free_nse(), gprs_ns2_free_nsvcs(), gprs_ns2_nse_by_nsei(), gprs_ns2_nse_foreach_nsvc(), gprs_ns2_nse::nsi, nsvc_force_unconf_cb(), gprs_ns2_nse::persistent, VTY_NEWLINE, vty_nsi, and vty_out().

## ◆ DEFUN_HIDDEN() [2/2]

DEFUN_HIDDEN | ( | show_ns | ,
|  | show_ns_cmd | ,
|  | "show ns" | ,
|  | SHOW_STR | SHOW_NS_STR
| ) |  |

References CMD_SUCCESS, dump_ns_bind(), dump_ns_entities(), osmo_fr_network::links, llist_count(), osmo_fr_network_dump_vty(), vty_fr_network, and vty_nsi.

## ◆ dump_bind()

static void dump_bind | ( | struct vty * | vty,
|  | const struct gprs_ns2_vc_bind * | bind,
|  | bool | stats
| ) |  |
| 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().

## ◆ dump_ns_bind()

static void dump_ns_bind | ( | struct vty * | vty,
|  | const struct gprs_ns2_inst * | nsi,
|  | bool | stats
| ) |  |
| 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().

## ◆ dump_ns_entities()

static void dump_ns_entities | ( | struct vty * | vty,
|  | const struct gprs_ns2_inst * | nsi,
|  | bool | stats,
|  | bool | persistent_only
| ) |  |
| static

References dump_nse(), list, llist_for_each_entry, gprs_ns2_inst::nse, and gprs_ns2_nse::nsi.

Referenced by DEFUN(), and DEFUN_HIDDEN().

## ◆ dump_nse()

static void dump_nse | ( | struct vty * | vty,
|  | const struct gprs_ns2_nse * | nse,
|  | bool | stats,
|  | bool | persistent_only
| ) |  |
| 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().

## ◆ gprs_ns2_vty_init()

int gprs_ns2_vty_init | ( | struct gprs_ns2_inst * | nsi | ) |

References gprs_ns2_vty_init_reduced(), install_lib_element(), install_node(), L_NS_BIND_NODE, L_NS_NODE, L_NS_NSE_NODE, ns_bind_node, and ns_nse_node.

## ◆ gprs_ns2_vty_init_reduced()

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.

Parameters

  [in] | nsi | NS instance on which we operate

Returns
  0 on success.

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().

## ◆ log_set_nse_filter()

static void log_set_nse_filter | ( | struct log_target * | target,
|  | struct gprs_ns2_nse * | nse
| ) |  |
| static

References LOG_FLT_GB_NSE, log_get_filter(), log_set_filter(), log_set_filter_data(), and gprs_ns2_vc::nse.

Referenced by DEFUN().

## ◆ log_set_nsvc_filter()

static void log_set_nsvc_filter | ( | struct log_target * | target,
|  | struct gprs_ns2_vc * | nsvc
| ) |  |
| static

References LOG_FLT_GB_NSVC, log_get_filter(), log_set_filter(), and log_set_filter_data().

Referenced by DEFUN().

## ◆ ns2_sns_add_sns_default_binds()

int ns2_sns_add_sns_default_binds | ( | struct gprs_ns2_nse * | nse | ) |

References gprs_ns2_nse::dialect, gprs_ns2_bind_by_name(), GPRS_NS2_DIALECT_SNS, GPRS_NS2_LL_UDP, gprs_ns2_sns_add_bind(), ip_sns_default_binds, list, gprs_ns2_nse::ll, llist_for_each_entry, vty_bind::name, OSMO_ASSERT, vty_nse_bind::vbind, and vty_nsi.

Referenced by ns2_create_vc_sns().

## ◆ ns2_vty_dump_nsvc()

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().

## ◆ ns_nse_nsvc_udp_cmds()

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
| ) |  |
| 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().

## ◆ nsvc_force_unconf_cb()

static int nsvc_force_unconf_cb | ( | struct gprs_ns2_vc * | nsvc,
|  | void * | ctx
| ) |  |
| static

References ns2_vc_force_unconfigured(), and ns2_vc_fsm_start().

Referenced by DEFUN_HIDDEN().

## ◆ vty_bind_alloc()

static struct vty_bind * vty_bind_alloc | ( | const char * | name | ) |
| 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().

## ◆ vty_bind_by_name()

static struct vty_bind * vty_bind_by_name | ( | const char * | name | ) |
| static

References binds, list, llist_for_each_entry, name, and vty_bind::name.

Referenced by DEFUN().

## ◆ vty_bind_free()

static void vty_bind_free | ( | struct vty_bind * | vbind | ) |
| static

References vty_bind::list, and llist_del().

Referenced by DEFUN().

## ◆ vty_nse_add_vbind()

static int vty_nse_add_vbind | ( | struct vty_nse * | vnse,
|  | struct vty_bind * | vbind
| ) |  |
| static

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().

## ◆ vty_nse_alloc()

static struct vty_nse * vty_nse_alloc | ( | uint16_t | nsei | ) |
| 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().

## ◆ vty_nse_by_nsei()

static struct vty_nse * vty_nse_by_nsei | ( | uint16_t | nsei | ) |
| 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().

## ◆ vty_nse_check_sns()

static bool vty_nse_check_sns | ( | struct gprs_ns2_nse * | nse | ) |
| static

References vty_nse::binds, gprs_ns2_sns_count(), llist_empty(), gprs_ns2_nse::nsei, and vty_nse_by_nsei().

Referenced by DEFUN().

## ◆ vty_nse_free()

static void vty_nse_free | ( | struct vty_nse * | vnse | ) |
| static

References vty_nse::list, and llist_del().

Referenced by DEFUN().

## ◆ vty_nse_remove_vbind()

static int vty_nse_remove_vbind | ( | struct vty_nse * | vnse,
|  | struct vty_bind * | vbind
| ) |  |
| static

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().

## Variable Documentation

## ◆ binds

struct llist_head binds
| static

Referenced by config_write_ns_bind(), gprs_ns2_vty_init_reduced(), vty_bind_alloc(), and vty_bind_by_name().

## ◆ gprs_ns_timer_strs

const struct value_string gprs_ns_timer_strs[]

Initial value:
= {
{ NS_TOUT_TNS_BLOCK, TNS_BLOCK_STR },
{ NS_TOUT_TNS_BLOCK_RETRIES, TNS_BLOCK_RETRIES_STR },
{ NS_TOUT_TNS_RESET, TNS_RESET_STR },
{ NS_TOUT_TNS_RESET_RETRIES, TNS_RESET_RETRIES_STR },
{ NS_TOUT_TNS_TEST, TNS_TEST_STR },
{ NS_TOUT_TNS_ALIVE, TNS_ALIVE_STR },
{ NS_TOUT_TNS_ALIVE_RETRIES, TNS_ALIVE_RETRIES_STR },
{ NS_TOUT_TSNS_PROV, TSNS_PROV_STR },
{ NS_TOUT_TSNS_SIZE_RETRIES, TSNS_SIZE_RETRIES_STR },
{ NS_TOUT_TSNS_CONFIG_RETRIES, TSNS_CONFIG_RETRIES_STR },
{ NS_TOUT_TSNS_PROCEDURES_RETRIES, TSNS_PROCEDURES_RETRIES_STR },
{ 0, NULL }
}
TNS_ALIVE_STR
#define TNS_ALIVE_STR
Definition: gprs_ns2_internal.h:71
TNS_RESET_RETRIES_STR
#define TNS_RESET_RETRIES_STR
Definition: gprs_ns2_internal.h:69
TNS_TEST_STR
#define TNS_TEST_STR
Definition: gprs_ns2_internal.h:70
TSNS_CONFIG_RETRIES_STR
#define TSNS_CONFIG_RETRIES_STR
Definition: gprs_ns2_internal.h:75
TSNS_SIZE_RETRIES_STR
#define TSNS_SIZE_RETRIES_STR
Definition: gprs_ns2_internal.h:74
TNS_BLOCK_STR
#define TNS_BLOCK_STR
Definition: gprs_ns2_internal.h:66
NS_TOUT_TSNS_CONFIG_RETRIES
@ NS_TOUT_TSNS_CONFIG_RETRIES
Definition: gprs_ns2_internal.h:110
NS_TOUT_TSNS_SIZE_RETRIES
@ NS_TOUT_TSNS_SIZE_RETRIES
Definition: gprs_ns2_internal.h:109
NS_TOUT_TSNS_PROCEDURES_RETRIES
@ NS_TOUT_TSNS_PROCEDURES_RETRIES
Definition: gprs_ns2_internal.h:111
TNS_BLOCK_RETRIES_STR
#define TNS_BLOCK_RETRIES_STR
Definition: gprs_ns2_internal.h:67
TNS_RESET_STR
#define TNS_RESET_STR
Definition: gprs_ns2_internal.h:68
TSNS_PROV_STR
#define TSNS_PROV_STR
Definition: gprs_ns2_internal.h:73
TNS_ALIVE_RETRIES_STR
#define TNS_ALIVE_RETRIES_STR
Definition: gprs_ns2_internal.h:72
TSNS_PROCEDURES_RETRIES_STR
#define TSNS_PROCEDURES_RETRIES_STR
Definition: gprs_ns2_internal.h:76
NS_TOUT_TSNS_PROV
@ NS_TOUT_TSNS_PROV
Definition: gprs_ns.h:41
NS_TOUT_TNS_BLOCK
@ NS_TOUT_TNS_BLOCK
Definition: gprs_ns.h:34
NS_TOUT_TNS_RESET
@ NS_TOUT_TNS_RESET
Definition: gprs_ns.h:36
NS_TOUT_TNS_BLOCK_RETRIES
@ NS_TOUT_TNS_BLOCK_RETRIES
Definition: gprs_ns.h:35
NS_TOUT_TNS_TEST
@ NS_TOUT_TNS_TEST
Definition: gprs_ns.h:38
NS_TOUT_TNS_ALIVE_RETRIES
@ NS_TOUT_TNS_ALIVE_RETRIES
Definition: gprs_ns.h:40
NS_TOUT_TNS_RESET_RETRIES
@ NS_TOUT_TNS_RESET_RETRIES
Definition: gprs_ns.h:37
NS_TOUT_TNS_ALIVE
@ NS_TOUT_TNS_ALIVE
Definition: gprs_ns.h:39

Referenced by config_write_ns(), and DEFUN().

## ◆ ip_sns_default_binds

struct llist_head ip_sns_default_binds
| static

Referenced by config_write_ns(), DEFUN(), gprs_ns2_vty_init_reduced(), and ns2_sns_add_sns_default_binds().

## ◆ ns_bind_node

struct cmd_node ns_bind_node
| static

Initial value:
= {
L_NS_BIND_NODE,
"%s(config-ns-bind)# ",
1,
}
L_NS_BIND_NODE
L_NS_BIND_NODE

Referenced by gprs_ns2_vty_init().

## ◆ ns_node

struct cmd_node ns_node
| static

Initial value:
= {
L_NS_NODE,
"%s(config-ns)# ",
1,
}
L_NS_NODE
L_NS_NODE

Referenced by gprs_ns2_vty_init_reduced().

## ◆ ns_nse_node

struct cmd_node ns_nse_node
| static

Initial value:
= {
L_NS_NSE_NODE,
"%s(config-ns-nse)# ",
1,
}
L_NS_NSE_NODE
L_NS_NSE_NODE

Referenced by gprs_ns2_vty_init().

## ◆ nses

struct llist_head nses
| static

Referenced by gprs_ns2_vty_init_reduced(), vty_nse_alloc(), and vty_nse_by_nsei().

## ◆ vty_fr_network

struct osmo_fr_network* vty_fr_network = NULL
| static

Referenced by DEFUN(), DEFUN_HIDDEN(), and gprs_ns2_vty_init_reduced().

## ◆ vty_fr_role_names

const struct value_string vty_fr_role_names[]

Initial value:
= {
{ FR_ROLE_USER_EQUIPMENT, "fr" },
{ FR_ROLE_NETWORK_EQUIPMENT, "frnet" },
{ 0, NULL }
}
FR_ROLE_NETWORK_EQUIPMENT
@ FR_ROLE_NETWORK_EQUIPMENT
Definition: frame_relay.h:40
FR_ROLE_USER_EQUIPMENT
@ FR_ROLE_USER_EQUIPMENT
Definition: frame_relay.h:39

Referenced by config_write_vbind().

## ◆ vty_ll_names

const struct value_string vty_ll_names[]

Initial value:
= {
{ GPRS_NS2_LL_FR, "fr" },
{ GPRS_NS2_LL_FR_GRE, "frgre" },
{ GPRS_NS2_LL_UDP, "udp" },
{ 0, NULL }
}
GPRS_NS2_LL_FR
@ GPRS_NS2_LL_FR
NS/FR.
Definition: gprs_ns2.h:47
GPRS_NS2_LL_FR_GRE
@ GPRS_NS2_LL_FR_GRE
NS/FR/GRE/IP.
Definition: gprs_ns2.h:48
GPRS_NS2_LL_UDP
@ GPRS_NS2_LL_UDP
NS/UDP/IP.
Definition: gprs_ns2.h:46

Referenced by config_write_vbind(), and DEFUN().

## ◆ vty_nsi

struct gprs_ns2_inst* vty_nsi = NULL
| static

Referenced by config_write_ns(), config_write_ns_nse(), config_write_vbind(), DEFUN(), DEFUN_HIDDEN(), gprs_ns2_vty_init_reduced(), ns2_sns_add_sns_default_binds(), ns_nse_nsvc_udp_cmds(), vty_bind_alloc(), and vty_nse_alloc().