Convert 'encoding' parameter of certain proto_tree_add_item() calls in plugin dissectors:
[obnox/wireshark/wip.git] / plugins / wimax / msg_ulmap.c
index b1369cf081451008c5e92fe5918191c7c8a4821c..1bf6e40df554fb3a9a13f2f258d2a37fd46003ae 100644 (file)
 #include "config.h"
 #endif
 
-#include "moduleinfo.h"
-
 #include <glib.h>
 #include <epan/packet.h>
-#include <epan/prefs.h>
 #include "crc.h"
 #include "wimax_bits.h"
 
@@ -71,19 +68,15 @@ extern gint N_layer;
 extern gint RCID_Type;
 extern gint RCID_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb, gint RCID_Type);
 
-
-/* forward reference */
-void dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
-
 static gint proto_mac_mgmt_msg_ulmap_decoder = -1;
 
 static gint ett_ulmap = -1;
 static gint ett_ulmap_ie = -1;
 static gint ett_ulmap_ffb = -1;
-static gint ett_ulmap_c = -1;
-static gint ett_ulmap_c_ie = -1;
-static gint ett_ulmap_s = -1;
-static gint ett_ulmap_s_ie = -1;
+/* static gint ett_ulmap_c = -1;    */
+/* static gint ett_ulmap_c_ie = -1; */
+/* static gint ett_ulmap_s = -1;    */
+/* static gint ett_ulmap_s_ie = -1; */
 static gint ett_287_1 = -1;
 static gint ett_287_2 = -1;
 static gint ett_289 = -1;
@@ -124,57 +117,6 @@ static gint ett_306_ul = -1;
 static gint ett_308b = -1;
 static gint ett_315d = -1;
 
-/* Setup protocol subtree array */
-static gint *ett[] =
-{
-    &ett_ulmap,
-    &ett_ulmap_ie,
-    &ett_ulmap_ffb,
-    &ett_ulmap_c,
-    &ett_ulmap_c_ie,
-    &ett_ulmap_s,
-    &ett_ulmap_s_ie,
-    &ett_287_1,
-    &ett_287_2,
-    &ett_289,
-    &ett_290,
-    &ett_290b,
-    &ett_291,
-    &ett_292,
-    &ett_293,
-    &ett_294,
-    &ett_295,
-    &ett_299,
-    &ett_300,
-    &ett_302,
-    &ett_302a,
-    &ett_302b,
-    &ett_302c,
-    &ett_302d,
-    &ett_302e,
-    &ett_302f,
-    &ett_302h,
-    &ett_302g,
-    &ett_302i,
-    &ett_302j,
-    &ett_302k,
-    &ett_302l,
-    &ett_302m,
-    &ett_302n,
-    &ett_302o,
-    &ett_302p,
-    &ett_302q,
-    &ett_302r,
-    &ett_302s,
-    &ett_302t,
-    &ett_302u,
-    &ett_302v,
-    &ett_306,
-    &ett_306_ul,
-    &ett_308b,
-    &ett_315d,
-};
-
 #define DCD_DOWNLINK_BURST_PROFILE        1
 #define DCD_BS_EIRP                       2
 #define DCD_FRAME_DURATION                3
@@ -309,312 +251,6 @@ static gint hf_ulmap_uiuc13_papr   = -1;
 static gint hf_ulmap_uiuc13_zone   = -1;
 static gint hf_ulmap_uiuc13_rsv    = -1;
 
-/* UL-MAP fields display */
-static hf_register_info hf[] =
-{
-    {
-           &hf_ulmap_message_type,
-           {
-                   "MAC Management Message Type", "wmx.macmgtmsgtype.ulmap",
-                   FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_fch_expected,
-           {
-                   "FCH Expected", "wmx.ulmap.fch.expected",
-                   FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_ie,
-           {
-                   "UL-MAP IE", "wmx.ulmap.ie",
-                   FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_ie_cid,
-           {
-                   "CID", "wmx.ulmap.ie.cid",
-                   FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_ie_uiuc,
-           {
-                   "UIUC", "wmx.ulmap.ie.uiuc",
-                   FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_ofdma_sym,
-           {
-                   "Num OFDMA Symbols", "wmx.ulmap.ofdma.sym",
-                   FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_reserved,
-           {
-                   "Reserved", "wmx.ulmap.rsv",
-                   FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_alloc_start_time,
-           {
-                   "Uplink Channel ID", "wmx.ulmap.start",
-                   FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_ucd_count,
-           {
-                   "UCD Count", "wmx.ulmap.ucd",
-                   FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc0_numsub,
-           {
-                   "No. subchannels", "wmx.ulmap.uiuc0.numsub",
-                   FT_UINT32,  BASE_DEC, NULL, 0x000003f8, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc0_numsym,
-           {
-                   "No. OFDMA symbols", "wmx.ulmap.uiuc0.numsym",
-                   FT_UINT32,  BASE_DEC, NULL, 0x0001fc00, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc0_rsv,
-           {
-                   "Reserved", "wmx.ulmap.uiuc0.rsv",
-                   FT_UINT32,  BASE_DEC, NULL, 0x00000007, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc0_subofs,
-           {
-                   "Subchannel offset", "wmx.ulmap.uiuc0.subofs",
-                   FT_UINT32,  BASE_DEC, NULL, 0x00fe0000, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc0_symofs,
-           {
-                   "OFDMA symbol offset", "wmx.ulmap.uiuc0.symofs",
-                   FT_UINT32,  BASE_DEC, NULL, 0xff000000, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc11_data,
-           {
-                   "Data", "wmx.ulmap.uiuc11.data",
-                   FT_BYTES,  BASE_HEX, NULL, 0x0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc11_ext,
-           {
-                   "Extended 2 UIUC", "wmx.ulmap.uiuc11.ext",
-                   FT_UINT8,  BASE_DEC, NULL, 0x0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc11_len,
-           {
-                   "Length", "wmx.ulmap.uiuc11.len",
-                   FT_UINT8,  BASE_DEC, NULL, 0x0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc12_dri,
-           {
-                   "Dedicated ranging indicator", "wmx.ulmap.uiuc12.dri",
-                   FT_UINT32, BASE_DEC, NULL, 0x00000001, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc10_dur,
-           {
-                   "Duration", "wmx.ulmap.uiuc12.dur",
-                   FT_UINT16, BASE_DEC, NULL, 0xFFc0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc12_method,
-           {
-                   "Ranging Method", "wmx.ulmap.uiuc12.method",
-                   FT_UINT32, BASE_DEC, NULL, 0x00000006, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc12_numsub,
-           {
-                   "No. Subchannels", "wmx.ulmap.uiuc12.numsub",
-                   FT_UINT32, BASE_DEC, NULL, 0x000003F8, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc12_numsym,
-           {
-                   "No. OFDMA Symbols", "wmx.ulmap.uiuc12.numsym",
-                   FT_UINT32, BASE_DEC, NULL, 0x0001Fc00, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc10_rep,
-           {
-                   "Repetition Coding indication", "wmx.ulmap.uiuc12.rep",
-                   FT_UINT16, BASE_DEC, NULL, 0x0030, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc12_subofs,
-           {
-                   "Subchannel Offset", "wmx.ulmap.uiuc12.subofs",
-                   FT_UINT32, BASE_DEC, NULL, 0x00Fe0000, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc12_symofs,
-           {
-                   "OFDMA Symbol Offset", "wmx.ulmap.uiuc12.symofs",
-                   FT_UINT32, BASE_DEC, NULL, 0xFF000000, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc13_numsub,
-           {
-                   "No. Subchannels/SZ Shift Value", "wmx.ulmap.uiuc13.numsub",
-                   FT_UINT32,  BASE_DEC, NULL, 0x000003f8, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc13_numsym,
-           {
-                   "No. OFDMA symbols", "wmx.ulmap.uiuc13.numsym",
-                   FT_UINT32,  BASE_DEC, NULL, 0x0001fc00, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc13_papr,
-           {
-                   "PAPR Reduction/Safety Zone", "wmx.ulmap.uiuc13.papr",
-                   FT_UINT32,  BASE_DEC, NULL, 0x00000004, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc13_rsv,
-           {
-                   "Reserved", "wmx.ulmap.uiuc13.rsv",
-                   FT_UINT32,  BASE_DEC, NULL, 0x00000001, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc13_subofs,
-           {
-                   "Subchannel offset", "wmx.ulmap.uiuc13.subofs",
-                   FT_UINT32,  BASE_DEC, NULL, 0x00fe0000, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc13_symofs,
-           {
-                   "OFDMA symbol offset", "wmx.ulmap.uiuc13.symofs",
-                   FT_UINT32,  BASE_DEC, NULL, 0xff000000, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc13_zone,
-           {
-                   "Sounding Zone", "wmx.ulmap.uiuc13.zone",
-                   FT_UINT32,  BASE_DEC, NULL, 0x00000002, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc14_bwr,
-           {
-                   "BW request mandatory", "wmx.ulmap.uiuc14.bwr",
-                   FT_UINT8,  BASE_DEC, NULL, 0x01, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc14_code,
-           {
-                   "Ranging code", "wmx.ulmap.uiuc14.code",
-                   FT_UINT8,  BASE_DEC, NULL, 0x0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc14_dur,
-           {
-                   "Duration", "wmx.ulmap.uiuc14.dur",
-                   FT_UINT16, BASE_DEC, NULL, 0xfc00, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc14_idx,
-           {
-                   "Frame Number Index", "wmx.ulmap.uiuc14.idx",
-                   FT_UINT16, BASE_DEC, NULL, 0x000F, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc14_rep,
-           {
-                   "Repetition Coding Indication", "wmx.ulmap.uiuc14.rep",
-                   FT_UINT16, BASE_DEC, NULL, 0x0030, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc14_sub,
-           {
-                   "Ranging subchannel", "wmx.ulmap.uiuc14.sub",
-                   FT_UINT8,  BASE_DEC, NULL, 0xfe, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc14_sym,
-           {
-                   "Ranging symbol", "wmx.ulmap.uiuc14.sym",
-                   FT_UINT8,  BASE_DEC, NULL, 0x0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc14_uiuc,
-           {
-                   "UIUC", "wmx.ulmap.uiuc14.uiuc",
-                   FT_UINT16, BASE_DEC, NULL, 0x03c0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc15_data,
-           {
-                   "Data", "wmx.ulmap.uiuc15.data",
-                   FT_BYTES,  BASE_HEX, NULL, 0x0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc15_ext,
-           {
-                   "Extended UIUC", "wmx.ulmap.uiuc15.ext",
-                   FT_UINT8,  BASE_DEC, NULL, 0x0, "", HFILL
-           }
-    },
-    {
-           &hf_ulmap_uiuc15_len,
-           {
-                   "Length", "wmx.ulmap.uiuc15.len",
-                   FT_UINT8,  BASE_DEC, NULL, 0x0, "", HFILL
-           }
-    }
-};
-
 /*  This gets called each time a capture file is loaded. */
 void init_wimax_globals(void)
 {
@@ -1150,7 +786,7 @@ gint AAS_UL_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gint le
     XBIT(data, 7, "UL_PermBase");
     XBIT(data, 8, "OFDMA symbol offset");
     XBIT(data, 8, "AAS zone length");
-    XBIT(data, 2, "Uplink peramble config");
+    XBIT(data, 2, "Uplink preamble config");
     XBIT(data, 1, "Preamble type");
     XBIT(data, 4, "Reserved");
     return BIT_TO_NIB(bit);
@@ -1203,7 +839,7 @@ gint CQICH_Alloc_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gi
             XBIT(data, 2, "Zone type");
             XBIT(data, 2, "Zone PRBS_ID");
             if (zperm == 0 || zperm == 1) {
-                XBIT(mgi, 1, "Major group indicatioon");
+                XBIT(mgi, 1, "Major group indication");
                 if (mgi == 1) {
                     /* PUSC major group bitmap*/
                     XBIT(data, 6, "PUSC Major group bitmap");
@@ -1964,20 +1600,8 @@ void lshift_bits(guint8 *buffer, gint bytes, gint bits)
 }
 
 
-/* Register Wimax Mac Payload Protocol and Dissector */
-void proto_register_mac_mgmt_msg_ulmap(void)
-{
-    if (proto_mac_mgmt_msg_ulmap_decoder == -1)
-    {
-       proto_mac_mgmt_msg_ulmap_decoder = proto_mac_mgmt_msg_dlmap_decoder;
-
-        proto_register_field_array(proto_mac_mgmt_msg_ulmap_decoder, hf, array_length(hf));
-        proto_register_subtree_array(ett, array_length(ett));
-    }
-}
-
 
-gint dissect_ulmap_ie( proto_tree *ie_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb)
+gint dissect_ulmap_ie( proto_tree *ie_tree, const guint8 *bufptr, gint offset, gint length _U_, tvbuff_t *tvb)
 {
     /* decode a single UL-MAP IE and return the
      * length of the IE in nibbles
@@ -1993,8 +1617,6 @@ gint dissect_ulmap_ie( proto_tree *ie_tree, const guint8 *bufptr, gint offset, g
 
     nibble = offset;
 
-    UNREFERENCED_PARAMETER(length);
-
     /* 8.4.5.4 UL-MAP IE format - table 287 */
     cid = NIB_WORD(nibble, bufptr);
     uiuc = NIB_NIBBLE(nibble + 4, bufptr);
@@ -2039,7 +1661,7 @@ gint dissect_ulmap_ie( proto_tree *ie_tree, const guint8 *bufptr, gint offset, g
         nibble += 2;
         */
 
-        len = 4 + BYTE_TO_NIB(len); /* length in nibbles */
+        len = 3 + BYTE_TO_NIB(len); /* length in nibbles */
 
         /* data table 290c 8.4.5.4.4.2 */
         switch (ext2_uiuc) {
@@ -2274,7 +1896,7 @@ gint dissect_ulmap_ie( proto_tree *ie_tree, const guint8 *bufptr, gint offset, g
     return (nibble - offset);
 }
 
-void dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+void dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
 {
     /* 6.3.2.3.4 [2] UL-MAP table 18 */
     guint offset = 0;
@@ -2290,23 +1912,21 @@ void dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo, proto
     /* XXX This should be removed, and regular tvb accessors should be used instead. */
     bufptr = tvb_get_ptr(tvb, offset, tvb_len);
 
-    UNREFERENCED_PARAMETER(pinfo);
-
     /* display MAC UL-MAP */
     ti = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_ulmap_decoder, tvb, offset, tvb_len, "UL-MAP (%u bytes)", tvb_len);
     ulmap_tree = proto_item_add_subtree(ti, ett_ulmap);
 
     /* Decode and display the UL-MAP */
-    proto_tree_add_item(ulmap_tree, hf_ulmap_message_type, tvb, offset, 1, FALSE);
+    proto_tree_add_item(ulmap_tree, hf_ulmap_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
     offset++;
 
-    proto_tree_add_item(ulmap_tree, hf_ulmap_reserved, tvb, offset, 1, FALSE);
+    proto_tree_add_item(ulmap_tree, hf_ulmap_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
     offset++;
-    proto_tree_add_item(ulmap_tree, hf_ulmap_ucd_count, tvb, offset, 1, FALSE);
+    proto_tree_add_item(ulmap_tree, hf_ulmap_ucd_count, tvb, offset, 1, ENC_BIG_ENDIAN);
     offset++;
-    proto_tree_add_item(ulmap_tree, hf_ulmap_alloc_start_time, tvb, offset, 4, FALSE);
+    proto_tree_add_item(ulmap_tree, hf_ulmap_alloc_start_time, tvb, offset, 4, ENC_BIG_ENDIAN);
     offset += 4;
-    proto_tree_add_item(ulmap_tree, hf_ulmap_ofdma_sym, tvb, offset, 1, FALSE);
+    proto_tree_add_item(ulmap_tree, hf_ulmap_ofdma_sym, tvb, offset, 1, ENC_BIG_ENDIAN);
     offset++;
 
     /* UL-MAP IEs */
@@ -2340,7 +1960,7 @@ gint wimax_decode_ulmapc(proto_tree *base_tree, const guint8 *bufptr, gint offse
     nib = offset;
 
     /* display MAC UL-MAP */
-    ti = proto_tree_add_protocol_format(base_tree, proto_mac_mgmt_msg_ulmap_decoder, tvb, NIBHI(offset,length), "Compressed UL-MAP");
+    ti = proto_tree_add_protocol_format(base_tree, proto_mac_mgmt_msg_ulmap_decoder, tvb, NIBHI(offset,length-offset), "Compressed UL-MAP (%u bytes)", NIB_ADDR(length-offset));
     tree = proto_item_add_subtree(ti, ett_306);
 
     /* Decode and display the UL-MAP */
@@ -2354,7 +1974,7 @@ gint wimax_decode_ulmapc(proto_tree *base_tree, const guint8 *bufptr, gint offse
     proto_tree_add_uint(tree, hf_ulmap_ofdma_sym, tvb, NIBHI(nib,2), data); /* added 2005 */
     nib += 2;
 
-    ti = proto_tree_add_text(tree, tvb, NIBHI(nib,length-nib), "UL-MAP IEs");
+    ti = proto_tree_add_text(tree, tvb, NIBHI(nib,length-nib), "UL-MAP IEs (%u bytes)", NIB_ADDR(length-nib));
     ie_tree = proto_item_add_subtree(ti, ett_306_ul);
     while (nib < length-1) {
         nib += dissect_ulmap_ie(ie_tree, bufptr, nib, length-nib, tvb);
@@ -2443,3 +2063,369 @@ gint wimax_decode_ulmap_reduced_aas(proto_tree *base_tree, const guint8 *bufptr,
     return (bit - offset); /* length in bits */
 }
 
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_ulmap(void)
+{
+       /* UL-MAP fields display */
+       static hf_register_info hf[] =
+       {
+               {
+                       &hf_ulmap_message_type,
+                       {
+                               "MAC Management Message Type", "wmx.macmgtmsgtype.ulmap",
+                               FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_fch_expected,
+                       {
+                               "FCH Expected", "wmx.ulmap.fch.expected",
+                               FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_ie,
+                       {
+                               "UL-MAP IE", "wmx.ulmap.ie",
+                               FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_ie_cid,
+                       {
+                               "CID", "wmx.ulmap.ie.cid",
+                               FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_ie_uiuc,
+                       {
+                               "UIUC", "wmx.ulmap.ie.uiuc",
+                               FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_ofdma_sym,
+                       {
+                               "Num OFDMA Symbols", "wmx.ulmap.ofdma.sym",
+                               FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_reserved,
+                       {
+                               "Reserved", "wmx.ulmap.rsv",
+                               FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_alloc_start_time,
+                       {
+                               "Uplink Channel ID", "wmx.ulmap.start",
+                               FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_ucd_count,
+                       {
+                               "UCD Count", "wmx.ulmap.ucd",
+                               FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc0_numsub,
+                       {
+                               "No. subchannels", "wmx.ulmap.uiuc0.numsub",
+                               FT_UINT32,      BASE_DEC, NULL, 0x000003f8, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc0_numsym,
+                       {
+                               "No. OFDMA symbols", "wmx.ulmap.uiuc0.numsym",
+                               FT_UINT32,      BASE_DEC, NULL, 0x0001fc00, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc0_rsv,
+                       {
+                               "Reserved", "wmx.ulmap.uiuc0.rsv",
+                               FT_UINT32,      BASE_DEC, NULL, 0x00000007, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc0_subofs,
+                       {
+                               "Subchannel offset", "wmx.ulmap.uiuc0.subofs",
+                               FT_UINT32,      BASE_DEC, NULL, 0x00fe0000, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc0_symofs,
+                       {
+                               "OFDMA symbol offset", "wmx.ulmap.uiuc0.symofs",
+                               FT_UINT32,      BASE_DEC, NULL, 0xff000000, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc11_data,
+                       {
+                               "Data", "wmx.ulmap.uiuc11.data",
+                               FT_BYTES,  BASE_NONE, NULL, 0x0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc11_ext,
+                       {
+                               "Extended 2 UIUC", "wmx.ulmap.uiuc11.ext",
+                               FT_UINT8,  BASE_DEC, NULL, 0x0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc11_len,
+                       {
+                               "Length", "wmx.ulmap.uiuc11.len",
+                               FT_UINT8,  BASE_DEC, NULL, 0x0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc12_dri,
+                       {
+                               "Dedicated ranging indicator", "wmx.ulmap.uiuc12.dri",
+                               FT_UINT32, BASE_DEC, NULL, 0x00000001, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc10_dur,
+                       {
+                               "Duration", "wmx.ulmap.uiuc12.dur",
+                               FT_UINT16, BASE_DEC, NULL, 0xFFc0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc12_method,
+                       {
+                               "Ranging Method", "wmx.ulmap.uiuc12.method",
+                               FT_UINT32, BASE_DEC, NULL, 0x00000006, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc12_numsub,
+                       {
+                               "No. Subchannels", "wmx.ulmap.uiuc12.numsub",
+                               FT_UINT32, BASE_DEC, NULL, 0x000003F8, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc12_numsym,
+                       {
+                               "No. OFDMA Symbols", "wmx.ulmap.uiuc12.numsym",
+                               FT_UINT32, BASE_DEC, NULL, 0x0001Fc00, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc10_rep,
+                       {
+                               "Repetition Coding indication", "wmx.ulmap.uiuc12.rep",
+                               FT_UINT16, BASE_DEC, NULL, 0x0030, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc12_subofs,
+                       {
+                               "Subchannel Offset", "wmx.ulmap.uiuc12.subofs",
+                               FT_UINT32, BASE_DEC, NULL, 0x00Fe0000, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc12_symofs,
+                       {
+                               "OFDMA Symbol Offset", "wmx.ulmap.uiuc12.symofs",
+                               FT_UINT32, BASE_DEC, NULL, 0xFF000000, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc13_numsub,
+                       {
+                               "No. Subchannels/SZ Shift Value", "wmx.ulmap.uiuc13.numsub",
+                               FT_UINT32,      BASE_DEC, NULL, 0x000003f8, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc13_numsym,
+                       {
+                               "No. OFDMA symbols", "wmx.ulmap.uiuc13.numsym",
+                               FT_UINT32,      BASE_DEC, NULL, 0x0001fc00, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc13_papr,
+                       {
+                               "PAPR Reduction/Safety Zone", "wmx.ulmap.uiuc13.papr",
+                               FT_UINT32,      BASE_DEC, NULL, 0x00000004, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc13_rsv,
+                       {
+                               "Reserved", "wmx.ulmap.uiuc13.rsv",
+                               FT_UINT32,      BASE_DEC, NULL, 0x00000001, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc13_subofs,
+                       {
+                               "Subchannel offset", "wmx.ulmap.uiuc13.subofs",
+                               FT_UINT32,      BASE_DEC, NULL, 0x00fe0000, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc13_symofs,
+                       {
+                               "OFDMA symbol offset", "wmx.ulmap.uiuc13.symofs",
+                               FT_UINT32,      BASE_DEC, NULL, 0xff000000, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc13_zone,
+                       {
+                               "Sounding Zone", "wmx.ulmap.uiuc13.zone",
+                               FT_UINT32,      BASE_DEC, NULL, 0x00000002, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc14_bwr,
+                       {
+                               "BW request mandatory", "wmx.ulmap.uiuc14.bwr",
+                               FT_UINT8,  BASE_DEC, NULL, 0x01, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc14_code,
+                       {
+                               "Ranging code", "wmx.ulmap.uiuc14.code",
+                               FT_UINT8,  BASE_DEC, NULL, 0x0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc14_dur,
+                       {
+                               "Duration", "wmx.ulmap.uiuc14.dur",
+                               FT_UINT16, BASE_DEC, NULL, 0xfc00, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc14_idx,
+                       {
+                               "Frame Number Index", "wmx.ulmap.uiuc14.idx",
+                               FT_UINT16, BASE_DEC, NULL, 0x000F, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc14_rep,
+                       {
+                               "Repetition Coding Indication", "wmx.ulmap.uiuc14.rep",
+                               FT_UINT16, BASE_DEC, NULL, 0x0030, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc14_sub,
+                       {
+                               "Ranging subchannel", "wmx.ulmap.uiuc14.sub",
+                               FT_UINT8,  BASE_DEC, NULL, 0xfe, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc14_sym,
+                       {
+                               "Ranging symbol", "wmx.ulmap.uiuc14.sym",
+                               FT_UINT8,  BASE_DEC, NULL, 0x0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc14_uiuc,
+                       {
+                               "UIUC", "wmx.ulmap.uiuc14.uiuc",
+                               FT_UINT16, BASE_DEC, NULL, 0x03c0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc15_data,
+                       {
+                               "Data", "wmx.ulmap.uiuc15.data",
+                               FT_BYTES,  BASE_NONE, NULL, 0x0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc15_ext,
+                       {
+                               "Extended UIUC", "wmx.ulmap.uiuc15.ext",
+                               FT_UINT8,  BASE_DEC, NULL, 0x0, NULL, HFILL
+                       }
+               },
+               {
+                       &hf_ulmap_uiuc15_len,
+                       {
+                               "Length", "wmx.ulmap.uiuc15.len",
+                               FT_UINT8,  BASE_DEC, NULL, 0x0, NULL, HFILL
+                       }
+               }
+       };
+
+       /* Setup protocol subtree array */
+       static gint *ett[] =
+               {
+                       &ett_ulmap,
+                       &ett_ulmap_ie,
+                       &ett_ulmap_ffb,
+                       /* &ett_ulmap_c,    */
+                       /* &ett_ulmap_c_ie, */
+                       /* &ett_ulmap_s,    */
+                       /* &ett_ulmap_s_ie, */
+                       &ett_287_1,
+                       &ett_287_2,
+                       &ett_289,
+                       &ett_290,
+                       &ett_290b,
+                       &ett_291,
+                       &ett_292,
+                       &ett_293,
+                       &ett_294,
+                       &ett_295,
+                       &ett_299,
+                       &ett_300,
+                       &ett_302,
+                       &ett_302a,
+                       &ett_302b,
+                       &ett_302c,
+                       &ett_302d,
+                       &ett_302e,
+                       &ett_302f,
+                       &ett_302h,
+                       &ett_302g,
+                       &ett_302i,
+                       &ett_302j,
+                       &ett_302k,
+                       &ett_302l,
+                       &ett_302m,
+                       &ett_302n,
+                       &ett_302o,
+                       &ett_302p,
+                       &ett_302q,
+                       &ett_302r,
+                       &ett_302s,
+                       &ett_302t,
+                       &ett_302u,
+                       &ett_302v,
+                       &ett_306,
+                       &ett_306_ul,
+                       &ett_308b,
+                       &ett_315d,
+               };
+
+       proto_mac_mgmt_msg_ulmap_decoder = proto_mac_mgmt_msg_dlmap_decoder;
+
+       proto_register_field_array(proto_mac_mgmt_msg_ulmap_decoder, hf, array_length(hf));
+       proto_register_subtree_array(ett, array_length(ett));
+}