Add the reason for a UL ReTx (PDCCH retx grant or PHICH NACK).
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 25 Nov 2011 11:19:03 +0000 (11:19 +0000)
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 25 Nov 2011 11:19:03 +0000 (11:19 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40001 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-catapult-dct2000.c
epan/dissectors/packet-mac-lte.c
epan/dissectors/packet-mac-lte.h

index cff6ca2cc929ee61bc27b8e1866e7e28e60bcef0..db85cdf5fd642714bebf8c99cd1e738ad13d039f 100644 (file)
@@ -1777,7 +1777,13 @@ static void attach_mac_lte_info(packet_info *pinfo)
 
     /* System frame number */
     if (i < outhdr_values_found) {
-        p_mac_lte_info->sysframeNumber = outhdr_values[i];
+        p_mac_lte_info->sysframeNumber = outhdr_values[i++];
+    }
+
+    if ((p_mac_lte_info->direction == DIRECTION_UPLINK) &&
+        (i < outhdr_values_found)) {
+
+        p_mac_lte_info->isPHICHNACK = outhdr_values[i];
     }
 
     /* Store info in packet */
index 542d0da9e214901db6fa48511b242f7f7b9ae4c0..c78b30b10e536fbff2cf1e6659ebd78dd4353fd5 100644 (file)
@@ -61,6 +61,7 @@ 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_retx_reason = -1;
 static int hf_mac_lte_context_crc_status = -1;
 static int hf_mac_lte_context_rapid = -1;
 static int hf_mac_lte_context_rach_attempt_number = -1;
@@ -526,7 +527,12 @@ static const value_string predefined_frame_vals[] =
     { 0, NULL }
 };
 
-
+static const value_string ul_retx_grant_vals[] =
+{
+    { 0,      "PDCCH ReTx"},
+    { 1,      "PHICH NACK"},
+    { 0, NULL }
+};
 
 /**************************************************************************/
 /* Preferences state                                                      */
@@ -3449,6 +3455,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
     /* Retx count goes in top-level tree to make it more visible */
     if (p_mac_lte_info->reTxCount) {
+        proto_item *retx_reason_ti;
         retx_ti = proto_tree_add_uint(mac_lte_tree, hf_mac_lte_context_retx_count,
                                  tvb, 0, 0, p_mac_lte_info->reTxCount);
         PROTO_ITEM_SET_GENERATED(retx_ti);
@@ -3458,6 +3465,10 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                    "UE %u: UL MAC frame ReTX no. %u",
                                    p_mac_lte_info->ueid, p_mac_lte_info->reTxCount);
         }
+
+        retx_reason_ti = proto_tree_add_uint(mac_lte_tree, hf_mac_lte_context_retx_reason,
+                                             tvb, 0, 0, p_mac_lte_info->isPHICHNACK);
+        PROTO_ITEM_SET_GENERATED(retx_reason_ti);
     }
 
     if (p_mac_lte_info->crcStatusValid) {
@@ -3749,6 +3760,12 @@ void proto_register_mac_lte(void)
               "Number of times this PDU has been retransmitted", HFILL
             }
         },
+        { &hf_mac_lte_context_retx_reason,
+            { "ReTX reason",
+              "mac-lte.retx-reason", FT_UINT8, BASE_DEC, VALS(ul_retx_grant_vals), 0x0,
+              "Type of UL ReTx grant", HFILL
+            }
+        },
         { &hf_mac_lte_context_crc_status,
             { "CRC Status",
               "mac-lte.crc-status", FT_UINT8, BASE_DEC, VALS(crc_status_vals), 0x0,
index 55086837c29a91d72fba1de3176720dd3f28b4cb..3546539df00b6c9ebc0a7a132c16dd907b0f7e07 100644 (file)
@@ -114,6 +114,7 @@ typedef struct mac_lte_info
 
     /* UL only.  0=newTx, 1=first-retx, etc */
     guint8          reTxCount;
+    guint8          isPHICHNACK; /* FALSE=PDCCH retx grant, TRUE=PHICH NACK */
 
     /* DL only.  Status of CRC check */
     mac_lte_crc_status   crcStatusValid;