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
This commit is contained in:
parent
ccd1252bd7
commit
fd815bba12
|
@ -104,6 +104,7 @@ enum sgsn_ran_type {
|
||||||
MM_CTX_T_GERAN_Iu,
|
MM_CTX_T_GERAN_Iu,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
extern const struct value_string sgsn_ran_type_names[];
|
||||||
|
|
||||||
struct service_info {
|
struct service_info {
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
|
|
|
@ -62,6 +62,15 @@ LLIST_HEAD(sgsn_ggsn_ctxts);
|
||||||
LLIST_HEAD(sgsn_apn_ctxts);
|
LLIST_HEAD(sgsn_apn_ctxts);
|
||||||
LLIST_HEAD(sgsn_pdp_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[] = {
|
static const struct rate_ctr_desc mmctx_ctr_description[] = {
|
||||||
{ "sign:packets:in", "Signalling Messages ( In)" },
|
{ "sign:packets:in", "Signalling Messages ( In)" },
|
||||||
{ "sign:packets:out", "Signalling Messages (Out)" },
|
{ "sign:packets:out", "Signalling Messages (Out)" },
|
||||||
|
|
|
@ -526,15 +526,18 @@ static void vty_dump_mmctx(struct vty *vty, const char *pfx,
|
||||||
struct sgsn_mm_ctx *mm, int pdp)
|
struct sgsn_mm_ctx *mm, int pdp)
|
||||||
{
|
{
|
||||||
uint32_t id = 0;
|
uint32_t id = 0;
|
||||||
|
const char *mm_state_name = NULL;
|
||||||
|
|
||||||
switch(mm->ran_type) {
|
switch(mm->ran_type) {
|
||||||
case MM_CTX_T_UTRAN_Iu:
|
case MM_CTX_T_UTRAN_Iu:
|
||||||
#if BUILD_IU
|
#if BUILD_IU
|
||||||
id = mm->iu.ue_ctx->conn_id;
|
id = mm->iu.ue_ctx->conn_id;
|
||||||
|
mm_state_name = osmo_fsm_inst_state_name(mm->iu.mm_state_fsm);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case MM_CTX_T_GERAN_Gb:
|
case MM_CTX_T_GERAN_Gb:
|
||||||
id = mm->gb.tlli;
|
id = mm->gb.tlli;
|
||||||
|
mm_state_name = osmo_fsm_inst_state_name(mm->gb.mm_state_fsm);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -542,9 +545,11 @@ static void vty_dump_mmctx(struct vty *vty, const char *pfx,
|
||||||
pfx, mm->imsi, mm->imei, mm->p_tmsi, VTY_NEWLINE);
|
pfx, mm->imsi, mm->imei, mm->p_tmsi, VTY_NEWLINE);
|
||||||
vty_out(vty, "%s MSISDN: %s, TLLI: %08x%s HLR: %s",
|
vty_out(vty, "%s MSISDN: %s, TLLI: %08x%s HLR: %s",
|
||||||
pfx, mm->msisdn, id, mm->hlr, VTY_NEWLINE);
|
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),
|
pfx, get_value_string(gprs_mm_st_strs, mm->gmm_state),
|
||||||
osmo_rai_name(&mm->ra), mm->gb.cell_id, VTY_NEWLINE);
|
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);
|
vty_out_rate_ctr_group(vty, " ", mm->ctrg);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue