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 submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/21432 )
Change subject: gprs_ns2_vty: Print all relevant data on each NS-VC
......................................................................
gprs_ns2_vty: Print all relevant data on each NS-VC
After this patch, we can finally see the BLOCKED/UNBLOCKED state,
weights, persistence, etc. in the VTY.
Example:
OsmoGbProxy> show ns entities
NSEI 00101: UDP, DEAD
NSVCI 00101: RESET PERSIST data_weight=1 sig_wight=1 udp)[127.0.0.1]:23000<101>[127.0.0.1]:7777
NSEI 00001: FR, ALIVE
NSVCI 00001: UNBLOCKED PERSIST data_weight=1 sig_wight=1 fr)netif: hdlcnet1 dlci: 16
NSVCI 00002: UNBLOCKED PERSIST data_weight=1 sig_wight=1 fr)netif: hdlcnet2 dlci: 17
NSVCI 00003: UNBLOCKED PERSIST data_weight=1 sig_wight=1 fr)netif: hdlcnet3 dlci: 18
NSVCI 00004: UNBLOCKED PERSIST data_weight=1 sig_wight=1 fr)netif: hdlcnet4 dlci: 19
Change-Id: I1cf8fe55d1d0cecc46113532c8550880558b0155
---
M src/gb/gprs_ns2_vty.c
1 file changed, 12 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 17b8d96..b244a96 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -260,7 +260,18 @@
static void dump_nsvc(struct vty *vty, struct gprs_ns2_vc *nsvc, bool stats)
{
- vty_out(vty, " NSVCI %05u %s%s", nsvc->nsvci, gprs_ns2_ll_str(nsvc), VTY_NEWLINE);
+ char nsvci_str[32];
+
+ if (nsvc->nsvci_is_valid)
+ snprintf(nsvci_str, sizeof(nsvci_str), "%05u", nsvc->nsvci);
+ else
+ snprintf(nsvci_str, sizeof(nsvci_str), "none");
+
+ vty_out(vty, " NSVCI %s: %s %s data_weight=%u sig_weight=%u %s%s", nsvci_str,
+ osmo_fsm_inst_state_name(nsvc->fi),
+ nsvc->persistent ? "PERSIST" : "DYNAMIC",
+ nsvc->data_weight, nsvc->sig_weight,
+ gprs_ns2_ll_str(nsvc), VTY_NEWLINE);
if (stats) {
vty_out_rate_ctr_group(vty, " ", nsvc->ctrg);
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21432
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I1cf8fe55d1d0cecc46113532c8550880558b0155
Gerrit-Change-Number: 21432
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201201/64a6eac3/attachment.htm>