packet-rsl.c: Use value-string in RXLEV and RXQUAL fields

RXLEV and RXQUAL fields in RSL "Uplink Measurements" use same scale
format (0-63, 0-7) as RXLEV and RXQUAL in RR. RXQUAL value-string is
moved to packet-gsm_a_common.c in order to use it in both protocols.

Change-Id: Idadd9505225353fec76b9605e2045a5222669475
Reviewed-on: https://code.wireshark.org/review/24663
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
Pau Espin 2017-11-30 15:07:17 +01:00 committed by Pascal Quantin
parent 48e68367d9
commit a3a906d663
4 changed files with 17 additions and 16 deletions

View File

@ -547,6 +547,18 @@ static const value_string gsm_a_rr_rxlev_vals [] = {
};
value_string_ext gsm_a_rr_rxlev_vals_ext = VALUE_STRING_EXT_INIT(gsm_a_rr_rxlev_vals);
const value_string gsm_a_rr_rxqual_vals[] = {
{0, "BER < 0.2%, Mean value 0.14%"},
{1, "0.2% <= BER < 0.4%, Mean value 0.28%"},
{2, "0.4% <= BER < 0.8%, Mean value 0.57%"},
{3, "0.8% <= BER < 1.6%, Mean value 1.13%"},
{4, "1.6% <= BER < 3.2%, Mean value 2.26%"},
{5, "3.2% <= BER < 6.4%, Mean value 4.53%"},
{6, "6.4% <= BER < 12.8%, Mean value 9.05%"},
{7, "BER > 12.8%, Mean value 18.10%"},
{0, NULL}
};
/* Initialize the protocol and registered fields */
static int proto_a_common = -1;

View File

@ -792,6 +792,7 @@ extern const value_string gsm_a_dtap_numbering_plan_id_values[];
extern const value_string gsm_a_sms_vals[];
extern const value_string tighter_cap_level_vals[];
extern value_string_ext gsm_a_rr_rxlev_vals_ext;
extern const value_string gsm_a_rr_rxqual_vals[];
extern const value_string gsm_a_gm_type_of_ciph_alg_vals[];
extern value_string_ext nas_eps_emm_cause_values_ext;

View File

@ -4222,18 +4222,6 @@ static const true_false_string gsm_a_rr_mv_vals = {
"The measurement results are valid"
};
static const value_string gsm_a_rr_rxqual_vals [] = {
{0, "BER < 0.2%, Mean value 0.14%"},
{1, "0.2% <= BER < 0.4%, Mean value 0.28%"},
{2, "0.4% <= BER < 0.8%, Mean value 0.57%"},
{3, "0.8% <= BER < 1.6%, Mean value 1.13%"},
{4, "1.6% <= BER < 3.2%, Mean value 2.26%"},
{5, "3.2% <= BER < 6.4%, Mean value 4.53%"},
{6, "6.4% <= BER < 12.8%, Mean value 9.05%"},
{7, "BER > 12.8%, Mean value 18.10%"},
{0, NULL}
};
static const value_string gsm_a_rr_ncell_vals [] = {
{0, "No neighbour cell measurement result"},
{1, "1 neighbour cell measurement result"},

View File

@ -4346,22 +4346,22 @@ void proto_register_rsl(void)
},
{ &hf_rsl_rxlev_full_up,
{ "RXLEV.FULL.up", "gsm_abis_rsl.rxlev_full_up",
FT_UINT8, BASE_DEC, NULL, 0x3f,
FT_UINT8, BASE_DEC|BASE_EXT_STRING, &gsm_a_rr_rxlev_vals_ext, 0x3f,
NULL, HFILL }
},
{ &hf_rsl_rxlev_sub_up,
{ "RXLEV.SUB.up", "gsm_abis_rsl.rxlev_sub_up",
FT_UINT8, BASE_DEC, NULL, 0x3f,
FT_UINT8, BASE_DEC|BASE_EXT_STRING, &gsm_a_rr_rxlev_vals_ext, 0x3f,
NULL, HFILL }
},
{ &hf_rsl_rxqual_full_up,
{ "RXQUAL.FULL.up", "gsm_abis_rsl.rxqual_full_up",
FT_UINT8, BASE_DEC, NULL, 0x38,
FT_UINT8, BASE_DEC, VALS(gsm_a_rr_rxqual_vals), 0x38,
NULL, HFILL }
},
{ &hf_rsl_rxqual_sub_up,
{ "RXQUAL.SUB.up", "gsm_abis_rsl.rxqual_sub_up",
FT_UINT8, BASE_DEC, NULL, 0x07,
FT_UINT8, BASE_DEC, VALS(gsm_a_rr_rxqual_vals), 0x07,
NULL, HFILL }
},
{ &hf_rsl_acc_delay,