Loading...
Searching...
No Matches
gprs_bssgp_vty.c File Reference

VTY interface for our GPRS BSS Gateway Protocol (BSSGP) implementation. More...

`#include <stdlib.h>`
`#include <unistd.h>`
`#include <errno.h>`
`#include <stdint.h>`
`#include <arpa/inet.h>`
`#include <osmocom/core/msgb.h>`
`#include <osmocom/gsm/tlv.h>`
`#include <osmocom/core/talloc.h>`
`#include <osmocom/core/select.h>`
`#include <osmocom/core/rate_ctr.h>`
`#include <osmocom/gprs/gprs_ns.h>`
`#include <osmocom/gprs/gprs_bssgp.h>`
`#include <osmocom/gprs/gprs_bssgp_bss.h>`
`#include <osmocom/vty/vty.h>`
`#include <osmocom/vty/command.h>`
`#include <osmocom/vty/logging.h>`
`#include <osmocom/vty/telnet_interface.h>`
`#include <osmocom/vty/misc.h>`

## Macros

#define | BSSGP_STR "Show information about the BSSGP protocol\n"

## Functions

static void | log_set_bvc_filter (struct log_target *target, struct bssgp_bvc_ctx *bctx)
static int | config_write_bssgp (struct vty *vty)
| DEFUN (cfg_bssgp, cfg_bssgp_cmd, "bssgp", "Configure the GPRS BSS Gateway Protocol")
static void | dump_bvc (struct vty *vty, struct bssgp_bvc_ctx *bvc, int stats)
static void | dump_bssgp (struct vty *vty, int stats)
| DEFUN (bvc_reset, bvc_reset_cmd, "bssgp bvc nsei <0-65535> bvci <0-65535> reset", "Initiate BVC RESET procedure for a given NSEI and BVCI\n" "Filter based on BSSGP Virtual Connection\n" "NSEI of the BVC to be filtered\n" "Network Service Entity Identifier (NSEI)\n" "BVCI of the BVC to be filtered\n" "BSSGP Virtual Connection Identifier (BVCI)\n" "Perform reset procedure\n")
| DEFUN (show_bssgp, show_bssgp_cmd, "show bssgp", SHOW_STR BSSGP_STR)
| DEFUN (show_bssgp_stats, show_bssgp_stats_cmd, "show bssgp stats", SHOW_STR BSSGP_STR "Include statistics\n")
| DEFUN (show_bvc, show_bvc_cmd, "show bssgp nsei <0-65535> [stats]", SHOW_STR BSSGP_STR "Show all BVCs on one NSE\n" "The NSEI\n" "Include Statistics\n")
| DEFUN (logging_fltr_bvc, logging_fltr_bvc_cmd, "logging filter bvc nsei <0-65535> bvci <0-65535>", LOGGING_STR FILTER_STR "Filter based on BSSGP Virtual Connection\n" "NSEI of the BVC to be filtered\n" "Network Service Entity Identifier (NSEI)\n" "BVCI of the BVC to be filtered\n" "BSSGP Virtual Connection Identifier (BVCI)\n")
int | bssgp_vty_init (void)

## Variables

static struct cmd_node | bssgp_node

## Detailed Description

VTY interface for our GPRS BSS Gateway Protocol (BSSGP) implementation.

## Macro Definition Documentation

## BSSGP_STR

#define BSSGP_STR "Show information about the BSSGP protocol\n"

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

## Function Documentation

## bssgp_vty_init()

int bssgp_vty_init | ( | void |  | ) |

References bssgp_node, and config_write_bssgp().

## config_write_bssgp()

int config_write_bssgp | ( | struct vty * | vty | ) |

static

Referenced by bssgp_vty_init().

## DEFUN() [1/6]

DEFUN | ( | bvc_reset | ,
|  | bvc_reset_cmd | ,
|  | "bssgp bvc nsei <0-65535> bvci <0-65535> reset" | ,
|  | "Initiate BVC RESET procedure for a given NSEI and BVCI\n" "Filter based on BSSGP Virtual Connection\n" "NSEI of the BVC to be filtered\n" "Network Service Entity Identifier (NSEI)\n" "BVCI of the BVC to be filtered\n" "BSSGP Virtual Connection Identifier (BVCI)\n" "Perform reset procedure\n" | )

References BSSGP_CAUSE_OML_INTERV, bssgp_tx_bvc_reset(), btsctx_by_bvci_nsei(), bvci, and nsei.

## DEFUN() [2/6]

DEFUN | ( | cfg_bssgp | ,
|  | cfg_bssgp_cmd | ,
|  | "bssgp" | ,
|  | "Configure the GPRS BSS Gateway Protocol" | )

References vty::node.

## DEFUN() [3/6]

DEFUN | ( | logging_fltr_bvc | ,
|  | logging_fltr_bvc_cmd | ,
|  | "logging filter bvc nsei <0-65535> bvci <0-65535>" | ,
|  | LOGGING_STR FILTER_STR "Filter based on BSSGP Virtual Connection\n" "NSEI of the BVC to be filtered\n" "Network Service Entity Identifier (NSEI)\n" "BVCI of the BVC to be filtered\n" "BSSGP Virtual Connection Identifier (BVCI)\n" | )

References btsctx_by_bvci_nsei(), bvci, log_set_bvc_filter(), and nsei.

## DEFUN() [4/6]

DEFUN | ( | show_bssgp | ,
|  | show_bssgp_cmd | ,
|  | "show bssgp" | ,
|  | SHOW_STR | BSSGP_STR )

References BSSGP_STR, and dump_bssgp().

## DEFUN() [5/6]

DEFUN | ( | show_bssgp_stats | ,
|  | show_bssgp_stats_cmd | ,
|  | "show bssgp stats" | ,
|  | SHOW_STR BSSGP_STR "Include statistics\n" | )

References BSSGP_STR, and dump_bssgp().

## DEFUN() [6/6]

DEFUN | ( | show_bvc | ,
|  | show_bvc_cmd | ,
|  | "show bssgp nsei <0-65535> " | [stats],
|  | SHOW_STR BSSGP_STR "Show all BVCs on one NSE\n" "The NSEI\n" "Include Statistics\n" | )

References bssgp_bvc_ctxts, BSSGP_STR, dump_bvc(), bssgp_bvc_ctx::list, bssgp_bvc_ctx::nsei, and nsei.

## dump_bssgp()

void dump_bssgp | ( | struct vty * | vty,
|  | int | stats )

static

References bssgp_bvc_ctxts, dump_bvc(), and bssgp_bvc_ctx::list.

Referenced by DEFUN(), and DEFUN().

## dump_bvc()

void dump_bvc | ( | struct vty * | vty,
|  | struct bssgp_bvc_ctx * | bvc,
|  | int | stats )

static

References bssgp_flow_control::bucket_counter, bssgp_flow_control::bucket_leak_rate, bssgp_flow_control::bucket_size_max, BVC_S_BLOCKED, bssgp_bvc_ctx::bvci, bssgp_bvc_ctx::cell_id, bssgp_bvc_ctx::ctrg, bssgp_bvc_ctx::fc, bssgp_flow_control::max_queue_depth, bssgp_bvc_ctx::nsei, bssgp_flow_control::queue_depth, bssgp_bvc_ctx::ra_id, and bssgp_bvc_ctx::state.

Referenced by DEFUN(), and dump_bssgp().

## log_set_bvc_filter()

void log_set_bvc_filter | ( | struct log_target * | target,
|  | struct bssgp_bvc_ctx * | bctx )

static

Referenced by DEFUN().

## Variable Documentation

## bssgp_node

struct cmd_node bssgp_node

static

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

Referenced by bssgp_vty_init().