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 and it was merged. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15357 ) Change subject: vty: Print MM state and RAN type in show mm-context ...................................................................... vty: Print MM state and RAN type in show mm-context Value presviosuly printed as MM state is actually usually refereed as GMM state, so rename it. Change-Id: Ia06c53f0cd2a6348237ed3abeb9367d965745aba --- M include/osmocom/sgsn/gprs_sgsn.h M src/gprs/gprs_sgsn.c M src/gprs/sgsn_vty.c 3 files changed, 16 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved laforge: Looks good to me, but someone else must approve diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/gprs_sgsn.h index 8f16c5b..8e8b762 100644 --- a/include/osmocom/sgsn/gprs_sgsn.h +++ b/include/osmocom/sgsn/gprs_sgsn.h @@ -104,6 +104,7 @@ MM_CTX_T_GERAN_Iu, #endif }; +extern const struct value_string sgsn_ran_type_names[]; struct service_info { uint8_t type; diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c index 2334707..387c0d5 100644 --- a/src/gprs/gprs_sgsn.c +++ b/src/gprs/gprs_sgsn.c @@ -62,6 +62,15 @@ LLIST_HEAD(sgsn_apn_ctxts); LLIST_HEAD(sgsn_pdp_ctxts); +const struct value_string sgsn_ran_type_names[] = { + { MM_CTX_T_GERAN_Gb, "GPRS/EDGE via Gb" }, + { MM_CTX_T_UTRAN_Iu, "UMTS via Iu" }, +#if 0 + { MM_CTX_T_GERAN_Iu, "GPRS/EDGE via Iu" }, +#endif + { 0, NULL } +}; + static const struct rate_ctr_desc mmctx_ctr_description[] = { { "sign:packets:in", "Signalling Messages ( In)" }, { "sign:packets:out", "Signalling Messages (Out)" }, diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index 1f7874f..184ece7 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -526,15 +526,18 @@ struct sgsn_mm_ctx *mm, int pdp) { uint32_t id = 0; + const char *mm_state_name = NULL; switch(mm->ran_type) { case MM_CTX_T_UTRAN_Iu: #if BUILD_IU id = mm->iu.ue_ctx->conn_id; + mm_state_name = osmo_fsm_inst_state_name(mm->iu.mm_state_fsm); #endif break; case MM_CTX_T_GERAN_Gb: id = mm->gb.tlli; + mm_state_name = osmo_fsm_inst_state_name(mm->gb.mm_state_fsm); break; } @@ -542,9 +545,11 @@ pfx, mm->imsi, mm->imei, mm->p_tmsi, VTY_NEWLINE); vty_out(vty, "%s MSISDN: %s, TLLI: %08x%s HLR: %s", pfx, mm->msisdn, id, mm->hlr, VTY_NEWLINE); - vty_out(vty, "%s MM State: %s, Routeing Area: %s, Cell ID: %u%s", + vty_out(vty, "%s GMM State: %s, Routeing Area: %s, Cell ID: %u%s", pfx, get_value_string(gprs_mm_st_strs, mm->gmm_state), osmo_rai_name(&mm->ra), mm->gb.cell_id, VTY_NEWLINE); + vty_out(vty, "%s MM State: %s, RAN Type: %s%s", pfx, mm_state_name, + get_value_string(sgsn_ran_type_names, mm->ran_type), VTY_NEWLINE); vty_out_rate_ctr_group(vty, " ", mm->ctrg); -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15357 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Ia06c53f0cd2a6348237ed3abeb9367d965745aba Gerrit-Change-Number: 15357 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <axilirator at gmail.com> Gerrit-Reviewer: laforge <laforge at gnumonks.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190906/f1f7bb1f/attachment.htm>