aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-umts_fp.c
diff options
context:
space:
mode:
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>2010-12-15 12:07:41 +0000
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>2010-12-15 12:07:41 +0000
commit210799babd43aaf11dc2ec59503869b9e6ee19d2 (patch)
treedac2ab01690790439228fd2775a6d414fc04c7aa /epan/dissectors/packet-umts_fp.c
parent4e2e4ed6bf9a8bdfc6277ef9b27427ca65718b45 (diff)
Use value_string for MAC-is descriptor lchid.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35191 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-umts_fp.c')
-rw-r--r--epan/dissectors/packet-umts_fp.c28
1 files changed, 23 insertions, 5 deletions
diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c
index 8a064c6dae..fbfe7b88b8 100644
--- a/epan/dissectors/packet-umts_fp.c
+++ b/epan/dissectors/packet-umts_fp.c
@@ -331,7 +331,25 @@ static const value_string segmentation_status_vals[] = {
{ 0, NULL }
};
-
+static const value_string lchid_vals[] = {
+ { 0, "Logical Channel 1" },
+ { 1, "Logical Channel 2" },
+ { 2, "Logical Channel 3" },
+ { 3, "Logical Channel 4" },
+ { 4, "Logical Channel 5" },
+ { 5, "Logical Channel 6" },
+ { 6, "Logical Channel 7" },
+ { 7, "Logical Channel 8" },
+ { 8, "Logical Channel 9" },
+ { 9, "Logical Channel 10" },
+ { 10, "Logical Channel 11" },
+ { 11, "Logical Channel 12" },
+ { 12, "Logical Channel 13" },
+ { 13, "Logical Channel 14" },
+ { 14, "CCCH (SRB0)" },
+ { 15, "E-RNTI being included (FDD only)" },
+ { 0, NULL }
+};
/* Dedicated control types */
#define DCH_OUTER_LOOP_POWER_CONTROL 1
@@ -2770,8 +2788,8 @@ static void dissect_e_dch_t2_channel_info(tvbuff_t *tvb, packet_info *pinfo _U_,
offset,
subframes[n].mac_is_length[pdu_no][sdu_no],
FALSE);
- proto_item_append_text(ti, " (LCH-ID=%u Len=%u): ",
- subframes[n].mac_is_lchid[pdu_no][sdu_no],
+ proto_item_append_text(ti, " (%s Len=%u): ",
+ val_to_str_const(subframes[n].mac_is_lchid[pdu_no][sdu_no], lchid_vals, "Unknown"),
subframes[n].mac_is_length[pdu_no][sdu_no]);
/* Show bytes too. There must be a nicer way of doing this! */
@@ -3742,7 +3760,7 @@ void proto_register_fp(void)
},
{ &hf_fp_edch_macis_lchid,
{ "LCH-ID",
- "fp.edch.mac-is.lchid", FT_UINT8, BASE_HEX, 0, 0xf0,
+ "fp.edch.mac-is.lchid", FT_UINT8, BASE_HEX, VALS(lchid_vals), 0xf0,
NULL, HFILL
}
},
@@ -3847,7 +3865,7 @@ void proto_register_fp(void)
},
{ &hf_fp_lchid,
{ "Logical Channel ID",
- "fp.lchid", FT_UINT8, BASE_DEC, 0, 0x0,
+ "fp.lchid", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL
}
},