This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/21692 ) Change subject: gbproxy: Add "show gbproxy cell ..." VTY command ...................................................................... gbproxy: Add "show gbproxy cell ..." VTY command This allows the user to inspect CELL related gb-proxy state. Change-Id: Iad1e8bbc358df9a3b3392404a70445a169dfebd5 --- M src/gbproxy/gb_proxy_vty.c 1 file changed, 43 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/92/21692/1 diff --git a/src/gbproxy/gb_proxy_vty.c b/src/gbproxy/gb_proxy_vty.c index 18dd53f..ae228f3 100644 --- a/src/gbproxy/gb_proxy_vty.c +++ b/src/gbproxy/gb_proxy_vty.c @@ -83,6 +83,32 @@ } } +static void gbproxy_vty_print_cell(struct vty *vty, struct gbproxy_cell *cell, bool show_stats) +{ + struct gprs_ra_id raid; + gsm48_parse_ra(&raid, cell->ra); + unsigned int num_sgsn_bvc = 0; + unsigned int i; + + vty_out(vty, "BVCI %5u RAI %s: ", cell->bvci, osmo_rai_name(&raid)); + if (cell->bss_bvc) + vty_out(vty, "BSS NSEI %5u, SGSN NSEI ", cell->bss_bvc->nse->nsei); + else + vty_out(vty, "BSS NSEI <none>, SGSN NSEI "); + + for (i = 0; i < ARRAY_SIZE(cell->sgsn_bvc); i++) { + struct gbproxy_bvc *sgsn_bvc = cell->sgsn_bvc[i]; + if (sgsn_bvc) { + vty_out(vty, "%5u ", sgsn_bvc->nse->nsei); + num_sgsn_bvc++; + } + } + if (num_sgsn_bvc) + vty_out(vty, "%s", VTY_NEWLINE); + else + vty_out(vty, "<none>%s", VTY_NEWLINE); +} + static int config_write_gbproxy(struct vty *vty) { struct gbproxy_nse *nse; @@ -208,6 +234,22 @@ return CMD_SUCCESS; } +DEFUN(show_gbproxy_cell, show_gbproxy_cell_cmd, "show gbproxy cell [stats]", + SHOW_STR "Display information about the Gb proxy\n" + "Show GPRS Cell Information\n" + "Show All GPRS Cells\n" + "Show statistics\n") +{ + struct gbproxy_cell *cell; + bool show_stats = argc >= 1; + int i; + + hash_for_each(g_cfg->cells, i, cell, list) + gbproxy_vty_print_cell(vty, cell, show_stats); + + return CMD_SUCCESS; +} + DEFUN(show_gbproxy_links, show_gbproxy_links_cmd, "show gbproxy links", SHOW_STR "Display information about the Gb proxy\n" "Show logical links\n") { @@ -322,6 +364,7 @@ int gbproxy_vty_init(void) { install_element_ve(&show_gbproxy_bvc_cmd); + install_element_ve(&show_gbproxy_cell_cmd); install_element_ve(&show_gbproxy_links_cmd); install_element_ve(&logging_fltr_bvc_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/21692 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Iad1e8bbc358df9a3b3392404a70445a169dfebd5 Gerrit-Change-Number: 21692 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201212/e909af3a/attachment.htm>