aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-11-30 15:07:17 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2017-11-30 16:28:39 +0000
commita3a906d663cdda569ab09ce71742d0f470f26d74 (patch)
tree0dab726beb4e921245317518581217346d1199c8
parent48e68367d9d0de933648c93fba9996993848aa5f (diff)
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>
-rw-r--r--epan/dissectors/packet-gsm_a_common.c12
-rw-r--r--epan/dissectors/packet-gsm_a_common.h1
-rw-r--r--epan/dissectors/packet-gsm_a_rr.c12
-rw-r--r--epan/dissectors/packet-rsl.c8
4 files changed, 17 insertions, 16 deletions
diff --git a/epan/dissectors/packet-gsm_a_common.c b/epan/dissectors/packet-gsm_a_common.c
index e210690..e70bac6 100644
--- a/epan/dissectors/packet-gsm_a_common.c
+++ b/epan/dissectors/packet-gsm_a_common.c
@@ -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;
diff --git a/epan/dissectors/packet-gsm_a_common.h b/epan/dissectors/packet-gsm_a_common.h
index 1e6ef11..21d2f62 100644
--- a/epan/dissectors/packet-gsm_a_common.h
+++ b/epan/dissectors/packet-gsm_a_common.h
@@ -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;
diff --git a/epan/dissectors/packet-gsm_a_rr.c b/epan/dissectors/packet-gsm_a_rr.c
index bb067d3..a8ae5db 100644
--- a/epan/dissectors/packet-gsm_a_rr.c
+++ b/epan/dissectors/packet-gsm_a_rr.c
@@ -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"},
diff --git a/epan/dissectors/packet-rsl.c b/epan/dissectors/packet-rsl.c
index 1b5d58c..fc6f1d9 100644
--- a/epan/dissectors/packet-rsl.c
+++ b/epan/dissectors/packet-rsl.c
@@ -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,