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/.
Harald Welte gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/5554
BSC: Add "show subscriber all" command
This command lists the currently-active bsc_subscr and their contents,
the format looks like this:
OsmoBSC> show subscriber all
IMSI TMSI LAC Use
001010123456789 ffffffff 65534 3
001010100000001 a1b2c301 65534 1
Change-Id: Ib9c0c31a0a5a91b42fd832fa0df3460b1a440733
---
M src/osmo-bsc/osmo_bsc_vty.c
1 file changed, 23 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/54/5554/1
diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c
index f01e6f7..fb8b275 100644
--- a/src/osmo-bsc/osmo_bsc_vty.c
+++ b/src/osmo-bsc/osmo_bsc_vty.c
@@ -929,6 +929,28 @@
return CMD_SUCCESS;
}
+static void dump_one_sub(struct vty *vty, struct bsc_subscr *bsub)
+{
+ vty_out(vty, " %15s %08x %5u %d%s", bsub->imsi, bsub->tmsi, bsub->lac, bsub->use_count,
+ VTY_NEWLINE);
+}
+
+DEFUN(show_subscr_all,
+ show_subscr_all_cmd,
+ "show subscriber all",
+ SHOW_STR "Display information about subscribers\n" "All Subscribers\n")
+{
+ struct bsc_subscr *bsc_subscr;
+
+ vty_out(vty, " IMSI TMSI LAC Use%s", VTY_NEWLINE);
+ /* " 001010123456789 ffffffff 65534 1" */
+
+ llist_for_each_entry(bsc_subscr, bsc_gsmnet->bsc_subscribers, entry)
+ dump_one_sub(vty, bsc_subscr);
+
+ return CMD_SUCCESS;
+}
+
int bsc_vty_init_extra(void)
{
struct gsm_network *net = bsc_gsmnet;
@@ -987,6 +1009,7 @@
install_element_ve(&show_mscs_cmd);
install_element_ve(&show_pos_cmd);
install_element_ve(&logging_fltr_imsi_cmd);
+ install_element_ve(&show_subscr_all_cmd);
install_element(ENABLE_NODE, &gen_position_trap_cmd);
--
To view, visit https://gerrit.osmocom.org/5554
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9c0c31a0a5a91b42fd832fa0df3460b1a440733
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>