summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2009-08-26 09:13:14 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2009-08-26 09:13:14 +0000
commit8437debcb642d9aafaf6d2bb3969f0cb1f9181a3 (patch)
treef20255ef3a8c82cbf5e3d14b876dcf77df8ac831
parenta1fc8892598e0ae395e44a9ff9e64df536d248fe (diff)
downloadwireshark-8437debcb642d9aafaf6d2bb3969f0cb1f9181a3.tar.gz
Make UL grant size a (generated) field of its own (for easier use as a custom column or IO graph filter).
svn path=/trunk/; revision=29562
-rw-r--r--epan/dissectors/packet-mac-lte.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c
index 0fb5371178..b5595bd35c 100644
--- a/epan/dissectors/packet-mac-lte.c
+++ b/epan/dissectors/packet-mac-lte.c
@@ -58,10 +58,12 @@ static int hf_mac_lte_context_ueid = -1;
static int hf_mac_lte_context_subframe_number = -1;
static int hf_mac_lte_context_predefined_frame = -1;
static int hf_mac_lte_context_length = -1;
+static int hf_mac_lte_context_ul_grant_size = -1;
static int hf_mac_lte_context_bch_transport_channel = -1;
static int hf_mac_lte_context_retx_count = -1;
static int hf_mac_lte_context_crc_status = -1;
+
/* MAC SCH header fields */
static int hf_mac_lte_ulsch_header = -1;
static int hf_mac_lte_dlsch_header = -1;
@@ -1599,6 +1601,13 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ti = proto_tree_add_uint(mac_lte_tree, hf_mac_lte_context_length,
tvb, 0, 0, p_mac_lte_info->length);
PROTO_ITEM_SET_GENERATED(ti);
+ /* Infer uplink grant size */
+ if (p_mac_lte_info->direction == DIRECTION_UPLINK) {
+ ti = proto_tree_add_uint(mac_lte_tree, hf_mac_lte_context_ul_grant_size,
+ tvb, 0, 0, p_mac_lte_info->length);
+ PROTO_ITEM_SET_GENERATED(ti);
+ }
+
if (p_mac_lte_info->reTxCount) {
ti = proto_tree_add_uint(mac_lte_tree, hf_mac_lte_context_retx_count,
@@ -1619,7 +1628,8 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (p_mac_lte_info->crcStatus != TRUE) {
expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
"Frame has CRC error");
- col_append_fstr(pinfo->cinfo, COL_INFO, "<CRC FAILURE> on %s %u ",
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s: <CRC FAILURE> on %s %u ",
+ (p_mac_lte_info->direction == DIRECTION_UPLINK) ? "UL" : "DL",
val_to_str(p_mac_lte_info->rntiType, rnti_type_vals,
"Unknown RNTI type"),
p_mac_lte_info->rnti);
@@ -1784,6 +1794,12 @@ void proto_register_mac_lte(void)
"Original length of frame (including SDUs and padding)", HFILL
}
},
+ { &hf_mac_lte_context_ul_grant_size,
+ { "Uplink grant size",
+ "mac-lte.ul-grant-size", FT_UINT8, BASE_DEC, 0, 0x0,
+ "Uplink grant size (in bytes)", HFILL
+ }
+ },
{ &hf_mac_lte_context_bch_transport_channel,
{ "Transport channel",
"mac-lte.bch-transport-channel", FT_UINT8, BASE_DEC, VALS(bch_transport_channel_vals), 0x0,