Loading...
Searching...
No Matches
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 one 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 one 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.
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"

Referenced by DEFUN(), and DEFUN().

## NSVCI_STR

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

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

## SHOW_NS_STR

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

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

## Function Documentation

## _config_write_ns_nse()

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, vty_nse_bind::list, vty_bind::name, ns2_sns_write_vty(), gprs_ns2_nse::nsei, gprs_ns2_nse::nsvc, vty_nse_bind::vbind, and vty_nse_by_nsei().

Referenced by config_write_ns_nse().

## config_write_ns()

int config_write_ns | ( | struct vty * | vty | ) |

static

References config_write_ns_bind(), config_write_ns_nse(), gprs_ns_timer_strs, ip_sns_default_binds, vty_nse_bind::list, vty_bind::name, NS_DEFAULT_TXQUEUE_MAX_LENGTH, vty_nse_bind::vbind, and vty_nsi.

Referenced by gprs_ns2_vty_init_reduced(), and gprs_ns_vty_init().

## config_write_ns_bind()

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

static

References binds, config_write_vbind(), and vty_bind::list.

Referenced by config_write_ns().

## config_write_ns_nse()

int config_write_ns_nse | ( | struct vty * | vty | ) |

static

References _config_write_ns_nse(), gprs_ns2_nse::list, gprs_ns2_nse::persistent, and vty_nsi.

Referenced by config_write_ns().

## config_write_nsvc()

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_sockaddr_str::port, osmo_sockaddr::sas, and osmo_sockaddr::u.

Referenced by _config_write_ns_nse().

## config_write_vbind()

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

static

References vty_bind::accept_ipaccess, vty_bind::accept_sns, vty_bind::dscp, 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::port, vty_bind::priority, osmo_sockaddr::sas, osmo_sockaddr::u, vty_fr_role_names, vty_ll_names, and vty_nsi.

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 gprs_ns2_bind_by_name(), gprs_ns2_free_bind(), vty_bind_by_name(), vty_bind_free(), and vty_nsi.

## 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, gprs_ns2_bind_by_name(), GPRS_NS2_LL_UDP, vty::index, vty_bind::ll, vty_bind::name, and vty_nsi.

## 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 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, and vty_nsi.

## 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 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, and vty_nsi.

## 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, gprs_ns2_bind_by_name(), GPRS_NS2_LL_UDP, vty::index, vty_bind::ll, vty_bind::name, and vty_nsi.

## 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 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, and vty_nsi.

## 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 GPRS_NS2_LL_UDP, ip_sns_default_binds, vty_nse_bind::list, vty_bind::ll, vty_nse_bind::vbind, and vty_bind_by_name().

## 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 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, ns2_nse_set_dialect(), gprs_ns2_nse::nsei, vty_bind_by_name(), vty_nse_by_nsei(), vty_nse_check_sns(), vty_nse_remove_vbind(), and vty_nsi.

## 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 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::sas, osmo_sockaddr::u, and vty_nse_check_sns().

## 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 DLCI_STR, 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, ns2_nse_set_dialect(), gprs_ns2_nse::nsei, gprs_ns2_nse::nsvc, and vty_nsi.

## 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 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, ns2_nse_set_dialect(), gprs_ns2_vc::nse, gprs_ns2_nse::nsvc, gprs_ns2_vc::nsvci, gprs_ns2_vc::nsvci_is_valid, NSVCI_STR, gprs_ns2_vc::persistent, osmo_sockaddr_str::port, osmo_sockaddr::sas, osmo_sockaddr::u, and vty_nsi.

## 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 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, ns2_nse_set_dialect(), gprs_ns2_vc::nse, gprs_ns2_nse::nsvc, gprs_ns2_vc::persistent, osmo_sockaddr_str::port, osmo_sockaddr::sas, osmo_sockaddr::u, and vty_nsi.

## 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 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, ns2_nse_set_dialect(), gprs_ns2_nse::nsvc, NSVCI_STR, and vty_nsi.

## 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 gprs_ns2_free_nse(), gprs_ns2_nse_by_nsei(), gprs_ns2_nse::nsei, nsei, gprs_ns2_nse::persistent, vty_nse_by_nsei(), vty_nse_free(), and vty_nsi.

## DEFUN() [15/41]

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

References 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 vty::index, vty_bind::ll, vty::node, vty_bind_alloc(), vty_bind_by_name(), and vty_ll_names.

## DEFUN() [17/41]

DEFUN | ( | cfg_ns_bind_accept_sns | ,
|  | cfg_ns_bind_accept_sns_cmd | ,
|  | "accept-dynamic-ip-sns" | ,
|  | "Allow one to create dynamic NS Entities by IP-SNS PDUs\n" | )

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

## 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 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, and vty_nsi.

## 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 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, vty_bind::name, vty_fr_network, and vty_nsi.

## 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 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, and vty_nsi.

## DEFUN() [21/41]

DEFUN | ( | cfg_ns_bind_ipaccess | ,
|  | cfg_ns_bind_ipaccess_cmd | ,
|  | "accept-ipaccess" | ,
|  | "Allow one 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, gprs_ns2_bind_by_name(), GPRS_NS2_LL_UDP, vty::index, vty_bind::ll, vty_bind::name, and vty_nsi.

## 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, 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::sas, osmo_sockaddr::u, and vty_nsi.

## 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 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, and vty_nsi.

## 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 GPRS_NS2_LL_UDP, ip_sns_default_binds, vty_nse_bind::list, vty_bind::ll, vty_nse_bind::vbind, vty_bind_by_name(), and vty_nsi.

## 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 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, ns2_nse_set_dialect(), gprs_ns2_nse::nsei, vty_bind_by_name(), vty_nse_add_vbind(), vty_nse_by_nsei(), and vty_nsi.

## 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 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::sas, and osmo_sockaddr::u.

## 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 gprs_ns2_nse::dialect, DLCI_STR, 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, NSVCI_STR, and vty_nsi.

## 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 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(), NSVCI_STR, gprs_ns2_vc::persistent, osmo_sockaddr::sas, osmo_sockaddr::u, and vty_nsi.

## 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 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 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 gprs_ns2_create_nse2(), GPRS_NS2_DIALECT_UNDEF, GPRS_NS2_LL_UNDEF, gprs_ns2_nse_by_nsei(), vty::index, vty::node, nsei, gprs_ns2_nse::persistent, vty_nse_alloc(), vty_nse_by_nsei(), and vty_nsi.

## 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 gprs_ns_timer_strs, NS_TIMERS, NS_TIMERS_HELP, 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 gprs_ns2_is_ip_bind(), gprs_ns2_vc_bind::list, ns2_ip_set_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 gprs_ns2_nse_by_nsei(), log_set_nse_filter(), and vty_nsi.

## 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 gprs_ns2_nsvc_by_nsvci(), log_set_nsvc_filter(), and vty_nsi.

## 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 gprs_ns2_nse::dialect, GPRS_NS2_DIALECT_SNS, gprs_ns2_free_nsvcs(), gprs_ns2_nse_by_nsei(), gprs_ns2_nse::nsi, and vty_nsi.

## 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 gprs_ns2_nsvc_by_nsvci(), ns2_vc_block(), ns2_vc_reset(), ns2_vc_unblock(), NSVCI_STR, and vty_nsi.

## 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 dump_ns_bind(), SHOW_NS_STR, 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 dump_ns_entities(), SHOW_NS_STR, 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 dump_ns_entities(), SHOW_NS_STR, 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 dump_nse(), gprs_ns2_nse_by_nsei(), gprs_ns2_nsvc_by_nsvci(), ns2_vty_dump_nsvc(), gprs_ns2_vc::nse, SHOW_NS_STR, and vty_nsi.

## 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 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, and vty_nsi.

## DEFUN_HIDDEN() [2/2]

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

References dump_ns_bind(), dump_ns_entities(), osmo_fr_network_dump_vty(), SHOW_NS_STR, vty_fr_network, and vty_nsi.

## dump_bind()

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, and gprs_ns2_vc_bind::statg.

Referenced by dump_ns_bind().

## dump_ns_bind()

void dump_ns_bind | ( | struct vty * | vty,
|  | const struct gprs_ns2_inst * | nsi,
|  | bool | stats )

static

References gprs_ns2_inst::binding, dump_bind(), gprs_ns2_vc_bind::list, and gprs_ns2_vc_bind::nsi.

Referenced by DEFUN(), and DEFUN_HIDDEN().

## dump_ns_entities()

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

static

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

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

## dump_nse()

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(), gprs_ns2_vc::list, gprs_ns2_nse::ll, ns2_sns_dump_vty(), ns2_vty_dump_nsvc(), gprs_ns2_vc::nse, gprs_ns2_nse::nsei, gprs_ns2_nse::nsvc, gprs_ns2_nse::persistent, and gprs_ns2_nse::ts_alive_change.

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(), 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, config_write_ns(), ip_sns_default_binds, ns_node, nses, osmo_fr_network_alloc(), vty_fr_network, and vty_nsi.

Referenced by gprs_ns2_vty_init().

## log_set_nse_filter()

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

static

References log_target::filter_data, log_target::filter_map, and gprs_ns2_vc::nse.

Referenced by DEFUN().

## log_set_nsvc_filter()

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

static

References log_target::filter_data, and log_target::filter_map.

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, vty_nse_bind::list, gprs_ns2_nse::ll, vty_bind::name, 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, gprs_ns2_vc::persistent, gprs_ns2_vc::sig_weight, gprs_ns2_vc::statg, and gprs_ns2_vc::ts_alive_change.

Referenced by DEFUN(), dump_nse(), dump_vty(), and dump_vty().

## ns_nse_nsvc_udp_cmds()

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 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, gprs_ns2_vc::persistent, osmo_sockaddr::sas, gprs_ns2_vc::sig_weight, sig_weight, osmo_sockaddr::u, and vty_nsi.

Referenced by DEFUN(), and DEFUN().

## nsvc_force_unconf_cb()

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

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, vty_bind::name, and vty_nsi.

Referenced by DEFUN().

## vty_bind_by_name()

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

static

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

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

## vty_bind_free()

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

static

References vty_bind::list.

Referenced by DEFUN().

## vty_nse_add_vbind()

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

static

References vty_nse::binds, GPRS_NS2_LL_UDP, vty_nse_bind::list, vty_bind::ll, and vty_nse_bind::vbind.

Referenced by DEFUN().

## vty_nse_alloc()

struct vty_nse * vty_nse_alloc | ( | uint16_t | nsei | ) |

static

References vty_nse::binds, vty_nse::list, nsei, vty_nse::nsei, nses, and vty_nsi.

Referenced by DEFUN().

## vty_nse_by_nsei()

struct vty_nse * vty_nse_by_nsei | ( | uint16_t | nsei | ) |

static

References vty_nse::list, nsei, vty_nse::nsei, and nses.

Referenced by _config_write_ns_nse(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), and vty_nse_check_sns().

## vty_nse_check_sns()

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

static

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

Referenced by DEFUN(), and DEFUN().

## vty_nse_free()

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

static

References vty_nse::list.

Referenced by DEFUN().

## vty_nse_remove_vbind()

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

static

References vty_nse::binds, GPRS_NS2_LL_UDP, vty_nse_bind::list, vty_bind::ll, 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(), config_write_ns(), and DEFUN().

## ip_sns_default_binds

struct llist_head ip_sns_default_binds

static

Referenced by config_write_ns(), DEFUN(), 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(), and gprs_ns_vty_init().

## 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(), config_write_ns_nse(), config_write_vbind(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN(), DEFUN_HIDDEN(), DEFUN_HIDDEN(), dump_ns(), gprs_ns2_vty_init_reduced(), gprs_ns_vty_init(), ns2_sns_add_sns_default_binds(), ns_nse_nsvc_udp_cmds(), vty_bind_alloc(), and vty_nse_alloc().