aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/epan/wimax
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2018-01-15 12:40:55 +0000
committerJoão Valverde <j@v6e.pt>2018-01-16 08:51:37 +0000
commit5352ef42f94b5c14a24eb2e5559440c71fdcae8f (patch)
tree22901b1d228d76360b22af10021564bcee36390e /plugins/epan/wimax
parenta069a4f856c29b25bae05f2a91d7b2b71e1905f3 (diff)
plugins: Add source tree subfolder for plugin library
This allows some simplification and makes things more consistent, particularly for loading plugins from the build dir. Also fixes the issue reported here: https://www.wireshark.org/lists/wireshark-dev/201801/msg00061.html Change-Id: I0d8a000ee679172bccad546a3b0c47a79486f44d Reviewed-on: https://code.wireshark.org/review/25329 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'plugins/epan/wimax')
-rw-r--r--plugins/epan/wimax/AUTHORS5
-rw-r--r--plugins/epan/wimax/CMakeLists.txt127
-rw-r--r--plugins/epan/wimax/Makefile.am116
-rw-r--r--plugins/epan/wimax/README.wimax86
-rw-r--r--plugins/epan/wimax/crc.c210
-rw-r--r--plugins/epan/wimax/crc.h45
-rw-r--r--plugins/epan/wimax/crc_data.c183
-rw-r--r--plugins/epan/wimax/mac_hd_generic_decoder.c2312
-rw-r--r--plugins/epan/wimax/mac_hd_type1_decoder.c572
-rw-r--r--plugins/epan/wimax/mac_hd_type2_decoder.c1382
-rw-r--r--plugins/epan/wimax/mac_mgmt_msg_decoder.c379
-rw-r--r--plugins/epan/wimax/msg_aas_beam.c353
-rw-r--r--plugins/epan/wimax/msg_aas_fbck.c361
-rw-r--r--plugins/epan/wimax/msg_arq.c455
-rw-r--r--plugins/epan/wimax/msg_clk_cmp.c162
-rw-r--r--plugins/epan/wimax/msg_dcd.c1263
-rw-r--r--plugins/epan/wimax/msg_dlmap.c3486
-rw-r--r--plugins/epan/wimax/msg_dreg.c539
-rw-r--r--plugins/epan/wimax/msg_dsa.c195
-rw-r--r--plugins/epan/wimax/msg_dsc.c198
-rw-r--r--plugins/epan/wimax/msg_dsd.c290
-rw-r--r--plugins/epan/wimax/msg_dsx_rvd.c119
-rw-r--r--plugins/epan/wimax/msg_fpc.c178
-rw-r--r--plugins/epan/wimax/msg_pkm.c189
-rw-r--r--plugins/epan/wimax/msg_pmc.c258
-rw-r--r--plugins/epan/wimax/msg_prc_lt_ctrl.c148
-rw-r--r--plugins/epan/wimax/msg_reg_req.c1452
-rw-r--r--plugins/epan/wimax/msg_reg_rsp.c379
-rw-r--r--plugins/epan/wimax/msg_rep.c1576
-rw-r--r--plugins/epan/wimax/msg_res_cmd.c166
-rw-r--r--plugins/epan/wimax/msg_rng_req.c643
-rw-r--r--plugins/epan/wimax/msg_rng_rsp.c975
-rw-r--r--plugins/epan/wimax/msg_sbc.c2849
-rw-r--r--plugins/epan/wimax/msg_ucd.c1255
-rw-r--r--plugins/epan/wimax/msg_ulmap.c2954
-rw-r--r--plugins/epan/wimax/packet-m2m.c821
-rw-r--r--plugins/epan/wimax/packet-wmx.c377
-rw-r--r--plugins/epan/wimax/wimax-int.h42
-rw-r--r--plugins/epan/wimax/wimax_bits.h206
-rw-r--r--plugins/epan/wimax/wimax_cdma_code_decoder.c128
-rw-r--r--plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.c2123
-rw-r--r--plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.h32
-rw-r--r--plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.c2137
-rw-r--r--plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.h32
-rw-r--r--plugins/epan/wimax/wimax_fch_decoder.c258
-rw-r--r--plugins/epan/wimax/wimax_ffb_decoder.c141
-rw-r--r--plugins/epan/wimax/wimax_hack_decoder.c153
-rw-r--r--plugins/epan/wimax/wimax_harq_map_decoder.c242
-rw-r--r--plugins/epan/wimax/wimax_mac.h701
-rw-r--r--plugins/epan/wimax/wimax_pdu_decoder.c267
-rw-r--r--plugins/epan/wimax/wimax_phy_attributes_decoder.c190
-rw-r--r--plugins/epan/wimax/wimax_tlv.c187
-rw-r--r--plugins/epan/wimax/wimax_tlv.h57
-rw-r--r--plugins/epan/wimax/wimax_utils.c3407
-rw-r--r--plugins/epan/wimax/wimax_utils.h70
55 files changed, 37431 insertions, 0 deletions
diff --git a/plugins/epan/wimax/AUTHORS b/plugins/epan/wimax/AUTHORS
new file mode 100644
index 0000000000..f7c8e66c71
--- /dev/null
+++ b/plugins/epan/wimax/AUTHORS
@@ -0,0 +1,5 @@
+Authors:
+Lu Pan <lu.pan@intel.com>
+Mike Harvey <michael.harvey@intel.com>
+John R. Underwood <junderx@yahoo.com>
+Daniel J. Sauble <djsauble@gmail.com>
diff --git a/plugins/epan/wimax/CMakeLists.txt b/plugins/epan/wimax/CMakeLists.txt
new file mode 100644
index 0000000000..8d7d201060
--- /dev/null
+++ b/plugins/epan/wimax/CMakeLists.txt
@@ -0,0 +1,127 @@
+# CMakeLists.txt
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+include(WiresharkPlugin)
+
+# Plugin name and version info (major minor micro extra)
+set_module_info(wimax 1 2 0 0)
+
+set(DISSECTOR_SRC
+ packet-m2m.c
+ packet-wmx.c
+)
+
+set(DISSECTOR_SUPPORT_SRC
+ wimax_ffb_decoder.c
+ wimax_fch_decoder.c
+ wimax_pdu_decoder.c
+ wimax_cdma_code_decoder.c
+ wimax_hack_decoder.c
+ wimax_phy_attributes_decoder.c
+ mac_hd_generic_decoder.c
+ mac_hd_type1_decoder.c
+ mac_hd_type2_decoder.c
+ mac_mgmt_msg_decoder.c
+ msg_dcd.c
+ msg_ucd.c
+ msg_dlmap.c
+ msg_ulmap.c
+ msg_rng_req.c
+ msg_rng_rsp.c
+ msg_reg_req.c
+ msg_reg_rsp.c
+ msg_dreg.c
+ msg_dsa.c
+ msg_dsc.c
+ msg_dsd.c
+ msg_arq.c
+ msg_sbc.c
+ msg_pkm.c
+ msg_aas_fbck.c
+ msg_fpc.c
+ msg_pmc.c
+ msg_prc_lt_ctrl.c
+ msg_aas_beam.c
+ msg_res_cmd.c
+ msg_rep.c
+ msg_clk_cmp.c
+ msg_dsx_rvd.c
+ wimax_harq_map_decoder.c
+ wimax_compact_dlmap_ie_decoder.c
+ wimax_compact_ulmap_ie_decoder.c
+ wimax_utils.c
+ crc.c
+ crc_data.c
+ wimax_tlv.c
+)
+
+set(PLUGIN_FILES
+ plugin.c
+ ${DISSECTOR_SRC}
+ ${DISSECTOR_SUPPORT_SRC}
+)
+
+set(CLEAN_FILES
+ ${PLUGIN_FILES}
+)
+
+set_source_files_properties(
+ ${CLEAN_FILES}
+ PROPERTIES
+ COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
+)
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
+register_plugin_files(plugin.c
+ plugin
+ ${DISSECTOR_SRC}
+ ${DISSECTOR_SUPPORT_SRC}
+)
+
+add_plugin_library(wimax epan)
+
+install_plugin(wimax epan)
+
+file(GLOB DISSECTOR_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.h")
+CHECKAPI(
+ NAME
+ wimax
+ SWITCHES
+ -g abort -g termoutput -build
+ SOURCES
+ ${DISSECTOR_SRC}
+ ${DISSECTOR_SUPPORT_SRC}
+ ${DISSECTOR_HEADERS}
+)
+
+#
+# Editor modelines - http://www.wireshark.org/tools/modelines.html
+#
+# Local variables:
+# c-basic-offset: 8
+# tab-width: 8
+# indent-tabs-mode: t
+# End:
+#
+# vi: set shiftwidth=8 tabstop=8 noexpandtab:
+# :indentSize=8:tabSize=8:noTabs=false:
+#
diff --git a/plugins/epan/wimax/Makefile.am b/plugins/epan/wimax/Makefile.am
new file mode 100644
index 0000000000..3074a525a5
--- /dev/null
+++ b/plugins/epan/wimax/Makefile.am
@@ -0,0 +1,116 @@
+# Makefile.am
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+include $(top_srcdir)/Makefile.am.inc
+include $(top_srcdir)/plugins/Makefile.am.inc
+
+# the name of the plugin
+PLUGIN_NAME = wimax
+
+PLUGIN_VERSION = 1.2.0
+
+BUILT_SOURCES = \
+ plugin.c
+
+# Non-generated sources to be scanned for registration routines
+NONGENERATED_REGISTER_C_FILES = \
+ packet-m2m.c \
+ packet-wmx.c \
+ wimax_cdma_code_decoder.c \
+ wimax_compact_dlmap_ie_decoder.c \
+ wimax_compact_ulmap_ie_decoder.c \
+ wimax_fch_decoder.c \
+ wimax_ffb_decoder.c \
+ wimax_hack_decoder.c \
+ wimax_harq_map_decoder.c \
+ wimax_pdu_decoder.c \
+ wimax_phy_attributes_decoder.c \
+ mac_hd_generic_decoder.c \
+ mac_hd_type1_decoder.c \
+ mac_hd_type2_decoder.c \
+ mac_mgmt_msg_decoder.c \
+ msg_aas_fbck.c \
+ msg_aas_beam.c \
+ msg_arq.c \
+ msg_clk_cmp.c \
+ msg_dcd.c \
+ msg_dlmap.c \
+ msg_dreg.c \
+ msg_dsa.c \
+ msg_dsc.c \
+ msg_dsd.c \
+ msg_dsx_rvd.c \
+ msg_fpc.c \
+ msg_pkm.c \
+ msg_pmc.c \
+ msg_prc_lt_ctrl.c \
+ msg_reg_req.c \
+ msg_reg_rsp.c \
+ msg_rep.c \
+ msg_res_cmd.c \
+ msg_rng_req.c \
+ msg_rng_rsp.c \
+ msg_sbc.c \
+ msg_ucd.c \
+ msg_ulmap.c \
+ wimax_utils.c
+
+# Non-generated sources
+NONGENERATED_C_FILES = \
+ $(NONGENERATED_REGISTER_C_FILES) \
+ crc.c \
+ crc_data.c \
+ wimax_tlv.c
+
+# Headers.
+CLEAN_HEADER_FILES = \
+ crc.h \
+ wimax_bits.h \
+ wimax_compact_dlmap_ie_decoder.h \
+ wimax_compact_ulmap_ie_decoder.h \
+ wimax_mac.h \
+ wimax_tlv.h \
+ wimax_utils.h \
+ wimax-int.h
+
+HEADER_FILES = \
+ $(CLEAN_HEADER_FILES)
+
+epan_plugin_LTLIBRARIES = wimax.la
+
+wimax_la_SOURCES = \
+ $(SRC_FILES) \
+ $(HEADER_FILES)
+
+nodist_wimax_la_SOURCES = \
+ plugin.c
+
+wimax_la_CPPFLAGS = $(AM_CPPFLAGS) $(PLUGIN_CPPFLAGS)
+
+wimax_la_CFLAGS = $(AM_CFLAGS) $(PLUGIN_CFLAGS)
+
+wimax_la_LDFLAGS = $(PLUGIN_LDFLAGS)
+
+DISTCLEANFILES = \
+ plugin.c
+
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README.wimax
diff --git a/plugins/epan/wimax/README.wimax b/plugins/epan/wimax/README.wimax
new file mode 100644
index 0000000000..4f7981fc72
--- /dev/null
+++ b/plugins/epan/wimax/README.wimax
@@ -0,0 +1,86 @@
+This document is an attempt, to explain how to use the wimax plugin
+in this directory.
+
+
+Overview
+--------
+The wimax plugin is a standalone Wireshark plugin that contains a set
+of WiMax Protocol dissectors. The plugin registers the WiMax Protocol
+dissectors without attached to any packet type. So none of the
+dissectors will be called by the Wireshark because there is no any
+packet type hookup to the plugin. However, it is very simple to add
+the WiMax Protocol decoding capability into any of the packet decoder
+by searching and calling the WiMax Protocol dissectors since they are
+registered to Wireshark already (see WiMAX M2M Encapsulation Protocol
+for an example).
+
+
+WiMax Protocol dissector list
+-------------
+WiMax Burst Dissectors:
+ 1. wimax_cdma_code_burst_handler - WiMax CDMA Code Attribute Burst dissector.
+ 2. wimax_fch_burst_handler - WiMax FCH Burst dissector.
+ 3. wimax_ffb_burst_handler - WiMax Fast Feedback Burst dissector.
+ 4. wimax_pdu_burst_handler - WiMax PDU Burst dissector.
+ 5. wimax_hack_burst_handler - WiMax HACK Burst dissector.
+ 6. wimax_phy_attributes_burst_handler - WiMax PHY Attributes Burst dissector.
+
+WiMax MAC dissectors:
+ 7. mac_header_type_1_handler - WiMax TYPE I MAC Header PDU dissector.
+ 8. mac_header_type_2_handler - WiMax TYPE II MAC Header PDU dissector.
+ 9. mac_header_generic_handler - WiMax Generic MAC Header PDU dissector.
+ 10. mac_mgmt_msg_handler - WiMax MAC Management Messages dissector.
+
+WiMax Utility dissectors:
+11. wimax_service_flow_encodings_decoder - WiMax Service Flow Encodings dissector.
+12. wimax_error_parameter_set_decoder - WiMax Error Parameter Set dissector.
+13. wimax_security_negotiation_parameters_decoder - WiMax Security Negotiation Parameter dissector.
+14. wimax_pkm_tlv_encoded_attributes_decoder - WiMax PKM TLV Encoded Attributes dissector.
+15. wimax_tek_parameters_decoder - WiMax TEK Parameters dissector.
+16. wimax_pkm_configuration_settings_decoder - WiMax PKM Configuration Settings dissector.
+17. wimax_sa_descriptor_decoder - WiMax SA Descriptor dissector.
+18. wimax_cryptographic_suite_list_decoder - WiMax Cryptographic Suite List dissector.
+19. wimax_security_capabilities_decoder - WiMax Security Capabilities dissector.
+20. wimax_common_tlv_encoding_decoder - WiMax Common TLV Encoding dissector.
+19. wimax_vendor_specific_information_decoder - WiMax Vendor-Specific Information dissector.
+
+
+Usages
+--------
+To use any of the dissectors listed above:
+
+1. Call Wireshark function: handle = find_dissector("dissector_name")
+to get the dissector's handler.
+Example: mgt_msg_handle = find_dissector("mac_mgmt_msg_handler");
+
+2. If find_dissector() finds the dissector successfully a non-NULL
+handle will be returned. Then call another Wireshark function:
+call_dissector(handle, tvb, pinfo, tree) to call the dissector
+corresponding to the handle.
+
+Here, handle is the value returned by find_dissector() function.
+ tvb is the pointer of the data buffer which contains the exact
+ content defined by the IEEE 802.16 standards for the dissector.
+ pinfo is the pointer to the packet information from Wireshark.
+ tree is the pointer to the display tree or sub-tree.
+Example: call_dissector(mgt_msg_handle, mgt_msg_tvb, pinfo, mgt_msg_tree);
+
+3. The WiMax Utility dissectors should be called directly.
+
+
+Notes
+--------
+1. All the burst data has to be defraged before passing it to the
+WiMax burst dissectors.
+
+2. The wimax_pdu_burst_handler will automatically call
+mac_header_generic_handler, mac_header_type_1_handler and
+mac_header_type_2_handler based on the PDU contents.
+
+3. The mac_header_generic_handler will automatically call
+mac_mgmt_msg_handler based on the PDU payload.
+
+4. All the dissectors can be called independently but the data passed
+to the dissectors has to contain exact content defined by the
+IEEE 802.16 standards.
+
diff --git a/plugins/epan/wimax/crc.c b/plugins/epan/wimax/crc.c
new file mode 100644
index 0000000000..dca0e72794
--- /dev/null
+++ b/plugins/epan/wimax/crc.c
@@ -0,0 +1,210 @@
+/* crc.c
+ * crc checksum generation and calculation functions: crc.c
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Mike Harvey <michael.harvey@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "crc.h"
+
+#define WMAX_MAC_CRC32_POLYNOMIAL 0x04c11db7U /* polynomial used in calculating the CRC-32 checksum */
+#define CCITT_X25_CRC16_POLYNOMIAL 0x1021 /* polynomial used in calculating the CRC-16 checksum */
+#define WMAX_MAC_CRC8_POLYNOMIAL 0x07 /* polynomial used in calculating the CRC-8 checksum */
+#define CRC32_INITIAL_VALUE 0xFFFFFFFF
+#define CRC16_INITIAL_VALUE 0xFFFF
+
+#ifndef STATIC_DATA
+static guint8 crc8_table[256];
+static guint32 crc32_table[256];
+
+extern guint16 crc16_table[256];
+
+/*
+ void wimax_mac_gen_crc32_table(void)
+
+ REQUIRES: The functions must be called only once to initialze CRC table
+
+ DESCRIPTION: Generate the table of CRC remainders
+ for all possible bytes
+
+ ARGS:
+
+ RETURNS:
+
+ SIDE EFFECTS:
+
+*/
+void wimax_mac_gen_crc32_table(void)
+{
+ guint32 i, bit;
+ guint32 crc;
+
+ /* little-endian (reflected) algorithm */
+ for ( i = 0; i < G_N_ELEMENTS(crc32_table); i++ )
+ {
+ crc = ( i << 24 );
+ for ( bit = 0; bit < 8; bit++ )
+ {
+ if ( crc & 0x80000000U )
+ crc = ( crc << 1 ) ^ WMAX_MAC_CRC32_POLYNOMIAL;
+ else
+ crc = ( crc << 1 );
+ }
+ crc32_table[i] = crc;
+ }
+}
+
+/*
+ void wimax_mac_gen_crc8_table(void)
+
+ REQUIRES: The functions must be called only once to initialze CRC table
+
+ DESCRIPTION: Generate the table of CRC remainders
+ for all possible bytes
+
+ ARGS:
+
+ RETURNS:
+
+ SIDE EFFECTS:
+
+*/
+void wimax_mac_gen_crc8_table(void)
+{
+ guint i, bit;
+ guint8 crc;
+
+ for ( i = 0; i < G_N_ELEMENTS(crc8_table); i++ )
+ {
+ crc = i;
+ for ( bit = 0; bit < 8; bit++ )
+ {
+ if ( crc & 0x80 )
+ crc = ( crc << 1 ) ^ WMAX_MAC_CRC8_POLYNOMIAL;
+ else
+ crc = ( crc << 1 );
+ }
+ crc8_table[i] = crc;
+ }
+}
+#endif
+
+/*
+
+ guint32 wimax_mac_calc_crc32(guint8 *data, guint data_len)
+
+ REQUIRES: wimax_mac_gen_crc32_table() must be called before
+
+ DESCRIPTION: Calculate the 32-bit CRC from a given data block
+
+ ARGS: data - pointer to data
+ data_len - length of data (in bytes)
+
+ RETURNS: calculated crc32
+
+ SIDE EFFECTS:
+
+*/
+guint32 wimax_mac_calc_crc32(const guint8 *data, guint data_len)
+{
+ guint32 crc=CRC32_INITIAL_VALUE;
+ guint i, j;
+
+ for ( j = 0; j < data_len; j++ )
+ {
+ i = ( (guint8)(crc>>24) ^ data[j] ) & 0xff;
+ crc = ( crc<<8 ) ^ crc32_table[i];
+ }
+ return ~crc;
+}
+
+/*
+
+ guint16 wimax_mac_calc_crc16(guint8 *data, guint data_len)
+
+ REQUIRES: crc16_table[] in crc_data.c
+
+ DESCRIPTION: Calculate the 16-bit CRC from a given data block
+
+ ARGS: data - pointer to data
+ data_len - length of data (in bytes)
+
+ RETURNS: calculated crc16
+
+ SIDE EFFECTS:
+
+*/
+guint16 wimax_mac_calc_crc16(const guint8 *data, guint data_len)
+{
+ guint32 crc=CRC16_INITIAL_VALUE;
+ guint j;
+
+ for ( j = 0; j < data_len; j++ )
+ {
+ crc ^= data[j] << 8;
+ crc = (crc << 8) ^ crc16_table[(crc & 0xff00) >> 8];
+ }
+ crc ^= 0xFFFF; /* Invert the output. */
+ crc &= 0xFFFF;
+ return crc;
+}
+
+/*
+
+ guint8 wimax_mac_calc_crc8(guint8 *data, guint data_len)
+
+ REQUIRES: wimax_mac_gen_crc8_table() must be called before
+
+ DESCRIPTION: Calculate the 8-bit CRC from a given data block
+
+ ARGS: data - pointer to data
+ data_len - length of data (in bytes)
+
+ RETURNS: calculated crc8
+
+ SIDE EFFECTS:
+
+*/
+guint8 wimax_mac_calc_crc8(const guint8 *data, guint data_len)
+{
+ guint8 crc=0;
+ guint i;
+
+ for(i = 0; i < data_len; i++)
+ {
+ crc = crc8_table[data[i]^crc];
+ }
+ return crc;
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/epan/wimax/crc.h b/plugins/epan/wimax/crc.h
new file mode 100644
index 0000000000..71079ddd2e
--- /dev/null
+++ b/plugins/epan/wimax/crc.h
@@ -0,0 +1,45 @@
+/* crc.h
+ * header file of crc.c
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Mike Harvey <michael.harvey@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef CRC_H
+#define CRC_H
+
+#include <glib.h>
+
+/* use lookup tables to compute CRC values */
+#ifdef STATIC_DATA
+extern guint8 crc8_table[];
+extern guint32 crc32_table[];
+#else
+void wimax_mac_gen_crc32_table(void);
+void wimax_mac_gen_crc8_table(void);
+#endif
+
+guint32 wimax_mac_calc_crc32(const guint8 *data, guint data_len);
+guint16 wimax_mac_calc_crc16(const guint8 *data, guint data_len);
+guint8 wimax_mac_calc_crc8(const guint8 *data, guint data_len);
+
+#endif /* CRC_H */
diff --git a/plugins/epan/wimax/crc_data.c b/plugins/epan/wimax/crc_data.c
new file mode 100644
index 0000000000..3bcf8ceb1e
--- /dev/null
+++ b/plugins/epan/wimax/crc_data.c
@@ -0,0 +1,183 @@
+/* crc_data.c
+ * static crc tables for crc.c
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Mike Harvey <michael.harvey@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "crc.h"
+
+#ifdef STATIC_DATA
+
+#include <glib.h>
+
+guint32 crc32_table[256] = {
+ 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
+ 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005,
+ 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
+ 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
+ 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9,
+ 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75,
+ 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011,
+ 0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd,
+ 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
+ 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5,
+ 0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81,
+ 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d,
+ 0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49,
+ 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
+ 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1,
+ 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d,
+ 0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae,
+ 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072,
+ 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
+ 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca,
+ 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde,
+ 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02,
+ 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066,
+ 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
+ 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e,
+ 0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692,
+ 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6,
+ 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a,
+ 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
+ 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2,
+ 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686,
+ 0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a,
+ 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637,
+ 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
+ 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f,
+ 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53,
+ 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47,
+ 0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b,
+ 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
+ 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623,
+ 0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7,
+ 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b,
+ 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f,
+ 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
+ 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7,
+ 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b,
+ 0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f,
+ 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3,
+ 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
+ 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c,
+ 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8,
+ 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24,
+ 0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30,
+ 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
+ 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088,
+ 0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654,
+ 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0,
+ 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c,
+ 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
+ 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4,
+ 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0,
+ 0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c,
+ 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
+ 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
+};
+
+
+guint8 hcs_table[256] = {
+ 0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15,
+ 0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d,
+ 0x70, 0x77, 0x7e, 0x79, 0x6c, 0x6b, 0x62, 0x65,
+ 0x48, 0x4f, 0x46, 0x41, 0x54, 0x53, 0x5a, 0x5d,
+ 0xe0, 0xe7, 0xee, 0xe9, 0xfc, 0xfb, 0xf2, 0xf5,
+ 0xd8, 0xdf, 0xd6, 0xd1, 0xc4, 0xc3, 0xca, 0xcd,
+ 0x90, 0x97, 0x9e, 0x99, 0x8c, 0x8b, 0x82, 0x85,
+ 0xa8, 0xaf, 0xa6, 0xa1, 0xb4, 0xb3, 0xba, 0xbd,
+ 0xc7, 0xc0, 0xc9, 0xce, 0xdb, 0xdc, 0xd5, 0xd2,
+ 0xff, 0xf8, 0xf1, 0xf6, 0xe3, 0xe4, 0xed, 0xea,
+ 0xb7, 0xb0, 0xb9, 0xbe, 0xab, 0xac, 0xa5, 0xa2,
+ 0x8f, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9d, 0x9a,
+ 0x27, 0x20, 0x29, 0x2e, 0x3b, 0x3c, 0x35, 0x32,
+ 0x1f, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0d, 0x0a,
+ 0x57, 0x50, 0x59, 0x5e, 0x4b, 0x4c, 0x45, 0x42,
+ 0x6f, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7d, 0x7a,
+ 0x89, 0x8e, 0x87, 0x80, 0x95, 0x92, 0x9b, 0x9c,
+ 0xb1, 0xb6, 0xbf, 0xb8, 0xad, 0xaa, 0xa3, 0xa4,
+ 0xf9, 0xfe, 0xf7, 0xf0, 0xe5, 0xe2, 0xeb, 0xec,
+ 0xc1, 0xc6, 0xcf, 0xc8, 0xdd, 0xda, 0xd3, 0xd4,
+ 0x69, 0x6e, 0x67, 0x60, 0x75, 0x72, 0x7b, 0x7c,
+ 0x51, 0x56, 0x5f, 0x58, 0x4d, 0x4a, 0x43, 0x44,
+ 0x19, 0x1e, 0x17, 0x10, 0x05, 0x02, 0x0b, 0x0c,
+ 0x21, 0x26, 0x2f, 0x28, 0x3d, 0x3a, 0x33, 0x34,
+ 0x4e, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5c, 0x5b,
+ 0x76, 0x71, 0x78, 0x7f, 0x6a, 0x6d, 0x64, 0x63,
+ 0x3e, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2c, 0x2b,
+ 0x06, 0x01, 0x08, 0x0f, 0x1a, 0x1d, 0x14, 0x13,
+ 0xae, 0xa9, 0xa0, 0xa7, 0xb2, 0xb5, 0xbc, 0xbb,
+ 0x96, 0x91, 0x98, 0x9f, 0x8a, 0x8d, 0x84, 0x83,
+ 0xde, 0xd9, 0xd0, 0xd7, 0xc2, 0xc5, 0xcc, 0xcb,
+ 0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3
+};
+#endif
+
+guint16 crc16_table[256] = {
+ 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7,
+ 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef,
+ 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6,
+ 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de,
+ 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485,
+ 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d,
+ 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4,
+ 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc,
+ 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823,
+ 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b,
+ 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12,
+ 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a,
+ 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41,
+ 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49,
+ 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70,
+ 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78,
+ 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f,
+ 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067,
+ 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e,
+ 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256,
+ 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d,
+ 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
+ 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c,
+ 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634,
+ 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab,
+ 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3,
+ 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a,
+ 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92,
+ 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9,
+ 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1,
+ 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8,
+ 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0,
+};
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/epan/wimax/mac_hd_generic_decoder.c b/plugins/epan/wimax/mac_hd_generic_decoder.c
new file mode 100644
index 0000000000..168f1458bd
--- /dev/null
+++ b/plugins/epan/wimax/mac_hd_generic_decoder.c
@@ -0,0 +1,2312 @@
+/* mac_hd_generic_decoder.c
+ * WiMax Generic MAC Header decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* TODO: Add FT_UINT24 and FT_INT24 cases to gtk_widget_get_toplevel()
+ * to prevent having to make all the changes from BASE_DEC to BASE_HEX
+ * made to this file today: 10/20/06.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+/*
+#define DEBUG
+*/
+
+#include <string.h>
+
+#include <epan/packet.h>
+#include <epan/expert.h>
+#include <epan/reassemble.h>
+#include "crc.h"
+#include "wimax-int.h"
+#include "wimax_utils.h"
+
+void proto_reg_handoff_mac_header_generic(void);
+
+extern gint proto_wimax;
+
+extern gint seen_a_service_type;
+extern gboolean first_gmh; /* defined in wimax_pdu_decoder.c */
+
+extern gint8 arq_enabled; /* declared in packet-wmx.c */
+extern gint scheduling_service_type; /* declared in packet-wmx.c */
+
+extern address bs_address; /* declared in packet-wmx.c */
+extern guint max_logical_bands; /* declared in wimax_compact_dlmap_ie_decoder.c */
+
+static dissector_handle_t mac_mgmt_msg_decoder_handle = NULL;
+static dissector_handle_t mac_ip_handle = NULL;
+
+/* global variables */
+gboolean include_cor2_changes = FALSE;
+
+/* Well-known CIDs */
+guint cid_initial_ranging = 0x0000;
+guint global_cid_max_basic = 320;
+guint cid_max_primary = 640;
+guint cid_aas_ranging = 0xFeFF;
+guint cid_normal_multicast = 0xFFFa;
+guint cid_sleep_multicast = 0xFFFb;
+guint cid_idle_multicast = 0xFFFc;
+guint cid_frag_broadcast = 0xFFFd;
+guint cid_padding = 0xFFFe;
+guint cid_broadcast = 0xFFFF;
+
+/* Maximum number of CID's */
+#define MAX_CID 64
+
+/* forward reference */
+static gint extended_subheader_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+static gint arq_feedback_payload_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *parent_item);
+
+/* Static variables */
+static reassembly_table payload_reassembly_table;
+
+gint proto_mac_header_generic_decoder = -1;
+static gint ett_mac_header_generic_decoder = -1;
+/* static gint ett_mac_subheader_decoder = -1; */
+static gint ett_mac_mesh_subheader_decoder = -1;
+static gint ett_mac_frag_subheader_decoder = -1;
+static gint ett_mac_grant_mgmt_subheader_decoder = -1;
+static gint ett_mac_pkt_subheader_decoder = -1;
+static gint ett_mac_fast_fb_subheader_decoder = -1;
+static gint ett_mac_ext_subheader_decoder = -1;
+static gint ett_mac_ext_subheader_dl_decoder = -1;
+static gint ett_mac_ext_subheader_ul_decoder = -1;
+static gint ett_mac_arq_fb_payload_decoder = -1;
+static gint ett_mac_data_pdu_decoder = -1;
+static gint hf_mac_header_generic_value_bytes = -1;
+
+static guint frag_type, frag_len;
+static guint extended_type, arq_fb_payload, seq_number;
+
+static guint cid_adjust[MAX_CID]; /* Must not start with 0 */
+static guint cid_vernier[MAX_CID];
+static guint cid_adj_array_size = 0;
+static guint *cid_adj_array = NULL;
+static guint8 *frag_num_array = NULL;
+
+static address save_src;
+static address save_dst;
+
+#define WIMAX_MAC_HEADER_SIZE 6
+#define IP_HEADER_BYTE 0x45
+
+#define EXTENDED_SUB_HEADER_RSV_MASK 0x80
+#define EXTENDED_SUB_HEADER_TYPE_MASK 0x7F
+
+/* WIMAX GENERIC MAC HEADER FIELDS (figure 19) */
+/* 1st to 3rd bytes */
+#define WIMAX_MAC_HEADER_GENERIC_HT 0x800000
+#define WIMAX_MAC_HEADER_GENERIC_EC 0x400000
+#define WIMAX_MAC_HEADER_GENERIC_TYPE_5 0x200000
+#define WIMAX_MAC_HEADER_GENERIC_TYPE_4 0x100000
+#define WIMAX_MAC_HEADER_GENERIC_TYPE_3 0x080000
+#define WIMAX_MAC_HEADER_GENERIC_TYPE_2 0x040000
+#define WIMAX_MAC_HEADER_GENERIC_TYPE_1 0x020000
+#define WIMAX_MAC_HEADER_GENERIC_TYPE_0 0x010000
+#define WIMAX_MAC_HEADER_GENERIC_ESF 0x008000
+#define WIMAX_MAC_HEADER_GENERIC_CI 0x004000
+#define WIMAX_MAC_HEADER_GENERIC_EKS 0x003000
+#define WIMAX_MAC_HEADER_GENERIC_RSV 0x000800
+#define WIMAX_MAC_HEADER_GENERIC_LEN 0x0007FF
+
+/* WIMAX GENERIC MAC HEADER 1st byte masks */
+#define WIMAX_MAC_HEADER_GENERIC_HT_MASK 0x80
+#define WIMAX_MAC_HEADER_GENERIC_EC_MASK 0x40
+#define WIMAX_MAC_HEADER_GENERIC_TYPE_MASK 0x3F
+/* WiMax Generic MAC Header Sub Type Masks */
+#define GENERIC_SUB_TYPE_0 0x01
+#define GENERIC_SUB_TYPE_1 0x02
+#define GENERIC_SUB_TYPE_2 0x04
+#define GENERIC_SUB_TYPE_3 0x08
+#define GENERIC_SUB_TYPE_4 0x10
+#define GENERIC_SUB_TYPE_5 0x20
+
+/* WIMAX GENERIC MAC HEADER 2nd byte masks */
+#define WIMAX_MAC_HEADER_GENERIC_ESF_MASK 0x80
+#define WIMAX_MAC_HEADER_GENERIC_CI_MASK 0x40
+#define WIMAX_MAC_HEADER_GENERIC_EKS_MASK 0x30
+#define WIMAX_MAC_HEADER_GENERIC_LEN_MASK 0x07
+
+static int hf_mac_header_generic_ht = -1;
+static int hf_mac_header_generic_ec = -1;
+static int hf_mac_header_generic_type_0 = -1;
+static int hf_mac_header_generic_type_1 = -1;
+static int hf_mac_header_generic_type_2 = -1;
+static int hf_mac_header_generic_type_3 = -1;
+static int hf_mac_header_generic_type_4 = -1;
+static int hf_mac_header_generic_type_5 = -1;
+static int hf_mac_header_generic_esf = -1;
+static int hf_mac_header_generic_ci = -1;
+static int hf_mac_header_generic_eks = -1;
+static int hf_mac_header_generic_rsv = -1;
+static int hf_mac_header_generic_len = -1;
+static int hf_mac_header_generic_cid = -1;
+static int hf_mac_header_generic_hcs = -1;
+static int hf_mac_header_generic_crc = -1;
+static int hf_mac_header_generic_crc_status = -1;
+
+/* MAC Header types */
+static const value_string ht_msgs[] =
+{
+ { 0, "Generic" },
+ { 1, "Signaling" },
+ { 0, NULL}
+};
+
+/* Encryption Controls */
+static const value_string ec_msgs[] =
+{
+ { 0, "Not encrypted" },
+ { 1, "Encrypted" },
+ { 0, NULL}
+};
+
+/* ESF messages */
+static const value_string esf_msgs[] =
+{
+ { 0, "Extended subheader is absent" },
+ { 1, "Extended subheader is present" },
+ { 0, NULL}
+};
+
+/* CRC Indicator messages */
+static const value_string ci_msgs[] =
+{
+ { 0, "No CRC is included" },
+ { 1, "CRC is included" },
+ { 0, NULL}
+};
+
+/* Sub-Type message 0 */
+static const value_string type_msg0[] =
+{
+ { 0, "Fast-feedback allocation subheader(DL)/Grant management subheader(UL) is absent" },
+ { 1, "Fast-feedback allocation subheader(DL)/Grant management subheader(UL) is present" },
+ { 0, NULL}
+};
+
+/* Sub-Type message 1 */
+static const value_string type_msg1[] =
+{
+ { 0, "Packing subheader is absent" },
+ { 1, "Packing Subheader is present" },
+ { 0, NULL}
+};
+
+/* Sub-Type message 2 */
+static const value_string type_msg2[] =
+{
+ { 0, "Fragmentation subheader is absent" },
+ { 1, "Fragmentation subheader is present" },
+ { 0, NULL}
+};
+
+/* Sub-Type message 3 */
+static const value_string type_msg3[] =
+{
+ { 0, "The subheader is not extended" },
+ { 1, "The subheader is extended" },
+ { 0, NULL}
+};
+
+/* Sub-Type message 4 */
+static const value_string type_msg4[] =
+{
+ { 0, "ARQ feedback payload is absent" },
+ { 1, "ARQ feedback payload is present" },
+ { 0, NULL}
+};
+
+/* Sub-Type message 5 */
+static const value_string type_msg5[] =
+{
+ { 0, "Mesh subheader is absent" },
+ { 1, "Mesh subheader is present" },
+ { 0, NULL}
+};
+
+/* Fast-Feedback Feedback Types */
+static const value_string fast_fb_types[] =
+{
+ { 0, "Fast DL measurement" },
+ { 1, "Fast MIMO Feedback, Antenna #0" },
+ { 2, "Fast MIMO Feedback, Antenna #1" },
+ { 3, "MIMO Mode and Permutation Mode Feedback" },
+ { 0, NULL}
+};
+
+/* Extended sub-headers */
+/* DL sub-header types */
+typedef enum
+{
+SDU_SN,
+DL_SLEEP_CONTROL,
+FEEDBACK_REQ,
+SN_REQ,
+PDU_SN_SHORT_DL,
+PDU_SN_LONG_DL
+} DL_EXT_SUBHEADER_e;
+
+static const value_string dl_ext_sub_header_type[] =
+{
+ {0, "SDU_SN"},
+ {1, "DL Sleep Control"},
+ {2, "Feedback Request"},
+ {3, "SN Request"},
+ {4, "PDU SN (short)"},
+ {5, "PDU SN (long)"},
+ {0, NULL}
+};
+
+/* DL Sleep Control Extended Subheader field masks (table 13e) */
+#define DL_SLEEP_CONTROL_POWER_SAVING_CLASS_ID_MASK 0xFC0000 /*0x00003F*/
+#define DL_SLEEP_CONTROL_OPERATION_MASK 0x020000 /*0x000040*/
+#define DL_SLEEP_CONTROL_FINAL_SLEEP_WINDOW_EXPONENT_MASK 0x01C000 /*0x000380*/
+#define DL_SLEEP_CONTROL_FINAL_SLEEP_WINDOW_BASE_MASK 0x003FF0 /*0x0FFC00*/
+#define DL_SLEEP_CONTROL_RESERVED_MASK 0x00000F /*0xF00000*/
+
+/* Feedback Request Extended Subheader field masks (table 13f) */
+#define FEEDBACK_REQUEST_UIUC_MASK 0xF00000 /*0x00000F*/
+#define FEEDBACK_REQUEST_FEEDBACK_TYPE_MASK 0x0F0000 /*0x0000F0*/
+#define FEEDBACK_REQUEST_OFDMA_SYMBOL_OFFSET_MASK 0x00FC00 /*0x003F00*/
+#define FEEDBACK_REQUEST_SUBCHANNEL_OFFSET_MASK 0x0003F0 /*0x0FC000*/
+#define FEEDBACK_REQUEST_NUMBER_OF_SLOTS_MASK 0x00000E /*0x700000*/
+#define FEEDBACK_REQUEST_FRAME_OFFSET_MASK 0x000001 /*0x800000*/
+
+/* OFDMA UIUC Values ??? */
+static const value_string uiuc_values[] =
+{
+ { 0, "Fast-Feedback Channel" },
+ { 1, "Burst Profile 1" },
+ { 2, "Burst Profile 2" },
+ { 3, "Burst Profile 3" },
+ { 4, "Burst Profile 4" },
+ { 5, "Burst Profile 5" },
+ { 6, "Burst Profile 6" },
+ { 7, "Burst Profile 7" },
+ { 8, "Burst Profile 8" },
+ { 9, "Burst Profile 9" },
+ { 10, "Burst Profile 10" },
+ { 11, "Extended UIUC 2 IE" },
+ { 12, "CDMA Bandwidth Request, CDMA Ranging" },
+ { 13, "PAPR Reduction Allocation, Safety Zone" },
+ { 14, "CDMA Allocation IE" },
+ { 15, "Extended UIUC" },
+ { 0, NULL}
+};
+
+/* UL sub-header types */
+typedef enum
+{
+MIMO_MODE_FEEDBACK,
+UL_TX_POWER_REPORT,
+MINI_FEEDBACK,
+PDU_SN_SHORT_UL,
+PDU_SN_LONG_UL
+} UL_EXT_SUBHEADER_e;
+
+static const value_string ul_ext_sub_header_type[] =
+{
+ {0, "MIMO Mode Feedback"},
+ {1, "UL TX Power Report"},
+ {2, "Mini-feedback"},
+ {3, "PDU SN (short)"},
+ {4, "PDU SN (long)"},
+ {0, NULL}
+};
+
+/* MIMO Mode Feedback Extended Subheader field masks (table 13g) */
+#define MIMO_FEEDBACK_TYPE_MASK 0xC0 /*0x03*/
+#define MIMO_FEEDBACK_CONTENT_MASK 0x3F /*0xFC*/
+/* Mimo Feedback Types ??? */
+static const value_string mimo_fb_types[] =
+{
+ { 0, "Fast DL measurement" },
+ { 1, "Default Feedback with Antenna Grouping" },
+ { 2, "Antenna Selection and Reduced Codebook" },
+ { 3, "Quantized Precoding Weight Feedback" },
+ { 0, NULL}
+};
+
+/* MNI-Feedback Extended Subheader field masks (table 13i) */
+#define MINI_FEEDBACK_TYPE_MASK 0xF000 /*0x000F*/
+#define MINI_FEEDBACK_CONTENT_MASK 0x0FFF /*0xFFF0*/
+/* Feedback Types */
+static const value_string fb_types[] =
+{
+ { 0, "CQI and MIMO Feedback" },
+ { 1, "DL average CINR" },
+ { 2, "MIMO Coefficients Feedback" },
+ { 3, "Preferred DL Channel DIUC Feedback" },
+ { 4, "UL Transmission Power" },
+ { 5, "PHY Channel Feedback" },
+ { 6, "AMC Band Indication Bitmap" },
+ { 7, "Life Span of Short-term Precoding Feedback" },
+ { 8, "Multiple Types of Feedback" },
+ { 9, "Long-term Precoding Feedback" },
+ { 10, "Combined DL Average CINR of Active BSs" },
+ { 11, "MIMO Channel Feedback" },
+ { 12, "CINR Feedback" },
+ { 13, "Close-loop MIMO Feedback" },
+ { 14, "Reserved" },
+ { 15, "Reserved" },
+ { 0, NULL}
+};
+
+/* common fields */
+static gint hf_mac_header_generic_ext_subheader_rsv = -1;
+/* DL sub-header */
+static gint hf_mac_header_generic_ext_subheader_type_dl = -1;
+static gint hf_mac_header_generic_ext_subheader_sdu_sn = -1;
+static gint hf_mac_header_generic_ext_subheader_dl_sleep_control_pscid = -1;
+static gint hf_mac_header_generic_ext_subheader_dl_sleep_control_op = -1;
+static gint hf_mac_header_generic_ext_subheader_dl_sleep_control_fswe = -1;
+static gint hf_mac_header_generic_ext_subheader_dl_sleep_control_fswb = -1;
+static gint hf_mac_header_generic_ext_subheader_dl_sleep_control_rsv = -1;
+static gint hf_mac_header_generic_ext_subheader_fb_req_uiuc = -1;
+static gint hf_mac_header_generic_ext_subheader_fb_req_fb_type = -1;
+static gint hf_mac_header_generic_ext_subheader_fb_req_ofdma_symbol_offset = -1;
+static gint hf_mac_header_generic_ext_subheader_fb_req_subchannel_offset = -1;
+static gint hf_mac_header_generic_ext_subheader_fb_req_slots = -1;
+static gint hf_mac_header_generic_ext_subheader_fb_req_frame_offset = -1;
+
+/* DL Sleep Control Operations */
+static const value_string dl_sleep_control_ops[] =
+{
+ { 0, "De-activate Power Saving Class" },
+ { 1, "Activate Power Saving Class" },
+ { 0, NULL}
+};
+
+/* UL sub-header */
+static gint hf_mac_header_generic_ext_subheader_type_ul = -1;
+static gint hf_mac_header_generic_ext_subheader_mimo_mode_fb_type = -1;
+static gint hf_mac_header_generic_ext_subheader_mimo_fb_content = -1;
+static gint hf_mac_header_generic_ext_subheader_ul_tx_pwr_rep = -1;
+static gint hf_mac_header_generic_ext_subheader_mini_fb_type = -1;
+static gint hf_mac_header_generic_ext_subheader_mini_fb_content = -1;
+/* common fields */
+static gint hf_mac_header_generic_ext_subheader_pdu_sn_short = -1;
+static gint hf_mac_header_generic_ext_subheader_pdu_sn_long = -1;
+
+/* SN Request subheader */
+#define SN_REQUEST_SUBHEADER_SN_REPORT_INDICATION_1_MASK 0x01
+#define SN_REQUEST_SUBHEADER_SN_REPORT_INDICATION_2_MASK 0x02
+#define SN_REQUEST_SUBHEADER_RESERVED_MASK 0xFC
+
+static gint hf_mac_header_generic_ext_subheader_sn_req_rep_ind_1 = -1;
+static gint hf_mac_header_generic_ext_subheader_sn_req_rep_ind_2 = -1;
+static gint hf_mac_header_generic_ext_subheader_sn_req_rsv = -1;
+/* SN Report Indication message */
+static const value_string sn_rep_msg[] =
+{
+ { 0, "" },
+ { 1, "request transmission" },
+ { 0, NULL}
+};
+
+/* Mesh Subheader */
+static gint hf_mac_header_generic_mesh_subheader = -1;
+
+/* Fragmentation Subheader (table 8) */
+#define FRAGMENTATION_SUBHEADER_FC_MASK 0xC000 /*0x0003*/
+#define FRAGMENTATION_SUBHEADER_BSN_MASK 0x3FF8 /*0x1FFC*/
+#define FRAGMENTATION_SUBHEADER_RSV_EXT_MASK 0x0007 /*0xE000*/
+#define FRAGMENTATION_SUBHEADER_FSN_MASK 0x38 /*0x1C*/
+#define FRAGMENTATION_SUBHEADER_RSV_MASK 0x07 /*0xE0*/
+#define FRAGMENT_TYPE_MASK 0xC0
+#define SEQ_NUMBER_MASK 0x38
+#define SEQ_NUMBER_MASK_11 0x3FF8
+
+#define NO_FRAG 0
+#define LAST_FRAG 1
+#define FIRST_FRAG 2
+#define MIDDLE_FRAG 3
+
+static gint hf_mac_header_generic_frag_subhd_fc = -1;
+static gint hf_mac_header_generic_frag_subhd_fc_ext = -1;
+static gint hf_mac_header_generic_frag_subhd_bsn = -1;
+static gint hf_mac_header_generic_frag_subhd_fsn = -1;
+static gint hf_mac_header_generic_frag_subhd_fsn_ext = -1;
+static gint hf_mac_header_generic_frag_subhd_rsv = -1;
+static gint hf_mac_header_generic_frag_subhd_rsv_ext = -1;
+
+/* Fragment Types */
+static const value_string frag_types[] =
+{
+ { 0, "No fragmentation" },
+ { 1, "Last fragment" },
+ { 2, "First fragment" },
+ { 3, "Continuing (middle) fragment" },
+ { 0, NULL}
+};
+
+/* Packing Subheader (table 11) */
+#define PACKING_SUBHEADER_FC_MASK 0xC00000
+#define PACKING_SUBHEADER_BSN_MASK 0x3FF800
+#define PACKING_SUBHEADER_FSN_MASK 0x38
+#define PACKING_SUBHEADER_LENGTH_MASK 0x07FF
+#define PACKING_SUBHEADER_LENGTH_EXT_MASK 0x0007FF
+
+#define FRAG_LENGTH_MASK 0x0007FF00
+
+static gint hf_mac_header_generic_packing_subhd_fc = -1;
+static gint hf_mac_header_generic_packing_subhd_fc_ext = -1;
+static gint hf_mac_header_generic_packing_subhd_bsn = -1;
+static gint hf_mac_header_generic_packing_subhd_fsn = -1;
+static gint hf_mac_header_generic_packing_subhd_fsn_ext = -1;
+static gint hf_mac_header_generic_packing_subhd_len = -1;
+static gint hf_mac_header_generic_packing_subhd_len_ext = -1;
+
+/* Fast-feedback Allocation Subheader (table 13) */
+#define FAST_FEEDBACK_ALLOCATION_OFFSET_MASK 0xFC /*0x3F*/
+#define FAST_FEEDBACK_FEEDBACK_TYPE_MASK 0x03 /*0xC0*/
+
+static gint hf_mac_header_generic_fast_fb_subhd_alloc_offset = -1;
+static gint hf_mac_header_generic_fast_fb_subhd_fb_type = -1;
+
+/* Grant Management Subheader (table 9 & 10) */
+#define GRANT_MGMT_SUBHEADER_UGS_SI_MASK 0x8000 /*0x0001*/
+#define GRANT_MGMT_SUBHEADER_UGS_PM_MASK 0x4000 /*0x0002*/
+#define GRANT_MGMT_SUBHEADER_UGS_FLI_MASK 0x2000 /*0x0004*/
+#define GRANT_MGMT_SUBHEADER_UGS_FL_MASK 0x1E00 /*0x0078*/
+#define GRANT_MGMT_SUBHEADER_UGS_RSV_MASK 0x01FF /*0xFF80*/
+#define GRANT_MGMT_SUBHEADER_EXT_PBR_MASK 0xFFE0 /*0x07FF*/
+#define GRANT_MGMT_SUBHEADER_EXT_FLI_MASK 0x0010 /*0x0800*/
+#define GRANT_MGMT_SUBHEADER_EXT_FL_MASK 0x000F /*0xF000*/
+
+typedef enum
+{
+ SCHEDULE_SERVICE_TYPE_RSVD,
+ SCHEDULE_SERVICE_TYPE_UNDEFINED,
+ SCHEDULE_SERVICE_TYPE_BE,
+ SCHEDULE_SERVICE_TYPE_NRTPS,
+ SCHEDULE_SERVICE_TYPE_RTPS,
+ SCHEDULE_SERVICE_TYPE_EXT_RTPS,
+ SCHEDULE_SERVICE_TYPE_UGS
+} SCHEDULE_SERVICE_TYPE_e;
+
+static gint hf_mac_header_generic_grant_mgmt_ugs_tree = -1;
+static gint hf_mac_header_generic_grant_mgmt_subhd_ugs_si = -1;
+static gint hf_mac_header_generic_grant_mgmt_subhd_ugs_pm = -1;
+static gint hf_mac_header_generic_grant_mgmt_subhd_ugs_fli = -1;
+static gint hf_mac_header_generic_grant_mgmt_subhd_ugs_fl = -1;
+static gint hf_mac_header_generic_grant_mgmt_subhd_ugs_rsv = -1;
+static gint hf_mac_header_generic_grant_mgmt_ext_rtps_tree = -1;
+static gint hf_mac_header_generic_grant_mgmt_subhd_ext_pbr = -1;
+static gint hf_mac_header_generic_grant_mgmt_subhd_ext_fli = -1;
+static gint hf_mac_header_generic_grant_mgmt_subhd_ext_fl = -1;
+static gint hf_mac_header_generic_grant_mgmt_ext_pbr_tree = -1;
+static gint hf_mac_header_generic_grant_mgmt_subhd_pbr = -1;
+
+/* Slip Indicators */
+static const value_string si_msgs[] =
+{
+ { 0, "No action" },
+ { 1, "A slip of UL grants relative to the UL queue depth" },
+ { 0, NULL}
+};
+
+/* Poll-Me Messages */
+static const value_string pm_msgs[] =
+{
+ { 0, "No action" },
+ { 1, "Request a bandwidth poll" },
+ { 0, NULL}
+};
+
+/* Frame Latency Indications */
+static const value_string fli_msgs[] =
+{
+ { 0, "Frame latency field disabled" },
+ { 1, "Frame latency field enabled" },
+ { 0, NULL}
+};
+
+/* ARQ Feedback Payload */
+
+/* ARQ Feedback IE bit masks (table 111) */
+#define ARQ_FB_IE_LAST_BIT_MASK 0x8000 /*0x0001*/
+#define ARQ_FB_IE_ACK_TYPE_MASK 0x6000 /*0x0006*/
+#define ARQ_FB_IE_BSN_MASK 0x1FFC /*0x3FF8*/
+#define ARQ_FB_IE_NUM_MAPS_MASK 0x0003 /*0xC000*/
+#define ARQ_FB_IE_SEQ_FORMAT_MASK 0x8000 /*0x0001*/
+#define ARQ_FB_IE_SEQ_ACK_MAP_MASK 0x7000 /*0x000E*/
+#define ARQ_FB_IE_SEQ1_LENGTH_MASK 0x0F00 /*0x00F0*/
+#define ARQ_FB_IE_SEQ2_LENGTH_MASK 0x00F0 /*0x0F00*/
+#define ARQ_FB_IE_SEQ3_LENGTH_MASK 0x000F /*0xF000*/
+#define ARQ_FB_IE_SEQ_ACK_MAP_2_MASK 0x6000 /*0x0006*/
+#define ARQ_FB_IE_SEQ1_LENGTH_6_MASK 0x1F80 /*0x01F8*/
+#define ARQ_FB_IE_SEQ2_LENGTH_6_MASK 0x007E /*0x7E00*/
+#define ARQ_FB_IE_RSV_MASK 0x0001 /*0x8000*/
+
+static gint hf_mac_header_generic_arq_fb_ie_cid = -1;
+static gint hf_mac_header_generic_arq_fb_ie_last = -1;
+static gint hf_mac_header_generic_arq_fb_ie_ack_type = -1;
+static gint hf_mac_header_generic_arq_fb_ie_bsn = -1;
+static gint hf_mac_header_generic_arq_fb_ie_num_maps = -1;
+static gint hf_ack_type_reserved = -1;
+static gint hf_mac_header_generic_arq_fb_ie_sel_ack_map = -1;
+static gint hf_mac_header_generic_arq_fb_ie_seq_format = -1;
+static gint hf_mac_header_generic_arq_fb_ie_seq_ack_map = -1;
+static gint hf_mac_header_generic_arq_fb_ie_seq1_length = -1;
+static gint hf_mac_header_generic_arq_fb_ie_seq2_length = -1;
+static gint hf_mac_header_generic_arq_fb_ie_seq3_length = -1;
+static gint hf_mac_header_generic_arq_fb_ie_seq_ack_map_2 = -1;
+static gint hf_mac_header_generic_arq_fb_ie_seq1_length_6 = -1;
+static gint hf_mac_header_generic_arq_fb_ie_seq2_length_6 = -1;
+static gint hf_mac_header_generic_arq_fb_ie_rsv = -1;
+static gint hf_mac_header_payload_fragment = -1;
+
+static expert_field ei_mac_crc_malformed = EI_INIT;
+static expert_field ei_mac_crc_missing = EI_INIT;
+static expert_field ei_mac_header_generic_crc = EI_INIT;
+
+/* Last IE Indicators */
+static const value_string last_ie_msgs[] =
+{
+ { 0, "No" },
+ { 1, "Yes" },
+ { 0, NULL}
+};
+
+/* Copied and renamed from proto.c because global value_strings don't work for plugins */
+static const value_string plugin_proto_checksum_vals[] = {
+ { PROTO_CHECKSUM_E_BAD, "Bad" },
+ { PROTO_CHECKSUM_E_GOOD, "Good" },
+ { PROTO_CHECKSUM_E_UNVERIFIED, "Unverified" },
+ { PROTO_CHECKSUM_E_NOT_PRESENT, "Not present" },
+
+ { 0, NULL }
+};
+
+/* Register Wimax defrag table init routine. */
+static void wimax_defragment_init(void)
+{
+ gint i;
+
+ /* Init fragmentation variables. */
+ for (i = 0; i < MAX_CID; i++)
+ {
+ cid_adjust[i] = 1; /* Must not start with 0 */
+ cid_vernier[i] = 0;
+ }
+ cid_adj_array_size = 0;
+ /* Initialize to make sure bs_address gets set in FCH decoder. */
+ bs_address.len = 0;
+
+ /* Initialize the Scheduling Service Type flag */
+ seen_a_service_type = 0;
+
+ max_logical_bands = 12;
+
+ /* Initialize UL_MAP globals. */
+ init_wimax_globals();
+}
+
+static void wimax_defragment_cleanup(void)
+{
+ g_free(cid_adj_array);
+ cid_adj_array = NULL;
+ g_free(frag_num_array);
+ frag_num_array = NULL;
+}
+
+static guint decode_packing_subheader(tvbuff_t *payload_tvb, packet_info *pinfo, proto_tree *tree, guint payload_length _U_, guint payload_offset, proto_item *parent_item)
+{
+ proto_item *generic_item = NULL;
+ proto_tree *generic_tree = NULL;
+ guint starting_offset = payload_offset;
+
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Packing subhdr");
+ /* add the Packing subheader info */
+ proto_item_append_text(parent_item, ", Packing Subheader");
+ /* display Packing subheader type */
+ generic_item = proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, payload_tvb, payload_offset, ((arq_enabled|extended_type)?3:2), "Packing subheader (%u bytes)", ((arq_enabled|extended_type)?3:2));
+ /* add Packing subheader subtree */
+ generic_tree = proto_item_add_subtree(generic_item, ett_mac_pkt_subheader_decoder);
+ /* decode and display the Packing subheader */
+ /* Get the fragment type */
+ frag_type = (tvb_get_guint8(payload_tvb, payload_offset) & FRAGMENT_TYPE_MASK) >> 6;
+ /* if ARQ Feedback payload is present */
+ if (arq_fb_payload)
+ { /* get the frag length */
+ frag_len = ((tvb_get_ntohl(payload_tvb, payload_offset) & FRAG_LENGTH_MASK) >> 8);
+ /* get the sequence number */
+ seq_number = (tvb_get_ntohs(payload_tvb, payload_offset) & SEQ_NUMBER_MASK_11) >> 3;
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_packing_subhd_fc_ext, payload_tvb, payload_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_packing_subhd_bsn, payload_tvb, payload_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_packing_subhd_len_ext, payload_tvb, payload_offset, 3, ENC_BIG_ENDIAN);
+ /* update the length and offset */
+ payload_offset += 3;
+ frag_len -= 3;
+ }
+ else
+ {
+ if (extended_type)
+ { /* get the frag length */
+ frag_len = ((tvb_get_ntohl(payload_tvb, payload_offset) & FRAG_LENGTH_MASK) >> 8);
+ /* get the sequence number */
+ seq_number = (tvb_get_ntohs(payload_tvb, payload_offset) & SEQ_NUMBER_MASK_11) >> 3;
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_packing_subhd_fc_ext, payload_tvb, payload_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_packing_subhd_fsn_ext, payload_tvb, payload_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_packing_subhd_len_ext, payload_tvb, payload_offset, 3, ENC_BIG_ENDIAN);
+ /* update the length and offset */
+ payload_offset += 3;
+ frag_len -= 3;
+ }
+ else
+ { /* get the frag length */
+ frag_len = (tvb_get_ntohs(payload_tvb, payload_offset) & PACKING_SUBHEADER_LENGTH_MASK);
+ /* get the sequence number */
+ seq_number = (tvb_get_guint8(payload_tvb, payload_offset) & SEQ_NUMBER_MASK) >> 3;
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_packing_subhd_fc, payload_tvb, payload_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_packing_subhd_fsn, payload_tvb, payload_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_packing_subhd_len, payload_tvb, payload_offset, 2, ENC_BIG_ENDIAN);
+ /* update the length and offset */
+ payload_offset += 2;
+ frag_len -= 2;
+ }
+ }
+ /* Prevent a crash! */
+ if ((gint)frag_len < 0)
+ frag_len = 0;
+ /* Return the number of bytes decoded. */
+ return payload_offset - starting_offset;
+}
+
+
+static int dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint payload_offset;
+ guint payload_length = 0;
+
+ static guint8 frag_number[MAX_CID];
+ static guint cid_list[MAX_CID];
+ static guint cid_base;
+ static const char reassem_str[] = "Reassembled Data transport PDU (%u bytes)";
+ static const char data_str[] = "Data transport PDU (%u bytes)";
+ const char *str_ptr;
+ gint length, i, cid_index;
+ guint tvb_len, ret_length, ubyte, new_tvb_len;
+ guint new_payload_len = 0;
+ guint /*mac_ht,*/ mac_ec, mac_esf, mac_ci, /*mac_eks,*/ mac_len, mac_cid, cid;
+ guint ffb_grant_mgmt_subheader, packing_subheader, fragment_subheader;
+ guint mesh_subheader;
+ guint packing_length;
+ guint32 mac_crc, calculated_crc;
+ proto_item *parent_item = NULL;
+ proto_item *generic_item = NULL;
+ proto_tree *generic_tree = NULL;
+ proto_item *child_item = NULL;
+ proto_tree *child_tree = NULL;
+ tvbuff_t *payload_tvb;
+ tvbuff_t *data_pdu_tvb;
+ fragment_head *payload_frag;
+ gboolean first_arq_fb_payload = TRUE;
+
+ proto_mac_header_generic_decoder = proto_wimax;
+
+#ifdef DEBUG
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "GMH");
+#endif
+
+ /* Get the frame length */
+ tvb_len = tvb_reported_length(tvb);
+ if (tvb_len < WIMAX_MAC_HEADER_SIZE)
+ {
+ /* display the error message */
+ generic_item = proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, tvb_len, "Error: the size of Generic MAC Header tvb is too small! (%u bytes)", tvb_len);
+ /* add subtree */
+ generic_tree = proto_item_add_subtree(generic_item, ett_mac_header_generic_decoder);
+ /* display the Generic MAC Header in Hex */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_value_bytes, tvb, offset, tvb_len, ENC_NA);
+ return tvb_captured_length(tvb);
+ }
+ /* get the parent */
+ parent_item = proto_tree_get_parent(tree);
+ /* add the MAC header info */
+ proto_item_append_text(parent_item, " - Generic MAC Header");
+ /* display MAC header message */
+ generic_item = proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, WIMAX_MAC_HEADER_SIZE, "Generic MAC Header (%u bytes)", WIMAX_MAC_HEADER_SIZE);
+ /* add MAC header subtree */
+ generic_tree = proto_item_add_subtree(generic_item, ett_mac_header_generic_decoder);
+ /* Decode and display the MAC header */
+ /* Get the first byte */
+ ubyte = tvb_get_guint8(tvb, offset);
+ /* get the Header Type (HT) */
+ /*mac_ht = ((ubyte & WIMAX_MAC_HEADER_GENERIC_HT_MASK)?1:0); XX: not used ?? */
+ /* get the Encryption Control (EC) */
+ mac_ec = ((ubyte & WIMAX_MAC_HEADER_GENERIC_EC_MASK)?1:0);
+ /* get the sub types */
+ ffb_grant_mgmt_subheader = ((ubyte & GENERIC_SUB_TYPE_0)?1:0);
+ packing_subheader = ((ubyte & GENERIC_SUB_TYPE_1)?1:0);
+ fragment_subheader = ((ubyte & GENERIC_SUB_TYPE_2)?1:0);
+ extended_type = ((ubyte & GENERIC_SUB_TYPE_3)?1:0);
+ arq_fb_payload = ((ubyte & GENERIC_SUB_TYPE_4)?1:0);
+ mesh_subheader = ((ubyte & GENERIC_SUB_TYPE_5)?1:0);
+ /* Get the 2nd byte */
+ ubyte = tvb_get_guint8(tvb, (offset+1));
+ /* get the Extended subheader field (ESF) */
+ mac_esf = ((ubyte & WIMAX_MAC_HEADER_GENERIC_ESF_MASK)?1:0);
+ /* get the CRC indicator (CI) */
+ mac_ci = ((ubyte & WIMAX_MAC_HEADER_GENERIC_CI_MASK)?1:0);
+ /* get the Encryption key sequence (EKS) */
+ /*mac_eks = ((ubyte & WIMAX_MAC_HEADER_GENERIC_EKS_MASK)>>4); XX: not used ?? */
+ /* get the MAC length; this is used even if tree is null */
+ mac_len = (tvb_get_ntohs(tvb, (offset+1)) & WIMAX_MAC_HEADER_GENERIC_LEN);
+ /* get the CID */
+ mac_cid = tvb_get_ntohs(tvb, (offset+3));
+ /* display the Header Type (HT) */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_ht, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* display the Encryption Control (EC) */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_ec, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* display the sub-types (Type) */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_type_5, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_type_4, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_type_3, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_type_2, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_type_1, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_type_0, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* display the Extended sub-header Field (ESF) */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_esf, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* display the CRC Indicator (CI) */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_ci, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* display the Encryption Key Sequence (EKS) */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_eks, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* display the reserved field */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_rsv, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* display the length */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_len, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the CID */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_cid, tvb, (offset+3), 2, ENC_BIG_ENDIAN);
+ /* Decode and display the HCS */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_hcs, tvb, (offset+5), 1, ENC_BIG_ENDIAN);
+ /* get the frame length without MAC header */
+ length = mac_len - WIMAX_MAC_HEADER_SIZE;
+#ifdef DEBUG
+ proto_item_append_text(parent_item, "tvb length=%u, mac length=%u, frame length=%u,", tvb_len, mac_len, length);
+#endif
+ /* set the offset for the frame */
+ offset += WIMAX_MAC_HEADER_SIZE;
+ /* the processing of the subheaders is order sensitive */
+ /* do not change the order */
+
+ if (mac_ec)
+ {
+ if (mac_ci)
+ {
+ if (length >= (gint)sizeof(mac_crc))
+ {
+ length -= (int)sizeof(mac_crc);
+ }
+ }
+ generic_item = proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, length, "Encrypted PDU (%u bytes)", length);
+ /* add payload subtree */
+ generic_tree = proto_item_add_subtree(generic_item, ett_mac_data_pdu_decoder);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_value_bytes, tvb, offset, length, ENC_NA);
+ goto check_crc;
+ }
+
+ /* if Extended subheader is present */
+ if (mac_esf)
+ { /* add the Extended subheader info */
+ proto_item_append_text(parent_item, ", Extended Subheader(s)");
+ ret_length = extended_subheader_decoder(tvb_new_subset_length(tvb, offset, length), pinfo, tree);
+ /* update the length and offset */
+ length -= ret_length;
+ offset += ret_length;
+ }
+ /* if Mesh subheader is present */
+ if (mesh_subheader)
+ { /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Mesh subhdr");
+ /* add the Mesh subheader info */
+ proto_item_append_text(parent_item, ", Mesh Subheader");
+ /* display Mesh subheader type */
+ generic_item = proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, length, "Mesh subheader (2 bytes)");
+ /* add Mesh subheader subtree */
+ generic_tree = proto_item_add_subtree(generic_item, ett_mac_mesh_subheader_decoder);
+ /* decode and display the Mesh subheader */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_mesh_subheader, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* update the length and offset */
+ length -= 2;
+ offset += 2;
+ }
+ /* if Fast-feedback allocation (DL) subheader or Grant management (UL) subheader is present */
+ if (ffb_grant_mgmt_subheader)
+ { /* check if it is downlink packet */
+ if (is_down_link(pinfo))
+ { /* Fast-feedback allocation (DL) subheader is present */
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Fast-fb subhdr");
+ /* add the Fast-feedback subheader info */
+ proto_item_append_text(parent_item, ", Fast-feedback Subheader");
+ /* display Fast-feedback allocation subheader type */
+ generic_item = proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, length, "Fast-feedback allocation (DL) subheader (%u bytes)", length);
+ /* add Fast-feedback allocation subheader subtree */
+ generic_tree = proto_item_add_subtree(generic_item, ett_mac_fast_fb_subheader_decoder);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_fast_fb_subhd_alloc_offset, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_fast_fb_subhd_fb_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* update the length and offset */
+ length -= 1;
+ offset += 1;
+ }
+ else /* Grant management (UL) subheader is present */
+ { /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Grant mgmt subhdr");
+ /* add the Grant management subheader info */
+ proto_item_append_text(parent_item, ", Grant Management Subheader");
+ /* display Grant management subheader type */
+ generic_item = proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, 2, "Grant management (UL) subheader (2 bytes)");
+ /* add Grant management subheader subtree */
+ generic_tree = proto_item_add_subtree(generic_item, ett_mac_grant_mgmt_subheader_decoder);
+ scheduling_service_type = get_service_type();
+ switch (scheduling_service_type)
+ {
+ case SCHEDULE_SERVICE_TYPE_UGS:
+ proto_item_append_text(generic_item, ": It looks like UGS is the correct Scheduling Service Type");
+ break;
+ case SCHEDULE_SERVICE_TYPE_EXT_RTPS:
+ proto_item_append_text(generic_item, ": It looks like Extended rtPS is the correct Scheduling Service Type");
+ break;
+ case -1:
+ proto_item_append_text(generic_item, ": Cannot determine the correct Scheduling Service Type");
+ break;
+ default:
+ proto_item_append_text(generic_item, ": It looks like Piggyback Request is the correct Scheduling Service Type");
+ break;
+ }
+ /* Create tree for Scheduling Service Type (UGS) */
+ child_item = proto_tree_add_item(generic_tree, hf_mac_header_generic_grant_mgmt_ugs_tree, tvb, offset, 2, ENC_BIG_ENDIAN);
+ child_tree = proto_item_add_subtree(child_item, ett_mac_grant_mgmt_subheader_decoder);
+ proto_tree_add_item(child_tree, hf_mac_header_generic_grant_mgmt_subhd_ugs_si, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(child_tree, hf_mac_header_generic_grant_mgmt_subhd_ugs_pm, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(child_tree, hf_mac_header_generic_grant_mgmt_subhd_ugs_fli, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(child_tree, hf_mac_header_generic_grant_mgmt_subhd_ugs_fl, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(child_tree, hf_mac_header_generic_grant_mgmt_subhd_ugs_rsv, tvb, offset, 2, ENC_BIG_ENDIAN);
+
+ /* Create tree for Scheduling Service Type (Extended RTPS) */
+ child_item = proto_tree_add_item(generic_tree, hf_mac_header_generic_grant_mgmt_ext_rtps_tree, tvb, offset, 2, ENC_BIG_ENDIAN);
+ child_tree = proto_item_add_subtree(child_item, ett_mac_grant_mgmt_subheader_decoder);
+ proto_tree_add_item(child_tree, hf_mac_header_generic_grant_mgmt_subhd_ext_pbr, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(child_tree, hf_mac_header_generic_grant_mgmt_subhd_ext_fli, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(child_tree, hf_mac_header_generic_grant_mgmt_subhd_ext_fl, tvb, offset, 2, ENC_BIG_ENDIAN);
+
+ /* Create tree for Scheduling Service Type (Piggyback Request) */
+ child_item = proto_tree_add_item(generic_tree, hf_mac_header_generic_grant_mgmt_ext_pbr_tree, tvb, offset, 2, ENC_BIG_ENDIAN);
+ child_tree = proto_item_add_subtree(child_item, ett_mac_grant_mgmt_subheader_decoder);
+ proto_tree_add_item(child_tree, hf_mac_header_generic_grant_mgmt_subhd_pbr, tvb, offset, 2, ENC_BIG_ENDIAN);
+
+ /* update the length and offset */
+ length -= 2;
+ offset += 2;
+ }
+ }
+ /* if Fragmentation subheader is present */
+ if (fragment_subheader)
+ { /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Frag subhdr");
+ /* add the Fragmentation subheader info */
+ proto_item_append_text(parent_item, ", Frag Subheader");
+ /* display Fragmentation subheader type */
+ generic_item = proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, ((arq_enabled|extended_type)?2:1), "Fragmentation subheader (%u bytes)", ((arq_enabled|extended_type)?2:1));
+ /* add Fragmentation subheader subtree */
+ generic_tree = proto_item_add_subtree(generic_item, ett_mac_frag_subheader_decoder);
+ /* Get the fragment type */
+ frag_type = (tvb_get_guint8(tvb, offset) & FRAGMENT_TYPE_MASK) >> 6;
+ if (arq_fb_payload)
+ { /* get the sequence number */
+ seq_number = (tvb_get_ntohs(tvb, offset) & SEQ_NUMBER_MASK_11) >> 3;
+ /* decode and display the header */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_frag_subhd_fc_ext, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_frag_subhd_bsn, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_frag_subhd_rsv_ext, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* update the length and offset */
+ length -= 2;
+ offset += 2;
+ }
+ else
+ {
+ if (extended_type)
+ { /* get the sequence number */
+ seq_number = (tvb_get_ntohs(tvb, offset) & SEQ_NUMBER_MASK_11) >> 3;
+ /* decode and display the header */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_frag_subhd_fc_ext, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_frag_subhd_fsn_ext, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_frag_subhd_rsv_ext, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* update the length and offset */
+ length -= 2;
+ offset += 2;
+ }
+ else
+ { /* get the sequence number */
+ seq_number = (tvb_get_guint8(tvb, offset) & SEQ_NUMBER_MASK) >> 3;
+ /* decode and display the header */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_frag_subhd_fc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_frag_subhd_fsn, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_frag_subhd_rsv, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* update the length and offset */
+ length -= 1;
+ offset += 1;
+ }
+ }
+ frag_len = length;
+ }
+ else /* ??? default fragment type: no fragment */
+ {
+ frag_type = NO_FRAG;
+ }
+ /* Decode the MAC payload if there is any */
+ if (mac_ci)
+ {
+ if (length < (gint)sizeof(mac_crc))
+ { /* display error message */
+ proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, length, "Error - the frame is too short (%u bytes)", length);
+ return tvb_captured_length(tvb);
+ }
+ length -= (int)sizeof(mac_crc);
+ }
+ while (length > 0)
+ {
+ frag_len = length; /* Can be changed by Packing subhdr */
+ if (packing_subheader)
+ {
+ packing_length = decode_packing_subheader(tvb, pinfo, tree, length, offset, parent_item);
+ length -= packing_length;
+ offset += packing_length;
+ generic_item = proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, frag_len, "Data transport PDU (%u bytes)", frag_len);
+ /* add payload subtree */
+ generic_tree = proto_item_add_subtree(generic_item, ett_mac_data_pdu_decoder);
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_value_bytes, tvb, offset, frag_len, ENC_NA);
+ }
+ /* defragment first if it is fragmented */
+ if (frag_type == NO_FRAG)
+ { /* not fragmented payload */
+ payload_tvb = tvb_new_subset_length(tvb, offset, frag_len);
+ payload_length = frag_len;
+ new_payload_len = frag_len;
+ }
+ else /* fragmented payload */
+ { /* add the fragment */
+ /* Make sure cid will not match a previous packet with different data */
+ for (i = 0; i < MAX_CID; i++)
+ {
+ if (cid_list[i] == mac_cid)
+ {
+ cid_base = i * (0xFFFFFFFF / MAX_CID);
+ break;
+ }
+ if (cid_list[i] == 0)
+ {
+ cid_list[i] = mac_cid;
+ cid_base = i * (0xFFFFFFFF / MAX_CID);
+ break;
+ }
+ }
+ cid_index = i;
+ while (pinfo->num > cid_adj_array_size)
+ {
+ cid_adj_array_size += 1024;
+ cid_adj_array = (guint *)g_realloc(cid_adj_array, (int)sizeof(guint) * cid_adj_array_size);
+ frag_num_array = (guint8 *)g_realloc(frag_num_array, (int)sizeof(guint8) * cid_adj_array_size);
+ /* Clear the added memory */
+ memset(&cid_adj_array[cid_adj_array_size - 1024], 0, (int)sizeof(guint) * 1024);
+ }
+ if (first_gmh)
+ {
+ /* New cid_adjust for each packet with fragment(s) */
+ cid_adjust[cid_index] += cid_vernier[cid_index];
+ /* cid_vernier must always be 0 at start of packet. */
+ cid_vernier[cid_index] = 0;
+ }
+ /* Create artificial sequence numbers. */
+ frag_number[cid_index]++;
+ if (frag_type == FIRST_FRAG)
+ {
+ frag_number[cid_index] = 0;
+ }
+ if (cid_adj_array[pinfo->num])
+ {
+ /* We apparently just clicked on the packet again. */
+ cid_adjust[cid_index] = cid_adj_array[pinfo->num];
+ /* Set the frag_number at start of packet. */
+ if (first_gmh)
+ {
+ frag_number[cid_index] = frag_num_array[pinfo->num];
+ }
+ } else {
+ /* Save for next time we click on this packet. */
+ cid_adj_array[pinfo->num] = cid_adjust[cid_index];
+ if (first_gmh)
+ {
+ frag_num_array[pinfo->num] = frag_number[cid_index];
+ }
+ }
+ /* Reset in case we stay in this while() loop to finish the packet. */
+ first_gmh = FALSE;
+ cid = cid_base + cid_adjust[cid_index] + cid_vernier[cid_index];
+ /* Save address pointers. */
+ copy_address_shallow(&save_src, &pinfo->src);
+ copy_address_shallow(&save_dst, &pinfo->dst);
+ /* Use dl_src and dl_dst in defragmentation. */
+ copy_address_shallow(&pinfo->src, &pinfo->dl_src);
+ copy_address_shallow(&pinfo->dst, &pinfo->dl_dst);
+ payload_frag = fragment_add_seq(&payload_reassembly_table, tvb, offset, pinfo, cid, NULL, frag_number[cid_index], frag_len, ((frag_type==LAST_FRAG)?0:1), 0);
+ /* Restore address pointers. */
+ copy_address_shallow(&pinfo->src, &save_src);
+ copy_address_shallow(&pinfo->dst, &save_dst);
+ if (frag_type == LAST_FRAG)
+ {
+ /* Make sure fragment_add_seq() sees next one as a new frame. */
+ cid_vernier[cid_index]++;
+ }
+ /* Don't show reassembled packet until last fragment. */
+ proto_tree_add_bytes_format(tree, hf_mac_header_payload_fragment, tvb, offset, frag_len, NULL, "Payload Fragment (%d bytes)", frag_len);
+
+ if (payload_frag && frag_type == LAST_FRAG)
+ { /* defragmented completely */
+ payload_length = payload_frag->len;
+ /* create the new tvb for defragmented frame */
+ payload_tvb = tvb_new_chain(tvb, payload_frag->tvb_data);
+ /* add the defragmented data to the data source list */
+ add_new_data_source(pinfo, payload_tvb, "Reassembled WiMax MAC payload");
+ /* save the tvb langth */
+ new_payload_len = payload_length;
+ }
+ else /* error or defragment is not complete */
+ {
+ payload_tvb = NULL;
+#ifdef DEBUG /* for debug only */
+/* if (frag_type == LAST_FRAG)*/
+ { /* error */
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Dropped the incomplete frame");
+ }
+#endif
+#if 0
+ if (frag_type == FIRST_FRAG)
+ { /* Set up to decode the first fragment (even though next fragment not read yet) */
+ payload_tvb = tvb_new_subset_length(tvb, offset, length);
+ payload_length = length;
+ frag_len = length;
+ }
+#endif
+ }
+ }
+ /* process the defragmented payload */
+ if (payload_tvb)
+ { /* reset the payload_offset */
+ payload_offset = 0;
+ /* process the payload */
+ if (payload_length > 0)
+ {
+ if (!new_payload_len)
+ continue;
+ /* if ARQ Feedback payload is present, it should be the first SDU */
+ if (first_arq_fb_payload && arq_fb_payload)
+ { /* decode and display the ARQ feedback payload */
+ first_arq_fb_payload = FALSE;
+#ifndef DEBUG
+ arq_feedback_payload_decoder(tvb_new_subset_length(payload_tvb, payload_offset, new_payload_len), pinfo, generic_tree, parent_item);
+#else
+ ret_length = arq_feedback_payload_decoder(tvb_new_subset_length(payload_tvb, payload_offset, new_payload_len), pinfo, generic_tree, parent_item);
+ if (ret_length != new_payload_len)
+ { /* error */
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "incorrect ARQ fb payload size");
+ }
+#endif
+ }
+ else /* decode SDUs */
+ { /* check the payload type */
+ if (mac_cid == cid_padding)
+ { /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Padding CID");
+ /* get the parent */
+ generic_item = proto_tree_get_parent(tree);
+ /* add the MAC header info */
+ proto_item_append_text(generic_item, ", Padding CID");
+ /* display padding CID */
+ generic_item = proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, payload_tvb, payload_offset, new_payload_len, "Padding CID (%u bytes)", new_payload_len);
+ /* add payload subtree */
+ generic_tree = proto_item_add_subtree(generic_item, ett_mac_header_generic_decoder);
+ /* display the Padding CID payload in Hex */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_value_bytes, payload_tvb, payload_offset, new_payload_len, ENC_NA);
+ }
+ else if ((mac_cid <= (2 * global_cid_max_basic)) || (mac_cid == cid_aas_ranging)
+ || (mac_cid >= cid_normal_multicast))
+ { /* MAC management message */
+ call_dissector(mac_mgmt_msg_decoder_handle, tvb_new_subset_length(payload_tvb, payload_offset, new_payload_len), pinfo, tree);
+ }
+ else /* data transport PDU */
+ { /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Data");
+ /* add the MAC payload info */
+ proto_item_append_text(parent_item, ", Data");
+ /* display payload info */
+ if ((new_payload_len + payload_offset) > payload_length)
+ {
+ new_tvb_len = new_payload_len - payload_offset;
+ }
+ else
+ {
+ new_tvb_len = new_payload_len;
+ }
+ if (frag_type == LAST_FRAG || frag_type == NO_FRAG)
+ {
+ if (frag_type == NO_FRAG)
+ {
+ str_ptr = data_str;
+ new_payload_len = frag_len;
+ }
+ else
+ {
+ str_ptr = reassem_str;
+ }
+ data_pdu_tvb = tvb_new_subset_length(payload_tvb, payload_offset, new_tvb_len);
+ generic_item = proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, data_pdu_tvb, payload_offset, new_payload_len, str_ptr, new_payload_len);
+ /* add payload subtree */
+ generic_tree = proto_item_add_subtree(generic_item, ett_mac_data_pdu_decoder);
+ /* check the data type */
+ if (tvb_get_guint8(payload_tvb, payload_offset) == IP_HEADER_BYTE)
+ {
+ if (mac_ip_handle)
+ call_dissector(mac_ip_handle, tvb_new_subset_length(payload_tvb, payload_offset, new_tvb_len), pinfo, generic_tree);
+ else /* display the Generic MAC Header in Hex */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_value_bytes, payload_tvb, payload_offset, new_tvb_len, ENC_NA);
+ }
+ else /* display the Generic MAC Header in Hex */
+ proto_tree_add_item(generic_tree, hf_mac_header_generic_value_bytes, payload_tvb, payload_offset, new_tvb_len, ENC_NA);
+ }
+ }
+ }
+ payload_length -= new_payload_len;
+ } /* end of while loop */
+ } /* end of payload processing */
+ length -= frag_len;
+ offset += frag_len;
+ } /* end of payload decoding */
+
+check_crc:
+ /* Decode and display the CRC if it is present */
+ if (mac_ci)
+ {
+ /* add the CRC info */
+ proto_item_append_text(parent_item, ", CRC");
+ /* check the length */
+ if (MIN(tvb_len, tvb_reported_length(tvb)) >= mac_len)
+ {
+ /* calculate the CRC */
+ calculated_crc = wimax_mac_calc_crc32(tvb_get_ptr(tvb, 0, mac_len - (int)sizeof(mac_crc)), mac_len - (int)sizeof(mac_crc));
+ /* display the CRC */
+ proto_tree_add_checksum(tree, tvb, mac_len - (int)sizeof(mac_crc), hf_mac_header_generic_crc, hf_mac_header_generic_crc_status, &ei_mac_header_generic_crc,
+ pinfo, calculated_crc, ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+ }
+ else
+ { /* display error message */
+ expert_add_info_format(pinfo, tree, &ei_mac_crc_malformed, "CRC missing - the frame is too short (%u bytes)", tvb_len);
+ }
+ }
+ else /* CRC is not included */
+ { /* add the CRC info */
+ proto_item_append_text(parent_item, ", No CRC");
+ /* display message */
+ expert_add_info(pinfo, tree, &ei_mac_crc_missing);
+ }
+ return tvb_captured_length(tvb);
+}
+
+static gint extended_subheader_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ gint offset = 0;
+ gint length, ext_length, ubyte, i;
+ proto_item *ti = NULL;
+ proto_tree *sub_tree = NULL;
+ proto_tree *ti_tree = NULL;
+
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Ext subhdrs");
+
+ /* Get the tvb reported length */
+ length = tvb_reported_length(tvb);
+ if (!length)
+ { /* display the error message */
+ proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, length, "Error: extended subheader tvb is empty ! (%u bytes)", length);
+ return length;
+ }
+
+ /* Get the length of the extended subheader group */
+ ext_length = tvb_get_guint8(tvb, offset);
+ /* display subheader type */
+ ti = proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, length, "Extended subheader group (%u bytes)", ext_length);
+ /* add extended subheader subtree */
+ sub_tree = proto_item_add_subtree(ti, ett_mac_ext_subheader_decoder);
+ /* decode and display the extended subheaders */
+ for (i=1; i<ext_length;)
+ { /* Get the extended subheader type */
+ ubyte = (tvb_get_guint8(tvb, (offset+i)) & EXTENDED_SUB_HEADER_TYPE_MASK);
+ /* decode and display the extended subheader type (MSB) */
+ proto_tree_add_item(sub_tree, hf_mac_header_generic_ext_subheader_rsv, tvb, (offset+i), 1, ENC_BIG_ENDIAN);
+ /* for downlink */
+ if (is_down_link(pinfo)) /* for downlink */
+ { /* decode and display the extended subheader type */
+ ti = proto_tree_add_item(sub_tree, hf_mac_header_generic_ext_subheader_type_dl, tvb, (offset+i), 1, ENC_BIG_ENDIAN);
+ /* add subtree */
+ ti_tree = proto_item_add_subtree(ti, ett_mac_ext_subheader_dl_decoder);
+ i++;
+ switch (ubyte)
+ {
+ case SDU_SN:
+ /* decode and display the extended sdu sn subheader */
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_sdu_sn, tvb, (offset+i), 1, ENC_BIG_ENDIAN);
+ i++;
+ break;
+ case DL_SLEEP_CONTROL:
+ /* decode and display the extended dl sleep control subheader */
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_dl_sleep_control_pscid, tvb, (offset+i), 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_dl_sleep_control_op, tvb, (offset+i), 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_dl_sleep_control_fswe, tvb, (offset+i), 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_dl_sleep_control_fswb, tvb, (offset+i), 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_dl_sleep_control_rsv, tvb, (offset+i), 3, ENC_BIG_ENDIAN);
+ i += 3;
+ break;
+ case FEEDBACK_REQ:
+ /* decode and display the extended feedback request subheader */
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_fb_req_uiuc, tvb, (offset+i), 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_fb_req_fb_type, tvb, (offset+i), 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_fb_req_ofdma_symbol_offset, tvb, (offset+i), 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_fb_req_subchannel_offset, tvb, (offset+i), 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_fb_req_slots, tvb, (offset+i), 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_fb_req_frame_offset, tvb, (offset+i), 3, ENC_BIG_ENDIAN);
+ i += 3;
+ break;
+ case SN_REQ:
+ /* decode and display the extended SN request subheader */
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_sn_req_rep_ind_1, tvb, (offset+i), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_sn_req_rep_ind_2, tvb, (offset+i), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_sn_req_rsv, tvb, (offset+i), 1, ENC_BIG_ENDIAN);
+ i++;
+ break;
+ case PDU_SN_SHORT_DL:
+ /* decode and display the extended pdu sn (short) subheader */
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_pdu_sn_short, tvb, (offset+i), 1, ENC_BIG_ENDIAN);
+ i++;
+ break;
+ case PDU_SN_LONG_DL:
+ /* decode and display the extended pdu sn (long) subheader */
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_pdu_sn_long, tvb, (offset+i), 2, ENC_BIG_ENDIAN);
+ i += 2;
+ break;
+ default: /* reserved */
+ break;
+ }
+ }
+ else /* for uplink */
+ { /* decode and display the extended subheader type */
+ ti = proto_tree_add_item(sub_tree, hf_mac_header_generic_ext_subheader_type_ul, tvb, (offset+i), 1, ENC_BIG_ENDIAN);
+ /* add subtree */
+ ti_tree = proto_item_add_subtree(ti, ett_mac_ext_subheader_ul_decoder);
+ i++;
+ switch (ubyte)
+ {
+ case MIMO_MODE_FEEDBACK:
+ /* decode and display the extended MIMO Mode Feedback subheader */
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_mimo_mode_fb_type, tvb, (offset+i), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_mimo_fb_content, tvb, (offset+i), 1, ENC_BIG_ENDIAN);
+ i++;
+ break;
+ case UL_TX_POWER_REPORT:
+ /* decode and display the extended ul tx power report subheader */
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_ul_tx_pwr_rep, tvb, (offset+i), 1, ENC_BIG_ENDIAN);
+ i++;
+ break;
+ case MINI_FEEDBACK:
+ /* decode and display the extended MINI Feedback subheader */
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_mini_fb_type, tvb, (offset+i), 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_mini_fb_content, tvb, (offset+i), 2, ENC_BIG_ENDIAN);
+ i += 2;
+ break;
+ case PDU_SN_SHORT_UL:
+ /* decode and display the extended pdu sn (short) subheader */
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_pdu_sn_short, tvb, (offset+i), 1, ENC_BIG_ENDIAN);
+ i++;
+ break;
+ case PDU_SN_LONG_UL:
+ /* decode and display the extended pdu sn (long) subheader */
+ proto_tree_add_item(ti_tree, hf_mac_header_generic_ext_subheader_pdu_sn_long, tvb, (offset+i), 2, ENC_BIG_ENDIAN);
+ i += 2;
+ break;
+ default: /* reserved */
+ break;
+ }
+ }
+ }
+ /* return the extended subheader length */
+ return ext_length;
+}
+
+static gint arq_feedback_payload_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *parent_item)
+{
+ gint length, i;
+ gint offset;
+ gint last_ie = 0;
+ gint ack_type, num_maps, seq_format;
+ gint word2, word3;
+ proto_item *ti = NULL;
+ proto_item *sub_ti = NULL;
+ proto_tree *sub_tree = NULL;
+
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "ARQ feedback payld");
+
+ /* add the MAC header info */
+ proto_item_append_text(parent_item, ", ARQ feedback payload");
+
+ /* reset the offset */
+ offset = 0;
+
+ /* Get the tvb reported length */
+ length = tvb_reported_length(tvb);
+ if (!length)
+ { /* display the error message */
+ proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, length, "Error: ARQ feedback payload tvb is empty ! (%u bytes)", length);
+ return length;
+ }
+
+ /* display subheader type */
+ ti = proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, length, "ARQ feedback payload ");
+ /* add extended subheader subtree */
+ sub_tree = proto_item_add_subtree(ti, ett_mac_arq_fb_payload_decoder);
+ /* decode and display the ARQ Feedback IEs */
+ while (!last_ie)
+ { /* decode and display CID */
+ proto_tree_add_item(sub_tree, hf_mac_header_generic_arq_fb_ie_cid, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* move to next 16-bit word */
+ offset += 2;
+ /* Get the 2nd 16-bit */
+ word2 = tvb_get_ntohs(tvb, offset);
+ /* get the last bit */
+ last_ie = (word2 & ARQ_FB_IE_LAST_BIT_MASK);
+ /* get the ACK type */
+ ack_type = ((word2 & ARQ_FB_IE_ACK_TYPE_MASK) >> 13);
+ /* get the number of ACK maps */
+ num_maps = (word2 & ARQ_FB_IE_NUM_MAPS_MASK) + 1;
+ /* decode and display the 2nd word */
+ proto_tree_add_item(sub_tree, hf_mac_header_generic_arq_fb_ie_last, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_mac_header_generic_arq_fb_ie_ack_type, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_mac_header_generic_arq_fb_ie_bsn, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* decode and display the 3rd word */
+ if (ack_type != 1)
+ {
+ sub_ti = proto_tree_add_item(sub_tree, hf_mac_header_generic_arq_fb_ie_num_maps, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* move to next 16-bit word */
+ offset += 2;
+ proto_item_append_text(sub_ti, " (%d map(s))", num_maps);
+ for (i = 0; i < num_maps; i++)
+ {
+ if (ack_type != 3)
+ {
+ proto_tree_add_item(sub_tree, hf_mac_header_generic_arq_fb_ie_sel_ack_map, tvb, offset, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* Get the next 16-bit */
+ word3 = tvb_get_ntohs(tvb, offset);
+ /* get the sequence format */
+ seq_format = (word3 & ARQ_FB_IE_SEQ_FORMAT_MASK);
+ /* decode and display the sequence format */
+ proto_tree_add_item(sub_tree, hf_mac_header_generic_arq_fb_ie_seq_format, tvb, offset, 2, ENC_BIG_ENDIAN);
+ if (!seq_format)
+ {
+ proto_tree_add_item(sub_tree, hf_mac_header_generic_arq_fb_ie_seq_ack_map_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_mac_header_generic_arq_fb_ie_seq1_length_6, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_mac_header_generic_arq_fb_ie_seq2_length_6, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_mac_header_generic_arq_fb_ie_rsv, tvb, offset, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(sub_tree, hf_mac_header_generic_arq_fb_ie_seq_ack_map, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_mac_header_generic_arq_fb_ie_seq1_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_mac_header_generic_arq_fb_ie_seq2_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_mac_header_generic_arq_fb_ie_seq3_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ }
+ }
+ /* move to next 16-bit word */
+ offset += 2;
+ }
+ }
+ else
+ {
+ /* Number of ACK Maps bits are reserved when ACK TYPE == 1 */
+ proto_tree_add_item(sub_tree, hf_ack_type_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* move to next 16-bit word */
+ offset += 2;
+ }
+ }
+ /* append text */
+ proto_item_append_text(ti,"(%u bytes)", offset);
+ /* return the offset */
+ return offset;
+}
+
+/* Register Wimax Generic Mac Header Protocol and Dissector */
+void wimax_proto_register_mac_header_generic(void)
+{
+ /* Generic MAC header display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_mac_header_generic_value_bytes,
+ {
+ "Values", "wmx.genericValueBytes",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ht,
+ {
+ "MAC Header Type", "wmx.genericHt",
+ FT_UINT24, BASE_HEX, VALS(ht_msgs), WIMAX_MAC_HEADER_GENERIC_HT,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ec,
+ {
+ "MAC Encryption Control", "wmx.genericEc",
+ FT_UINT24, BASE_HEX, VALS(ec_msgs), WIMAX_MAC_HEADER_GENERIC_EC,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_type_0,
+ {
+ "MAC Sub-type Bit 0", "wmx.genericType0",
+ FT_UINT24, BASE_HEX, VALS(type_msg0), WIMAX_MAC_HEADER_GENERIC_TYPE_0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_type_1,
+ {
+ "MAC Sub-type Bit 1", "wmx.genericType1",
+ FT_UINT24, BASE_HEX, VALS(type_msg1), WIMAX_MAC_HEADER_GENERIC_TYPE_1,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_type_2,
+ {
+ "MAC Sub-type Bit 2", "wmx.genericType2",
+ FT_UINT24, BASE_HEX, VALS(type_msg2), WIMAX_MAC_HEADER_GENERIC_TYPE_2,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_type_3,
+ {
+ "MAC Sub-type Bit 3", "wmx.genericType3",
+ FT_UINT24, BASE_HEX, VALS(type_msg3), WIMAX_MAC_HEADER_GENERIC_TYPE_3,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_type_4,
+ {
+ "MAC Sub-type Bit 4", "wmx.genericType4",
+ FT_UINT24, BASE_HEX, VALS(type_msg4), WIMAX_MAC_HEADER_GENERIC_TYPE_4,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_type_5,
+ {
+ "MAC Sub-type Bit 5", "wmx.genericType5",
+ FT_UINT24, BASE_HEX, VALS(type_msg5), WIMAX_MAC_HEADER_GENERIC_TYPE_5,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_esf,
+ {
+ "Extended Sub-header Field", "wmx.genericEsf",
+ FT_UINT24, BASE_HEX, VALS(esf_msgs), WIMAX_MAC_HEADER_GENERIC_ESF,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ci,
+ {
+ "CRC Indicator", "wmx.genericCi",
+ FT_UINT24, BASE_HEX, VALS(ci_msgs), WIMAX_MAC_HEADER_GENERIC_CI,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_eks,
+ {
+ "Encryption Key Sequence", "wmx.genericEks",
+ FT_UINT24, BASE_HEX, NULL, WIMAX_MAC_HEADER_GENERIC_EKS,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_rsv,
+ {
+ "Reserved", "wmx.genericRsv",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_GENERIC_RSV,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_len,
+ {
+ "Length", "wmx.genericLen",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_GENERIC_LEN,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_cid,
+ {
+ "Connection ID", "wmx.genericCid",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_hcs,
+ {
+ "Header Check Sequence", "wmx.genericHcs",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_crc,
+ {
+ "CRC", "wmx.genericCrc",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_crc_status,
+ {
+ "CRC Status", "wmx.genericCrc.status",
+ FT_UINT8, BASE_NONE, VALS(plugin_proto_checksum_vals), 0x0,
+ NULL, HFILL
+ }
+ },
+
+
+ };
+
+ /* Extended Subheader display */
+ static hf_register_info hf_ext[] =
+ {
+ {
+ &hf_mac_header_generic_ext_subheader_rsv,
+ {
+ "Reserved", "wmx.genericExtSubhd.Rsv",
+ FT_UINT8, BASE_DEC, NULL, EXTENDED_SUB_HEADER_RSV_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_type_dl,
+ {
+ "DL Extended Subheader Type", "wmx.genericExtSubhd.Dl",
+ FT_UINT8, BASE_DEC, VALS(dl_ext_sub_header_type), EXTENDED_SUB_HEADER_TYPE_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_type_ul,
+ {
+ "UL Extended Subheader Type", "wmx.genericExtSubhd.Ul",
+ FT_UINT8, BASE_DEC, VALS(ul_ext_sub_header_type), EXTENDED_SUB_HEADER_TYPE_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_sdu_sn,
+ {
+ "SDU Sequence Number", "wmx.genericExtSubhd.SduSn",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_dl_sleep_control_pscid,
+ {
+ "Power Saving Class ID", "wmx.genericExtSubhd.DlSleepCtrlPSCID",
+ FT_UINT24, BASE_DEC, NULL, DL_SLEEP_CONTROL_POWER_SAVING_CLASS_ID_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_dl_sleep_control_op,
+ {
+ "Operation", "wmx.genericExtSubhd.DlSleepCtrlOP",
+ FT_UINT24, BASE_HEX, VALS(dl_sleep_control_ops), DL_SLEEP_CONTROL_OPERATION_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_dl_sleep_control_fswe,
+ {
+ "Final Sleep Window Exponent", "wmx.genericExtSubhd.DlSleepCtrlFSWE",
+ FT_UINT24, BASE_DEC, NULL, DL_SLEEP_CONTROL_FINAL_SLEEP_WINDOW_EXPONENT_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_dl_sleep_control_fswb,
+ {
+ "Final Sleep Window Base", "wmx.genericExtSubhd.DlSleepCtrlFSWB",
+ FT_UINT24, BASE_DEC, NULL, DL_SLEEP_CONTROL_FINAL_SLEEP_WINDOW_BASE_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_dl_sleep_control_rsv,
+ {
+ "Reserved", "wmx.genericExtSubhd.DlSleepCtrlRsv",
+ FT_UINT24, BASE_DEC, NULL, DL_SLEEP_CONTROL_RESERVED_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_fb_req_uiuc,
+ {
+ "UIUC", "wmx.genericExtSubhd.FbReqUIUC",
+ FT_UINT24, BASE_HEX, VALS(uiuc_values), FEEDBACK_REQUEST_UIUC_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_fb_req_fb_type,
+ {
+ "Feedback Type", "wmx.genericExtSubhd.FbReqFbType",
+ FT_UINT24, BASE_HEX, VALS(fb_types), FEEDBACK_REQUEST_FEEDBACK_TYPE_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_fb_req_ofdma_symbol_offset,
+ {
+ "OFDMA Symbol Offset", "wmx.genericExtSubhd.FbReqOfdmaSymbolOffset",
+ FT_UINT24, BASE_HEX, NULL, FEEDBACK_REQUEST_OFDMA_SYMBOL_OFFSET_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_fb_req_subchannel_offset,
+ {
+ "Subchannel Offset", "wmx.genericExtSubhd.FbReqSubchannelOffset",
+ FT_UINT24, BASE_HEX, NULL, FEEDBACK_REQUEST_SUBCHANNEL_OFFSET_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_fb_req_slots,
+ {
+ "Number of Slots", "wmx.genericExtSubhd.FbReqSlots",
+ FT_UINT24, BASE_HEX, NULL, FEEDBACK_REQUEST_NUMBER_OF_SLOTS_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_fb_req_frame_offset,
+ {
+ "Frame Offset", "wmx.genericExtSubhd.FbReqFrameOffset",
+ FT_UINT24, BASE_HEX, NULL, FEEDBACK_REQUEST_FRAME_OFFSET_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_sn_req_rep_ind_1,
+ {
+ "First SN Report Indication", "wmx.genericExtSubhd.SnReqRepInd1",
+ FT_UINT8, BASE_DEC, VALS(sn_rep_msg), SN_REQUEST_SUBHEADER_SN_REPORT_INDICATION_1_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_sn_req_rep_ind_2,
+ {
+ "Second SN Report Indication", "wmx.genericExtSubhd.SnReqRepInd2",
+ FT_UINT8, BASE_DEC, VALS(sn_rep_msg), SN_REQUEST_SUBHEADER_SN_REPORT_INDICATION_2_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_sn_req_rsv,
+ {
+ "Reserved", "wmx.genericExtSubhd.SnReqRsv",
+ FT_UINT8, BASE_DEC, NULL, SN_REQUEST_SUBHEADER_RESERVED_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_mimo_mode_fb_type,
+ {
+ "Feedback Type", "wmx.genericExtSubhd.MimoFbType",
+ FT_UINT8, BASE_DEC, VALS(mimo_fb_types), MIMO_FEEDBACK_TYPE_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_mimo_fb_content,
+ {
+ "Feedback Content", "wmx.genericExtSubhd.MimoFbContent",
+ FT_UINT8, BASE_DEC, NULL, MIMO_FEEDBACK_CONTENT_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_ul_tx_pwr_rep,
+ {
+ "UL TX Power", "wmx.genericExtSubhd.UlTxPwr",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_mini_fb_type,
+ {
+ "Feedback Type", "wmx.genericExtSubhd.MiniFbType",
+ FT_UINT16, BASE_DEC, VALS(fb_types), MINI_FEEDBACK_TYPE_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_mini_fb_content,
+ {
+ "Feedback Content", "wmx.genericExtSubhd.MiniFbContent",
+ FT_UINT16, BASE_DEC, NULL, MINI_FEEDBACK_CONTENT_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_pdu_sn_short,
+ {
+ "PDU Sequence Number", "wmx.genericExtSubhd.PduSnShort",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_ext_subheader_pdu_sn_long,
+ {
+ "PDU Sequence Number", "wmx.genericExtSubhd.PduSnLong",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ }
+ };
+
+ /* Mesh Subheader display */
+ static hf_register_info hf_mesh[] =
+ {
+ {
+ &hf_mac_header_generic_mesh_subheader,
+ {
+ "Xmt Node Id", "wmx.genericMeshSubhd",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ }
+ };
+
+ /* Fragmentation Subheader display */
+ static hf_register_info hf_frag[] =
+ {
+ {
+ &hf_mac_header_generic_frag_subhd_fc,
+ {
+ "Fragment Type", "wmx.genericFragSubhd.Fc",
+ FT_UINT8, BASE_DEC, VALS(frag_types), FRAGMENTATION_SUBHEADER_FC_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_frag_subhd_fc_ext,
+ {
+ "Fragment Type", "wmx.genericFragSubhd.FcExt",
+ FT_UINT16, BASE_DEC, VALS(frag_types), FRAGMENTATION_SUBHEADER_FC_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_frag_subhd_bsn,
+ {
+ "Block Sequence Number (BSN)", "wmx.genericFragSubhd.Bsn",
+ FT_UINT16, BASE_DEC, NULL, FRAGMENTATION_SUBHEADER_BSN_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_frag_subhd_fsn,
+ {
+ "Fragment Sequence Number (FSN)", "wmx.genericFragSubhd.Fsn",
+ FT_UINT8, BASE_DEC, NULL, FRAGMENTATION_SUBHEADER_FSN_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_frag_subhd_fsn_ext,
+ {
+ "Fragment Sequence Number (FSN)", "wmx.genericFragSubhd.FsnExt",
+ FT_UINT16, BASE_DEC, NULL, FRAGMENTATION_SUBHEADER_BSN_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_frag_subhd_rsv,
+ {
+ "Reserved", "wmx.genericFragSubhd.Rsv",
+ FT_UINT8, BASE_DEC, NULL, FRAGMENTATION_SUBHEADER_RSV_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_frag_subhd_rsv_ext,
+ {
+ "Reserved", "wmx.genericFragSubhd.RsvExt",
+ FT_UINT16, BASE_DEC, NULL, FRAGMENTATION_SUBHEADER_RSV_EXT_MASK,
+ NULL, HFILL
+ }
+ }
+ };
+
+ /* Packing Subheader display */
+ static hf_register_info hf_pack[] =
+ {
+ {
+ &hf_mac_header_generic_packing_subhd_fc,
+ {
+ "Fragment Type", "wmx.genericPackSubhd.Fc",
+ FT_UINT16, BASE_DEC, VALS(frag_types), PACKING_SUBHEADER_FC_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_packing_subhd_fc_ext,
+ {
+ "Fragment Type", "wmx.genericPackSubhd.FcExt",
+ FT_UINT24, BASE_HEX, VALS(frag_types), PACKING_SUBHEADER_FC_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_packing_subhd_bsn,
+ {
+ "First Block Sequence Number", "wmx.genericPackSubhd.Bsn",
+ FT_UINT24, BASE_DEC, NULL, PACKING_SUBHEADER_BSN_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_packing_subhd_fsn,
+ {
+ "Fragment Number", "wmx.genericPackSubhd.Fsn",
+ FT_UINT16, BASE_DEC, NULL, PACKING_SUBHEADER_FSN_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_packing_subhd_fsn_ext,
+ {
+ "Fragment Number", "wmx.genericPackSubhd.FsnExt",
+ FT_UINT24, BASE_DEC, NULL, PACKING_SUBHEADER_BSN_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_packing_subhd_len,
+ {
+ "Length", "wmx.genericPackSubhd.Len",
+ FT_UINT16, BASE_DEC, NULL, PACKING_SUBHEADER_LENGTH_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_packing_subhd_len_ext,
+ {
+ "Length", "wmx.genericPackSubhd.LenExt",
+ FT_UINT24, BASE_DEC, NULL, PACKING_SUBHEADER_LENGTH_EXT_MASK,
+ NULL, HFILL
+ }
+ }
+ };
+
+ /* Fast-feedback Allocation Subheader display */
+ static hf_register_info hf_fast[] =
+ {
+ {
+ &hf_mac_header_generic_fast_fb_subhd_alloc_offset,
+ {
+ "Allocation Offset", "wmx.genericFastFbSubhd.AllocOffset",
+ FT_UINT8, BASE_DEC, NULL, FAST_FEEDBACK_ALLOCATION_OFFSET_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_fast_fb_subhd_fb_type,
+ {
+ "Feedback Type", "wmx.genericFastFbSubhd.FbType",
+ FT_UINT8, BASE_DEC, VALS(fast_fb_types), FAST_FEEDBACK_FEEDBACK_TYPE_MASK,
+ NULL, HFILL
+ }
+ }
+ };
+
+ /* Grant Management Subheader display */
+ static hf_register_info hf_grant[] =
+ {
+ {
+ &hf_mac_header_generic_grant_mgmt_ext_pbr_tree,
+ {
+ "Scheduling Service Type (Default)",
+ "wmx.genericGrantSubhd.Default",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_grant_mgmt_subhd_pbr,
+ {
+ "PiggyBack Request", "wmx.genericGrantSubhd.Pbr",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_grant_mgmt_ugs_tree,
+ {
+ "Scheduling Service Type (UGS)", "wmx.genericGrantSubhd.UGS",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_grant_mgmt_subhd_ugs_si,
+ {
+ "Slip Indicator", "wmx.genericGrantSubhd.Si",
+ FT_UINT16, BASE_DEC, VALS(si_msgs), GRANT_MGMT_SUBHEADER_UGS_SI_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_grant_mgmt_subhd_ugs_pm,
+ {
+ "Poll-Me", "wmx.genericGrantSubhd.Pm",
+ FT_UINT16, BASE_DEC, VALS(pm_msgs), GRANT_MGMT_SUBHEADER_UGS_PM_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_grant_mgmt_subhd_ugs_fli,
+ {
+ "Frame Latency Indication", "wmx.genericGrantSubhd.Fli",
+ FT_UINT16, BASE_DEC, VALS(fli_msgs), GRANT_MGMT_SUBHEADER_UGS_FLI_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_grant_mgmt_subhd_ugs_fl,
+ {
+ "Frame Latency", "wmx.genericGrantSubhd.Fl",
+ FT_UINT16, BASE_DEC, NULL, GRANT_MGMT_SUBHEADER_UGS_FL_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_grant_mgmt_subhd_ugs_rsv,
+ {
+ "Reserved", "wmx.genericGrantSubhd.Rsv",
+ FT_UINT16, BASE_DEC, NULL, GRANT_MGMT_SUBHEADER_UGS_RSV_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_grant_mgmt_ext_rtps_tree,
+ {
+ "Scheduling Service Type (Extended rtPS)",
+ "wmx.genericGrantSubhd.ExtendedRTPS",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_grant_mgmt_subhd_ext_pbr,
+ {
+ "Extended PiggyBack Request", "wmx.genericGrantSubhd.ExtPbr",
+ FT_UINT16, BASE_DEC, NULL, GRANT_MGMT_SUBHEADER_EXT_PBR_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_grant_mgmt_subhd_ext_fli,
+ {
+ "Frame Latency Indication", "wmx.genericGrantSubhd.ExtFli",
+ FT_UINT16, BASE_DEC, VALS(fli_msgs), GRANT_MGMT_SUBHEADER_EXT_FLI_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_grant_mgmt_subhd_ext_fl,
+ {
+ "Frame Latency", "wmx.genericGrantSubhd.ExtFl",
+ FT_UINT16, BASE_DEC, NULL, GRANT_MGMT_SUBHEADER_EXT_FL_MASK,
+ NULL, HFILL
+ }
+ }
+ };
+
+ /* ARQ Feedback Payload display */
+ static hf_register_info hf_arq[] =
+ {
+ {
+ &hf_mac_header_generic_arq_fb_ie_cid,
+ {
+ "CID", "wmx.genericArq.FbIeCid",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_arq_fb_ie_last,
+ {
+ "Last IE", "wmx.genericArq.FbIeLast",
+ FT_UINT16, BASE_DEC, VALS(last_ie_msgs), ARQ_FB_IE_LAST_BIT_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_arq_fb_ie_ack_type,
+ {
+ "ACK Type", "wmx.genericArq.FbIeAckType",
+ FT_UINT16, BASE_DEC, NULL, ARQ_FB_IE_ACK_TYPE_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_arq_fb_ie_bsn,
+ {
+ "BSN", "wmx.genericArq.FbIeBsn",
+ FT_UINT16, BASE_DEC, NULL, ARQ_FB_IE_BSN_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_arq_fb_ie_num_maps,
+ {
+ "Number of ACK Maps", "wmx.genericArq.FbIeMaps",
+ FT_UINT16, BASE_DEC, NULL, ARQ_FB_IE_NUM_MAPS_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_ack_type_reserved,
+ {
+ "Reserved", "wmx.genericArq.FbIeRsvd", FT_UINT16, BASE_DEC, NULL, 0x03, NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_arq_fb_ie_sel_ack_map,
+ {
+ "Selective ACK Map", "wmx.genericArq.FbIeSelAckMap",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_arq_fb_ie_seq_format,
+ {
+ "Sequence Format", "wmx.genericArq.FbIeSeqFmt",
+ FT_UINT16, BASE_DEC, NULL, ARQ_FB_IE_SEQ_FORMAT_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_arq_fb_ie_seq_ack_map,
+ {
+ "Sequence ACK Map", "wmx.genericArq.FbIeSeqAckMap",
+ FT_UINT16, BASE_HEX, NULL, ARQ_FB_IE_SEQ_ACK_MAP_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_arq_fb_ie_seq1_length,
+ {
+ "Sequence 1 Length", "wmx.genericArq.FbIeSeq1Len",
+ FT_UINT16, BASE_DEC, NULL, ARQ_FB_IE_SEQ1_LENGTH_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_arq_fb_ie_seq2_length,
+ {
+ "Sequence 2 Length", "wmx.genericArq.FbIeSeq2Len",
+ FT_UINT16, BASE_DEC, NULL, ARQ_FB_IE_SEQ2_LENGTH_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_arq_fb_ie_seq3_length,
+ {
+ "Sequence 3 Length", "wmx.genericArq.FbIeSeq3Len",
+ FT_UINT16, BASE_DEC, NULL, ARQ_FB_IE_SEQ3_LENGTH_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_arq_fb_ie_seq_ack_map_2,
+ {
+ "Sequence ACK Map", "wmx.genericArq.FbIeSeqAckMap2",
+ FT_UINT16, BASE_HEX, NULL, ARQ_FB_IE_SEQ_ACK_MAP_2_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_arq_fb_ie_seq1_length_6,
+ {
+ "Sequence 1 Length", "wmx.genericArq.FbIeSeq1Len",
+ FT_UINT16, BASE_DEC, NULL, ARQ_FB_IE_SEQ1_LENGTH_6_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_arq_fb_ie_seq2_length_6,
+ {
+ "Sequence 2 Length", "wmx.genericArq.FbIeSeq2Len",
+ FT_UINT16, BASE_DEC, NULL, ARQ_FB_IE_SEQ2_LENGTH_6_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_generic_arq_fb_ie_rsv,
+ {
+ "Reserved", "wmx.genericArq.FbIeRsv",
+ FT_UINT16, BASE_DEC, NULL, ARQ_FB_IE_RSV_MASK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_payload_fragment,
+ {
+ "Payload Fragment", "wmx.payload_fragment",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_header_generic_decoder,
+ /* &ett_mac_subheader_decoder, */
+ &ett_mac_mesh_subheader_decoder,
+ &ett_mac_frag_subheader_decoder,
+ &ett_mac_grant_mgmt_subheader_decoder,
+ &ett_mac_pkt_subheader_decoder,
+ &ett_mac_fast_fb_subheader_decoder,
+ &ett_mac_ext_subheader_decoder,
+ &ett_mac_ext_subheader_dl_decoder,
+ &ett_mac_ext_subheader_ul_decoder,
+ &ett_mac_arq_fb_payload_decoder,
+ &ett_mac_data_pdu_decoder,
+ };
+
+ static ei_register_info ei[] = {
+ { &ei_mac_crc_malformed, { "wmx.genericCrc.missing", PI_MALFORMED, PI_ERROR, "CRC missing - the frame is too short", EXPFILL }},
+ { &ei_mac_crc_missing, { "wmx.genericCrc.missing", PI_PROTOCOL, PI_NOTE, "CRC is not included in this frame!", EXPFILL }},
+ { &ei_mac_header_generic_crc, { "wmx.genericCrc.bad_checksum", PI_CHECKSUM, PI_ERROR, "Bad checksum", EXPFILL }},
+ };
+
+ expert_module_t* expert_mac_header_generic;
+
+ proto_mac_header_generic_decoder = proto_register_protocol (
+ "WiMax Generic/Type1/Type2 MAC Header Messages", /* name */
+ "WiMax Generic/Type1/Type2 MAC Header (hdr)", /* short name */
+ "wmx.hdr" /* abbrev */
+ );
+
+ /* register the field display messages */
+ proto_register_field_array(proto_mac_header_generic_decoder, hf, array_length(hf));
+ proto_register_field_array(proto_mac_header_generic_decoder, hf_ext, array_length(hf_ext));
+ proto_register_field_array(proto_mac_header_generic_decoder, hf_mesh, array_length(hf_mesh));
+ proto_register_field_array(proto_mac_header_generic_decoder, hf_frag, array_length(hf_frag));
+ proto_register_field_array(proto_mac_header_generic_decoder, hf_pack, array_length(hf_pack));
+ proto_register_field_array(proto_mac_header_generic_decoder, hf_fast, array_length(hf_fast));
+ proto_register_field_array(proto_mac_header_generic_decoder, hf_grant, array_length(hf_grant));
+ proto_register_field_array(proto_mac_header_generic_decoder, hf_arq, array_length(hf_arq));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ expert_mac_header_generic = expert_register_protocol(proto_mac_header_generic_decoder);
+ expert_register_field_array(expert_mac_header_generic, ei, array_length(ei));
+
+ /* register the generic mac header dissector */
+ register_dissector("mac_header_generic_handler", dissect_mac_header_generic_decoder, proto_mac_header_generic_decoder);
+
+ /* Register the payload fragment table init routine */
+ register_init_routine(wimax_defragment_init);
+ register_cleanup_routine(wimax_defragment_cleanup);
+ reassembly_table_register(&payload_reassembly_table,
+ &addresses_reassembly_table_functions);
+}
+
+void
+wimax_proto_reg_handoff_mac_header_generic(void)
+{
+ mac_mgmt_msg_decoder_handle = find_dissector("wmx_mac_mgmt_msg_decoder");
+ mac_ip_handle = find_dissector("ip");
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/mac_hd_type1_decoder.c b/plugins/epan/wimax/mac_hd_type1_decoder.c
new file mode 100644
index 0000000000..50a9178710
--- /dev/null
+++ b/plugins/epan/wimax/mac_hd_type1_decoder.c
@@ -0,0 +1,572 @@
+/* mac_hd_type1_decoder.c
+ * WiMax MAC Type I Signaling Header decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* TODO: Add FT_UINT24 and FT_INT24 cases to gtk_widget_get_toplevel()
+ * to prevent having to make all the changes from BASE_DEC to BASE_HEX
+ * made to this file today: 10/20/06.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+/*
+#define DEBUG
+*/
+
+#include <epan/packet.h>
+#include "wimax-int.h"
+
+extern gint proto_mac_header_generic_decoder;
+
+static gint proto_mac_header_type_1_decoder = -1;
+static gint ett_mac_header_type_1_decoder = -1;
+static gint hf_mac_header_type_1_value_bytes = -1;
+
+#define WIMAX_MAC_HEADER_SIZE 6
+
+/* WiMax MAC Header Type I Sub Types */
+typedef enum
+{
+ BR_INCREMENTAL, /* 0 */
+ BR_AGGREGATE, /* 1 */
+ PHY_CHANNEL_REPORT, /* 2 */
+ BR_WITH_UL_TX_POWER_REPORT,/* 3 */
+ BR_AND_CINR_REPORT, /* 4 */
+ BR_WITH_UL_SLEEP_CONTROL, /* 5 */
+ SN_REPORT, /* 6 */
+ CQICH_ALLOCATION_REQUEST, /* 7 */
+ TYPE_I_SUBTYPE_MAX
+} TYPE_I_SUBTYPE_e;
+
+static const char *type1_subtype_abbrv[TYPE_I_SUBTYPE_MAX] =
+{
+ "BR INCREMENTAL", /* 0 */
+ "BR AGGREGATE", /* 1 */
+ "PHY CHANNEL_REPORT", /* 2 */
+ "BR WITH UL TX POWER_REPORT",/* 3 */
+ "BR AND CINR REPORT", /* 4 */
+ "BR WITH UL SLEEP CONTROL", /* 5 */
+ "SN REPORT", /* 6 */
+ "CQICH ALLOCATION REQUEST" /* 7 */
+};
+
+#define WIMAX_MAC_HEADER_TYPE_1_SUB_TYPE_MASK 0x38
+
+/* WIMAX MAC HEADER TYPE I FILEDS */
+/* 1st to 3rd bytes */
+/* Common Fields */
+#define WIMAX_MAC_HEADER_TYPE_1_HT 0x800000
+#define WIMAX_MAC_HEADER_TYPE_1_EC 0x400000
+#define WIMAX_MAC_HEADER_TYPE_1_TYPE 0x380000
+/* Bandwidth Request Incremental Header (type 0) &
+ Bandwidth Request Aggregate Header (type 1) only */
+#define WIMAX_MAC_HEADER_TYPE_1_BR 0x07FFFF
+/* PHY Channel Report Header (type 2) only */
+#define WIMAX_MAC_HEADER_TYPE_1_DIUC 0x078000
+#define WIMAX_MAC_HEADER_TYPE_1_UL_TX_PWR 0x007F80
+#define WIMAX_MAC_HEADER_TYPE_1_UL_HDRM 0x00007E
+#define WIMAX_MAC_HEADER_TYPE_1_RSV_2 0x000001
+/* Bandwidth Request and UL TX Power Report Header (type 3),
+ Bandwidth Request and CINR Report Header (type 4), &
+ Bandwidth Request and Uplink Sleep Control Header (type 5) only */
+#define WIMAX_MAC_HEADER_TYPE_1_BR_3 0x07FF00
+/* Bandwidth Request and UL TX Power Report Header (type 3) only */
+#define WIMAX_MAC_HEADER_TYPE_1_UL_TX_PWR_3 0x0000FF
+/* Bandwidth Request and CINR Report Header (type 4) only */
+#define WIMAX_MAC_HEADER_TYPE_1_CINR 0x0000FE
+#define WIMAX_MAC_HEADER_TYPE_1_DCI 0x000001
+/* Bandwidth Request and Uplink Sleep Control Header (type 5) only */
+#define WIMAX_MAC_HEADER_TYPE_1_PSCID 0x0000FC
+#define WIMAX_MAC_HEADER_TYPE_1_OP 0x000002
+#define WIMAX_MAC_HEADER_TYPE_1_RSV_5 0x000001
+/* SN Report Header (type 6) only */
+#define WIMAX_MAC_HEADER_TYPE_1_LAST 0x040000
+#define WIMAX_MAC_HEADER_TYPE_1_SDU_SN1 0x03F000
+#define WIMAX_MAC_HEADER_TYPE_1_SDU_SN2 0x000FC0
+#define WIMAX_MAC_HEADER_TYPE_1_SDU_SN3 0x00003F
+/* CQICH Allocation Request (type 7) only */
+#define WIMAX_MAC_HEADER_TYPE_1_FB_TYPE 0x070000
+#define WIMAX_MAC_HEADER_TYPE_1_FBSSI 0x008000
+#define WIMAX_MAC_HEADER_TYPE_1_PERIOD 0x007000
+#define WIMAX_MAC_HEADER_TYPE_1_RSV_7 0x000FFF
+/* 4th to 6th bytes */
+/*#define WIMAX_MAC_HEADER_TYPE_1_CID 0xFFFF
+ *#define WIMAX_MAC_HEADER_TYPE_1_HCS 0xFF
+ */
+/* Common Fields */
+static int hf_mac_header_type_1_ht = -1;
+static int hf_mac_header_type_1_ec = -1;
+static int hf_mac_header_type_1_type = -1;
+/* type 0 & type 1 only */
+static int hf_mac_header_type_1_br = -1;
+/* type 3, type 4, & type 5 only */
+static int hf_mac_header_type_1_br_3 = -1;
+/* type 2 only */
+static int hf_mac_header_type_1_diuc = -1;
+static int hf_mac_header_type_1_ultxpwr = -1;
+static int hf_mac_header_type_1_ulhdrm = -1;
+static int hf_mac_header_type_1_rsv_2 = -1;
+/* type 3 only */
+static int hf_mac_header_type_1_ultxpwr_3 = -1;
+/* type 4 only */
+static int hf_mac_header_type_1_cinr = -1;
+static int hf_mac_header_type_1_dci = -1;
+/* type 5 only */
+static int hf_mac_header_type_1_pscid = -1;
+static int hf_mac_header_type_1_op = -1;
+static int hf_mac_header_type_1_rsv_5 = -1;
+/* type 6 only */
+static int hf_mac_header_type_1_last = -1;
+static int hf_mac_header_type_1_sdu_sn1 = -1;
+static int hf_mac_header_type_1_sdu_sn2 = -1;
+static int hf_mac_header_type_1_sdu_sn3 = -1;
+/* type 7 only */
+static int hf_mac_header_type_1_fb_type = -1;
+static int hf_mac_header_type_1_fbssi = -1;
+static int hf_mac_header_type_1_period = -1;
+static int hf_mac_header_type_1_rsv_7 = -1;
+/* Common Fields */
+static int hf_mac_header_type_1_cid = -1;
+static int hf_mac_header_type_1_hcs = -1;
+
+/* MAC Header Type I Sub-Types */
+static const value_string sub_types[] =
+{
+ { BR_INCREMENTAL, "Bandwidth Request Incremental" },
+ { BR_AGGREGATE, "Bandwidth Request Aggregate" },
+ { PHY_CHANNEL_REPORT, "PHY Channel Report" },
+ { BR_WITH_UL_TX_POWER_REPORT, "Bandwidth Request with UL TX Power Report" },
+ { BR_AND_CINR_REPORT, "Bandwidth Request and CINR Report" },
+ { BR_WITH_UL_SLEEP_CONTROL, "Bandwidth Request with Sleep Control" },
+ { SN_REPORT, "SN Report" },
+ { CQICH_ALLOCATION_REQUEST, "CQICH Allocation Request" },
+ { 0, NULL}
+};
+
+/* Feedback Types (need to be changed for type I) */
+static const value_string fb_types[] =
+{
+ { 0, "CQI and MIMO Feedback" },
+ { 1, "DL average CINR" },
+ { 2, "MIMO Coefficients Feedback" },
+ { 3, "Preferred DL Channel DIUC Feedback" },
+ { 4, "UL Transmission Power" },
+ { 5, "PHY Channel Feedback" },
+ { 6, "AMC Band Indication Bitmap" },
+ { 7, "Life Span of Short-term Precoding Feedback" },
+ { 0, NULL}
+};
+
+/* DCD Change Indication messages */
+static const value_string dci_msgs[] =
+{
+ { 0, "Match DCD Change Count" },
+ { 1, "Mismatch DCD Change Count" },
+ { 0, NULL}
+};
+
+/* Operation messages */
+static const value_string op_msgs[] =
+{
+ { 0, "Deactivate Power Saving Class" },
+ { 1, "Activate Power Saving Class" },
+ { 0, NULL}
+};
+
+/* Last ARQ BSN or SDU SN Indication messages */
+static const value_string last_msgs[] =
+{
+ { 0, "First three connections" },
+ { 1, "Last three connections" },
+ { 0, NULL}
+};
+
+static int dissect_mac_header_type_1_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ gint tvb_len, offset = 0;
+ guint first_byte, sub_type;
+ proto_item *parent_item = NULL;
+ proto_item *ti = NULL;
+ proto_tree *ti_tree = NULL;
+
+ if (tree)
+ { /* we are being asked for details */
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display the MAC Type I Header message */
+ ti = proto_tree_add_protocol_format(tree, proto_mac_header_type_1_decoder, tvb, offset, tvb_len, "Mac Type I Header (%u bytes)", WIMAX_MAC_HEADER_SIZE);
+ /* add subtree */
+ ti_tree = proto_item_add_subtree(ti, ett_mac_header_type_1_decoder);
+ if(tvb_len < WIMAX_MAC_HEADER_SIZE)
+ {
+ /* display the MAC Type I Header in Hex */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_value_bytes, tvb, offset, tvb_len, ENC_NA);
+ return tvb_captured_length(tvb);
+ }
+#ifdef DEBUG
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, type1_subtype_abbrv[]);
+#endif
+ /* get the parent */
+ parent_item = proto_tree_get_parent(tree);
+ /* Decode and display the first 3 bytes of the header */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_ht, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_ec, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_type, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Get the first byte */
+ first_byte = tvb_get_guint8(tvb, offset);
+ /* get the sub Type */
+ sub_type = ((first_byte & WIMAX_MAC_HEADER_TYPE_1_SUB_TYPE_MASK)>>3);
+ if(sub_type < TYPE_I_SUBTYPE_MAX)
+ {
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, type1_subtype_abbrv[sub_type]);
+ }
+ else
+ {
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Unknown type 1 subtype");
+ /* display MAC Header Type I Subtype */
+ proto_tree_add_protocol_format(ti_tree, proto_mac_header_type_1_decoder, tvb, offset, tvb_len, "Unknown type 1 subtype: %u", sub_type);
+ /* display the MAC Type I Header in Hex */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_value_bytes, tvb, offset, tvb_len, ENC_NA);
+ return tvb_captured_length(tvb);
+ }
+ /* add the MAC header info */
+ proto_item_append_text(parent_item, "%s", type1_subtype_abbrv[sub_type]);
+ switch (sub_type)
+ {
+ case BR_INCREMENTAL:
+ case BR_AGGREGATE:
+ /* Decode and display the Bandwidth Request */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_br, tvb, offset, 3, ENC_BIG_ENDIAN);
+ break;
+ case PHY_CHANNEL_REPORT:
+ /* Decode and display the Preferred-DIUC */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_diuc, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the UL TX Power */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_ultxpwr, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the UL Headroom */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_ulhdrm, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the reserved filed */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_rsv_2, tvb, offset, 3, ENC_BIG_ENDIAN);
+ break;
+ case BR_WITH_UL_TX_POWER_REPORT:
+ /* Decode and display the Bandwidth Request */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_br_3, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the UL TX Power */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_ultxpwr_3, tvb, offset, 3, ENC_BIG_ENDIAN);
+ break;
+ case BR_AND_CINR_REPORT:
+ /* Decode and display the Bandwidth Request */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_br_3, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the CINR */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_cinr, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the DCD Change Indication */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_dci, tvb, offset, 3, ENC_BIG_ENDIAN);
+ break;
+ case BR_WITH_UL_SLEEP_CONTROL:
+ /* Decode and display the Bandwidth Request */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_br_3, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the Power Saving Class ID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_pscid, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the Operation */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_op, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the reserved filed */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_rsv_5, tvb, offset, 3, ENC_BIG_ENDIAN);
+ break;
+ case SN_REPORT:
+ /* Decode and display the Last field */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_last, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the SDU SN1 */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_sdu_sn1, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the SDU SN2 */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_sdu_sn2, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the SDU SN3 */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_sdu_sn3, tvb, offset, 3, ENC_BIG_ENDIAN);
+ break;
+ case CQICH_ALLOCATION_REQUEST:
+ /* Decode and display the Feedback Type */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_fb_type, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the FBSSI */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_fbssi, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the Prreferred-period */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_period, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the reserved filed */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_rsv_7, tvb, offset, 3, ENC_BIG_ENDIAN);
+ break;
+ }
+ /* Decode and display the CID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_cid, tvb, (offset+3), 2, ENC_BIG_ENDIAN);
+ /* Decode and display the HCS */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_1_hcs, tvb, (offset+5), 1, ENC_BIG_ENDIAN);
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac Header Type II Protocol and Dissector */
+void wimax_proto_register_mac_header_type_1(void)
+{
+ /* TLV display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_mac_header_type_1_value_bytes,
+ {
+ "Values", "wmx.type1ValueBytes",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_ht,
+ {
+ "MAC Header Type", "wmx.type1Ht",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_HT,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_ec,
+ {
+ "MAC Encryption Control", "wmx.type1Ec",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_EC,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_type,
+ {
+ "MAC Sub-Type", "wmx.type1Type",
+ FT_UINT24, BASE_HEX, VALS(sub_types), WIMAX_MAC_HEADER_TYPE_1_TYPE,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_br,
+ {
+ "Bandwidth Request", "wmx.type1Br",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_BR,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_br_3,
+ {
+ "Bandwidth Request", "wmx.type1Br3",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_BR_3,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_fb_type,
+ {
+ "Feedback Type", "wmx.type1FbType",
+ FT_UINT24, BASE_HEX, VALS(fb_types), WIMAX_MAC_HEADER_TYPE_1_FB_TYPE,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_diuc,
+ {
+ "Preferred DIUC Index", "wmx.type1Diuc",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_DIUC,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_ultxpwr,
+ {
+ "UL TX Power", "wmx.type1UlTxPwr",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_UL_TX_PWR,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_ultxpwr_3,
+ {
+ "UL TX Power", "wmx.type1UlTxPwr3",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_UL_TX_PWR_3,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_ulhdrm,
+ {
+ "Headroom to UL Max Power Level", "wmx.type1HdRm",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_UL_HDRM,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_cinr,
+ {
+ "CINR Value", "wmx.type1Cinr",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_CINR,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_dci,
+ {
+ "DCD Change Indication", "wmx.type1Dci",
+ FT_UINT24, BASE_HEX, VALS(dci_msgs), WIMAX_MAC_HEADER_TYPE_1_DCI,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_pscid,
+ {
+ "Power Saving Class ID", "wmx.type1PsCid",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_PSCID,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_op,
+ {
+ "Operation", "wmx.type1Op",
+ FT_UINT24, BASE_HEX, VALS(op_msgs), WIMAX_MAC_HEADER_TYPE_1_OP,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_last,
+ {
+ "Last ARQ BSN or SDU SN", "wmx.type1Last",
+ FT_UINT24, BASE_HEX, VALS(last_msgs), WIMAX_MAC_HEADER_TYPE_1_LAST,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_sdu_sn1,
+ {
+ "ARQ BSN or MAC SDU SN (1)", "wmx.type1SduSn1",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_SDU_SN1,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_sdu_sn2,
+ {
+ "ARQ BSN or MAC SDU SN (2)", "wmx.type1SduSn2",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_SDU_SN2,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_sdu_sn3,
+ {
+ "ARQ BSN or MAC SDU SN (3)", "wmx.type1SduSn3",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_SDU_SN3,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_fbssi,
+ {
+ "FBSS Indicator", "wmx.type1Fbssi",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_FBSSI,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_period,
+ {
+ "Preferred CQICH Allocation Period", "wmx.type1Period",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_PERIOD,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_rsv_2,
+ {
+ "Reserved", "wmx.type1Rsv2",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_RSV_2,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_rsv_5,
+ {
+ "Reserved", "wmx.type1Rsv5",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_RSV_5,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_rsv_7,
+ {
+ "Reserved", "wmx.type1Rsv7",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_1_RSV_7,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_cid,
+ {
+ "Connection ID", "wmx.type1Cid",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_1_hcs,
+ {
+ "Header Check Sequence", "wmx.type1Hcs",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL
+ }
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_header_type_1_decoder,
+ };
+
+ proto_mac_header_type_1_decoder = proto_mac_header_generic_decoder;
+
+ proto_register_field_array(proto_mac_header_type_1_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ register_dissector("mac_header_type_1_handler", dissect_mac_header_type_1_decoder, proto_mac_header_type_1_decoder);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/mac_hd_type2_decoder.c b/plugins/epan/wimax/mac_hd_type2_decoder.c
new file mode 100644
index 0000000000..4cb74c96b6
--- /dev/null
+++ b/plugins/epan/wimax/mac_hd_type2_decoder.c
@@ -0,0 +1,1382 @@
+/* mac_hd_type2_decoder.c
+ * WiMax MAC Type II Signaling Header decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* TODO: Add FT_UINT24 and FT_INT24 cases to gtk_widget_get_toplevel()
+ * to prevent having to make all the changes from BASE_DEC to BASE_HEX
+ * made to this file today: 10/20/06.
+ */
+
+/*
+#define DEBUG
+*/
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax-int.h"
+
+extern gint proto_mac_header_generic_decoder;
+
+static gint proto_mac_header_type_2_decoder = -1;
+static gint ett_mac_header_type_2_decoder = -1;
+static gint hf_mac_header_type_2_value_bytes = -1;
+
+#define WIMAX_MAC_HEADER_SIZE 6
+
+/* WiMax MAC Header Type II Feedback Types */
+typedef enum
+{
+ CQI_MIMO_FB, /* 0 */
+ DL_AVG_CINR, /* 1 */
+ MIMO_COEF_FB, /* 2 */
+ PREF_DL_CHAN_DIUC_FB,/* 3 */
+ UL_TX_PWR, /* 4 */
+ PHY_CHAN_FB, /* 5 */
+ AMC_BAND_BITMAP, /* 6 */
+ SHORT_PRECODE_FB, /* 7 */
+ MULTI_TYPES_FB, /* 8 */
+ LONG_PRECODE_FB, /* 9 */
+ COMB_DL_AVG_CINR, /* 10 */
+ MIMO_CHAN_FB, /* 11 */
+ CINR_FB, /* 12 */
+ CL_MIMO_FB, /* 13 */
+ TYPE_II_FB_TYPE_MAX
+} TYPE_II_FB_TYPE_e;
+
+static const char *type2_fb_type_abbrv[TYPE_II_FB_TYPE_MAX] =
+{
+ "CQI and MIMO Feedback",
+ "DL average CINR",
+ "MIMO Coefficients Feedback",
+ "Preferred DL Channel DIUC Feedback",
+ "UL Transmission Power",
+ "PHY Channel Feedback",
+ "AMC Band Indication Bitmap",
+ "Life Span of Short-term Precoding Feedback",
+ "Multiple Types of Feedback",
+ "Long-term Precoding Feedback",
+ "Combined DL Average CINR of Active BSs",
+ "MIMO Channel Feedback",
+ "CINR Feedback",
+ "Close-loop MIMO Feedback"
+};
+
+/* WIMAX MAC HEADER TYPE II FILEDS */
+/* first byte */
+#define WIMAX_MAC_HEADER_TYPE_2_HT 0x80
+#define WIMAX_MAC_HEADER_TYPE_2_EC 0x40
+#define WIMAX_MAC_HEADER_TYPE_2_TYPE 0x20
+#define WIMAX_MAC_HEADER_TYPE_2_CII 0x10
+#define WIMAX_MAC_HEADER_TYPE_2_FB_TYPE 0x0F
+static int hf_mac_header_type_2_ht = -1;
+static int hf_mac_header_type_2_ec = -1;
+static int hf_mac_header_type_2_type = -1;
+static int hf_mac_header_type_2_cii = -1;
+static int hf_mac_header_type_2_fb_type = -1;
+
+/* 2nd to 5th bytes (varies by different fb types) */
+static int hf_mac_header_type_2_cid = -1;
+static int hf_mac_header_type_2_no_cid = -1;
+/* CQI and MIMO Feedback */
+/* 2nd & 3rd bytes */
+#define WIMAX_MAC_HEADER_TYPE_2_CQI_FB_TYPE 0xE000
+#define WIMAX_MAC_HEADER_TYPE_2_CQI_PAYLOAD 0x1F80
+#define WIMAX_MAC_HEADER_TYPE_2_CQI_RSV 0x007F
+static int hf_mac_header_type_2_cqi_fb_type = -1;
+static int hf_mac_header_type_2_cqi_payload = -1;
+static int hf_mac_header_type_2_cqi_rsv = -1;
+/* 4th & 5th without CID */
+/*#define WIMAX_MAC_HEADER_TYPE_2_NO_CID 0xFFFF*/
+
+/* DL average CINR */
+/* 2nd byte */
+#define WIMAX_MAC_HEADER_TYPE_2_DL_AVE_CINR 0xF800
+#define WIMAX_MAC_HEADER_TYPE_2_DL_AVE_RSV 0x07FF
+static int hf_mac_header_type_2_dl_ave_cinr = -1;
+static int hf_mac_header_type_2_dl_ave_rsv = -1;
+
+/* MIMO Coefficients Feedback */
+/* 2nd & 3rd bytes */
+#define WIMAX_MAC_HEADER_TYPE_2_MIMO_COEF_NI 0xC000
+#define WIMAX_MAC_HEADER_TYPE_2_MIMO_COEF_AI 0x3000
+#define WIMAX_MAC_HEADER_TYPE_2_MIMO_COEF 0x0F80
+#define WIMAX_MAC_HEADER_TYPE_2_MIMO_COEF_RSV 0x007F
+static int hf_mac_header_type_2_mimo_coef_ni = -1;
+static int hf_mac_header_type_2_mimo_coef_ai = -1;
+static int hf_mac_header_type_2_mimo_coef = -1;
+static int hf_mac_header_type_2_mimo_coef_rsv = -1;
+
+/* Preferred DL Channel DIUC Feedback */
+/* 2nd byte */
+#define WIMAX_MAC_HEADER_TYPE_2_DL_CHAN_DIUC 0xF000
+#define WIMAX_MAC_HEADER_TYPE_2_DL_CHAN_DCD 0x0F00
+#define WIMAX_MAC_HEADER_TYPE_2_DL_CHAN_RSV 0x00FF
+static int hf_mac_header_type_2_dl_chan_diuc = -1;
+static int hf_mac_header_type_2_dl_chan_dcd = -1;
+static int hf_mac_header_type_2_dl_chan_rsv = -1;
+
+/* UL Transmission Power */
+/* 2nd byte */
+#define WIMAX_MAC_HEADER_TYPE_2_UL_TX_PWR 0xFF00
+#define WIMAX_MAC_HEADER_TYPE_2_UL_TX_PWR_RSV 0x00FF
+static int hf_mac_header_type_2_ul_tx_pwr = -1;
+static int hf_mac_header_type_2_ul_tx_pwr_rsv = -1;
+
+/* PHY Channel Feedback */
+/* 2nd to 4th bytes */
+#define WIMAX_MAC_HEADER_TYPE_2_PHY_DIUC 0xF00000
+#define WIMAX_MAC_HEADER_TYPE_2_PHY_UL_TX_PWR 0x0FF000
+#define WIMAX_MAC_HEADER_TYPE_2_PHY_UL_HDRM 0x000FC0
+#define WIMAX_MAC_HEADER_TYPE_2_PHY_RSV 0x00003F
+static int hf_mac_header_type_2_phy_diuc = -1;
+static int hf_mac_header_type_2_phy_ul_tx_pwr = -1;
+static int hf_mac_header_type_2_phy_ul_hdrm = -1;
+static int hf_mac_header_type_2_phy_rsv = -1;
+
+/* AMC Band Indication Bitmap */
+/* 2nd to 5th bytes */
+#define WIMAX_MAC_HEADER_TYPE_2_AMC_BITMAP 0xFFF00000
+#define WIMAX_MAC_HEADER_TYPE_2_AMC_CQI_1 0x000F8000
+#define WIMAX_MAC_HEADER_TYPE_2_AMC_CQI_2 0x00007C00
+#define WIMAX_MAC_HEADER_TYPE_2_AMC_CQI_3 0x000003E0
+#define WIMAX_MAC_HEADER_TYPE_2_AMC_CQI_4 0x0000001F
+static int hf_mac_header_type_2_amc_bitmap = -1;
+static int hf_mac_header_type_2_amc_cqi_1 = -1;
+static int hf_mac_header_type_2_amc_cqi_2 = -1;
+static int hf_mac_header_type_2_amc_cqi_3 = -1;
+static int hf_mac_header_type_2_amc_cqi_4 = -1;
+
+/* Life Span of Short-term Precoding Feedback */
+/* 2nd byte */
+#define WIMAX_MAC_HEADER_TYPE_2_LIFE_SPAN 0xF000
+#define WIMAX_MAC_HEADER_TYPE_2_LIFE_SPAN_RSV 0x0FFF
+static int hf_mac_header_type_2_life_span = -1;
+static int hf_mac_header_type_2_life_span_rsv = -1;
+
+/* Multiple Types of Feedback */
+/* 2nd to 5th bytes ??? */
+#define WIMAX_MAC_HEADER_TYPE_2_MT_NUM_FB_TYPES 0xC0000000
+#define WIMAX_MAC_HEADER_TYPE_2_MT_OCCU_FB_TYPE 0x3C000000
+#define WIMAX_MAC_HEADER_TYPE_2_MT_FB_CONTENTS 0x03FFFFFF
+static int hf_mac_header_type_2_mt_num_fb_types = -1;
+static int hf_mac_header_type_2_mt_occu_fb_type = -1;
+static int hf_mac_header_type_2_mt_fb_contents = -1;
+
+/* Long-term Precoding Feedback */
+/* 2nd & 3rd bytes */
+#define WIMAX_MAC_HEADER_TYPE_2_LT_ID_FB 0xFC00
+#define WIMAX_MAC_HEADER_TYPE_2_LT_RANK 0x0300
+#define WIMAX_MAC_HEADER_TYPE_2_LT_FEC_QAM 0x00FC
+#define WIMAX_MAC_HEADER_TYPE_2_LT_RSV 0x0003
+static int hf_mac_header_type_2_lt_id_fb = -1;
+static int hf_mac_header_type_2_lt_rank = -1;
+static int hf_mac_header_type_2_lt_fec_qam = -1;
+static int hf_mac_header_type_2_lt_rsv = -1;
+
+/* Combined DL Average CINR of Active BSs */
+/* 2nd & 3rd bytes */
+#define WIMAX_MAC_HEADER_TYPE_2_COMB_DL_AVE 0xF800
+#define WIMAX_MAC_HEADER_TYPE_2_COMB_DL_RSV 0x0EFF
+static int hf_mac_header_type_2_comb_dl_ave = -1;
+static int hf_mac_header_type_2_comb_dl_rsv = -1;
+
+/* MIMO Channel Feedback */
+/* 2nd byte */
+#define WIMAX_MAC_HEADER_TYPE_2_DIUC 0xF0
+#define WIMAX_MAC_HEADER_TYPE_2_PBWI 0x0F
+/* 3rd to 5th bytes with CID */
+#define WIMAX_MAC_HEADER_TYPE_2_SLPB 0xFE0000
+#define WIMAX_MAC_HEADER_TYPE_2_PBRI_CID 0x010000
+#define WIMAX_MAC_HEADER_TYPE_2_CID 0x00FFFF
+/* 3rd to 5th bytes without CID */
+#define WIMAX_MAC_HEADER_TYPE_2_PBRI 0x018000
+#define WIMAX_MAC_HEADER_TYPE_2_CTI 0x007000
+#define WIMAX_MAC_HEADER_TYPE_2_AI_0 0x000800
+#define WIMAX_MAC_HEADER_TYPE_2_AI_1 0x000400
+#define WIMAX_MAC_HEADER_TYPE_2_AI_2 0x000200
+#define WIMAX_MAC_HEADER_TYPE_2_AI_3 0x000100
+#define WIMAX_MAC_HEADER_TYPE_2_MI 0x0000C0
+#define WIMAX_MAC_HEADER_TYPE_2_CT 0x000020
+#define WIMAX_MAC_HEADER_TYPE_2_CQI 0x00001F
+static int hf_mac_header_type_2_mimo_diuc = -1;
+static int hf_mac_header_type_2_mimo_pbwi = -1;
+static int hf_mac_header_type_2_mimo_slpb = -1;
+static int hf_mac_header_type_2_mimo_bpri = -1;
+static int hf_mac_header_type_2_mimo_bpri_cid = -1;
+static int hf_mac_header_type_2_mimo_cid = -1;
+static int hf_mac_header_type_2_mimo_cti = -1;
+static int hf_mac_header_type_2_mimo_ai_0 = -1;
+static int hf_mac_header_type_2_mimo_ai_1 = -1;
+static int hf_mac_header_type_2_mimo_ai_2 = -1;
+static int hf_mac_header_type_2_mimo_ai_3 = -1;
+static int hf_mac_header_type_2_mimo_mi = -1;
+static int hf_mac_header_type_2_mimo_ct = -1;
+static int hf_mac_header_type_2_mimo_cqi = -1;
+
+/* CINR Feedback */
+/* 2nd byte */
+/*#define WIMAX_MAC_HEADER_TYPE_2_CINR_MEAN 0xFF*/
+/* 3rd byte */
+/*#define WIMAX_MAC_HEADER_TYPE_2_CINR_DEVI 0xFF*/
+static int hf_mac_header_type_2_cinr_mean = -1;
+static int hf_mac_header_type_2_cinr_devi = -1;
+
+/* Close-loop MIMO Feedback */
+/* 2nd & 3rd bytes */
+#define WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_TYPE 0xC000
+#define WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_ANT_ID 0x3C00
+#define WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_CQI 0x03E0
+#define WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_RSV 0x008F
+#define WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_STREAMS 0x3000
+#define WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_ANT_SEL 0x0E00
+#define WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_CQI_1 0x01F0
+#define WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_RSV_1 0x000F
+#define WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_CODEBOOK_ID 0x3F00
+#define WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_CQI_2 0x00F8
+#define WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_RSV_2 0x000E
+static int hf_mac_header_type_2_cl_mimo_type = -1;
+static int hf_mac_header_type_2_cl_mimo_ant_id = -1;
+static int hf_mac_header_type_2_cl_mimo_cqi = -1;
+static int hf_mac_header_type_2_cl_mimo_cqi_1 = -1;
+static int hf_mac_header_type_2_cl_mimo_cqi_2 = -1;
+static int hf_mac_header_type_2_cl_mimo_rsv = -1;
+static int hf_mac_header_type_2_cl_mimo_rsv_1 = -1;
+static int hf_mac_header_type_2_cl_mimo_rsv_2 = -1;
+static int hf_mac_header_type_2_cl_mimo_streams = -1;
+static int hf_mac_header_type_2_cl_mimo_ant_sel = -1;
+static int hf_mac_header_type_2_cl_mimo_codebook_id = -1;
+
+/* last byte */
+/*#define WIMAX_MAC_HEADER_TYPE_2_HCS 0xFF*/
+static int hf_mac_header_type_2_hcs = -1;
+
+/* CID Inclusion Indication messages */
+static const value_string cii_msgs[] =
+{
+ { 0, "without CID" },
+ { 1, "with CID" },
+ { 0, NULL}
+};
+
+/* Feedback Types */
+static const value_string fb_types[] =
+{
+ { 0, "CQI and MIMO Feedback" },
+ { 1, "DL average CINR" },
+ { 2, "MIMO Coefficients Feedback" },
+ { 3, "Preferred DL Channel DIUC Feedback" },
+ { 4, "UL Transmission Power" },
+ { 5, "PHY Channel Feedback" },
+ { 6, "AMC Band Indication Bitmap" },
+ { 7, "Life Span of Short-term Precoding Feedback" },
+ { 8, "Multiple Types of Feedback" },
+ { 9, "Long-term Precoding Feedback" },
+ { 10, "Combined DL Average CINR of Active BSs" },
+ { 11, "MIMO Channel Feedback" },
+ { 12, "CINR Feedback" },
+ { 13, "Close-loop MIMO Feedback" },
+ { 14, "Reserved" },
+ { 15, "Reserved" },
+ { 0, NULL}
+};
+
+/* Table of the Preferred Bandwidth Ratio of bandwidth over used channel bandwidth */
+static const value_string pbwi_table[] =
+{
+ { 0, "1" },
+ { 1, "3/4" },
+ { 2, "2/3" },
+ { 3, "1/2" },
+ { 4, "1/3" },
+ { 5, "1/4" },
+ { 6, "1/5" },
+ { 7, "1/6" },
+ { 8, "1/8" },
+ { 9, "1/10" },
+ { 10, "1/12" },
+ { 11, "1/16" },
+ { 12, "1/24" },
+ { 13, "1/32" },
+ { 14, "1/48" },
+ { 15, "1/64" },
+ { 0, NULL}
+};
+
+/* Burst Profile Ranking Indicator table */
+static const value_string bpri_table[] =
+{
+ { 0, "1st preferred burst profile" },
+ { 1, "2nd preferred burst profile" },
+ { 2, "3rd preferred burst profile" },
+ { 3, "4th preferred burst profile" },
+ { 0, NULL}
+};
+
+/* Coherent Time Index Table */
+static const value_string cti_table[] =
+{
+ { 0, "Infinite" },
+ { 1, "1 frame" },
+ { 2, "2 frames" },
+ { 3, "3 frames" },
+ { 4, "4 frames" },
+ { 5, "8 frames" },
+ { 6, "14 frames" },
+ { 7, "24 frames" },
+ { 0, NULL}
+};
+
+/* The MS Matrix Index Table */
+static const value_string mi_table[] =
+{
+ { 0, "No STC" },
+ { 1, "Matrix A" },
+ { 2, "Matrix B" },
+ { 3, "Matrix C" },
+ { 0, NULL}
+};
+
+/* CQI Feedback Types */
+static const value_string ct_msgs[] =
+{
+ { 0, "DL average feedback" },
+ { 1, "CQI feedback" },
+ { 0, NULL}
+};
+
+/* Antenna Indication messages */
+static const value_string ai_msgs[] =
+{
+ { 0, "Not applicable" },
+ { 1, "Applicable" },
+ { 0, NULL}
+};
+
+
+static int dissect_mac_header_type_2_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ gint tvb_len, offset = 0;
+ guint cii_bit, first_byte, fb_type, mimo_type;
+ proto_item *parent_item = NULL;
+ proto_item *ti = NULL;
+ proto_tree *ti_tree = NULL;
+
+ { /* we are being asked for details */
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display the MAC Type II Header message */
+ ti = proto_tree_add_protocol_format(tree, proto_mac_header_type_2_decoder, tvb, offset, tvb_len, "Mac Type II Header (6 bytes)");
+ /* add subtree */
+ ti_tree = proto_item_add_subtree(ti, ett_mac_header_type_2_decoder);
+ if(tvb_len < WIMAX_MAC_HEADER_SIZE)
+ {
+ /* display the error message */
+ proto_tree_add_protocol_format(ti_tree, proto_mac_header_type_2_decoder, tvb, offset, tvb_len, "Error: the size of Mac Header Type II tvb is too small! (%u bytes)", tvb_len);
+ /* display the MAC Type II Header in Hex */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_value_bytes, tvb, offset, tvb_len, ENC_NA);
+ return tvb_captured_length(tvb);
+ }
+#ifdef DEBUG
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "MAC Signaling Header Type II");
+#endif
+ /* get the parent */
+ parent_item = proto_tree_get_parent(tree);
+ /* Decode and display the first byte of the header */
+ /* header type */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_ht, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* encryption control */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_ec, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* sub-type */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* CID inclusion indication */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cii, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* feedback type */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_fb_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* Get the first byte */
+ first_byte = tvb_get_guint8(tvb, offset);
+ /* get the CII field */
+ cii_bit = ((first_byte & WIMAX_MAC_HEADER_TYPE_2_CII)?1:0);
+ /* check the Type field */
+ if(!(first_byte & WIMAX_MAC_HEADER_TYPE_2_TYPE))
+ {
+ /* Get the feedback type */
+ fb_type = (first_byte & WIMAX_MAC_HEADER_TYPE_2_FB_TYPE);
+ if(fb_type < TYPE_II_FB_TYPE_MAX)
+ {
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, type2_fb_type_abbrv[fb_type]);
+ }
+ else
+ {
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Unknown type 2 fb type");
+ /* display the MAC Type I Header in Hex */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_value_bytes, tvb, offset, tvb_len, ENC_NA);
+ return tvb_captured_length(tvb);
+ }
+ /* move to the second byte */
+ offset++;
+ /* add the MAC header info */
+ proto_item_append_text(parent_item, "%s", type2_fb_type_abbrv[fb_type]);
+ /* process the feedback header based on the fb type */
+ switch (fb_type)
+ {
+ case CQI_MIMO_FB:
+ /* Decode and display the CQI and MIMO feedback */
+ /* CQI feedback type */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cqi_fb_type, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* CQI payload */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cqi_payload, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cqi_rsv, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* check the CII field */
+ if(cii_bit)
+ { /* with CID */
+ /* CID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* without CID */
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_no_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ break;
+ case DL_AVG_CINR:
+ /* Decode and display the DL average CINR feedback */
+ /* DL average CINR payload */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_dl_ave_cinr, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_dl_ave_rsv, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* check the CII field */
+ if(cii_bit)
+ { /* with CID */
+ /* CID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* without CID */
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_no_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ break;
+ case MIMO_COEF_FB:
+ /* Decode and display the MIMO coefficients feedback */
+ /* number of index */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_coef_ni, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* occurrences of antenna index */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_coef_ai, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* MIMO coefficients */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_coef, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_coef_rsv, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* check the CII field */
+ if(cii_bit)
+ { /* with CID */
+ /* Decode and display the CID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* without CID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_no_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ break;
+ case PREF_DL_CHAN_DIUC_FB:
+ /* Decode and display the Preffed DL Channel DIUC feedback */
+ /* Preferred DIUC */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_dl_chan_diuc, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* DCD Change Count */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_dl_chan_dcd, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_dl_chan_rsv, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* check the CII field */
+ if(cii_bit)
+ { /* with CID */
+ /* CID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* without CID */
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_no_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ break;
+ case UL_TX_PWR:
+ /* Decode and display the UL TX Power feedback */
+ /* UL TX Power */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_ul_tx_pwr, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_ul_tx_pwr_rsv, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* check the CII field */
+ if(cii_bit)
+ { /* with CID */
+ /* CID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* without CID */
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_no_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ break;
+ case PHY_CHAN_FB:
+ /* Decode and display the PHY Channel feedback */
+ /* Preffed DIUC */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_phy_diuc, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* UL TX Power */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_phy_ul_tx_pwr, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* UL Headroom */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_phy_ul_hdrm, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_phy_rsv, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* check the CII field */
+ if(cii_bit)
+ { /* with CID */
+ /* CID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* without CID */
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_no_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ break;
+ case AMC_BAND_BITMAP:
+ /* Decode and display the AMC Band CQIs feedback */
+ /* AMC Band Indication Bitmap */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_amc_bitmap, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* AMC CQI 1 */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_amc_cqi_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* AMC CQI 2 */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_amc_cqi_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* AMC CQI 3 */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_amc_cqi_3, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* AMC CQI 4 */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_amc_cqi_4, tvb, offset, 2, ENC_BIG_ENDIAN);
+#if 0
+ /* check the CII field */
+ if(cii_bit)
+ { /* with CID */
+ /* CID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* without CID */
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_no_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+#endif
+ break;
+ case SHORT_PRECODE_FB:
+ /* Decode and display the Life Span of Short-term precoding feedback */
+ /* Life Span */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_life_span, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_life_span_rsv, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* check the CII field */
+ if(cii_bit)
+ { /* with CID */
+ /* CID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* without CID */
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_no_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ break;
+ case MULTI_TYPES_FB:
+ /* Decode and display the Multi types of feedback */
+ /* Number of feedback types */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mt_num_fb_types, tvb, offset, 4, ENC_BIG_ENDIAN);
+ /* Occurrences of feedback type */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mt_occu_fb_type, tvb, offset, 4, ENC_BIG_ENDIAN);
+ /* feedback contents */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mt_fb_contents, tvb, offset, 4, ENC_BIG_ENDIAN);
+#if 0
+ /* check the CII field */
+ if(cii_bit)
+ { /* with CID */
+ /* CID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* without CID */
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_no_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+#endif
+ break;
+ case LONG_PRECODE_FB:
+ /* Decode and display the Long-term precoding feedback */
+ /* Feedback of index */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_lt_id_fb, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* rank of prrecoding codebook */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_lt_rank, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* EFC and QAM feedback */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_lt_fec_qam, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_lt_rsv, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* check the CII field */
+ if(cii_bit)
+ { /* with CID */
+ /* CID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* without CID */
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_no_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ break;
+ case COMB_DL_AVG_CINR:
+ /* Decode and display the Combined DL Average CINR feedback */
+ /* Combined DL average CINR of Active BSs */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_comb_dl_ave, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_comb_dl_rsv, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* check the CII field */
+ if(cii_bit)
+ { /* with CID */
+ /* CID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* without CID */
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_no_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ break;
+ case MIMO_CHAN_FB:
+ /* Decode and display the second byte of the header */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_diuc, tvb, (offset+1), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_pbwi, tvb, (offset+1), 1, ENC_BIG_ENDIAN);
+ /* Decode and display the 3rd to 5th bytes of the header */
+ /* Decode and display the SLPB */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_slpb, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* check the CII field */
+ if(cii_bit)
+ { /* with CID */
+ /* Decode and display the BPRI */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_bpri_cid, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the CID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_cid, tvb, offset, 3, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* without CID */
+ /* Decode and display the BPRI */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_bpri, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the CTI */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_cti, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the AI */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_ai_0, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_ai_1, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_ai_2, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_ai_3, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the MI */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_mi, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the CT */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_ct, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* Decode and display the CQI */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_mimo_cqi, tvb, offset, 3, ENC_BIG_ENDIAN);
+ }
+ break;
+ case CINR_FB:
+ /* Decode and display the CINRC feedback */
+ /* CINR Mean */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cinr_mean, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* CINR Standard Deviation */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cinr_devi, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* check the CII field */
+ if(cii_bit)
+ { /* with CID */
+ /* Decode and display the CID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* without CID */
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_no_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ break;
+ case CL_MIMO_FB:
+ /* Get the MIMO type */
+ mimo_type = ((tvb_get_guint8(tvb, offset) & 0xC0) >> 6);
+ /* Decode and display the MIMO type */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cl_mimo_type, tvb, offset, 2, ENC_BIG_ENDIAN);
+ if(mimo_type == 1)
+ {
+ /* Decode and display the umber of streams */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cl_mimo_streams, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* Decode and display the antenna selection option index */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cl_mimo_ant_sel, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* Decode and display the average CQI */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cl_mimo_cqi_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cl_mimo_rsv_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ }
+ else if(mimo_type == 2)
+ {
+ /* Decode and display the umber of streams */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cl_mimo_streams, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* Decode and display the antenna selection option index */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cl_mimo_codebook_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* Decode and display the average CQI */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cl_mimo_cqi_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cl_mimo_rsv_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ /* Decode and display the antenna grouping index */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cl_mimo_ant_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* Decode and display the average CQI */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cl_mimo_cqi, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cl_mimo_rsv, tvb, offset, 2, ENC_BIG_ENDIAN);
+ }
+ /* check the CII field */
+ if(cii_bit)
+ { /* with CID */
+ /* Decode and display the CID */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* without CID */
+ /* reserved */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_no_cid, tvb, (offset+2), 2, ENC_BIG_ENDIAN);
+ }
+ break;
+ default:
+ break;
+ }
+ /* Decode and display the HCS */
+ proto_tree_add_item(ti_tree, hf_mac_header_type_2_hcs, tvb, (offset+4), 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Error - Undefined Type");
+ }
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac Header Type II Protocol and Dissector */
+void wimax_proto_register_mac_header_type_2(void)
+{
+ /* MAC HEADER TYPE II display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_mac_header_type_2_value_bytes,
+ {
+ "Values", "wmx.type2ValueBytes",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_ht,
+ {
+ "MAC Header Type", "wmx.type2Ht",
+ FT_UINT8, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_HT,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_ec,
+ {
+ "MAC Encryption Control", "wmx.type2Ec",
+ FT_UINT8, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_EC,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_type,
+ {
+ "MAC Sub-Type", "wmx.type2Type",
+ FT_UINT8, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_TYPE,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cii,
+ {
+ "CID Inclusion Indication", "wmx.type2Cii",
+ FT_UINT8, BASE_DEC, VALS(cii_msgs), WIMAX_MAC_HEADER_TYPE_2_CII,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_fb_type,
+ {
+ "Feedback Type", "wmx.type2FbType",
+ FT_UINT8, BASE_DEC, VALS(fb_types), WIMAX_MAC_HEADER_TYPE_2_FB_TYPE,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cqi_fb_type,
+ {
+ "Mimo Feedback Type", "wmx.type2MimoFbType",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_CQI_FB_TYPE,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cqi_payload,
+ {
+ "CQI and Mimo Feedback Payload", "wmx.type2MimoFbPayload",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_CQI_PAYLOAD,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cqi_rsv,
+ {
+ "Reserved", "wmx.type2MimoFbRsv",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_CQI_RSV,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_dl_ave_cinr,
+ {
+ "DL Average CINR", "wmx.type2DlAveCinr",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_DL_AVE_CINR,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_dl_ave_rsv,
+ {
+ "Reserved", "wmx.type2DlAveRsv",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_DL_AVE_RSV,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_coef_ni,
+ {
+ "Number of Index", "wmx.type2MimoCoefNi",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_MIMO_COEF_NI,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_coef_ai,
+ {
+ "Occurrences of Antenna Index", "wmx.type2MimoCoefAi",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_MIMO_COEF_AI,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_coef,
+ {
+ "MIMO Coefficients", "wmx.type2MimoCoef",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_MIMO_COEF,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_coef_rsv,
+ {
+ "Reserved", "wmx.type2MimoCoefRsv",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_MIMO_COEF_RSV,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_dl_chan_diuc,
+ {
+ "Preferred DIUC", "wmx.type2DlChanDiuc",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_DL_CHAN_DIUC,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_dl_chan_dcd,
+ {
+ "DCD Change Count", "wmx.type2DlChanDcd",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_DL_CHAN_DCD,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_dl_chan_rsv,
+ {
+ "Reserved", "wmx.type2DlChanRsv",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_DL_CHAN_RSV,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_ul_tx_pwr,
+ {
+ "UL TX Power", "wmx.type2UlTxPwr",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_UL_TX_PWR,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_ul_tx_pwr_rsv,
+ {
+ "Reserved", "wmx.type2UlTxPwrRsv",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_UL_TX_PWR_RSV,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_phy_diuc,
+ {
+ "Preferred DIUC Index", "wmx.type2PhyDiuc",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_PHY_DIUC,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_phy_ul_tx_pwr,
+ {
+ "UL TX Power", "wmx.type2PhyUlTxPwr",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_PHY_UL_TX_PWR,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_phy_ul_hdrm,
+ {
+ "UL Headroom", "wmx.type2PhyHdRm",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_PHY_UL_HDRM,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_phy_rsv,
+ {
+ "Reserved", "wmx.type2PhyRsv",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_PHY_RSV,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_amc_bitmap,
+ {
+ "AMC Band Indication Bitmap", "wmx.type2AmcBitmap",
+ FT_UINT32, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_AMC_BITMAP,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_amc_cqi_1,
+ {
+ "CQI 1", "wmx.type2AmcCqi1",
+ FT_UINT32, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_AMC_CQI_1,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_amc_cqi_2,
+ {
+ "CQI 2", "wmx.type2AmcCqi2",
+ FT_UINT32, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_AMC_CQI_2,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_amc_cqi_3,
+ {
+ "CQI 3", "wmx.type2AmcCqi3",
+ FT_UINT32, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_AMC_CQI_3,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_amc_cqi_4,
+ {
+ "CQI 4", "wmx.type2AmcCqi4",
+ FT_UINT32, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_AMC_CQI_4,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_life_span,
+ {
+ "Life Span of Short-term", "wmx.type2LifeSpan",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_LIFE_SPAN,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_life_span_rsv,
+ {
+ "Reserved", "wmx.type2LifeSpanRsv",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_LIFE_SPAN_RSV,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mt_num_fb_types,
+ {
+ "Number of Feedback Types", "wmx.type2MtNumFbTypes",
+ FT_UINT32, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_MT_NUM_FB_TYPES,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mt_occu_fb_type,
+ {
+ "Occurrences of Feedback Type", "wmx.type2MtOccuFbType",
+ FT_UINT32, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_MT_OCCU_FB_TYPE,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mt_fb_contents,
+ {
+ "Number of Feedback Types", "wmx.type2MtNumFbTypes",
+ FT_UINT32, BASE_HEX, NULL, WIMAX_MAC_HEADER_TYPE_2_MT_FB_CONTENTS,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_lt_id_fb,
+ {
+ "Long-term Feedback Index", "wmx.type2LtFbId",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_LT_ID_FB,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_lt_rank,
+ {
+ "Rank of Precoding Codebook", "wmx.type2LtRank",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_LT_RANK,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_lt_fec_qam,
+ {
+ "FEC and QAM", "wmx.type2LtFecQam",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_LT_FEC_QAM,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_lt_rsv,
+ {
+ "Reserved", "wmx.type2LtFbId",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_LT_RSV,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_comb_dl_ave,
+ {
+ "Combined DL Average CINR of Active BSs", "wmx.type2CombDlAve",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_COMB_DL_AVE,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_comb_dl_rsv,
+ {
+ "Reserved", "wmx.type2CombDlRsv",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_COMB_DL_RSV,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_diuc,
+ {
+ "Preferred DIUC Index", "wmx.type2MimoDiuc",
+ FT_UINT8, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_DIUC,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_pbwi,
+ {
+ "Preferred Bandwidth Index", "wmx.type2MimoPbwi",
+ FT_UINT8, BASE_DEC, VALS(pbwi_table), WIMAX_MAC_HEADER_TYPE_2_PBWI,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_slpb,
+ {
+ "Starting Location of Preferred Bandwidth", "wmx.type2MimoSlpb",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_SLPB,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_bpri_cid,
+ {
+ "Burst Profile Ranking Indicator with CID", "wmx.type2MimoBpriCid",
+ FT_UINT24, BASE_HEX, VALS(bpri_table), WIMAX_MAC_HEADER_TYPE_2_PBRI_CID,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_cid,
+ {
+ "Connection ID", "wmx.type2MimoCid",
+ FT_UINT24, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_CID,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_bpri,
+ {
+ "Burst Profile Ranking Indicator without CID", "wmx.type2MimoBpri",
+ FT_UINT24, BASE_HEX, VALS(bpri_table), WIMAX_MAC_HEADER_TYPE_2_PBRI,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_cti,
+ {
+ "Coherent Time Index", "wmx.type2MimoCti",
+ FT_UINT24, BASE_HEX, VALS(cti_table), WIMAX_MAC_HEADER_TYPE_2_CTI,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_ai_0,
+ {
+ "Antenna 0 Indication", "wmx.type2MimoAi",
+ FT_UINT24, BASE_HEX, VALS(ai_msgs), WIMAX_MAC_HEADER_TYPE_2_AI_0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_ai_1,
+ {
+ "Antenna 1 Indication", "wmx.type2MimoAi",
+ FT_UINT24, BASE_HEX, VALS(ai_msgs), WIMAX_MAC_HEADER_TYPE_2_AI_1,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_ai_2,
+ {
+ "Antenna 2 Indication", "wmx.type2MimoAi",
+ FT_UINT24, BASE_HEX, VALS(ai_msgs), WIMAX_MAC_HEADER_TYPE_2_AI_2,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_ai_3,
+ {
+ "Antenna 3 Indication", "wmx.type2MimoAi",
+ FT_UINT24, BASE_HEX, VALS(ai_msgs), WIMAX_MAC_HEADER_TYPE_2_AI_3,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_mi,
+ {
+ "MS Matrix Indicator", "wmx.type2MimoMi",
+ FT_UINT24, BASE_HEX, VALS(mi_table), WIMAX_MAC_HEADER_TYPE_2_MI,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_ct,
+ {
+ "CQI Type", "wmx.type2MimoCt",
+ FT_UINT24, BASE_HEX, VALS(ct_msgs), WIMAX_MAC_HEADER_TYPE_2_CT,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_mimo_cqi,
+ {
+ "CQI Feedback", "wmx.type2MimoCqi",
+ FT_UINT24, BASE_HEX, NULL, WIMAX_MAC_HEADER_TYPE_2_CQI,
+ NULL, HFILL
+ }
+ },
+ { &hf_mac_header_type_2_cinr_mean,
+ {
+ "CINR Mean", "wmx.type2CinrMean",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cinr_devi,
+ {
+ "CINR Standard Deviation", "wmx.type2CinrDevi",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cl_mimo_type,
+ {
+ "Closed-Loop MIMO Type", "wmx.type2ClMimoType",
+ FT_UINT16, BASE_HEX, NULL, WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_TYPE,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cl_mimo_ant_id,
+ {
+ "Antenna Grouping Index", "wmx.type2ClMimoAntId",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_ANT_ID,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cl_mimo_cqi,
+ {
+ "Average CQI", "wmx.type2ClMimoCqi",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_CQI,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cl_mimo_cqi_1,
+ {
+ "Average CQI", "wmx.type2ClMimoCqi",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_CQI_1,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cl_mimo_cqi_2,
+ {
+ "Average CQI", "wmx.type2ClMimoCqi",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_CQI_2,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cl_mimo_rsv,
+ {
+ "Reserved", "wmx.type2ClMimoRsv",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_RSV,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cl_mimo_rsv_1,
+ {
+ "Reserved", "wmx.type2ClMimoRsv",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_RSV_1,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cl_mimo_rsv_2,
+ {
+ "Reserved", "wmx.type2ClMimoRsv",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_RSV_2,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cl_mimo_streams,
+ {
+ "Number of Streams", "wmx.type2ClMimoStreams",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_STREAMS,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cl_mimo_ant_sel,
+ {
+ "Antenna Selection Option Index", "wmx.type2ClMimoAntSel",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_ANT_SEL,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cl_mimo_codebook_id,
+ {
+ "Codebook Index", "wmx.type2ClMimoCodeBkId",
+ FT_UINT16, BASE_DEC, NULL, WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_CODEBOOK_ID,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_cid,
+ {
+ "Connection ID", "wmx.type2Cid",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_no_cid,
+ {
+ "Reserved", "wmx.type2NoCid",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_type_2_hcs,
+ {
+ "Header Check Sequence", "wmx.type2Hcs",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL
+ }
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_header_type_2_decoder,
+ };
+
+ proto_mac_header_type_2_decoder = proto_mac_header_generic_decoder;
+
+ proto_register_field_array(proto_mac_header_type_2_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ register_dissector("mac_header_type_2_handler", dissect_mac_header_type_2_decoder, proto_mac_header_type_2_decoder);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/mac_mgmt_msg_decoder.c b/plugins/epan/wimax/mac_mgmt_msg_decoder.c
new file mode 100644
index 0000000000..2eed2e5c36
--- /dev/null
+++ b/plugins/epan/wimax/mac_mgmt_msg_decoder.c
@@ -0,0 +1,379 @@
+/* mac_mgmt_msg_decoder.c
+ * WiMax MAC Management Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include <epan/expert.h>
+#include "wimax_mac.h"
+
+void proto_register_mac_mgmt_msg(void);
+void proto_reg_handoff_mac_mgmt_msg(void);
+
+static gint proto_mac_mgmt_msg_decoder = -1;
+static gint ett_mac_mgmt_msg_decoder = -1;
+
+static gint hf_mac_mgmt_msg_type = -1;
+static gint hf_mac_mgmt_msg_values = -1;
+
+static expert_field ei_empty_payload = EI_INIT;
+
+static dissector_table_t subdissector_message_table;
+
+/* WIMAX MAC Management message type info */
+static const value_string mgt_msg_abbrv_vals[] = {
+ { MAC_MGMT_MSG_UCD, "UCD" },
+ { MAC_MGMT_MSG_DCD, "DCD" },
+ { MAC_MGMT_MSG_DL_MAP, "DL-MAP" },
+ { MAC_MGMT_MSG_UL_MAP, "UL-MAP" },
+ { MAC_MGMT_MSG_RNG_REQ, "RNG-REQ" },
+ { MAC_MGMT_MSG_RNG_RSP, "RNG-RSP" },
+ { MAC_MGMT_MSG_REG_REQ, "REG-REQ" },
+ { MAC_MGMT_MSG_REG_RSP, "REG-RSP" },
+ { 8, "Reserved8" },
+ { MAC_MGMT_MSG_PKM_REQ, "PKM-REQ" },
+ { MAC_MGMT_MSG_PKM_RSP, "PKM-RSP" },
+ { MAC_MGMT_MSG_DSA_REQ, "DSA-REQ" },
+ { MAC_MGMT_MSG_DSA_RSP, "DSA-RSP" },
+ { MAC_MGMT_MSG_DSA_ACK, "DSA-ACK" },
+ { MAC_MGMT_MSG_DSC_REQ, "DSC-REQ" },
+ { MAC_MGMT_MSG_DSC_RSP, "DSC-RSP" },
+ { MAC_MGMT_MSG_DSC_ACK, "DSC-ACK" },
+ { MAC_MGMT_MSG_DSD_REQ, "DSD-REQ" },
+ { MAC_MGMT_MSG_DSD_RSP, "DSD-RSP" },
+ { 19, "Reserved19" },
+ { 20, "Reserved20" },
+ { MAC_MGMT_MSG_MCA_REQ, "MCA-REQ" },
+ { MAC_MGMT_MSG_MCA_RSP, "MCA-RSP" },
+ { MAC_MGMT_MSG_DBPC_REQ, "DBPC-REQ" },
+ { MAC_MGMT_MSG_DBPC_RSP, "DBPC-RSP" },
+ { MAC_MGMT_MSG_RES_CMD, "RES-CMD" },
+ { MAC_MGMT_MSG_SBC_REQ, "SBC-REQ" },
+ { MAC_MGMT_MSG_SBC_RSP, "SBC-RSP" },
+ { MAC_MGMT_MSG_CLK_CMP, "CLK-CMP" },
+ { MAC_MGMT_MSG_DREG_CMD, "DREG-CMD" },
+ { MAC_MGMT_MSG_DSX_RVD, "DSX-RVD" },
+ { MAC_MGMT_MSG_TFTP_CPLT, "TFTP-CPLT" },
+ { MAC_MGMT_MSG_TFTP_RSP, "TFTP-RSP" },
+ { MAC_MGMT_MSG_ARQ_FEEDBACK, "ARQ-FEEDBACK" },
+ { MAC_MGMT_MSG_ARQ_DISCARD, "ARQ-DISCARD" },
+ { MAC_MGMT_MSG_ARQ_RESET, "ARQ-RESET" },
+ { MAC_MGMT_MSG_REP_REQ, "REP-REQ" },
+ { MAC_MGMT_MSG_REP_RSP, "REP-RSP" },
+ { MAC_MGMT_MSG_FPC, "FPC" },
+ { MAC_MGMT_MSG_MSH_NCFG, "MSH-NCFG" },
+ { MAC_MGMT_MSG_MSH_NENT, "MSH-NENT" },
+ { MAC_MGMT_MSG_MSH_DSCH, "MSH-DSCH" },
+ { MAC_MGMT_MSG_MSH_CSCH, "MSH-CSCH" },
+ { MAC_MGMT_MSG_MSH_CSCF, "MSH-CSCF" },
+ { MAC_MGMT_MSG_AAS_FBCK_REQ, "AAS-FBCK_REQ" },
+ { MAC_MGMT_MSG_AAS_FBCK_RSP, "AAS-FBCK_RSP" },
+ { MAC_MGMT_MSG_AAS_BEAM_SELECT, "AAS-BEAM_SELECT" },
+ { MAC_MGMT_MSG_AAS_BEAM_REQ, "AAS-BEAM_REQ" },
+ { MAC_MGMT_MSG_AAS_BEAM_RSP, "AAS-BEAM_RSP" },
+ { MAC_MGMT_MSG_DREG_REQ, "DREG-REQ" },
+ { MAC_MGMT_MSG_MOB_SLP_REQ, "MOB-SLP-REQ" },
+ { MAC_MGMT_MSG_MOB_SLP_RSP, "MOB-SLP-RSP" },
+ { MAC_MGMT_MSG_MOB_TRF_IND, "MOB-TRF-IND" },
+ { MAC_MGMT_MSG_MOB_NBR_ADV, "MOB-NBR-ADV" },
+ { MAC_MGMT_MSG_MOB_SCN_REQ, "MOB-SCN-REQ" },
+ { MAC_MGMT_MSG_MOB_SCN_RSP, "MOB-SCN-RSP" },
+ { MAC_MGMT_MSG_MOB_BSHO_REQ, "MOB-BSHO-REQ" },
+ { MAC_MGMT_MSG_MOB_MSHO_REQ, "MOB-MSHO-REQ" },
+ { MAC_MGMT_MSG_MOB_BSHO_RSP, "MOB-BSHO-RSP" },
+ { MAC_MGMT_MSG_MOB_HO_IND, "MOB-HO-IND" },
+ { MAC_MGMT_MSG_MOB_SCN_REP, "MOB-SCN-REP" },
+ { MAC_MGMT_MSG_MOB_PAG_ADV, "MOB-PAG-ADV" },
+ { MAC_MGMT_MSG_MBS_MAP, "MBS-MAP" },
+ { MAC_MGMT_MSG_PMC_REQ, "PMC-REQ" },
+ { MAC_MGMT_MSG_PMC_RSP, "PMC-RSP" },
+ { MAC_MGMT_MSG_PRC_LT_CTRL, "PRC-LT-CTRL" },
+ { MAC_MGMT_MSG_MOB_ASC_REP, "MOB-ASC-REP" },
+
+ { 0, NULL }
+};
+
+static value_string_ext mgt_msg_abbrv_vals_ext = VALUE_STRING_EXT_INIT(mgt_msg_abbrv_vals);
+
+static int dissect_mac_mgmt_msg_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint message_type;
+ proto_item *message_item;
+ proto_tree *message_tree;
+ const char* mgt_msg_str;
+
+ message_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_decoder, tvb, offset, -1,
+ "MAC Management Message Type (%u bytes)", tvb_reported_length(tvb));
+ message_tree = proto_item_add_subtree(message_item, ett_mac_mgmt_msg_decoder);
+
+ if (tvb_reported_length(tvb) == 0)
+ {
+ expert_add_info(pinfo, message_item, &ei_empty_payload);
+ return tvb_captured_length(tvb);
+ }
+
+ /* Get the payload type */
+ message_type = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(message_tree, hf_mac_mgmt_msg_type, tvb, offset, 1, ENC_NA);
+ mgt_msg_str = val_to_str_ext_const(message_type, &mgt_msg_abbrv_vals_ext, "Unknown");
+
+ /* Display message type in Info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", mgt_msg_str);
+
+ /* add the payload type into the info column */
+ if (try_val_to_str_ext(message_type, &mgt_msg_abbrv_vals_ext) == NULL)
+ {
+ /* display the MAC payload in Hex */
+ proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, -1, ENC_NA);
+ return 1;
+ }
+
+ /* add the MAC header info to parent*/
+ proto_item_append_text(proto_tree_get_parent(tree), ", %s", mgt_msg_str);
+
+ /* Decode and display the MAC payload */
+ if (!dissector_try_uint(subdissector_message_table, message_type,
+ tvb_new_subset_remaining(tvb, 1), pinfo, tree))
+ {
+ proto_tree_add_item(message_tree, hf_mac_mgmt_msg_values, tvb, offset, -1, ENC_NA);
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg(void)
+{
+ /* Payload display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_mac_mgmt_msg_type,
+ {
+ "MAC Management Message Type", "wmx.macmgtmsgtype",
+ FT_UINT8, BASE_DEC | BASE_EXT_STRING, &mgt_msg_abbrv_vals_ext, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_mgmt_msg_values,
+ {
+ "Values", "wmx.values",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_mgmt_msg_decoder,
+ };
+
+ static ei_register_info ei[] = {
+ { &ei_empty_payload, { "wmx.empty_payload", PI_PROTOCOL, PI_ERROR, "Error: Mac payload tvb is empty !", EXPFILL }},
+ };
+
+ expert_module_t* expert_mac_mgmt;
+
+ proto_mac_mgmt_msg_decoder = proto_register_protocol (
+ "WiMax MAC Management Message", /* name */
+ "MGMT MSG", /* short name */
+ "wmx.mgmt" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+ expert_mac_mgmt = expert_register_protocol(proto_mac_mgmt_msg_decoder);
+ expert_register_field_array(expert_mac_mgmt, ei, array_length(ei));
+
+ subdissector_message_table = register_dissector_table("wmx.mgmtmsg",
+ "WiMax MAC Management Message", proto_mac_mgmt_msg_decoder, FT_UINT8, BASE_DEC);
+
+ /* Register dissector by name */
+ register_dissector("wmx_mac_mgmt_msg_decoder", dissect_mac_mgmt_msg_decoder,
+ proto_mac_mgmt_msg_decoder);
+}
+
+void proto_reg_handoff_mac_mgmt_msg(void)
+{
+ dissector_handle_t mgt_msg_handle;
+
+ /* Find the dissectors that appear to be supported through a third-party plugin
+ Keep here until third-party plugin can register through the new "wmx.mgmtmsg"
+ subdissector */
+
+ /* find the Multicast Assignment request message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_mca_req_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MCA_REQ, mgt_msg_handle );
+
+ /* find the Multicast Assignment response message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_mca_rsp_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MCA_RSP, mgt_msg_handle );
+
+ /* find the DL Burst Profile Change request message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_dbpc_req_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_DBPC_REQ, mgt_msg_handle );
+
+ /* find the DL Burst Profile Change response message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_dbpc_rsp_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_DBPC_RSP, mgt_msg_handle );
+
+ /* find the Config File TFTP Complete message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_tftp_cplt_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_TFTP_CPLT, mgt_msg_handle );
+
+ /* find the Config File TFTP Complete response message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_tftp_rsp_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_TFTP_RSP, mgt_msg_handle );
+
+ /* find the Mesh Network Configuration message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_ncfg_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MSH_NCFG, mgt_msg_handle );
+
+ /* find the Mesh Network Entry message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_nent_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MSH_NENT, mgt_msg_handle );
+
+ /* find the Mesh Distributed Schedule message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_dsch_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MSH_DSCH, mgt_msg_handle );
+
+ /* find the Mesh Centralized Schedule message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_csch_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MSH_CSCH, mgt_msg_handle );
+
+ /* find the Mesh Centralized Schedule Configuration message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_cscf_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MSH_CSCF, mgt_msg_handle );
+
+ /* find the AAS Beam request message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_aas_beam_req_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_AAS_BEAM_REQ, mgt_msg_handle );
+
+ /* find the AAS Beam response message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_aas_beam_rsp_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_AAS_BEAM_RSP, mgt_msg_handle );
+
+ /* find the Sleep Request message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_slp_req_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_SLP_REQ, mgt_msg_handle );
+
+ /* find the Sleep Response message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_slp_rsp_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_SLP_RSP, mgt_msg_handle );
+
+ /* find the Traffic Indication message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_trf_ind_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_TRF_IND, mgt_msg_handle );
+
+ /* find the Neighbor Advertisement message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_nbr_adv_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_NBR_ADV, mgt_msg_handle );
+
+ /* find the Scanning Interval Allocation Request message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_scn_req_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_SCN_REQ, mgt_msg_handle );
+
+ /* find the Scanning Interval Allocation Response message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_scn_rsp_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_SCN_RSP, mgt_msg_handle );
+
+ /* find the BS HO Request message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_bsho_req_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_BSHO_REQ, mgt_msg_handle );
+
+ /* find the MS HO Request message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_msho_req_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_MSHO_REQ, mgt_msg_handle );
+
+ /* find the BS HO Response message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_bsho_rsp_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_BSHO_RSP, mgt_msg_handle );
+
+ /* find the HO Indication message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_ho_ind_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_HO_IND, mgt_msg_handle );
+
+ /* find the Scanning Result Report message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_scn_rep_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_SCN_REP, mgt_msg_handle );
+
+ /* find the BS Broadcast Paging message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_pag_adv_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_PAG_ADV, mgt_msg_handle );
+
+ /* find the MBS MAP message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_mbs_map_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MBS_MAP, mgt_msg_handle );
+
+ /* find the Association Result Report message handler */
+ mgt_msg_handle = find_dissector("mac_mgmt_msg_mob_asc_rep_handler");
+ if (mgt_msg_handle)
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_MOB_ASC_REP, mgt_msg_handle );
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_aas_beam.c b/plugins/epan/wimax/msg_aas_beam.c
new file mode 100644
index 0000000000..a3bfa467bf
--- /dev/null
+++ b/plugins/epan/wimax/msg_aas_beam.c
@@ -0,0 +1,353 @@
+/* msg_aas_beam.c
+ * WiMax MAC Management AAS-BEAM-SELECT/REQ/RSP Messages decoders
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#define OFDM /* disable it if not supporting OFDM */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax_mac.h"
+
+extern gint proto_mac_mgmt_msg_aas_fbck_decoder;
+
+#define AAS_BEAM_SELECT_AAS_BEAM_INDEX_MASK 0xFC
+#define AAS_BEAM_SELECT_RESERVED_MASK 0x03
+#define AAS_BEAM_FEEDBACK_REQUEST_NUMBER_MASK 0xE0
+#define AAS_BEAM_MEASUREMENT_REPORT_TYPE_MASK 0x18
+#define AAS_BEAM_RESOLUTION_PARAMETER_MASK 0x07
+
+#define AAS_BEAM_BEAM_BIT_MASK_MASK 0xF0
+#define AAS_BEAM_RESERVED_MASK 0x0F
+
+void proto_register_mac_mgmt_msg_aas_beam(void);
+void proto_reg_handoff_mac_mgmt_msg_aas_beam(void);
+
+static gint proto_mac_mgmt_msg_aas_beam_decoder = -1;
+static gint ett_mac_mgmt_msg_aas_beam_select_decoder = -1;
+static gint ett_mac_mgmt_msg_aas_beam_req_decoder = -1;
+static gint ett_mac_mgmt_msg_aas_beam_rsp_decoder = -1;
+
+#ifdef OFDM
+static const value_string vals_report_types[] =
+{
+ {0, "BEAM_REP_IE"},
+ {0, NULL}
+};
+
+static const value_string vals_resolution_parameter[] =
+{
+ {0, "report every 4th subcarrier"},
+ {1, "report every 8th subcarrier"},
+ {2, "report every 16th subcarrier"},
+ {3, "report every 32nd subcarrier"},
+ {4, "report every 64th subcarrier"},
+ {0, NULL}
+};
+#endif
+
+/* fix fields */
+/* static gint hf_aas_beam_unknown_type = -1; */
+static gint hf_aas_beam_select_index = -1;
+static gint hf_aas_beam_select_reserved = -1;
+#ifdef OFDM
+static gint hf_aas_beam_frame_number = -1;
+static gint hf_aas_beam_feedback_request_number = -1;
+static gint hf_aas_beam_measurement_report_type = -1;
+static gint hf_aas_beam_resolution_parameter = -1;
+static gint hf_aas_beam_beam_bit_mask = -1;
+static int hf_aas_beam_freq_value_re = -1;
+static int hf_aas_beam_freq_value_im = -1;
+static int hf_aas_beam_rssi_value = -1;
+static int hf_aas_beam_cinr_value = -1;
+#endif
+
+
+static int dissect_mac_mgmt_msg_aas_beam_select_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ proto_item *aas_beam_item;
+ proto_tree *aas_beam_tree;
+
+ { /* we are being asked for details */
+
+ /* display MAC message type */
+ aas_beam_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_beam_decoder, tvb, offset, -1, "AAS Beam Select (AAS-BEAM-SELECT)");
+ /* add subtree */
+ aas_beam_tree = proto_item_add_subtree(aas_beam_item, ett_mac_mgmt_msg_aas_beam_select_decoder);
+
+ /* Decode and display the AAS-BEAM-SELECT message body */
+ /* display the AAS Beam Index */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_select_index, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved fields */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_select_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ return tvb_captured_length(tvb);
+}
+
+#ifdef OFDM
+static int dissect_mac_mgmt_msg_aas_beam_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ proto_item *aas_beam_item;
+ proto_tree *aas_beam_tree;
+
+ { /* we are being asked for details */
+
+ /* display MAC message type */
+ aas_beam_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_beam_decoder, tvb, offset, -1, "AAS Beam Request (AAS-BEAM-REQ)");
+ /* add subtree */
+ aas_beam_tree = proto_item_add_subtree(aas_beam_item, ett_mac_mgmt_msg_aas_beam_req_decoder);
+
+ /* Decode and display the AAS-BEAM-REQ message body */
+ /* display the Frame Number */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_frame_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ /* display the Feedback Request Number */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_feedback_request_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the Measurement Report Type */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_measurement_report_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the Resolution Parameter */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_resolution_parameter, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ /* display the Beam Bit mask */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_beam_bit_mask, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved fields */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_select_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ return tvb_captured_length(tvb);
+}
+
+static int dissect_mac_mgmt_msg_aas_beam_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tvb_len, report_type;
+ guint number_of_frequencies, indx;
+ proto_item *aas_beam_item;
+ proto_tree *aas_beam_tree;
+
+ { /* we are being asked for details */
+
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC message type */
+ aas_beam_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_beam_decoder, tvb, offset, -1, "AAS Beam Response (AAS-BEAM-RSP)");
+ /* add subtree */
+ aas_beam_tree = proto_item_add_subtree(aas_beam_item, ett_mac_mgmt_msg_aas_beam_rsp_decoder);
+
+ /* Decode and display the AAS-BEAM-RSP message body */
+ /* display the Frame Number */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_frame_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ /* get the Measurement Report Type */
+ report_type = tvb_get_guint8(tvb, offset);
+ /* display the Feedback Request Number */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_feedback_request_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the Measurement Report Type */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_measurement_report_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the Resolution Parameter */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_resolution_parameter, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ /* display the Beam Bit mask */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_beam_bit_mask, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved fields */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_select_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ /* check the Measurement Report Type */
+ if((report_type & AAS_BEAM_MEASUREMENT_REPORT_TYPE_MASK) == 0)
+ {
+ /* calculate the total number of frequencies */
+ number_of_frequencies = (tvb_len - offset) / 2 - 1;
+ /* display the frequency */
+ for(indx = 0; indx < number_of_frequencies; indx++)
+ { /* display the Frequency Value (real part) */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_freq_value_re, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ /* display the Frequency Value (imaginary part) */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_freq_value_im, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ }
+ }
+ /* display the RSSI Mean Value */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_rssi_value, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ /* display the CINR Mean Value */
+ proto_tree_add_item(aas_beam_tree, hf_aas_beam_cinr_value, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ return tvb_captured_length(tvb);
+}
+#endif
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_aas_beam(void)
+{
+ /* AAS-BEAM display */
+ static hf_register_info hf_aas_beam[] =
+ {
+ {
+ &hf_aas_beam_select_index,
+ {
+ "AAS Beam Index", "wmx.aas_beam.aas_beam_index",
+ FT_UINT8, BASE_DEC, NULL, AAS_BEAM_SELECT_AAS_BEAM_INDEX_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_beam_beam_bit_mask,
+ {
+ "Beam Bit Mask", "wmx.aas_beam.beam_bit_mask",
+ FT_UINT8, BASE_HEX, NULL, AAS_BEAM_BEAM_BIT_MASK_MASK, NULL, HFILL
+ }
+ },
+#ifdef OFDM
+ {
+ &hf_aas_beam_cinr_value,
+ {
+ "CINR Mean Value", "wmx.aas_beam.cinr_mean_value",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_beam_feedback_request_number,
+ {
+ "Feedback Request Number", "wmx.aas_beam.feedback_request_number",
+ FT_UINT8, BASE_DEC, NULL, AAS_BEAM_FEEDBACK_REQUEST_NUMBER_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_beam_frame_number,
+ {
+ "Frame Number", "wmx.aas_beam.frame_number",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_beam_freq_value_im,
+ {
+ "Frequency Value (imaginary part)", "wmx.aas_beam.freq_value_im",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_beam_freq_value_re,
+ {
+ "Frequency Value (real part)", "wmx.aas_beam.freq_value_re",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_beam_measurement_report_type,
+ {
+ "Measurement Report Type", "wmx.aas_beam.measurement_report_type",
+ FT_UINT8, BASE_DEC, VALS(vals_report_types), AAS_BEAM_MEASUREMENT_REPORT_TYPE_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_beam_select_reserved,
+ {
+ "Reserved", "wmx.aas_beam.reserved",
+ FT_UINT8, BASE_HEX, NULL, AAS_BEAM_SELECT_RESERVED_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_beam_resolution_parameter,
+ {
+ "Resolution Parameter", "wmx.aas_beam.resolution_parameter",
+ FT_UINT8, BASE_DEC, VALS(vals_resolution_parameter), AAS_BEAM_RESOLUTION_PARAMETER_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_beam_rssi_value,
+ {
+ "RSSI Mean Value", "wmx.aas_beam.rssi_mean_value",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+#endif
+#if 0
+ {
+ &hf_aas_beam_unknown_type,
+ {
+ "Unknown TLV type", "wmx.aas_beam.unknown_type",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ }
+#endif
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_mgmt_msg_aas_beam_select_decoder,
+ &ett_mac_mgmt_msg_aas_beam_req_decoder,
+ &ett_mac_mgmt_msg_aas_beam_rsp_decoder,
+ };
+
+ proto_mac_mgmt_msg_aas_beam_decoder = proto_register_protocol (
+ "WiMax AAS-BEAM Messages", /* name */
+ "WiMax AAS-BEAM", /* short name */
+ "wmx.aas_beam" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_aas_beam_decoder, hf_aas_beam, array_length(hf_aas_beam));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ register_dissector("mac_mgmt_msg_aas_beam_select_handler", dissect_mac_mgmt_msg_aas_beam_select_decoder, -1);
+#ifdef OFDM
+ register_dissector("mac_mgmt_msg_aas_beam_req_handler", dissect_mac_mgmt_msg_aas_beam_req_decoder, -1);
+ register_dissector("mac_mgmt_msg_aas_beam_rsp_handler", dissect_mac_mgmt_msg_aas_beam_rsp_decoder, -1);
+#endif
+}
+
+void
+proto_reg_handoff_mac_mgmt_msg_aas_beam(void)
+{
+ dissector_handle_t aas_handle;
+
+ aas_handle = create_dissector_handle(dissect_mac_mgmt_msg_aas_beam_select_decoder, proto_mac_mgmt_msg_aas_beam_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_AAS_BEAM_SELECT, aas_handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_aas_fbck.c b/plugins/epan/wimax/msg_aas_fbck.c
new file mode 100644
index 0000000000..311e608b48
--- /dev/null
+++ b/plugins/epan/wimax/msg_aas_fbck.c
@@ -0,0 +1,361 @@
+/* msg_aas_beam.c
+ * WiMax MAC Management AAS-BEAM-SELECT/REQ/RSP Messages decoders
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax_mac.h"
+
+#define OFDMA_AAS_FBCK_REQ_NUMBER_OF_FRAME_MASK 0xFE
+#define OFDMA_AAS_FBCK_REQ_DATA_TYPE_MASK 0x01
+#define OFDMA_AAS_FBCK_REQ_FB_REQ_COUNTER_MASK 0xE0
+#define OFDMA_AAS_FBCK_REQ_FB_REQ_RESOLUTION_MASK 0x18
+#define OFDMA_AAS_FBCK_REQ_FB_REQ_RESERVED_MASK 0x07
+
+#define OFDMA_AAS_FBCK_REQ_FB_RSP_RESERVED_MASK 0xC0
+#define OFDMA_AAS_FBCK_RSP_DATA_TYPE_MASK 0x20
+#define OFDMA_AAS_FBCK_REQ_FB_RSP_COUNTER_MASK 0x1C
+#define OFDMA_AAS_FBCK_REQ_FB_RSP_RESOLUTION_MASK 0x03
+
+void proto_register_mac_mgmt_msg_aas_fbck(void);
+void proto_reg_handoff_mac_mgmt_msg_aas(void);
+
+static gint proto_mac_mgmt_msg_aas_fbck_decoder = -1;
+static gint ett_mac_mgmt_msg_aas_fbck_req_decoder = -1;
+static gint ett_mac_mgmt_msg_aas_fbck_rsp_decoder = -1;
+
+static const value_string vals_data_types[] =
+{
+ {0, "measure on downlink preamble only"},
+ {1, "measure on downlink data (for this SS) only"},
+ {0, NULL}
+};
+
+static const value_string vals_resolutions_0[] =
+{
+ {0, "32 subcarriers"},
+ {1, "64 subcarriers"},
+ {2, "128 subcarriers"},
+ {3, "256 subcarriers"},
+ {0, NULL}
+};
+
+static const value_string vals_resolutions_1[] =
+{
+ {0, "1 subcarrier"},
+ {1, "4 subcarriers"},
+ {2, "8 subcarriers"},
+ {3, "16 subcarriers"},
+ {0, NULL}
+};
+
+/* fix fields */
+/* static int hf_aas_fbck_unknown_type = -1; */
+static int hf_aas_fbck_frame_number = -1;
+static int hf_aas_fbck_number_of_frames = -1;
+static int hf_aas_fbck_req_data_type = -1;
+static int hf_aas_fbck_rsp_data_type = -1;
+static int hf_aas_fbck_req_counter = -1;
+static int hf_aas_fbck_rsp_counter = -1;
+static int hf_aas_fbck_req_resolution_0 = -1;
+static int hf_aas_fbck_rsp_resolution_0 = -1;
+static int hf_aas_fbck_req_resolution_1 = -1;
+static int hf_aas_fbck_rsp_resolution_1 = -1;
+static int hf_aas_fbck_req_reserved = -1;
+static int hf_aas_fbck_rsp_reserved = -1;
+static int hf_aas_fbck_freq_value_re = -1;
+static int hf_aas_fbck_freq_value_im = -1;
+static int hf_aas_fbck_rssi_value = -1;
+static int hf_aas_fbck_cinr_value = -1;
+
+
+static int dissect_mac_mgmt_msg_aas_fbck_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint data_type;
+ proto_item *aas_fbck_item;
+ proto_tree *aas_fbck_tree;
+
+ { /* we are being asked for details */
+
+ /* display MAC message type */
+ aas_fbck_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_fbck_decoder, tvb, offset, -1, "AAS Channel Feedback Request (AAS-FBCK-REQ)");
+ /* add subtree */
+ aas_fbck_tree = proto_item_add_subtree(aas_fbck_item, ett_mac_mgmt_msg_aas_fbck_req_decoder);
+ /* Display the AAS-FBCK-REQ message type */
+
+ /* Decode and display the AAS-FBCK-REQ message body */
+ /* display the Frame Number */
+ proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_frame_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ /* get the data type */
+ data_type = tvb_get_guint8(tvb, offset);
+ /* display the number of Frames */
+ proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_number_of_frames, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the Data Type */
+ proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_req_data_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ /* display the Feedback Request Counter */
+ proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_req_counter, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the Frequency Measurement Resolution */
+ if(data_type & OFDMA_AAS_FBCK_REQ_DATA_TYPE_MASK)
+ proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_req_resolution_1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ else
+ proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_req_resolution_0, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved fields */
+ proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_req_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ return tvb_captured_length(tvb);
+}
+
+static int dissect_mac_mgmt_msg_aas_fbck_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tvb_len, data_type;
+ proto_item *aas_fbck_item;
+ proto_tree *aas_fbck_tree;
+
+ { /* we are being asked for details */
+
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC message type */
+ aas_fbck_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_fbck_decoder, tvb, offset, -1, "AAS Channel Feedback Response (AAS-FBCK-RSP)");
+ /* add subtree */
+ aas_fbck_tree = proto_item_add_subtree(aas_fbck_item, ett_mac_mgmt_msg_aas_fbck_rsp_decoder);
+ /* Display the AAS-FBCK-RSP message type */
+
+ /* get the data type */
+ data_type = tvb_get_guint8(tvb, offset);
+ /* Decode and display the AAS-FBCK-RSP message body */
+ /* display the reserved fields */
+ proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_rsp_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the Data Type */
+ proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_rsp_data_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the Feedback Request Counter */
+ proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_rsp_counter, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the Frequency Measurement Resolution */
+ if(data_type & OFDMA_AAS_FBCK_RSP_DATA_TYPE_MASK)
+ proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_rsp_resolution_1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ else
+ proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_rsp_resolution_0, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ for(; offset < (tvb_len - 2); )
+ {
+ /* display the Frequency Value (real part) */
+ proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_freq_value_re, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ /* display the Frequency Value (imaginary part) */
+ proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_freq_value_im, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ }
+ /* display the RSSI Mean Value */
+ proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_rssi_value, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ /* display the CINR Mean Value */
+ proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_cinr_value, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_aas_fbck(void)
+{
+ /* AAS-FBCK display */
+ static hf_register_info hf_aas_fbck[] =
+ {
+ {
+ &hf_aas_fbck_cinr_value,
+ {
+ "CINR Mean Value", "wmx.aas_fbck.cinr_mean_value",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_fbck_req_counter,
+ {
+ "Feedback Request Counter", "wmx.aas_fbck.counter",
+ FT_UINT8, BASE_DEC, NULL, OFDMA_AAS_FBCK_REQ_FB_REQ_COUNTER_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_fbck_frame_number,
+ {
+ "Frame Number", "wmx.aas_fbck.frame_number",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_fbck_freq_value_re,
+ {
+ "Frequency Value (real part)", "wmx.aas_fbck.freq_value_re",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_fbck_freq_value_im,
+ {
+ "Frequency Value (imaginary part)", "wmx.aas_fbck.freq_value_im",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_fbck_number_of_frames,
+ {
+ "Number Of Frames", "wmx.aas_fbck.number_of_frames",
+ FT_UINT8, BASE_DEC, NULL, OFDMA_AAS_FBCK_REQ_NUMBER_OF_FRAME_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_fbck_req_resolution_0,
+ {
+ "Frequency Measurement Resolution", "wmx.aas_fbck.resolution",
+ FT_UINT8, BASE_DEC, VALS(vals_resolutions_0), OFDMA_AAS_FBCK_REQ_FB_REQ_RESOLUTION_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_fbck_req_resolution_1,
+ {
+ "Frequency Measurement Resolution", "wmx.aas_fbck.resolution",
+ FT_UINT8, BASE_DEC, VALS(vals_resolutions_1), OFDMA_AAS_FBCK_REQ_FB_REQ_RESOLUTION_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_fbck_rssi_value,
+ {
+ "RSSI Mean Value", "wmx.aas_fbck.rssi_mean_value",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_aas_fbck_unknown_type,
+ {
+ "Unknown TLV type", "wmx.aas_fbck.unknown_type",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_aas_fbck_req_data_type,
+ {
+ "Measurement Data Type", "wmx.aas_fbck_req.data_type",
+ FT_UINT8, BASE_DEC, VALS(vals_data_types), OFDMA_AAS_FBCK_REQ_DATA_TYPE_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_fbck_req_reserved,
+ {
+ "Reserved", "wmx.aas_fbck_req.reserved",
+ FT_UINT8, BASE_HEX, NULL, OFDMA_AAS_FBCK_REQ_FB_REQ_RESERVED_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_fbck_rsp_counter,
+ {
+ "Feedback Request Counter", "wmx.aas_fbck_rsp.counter",
+ FT_UINT8, BASE_DEC, NULL, OFDMA_AAS_FBCK_REQ_FB_RSP_COUNTER_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_fbck_rsp_data_type,
+ {
+ "Measurement Data Type", "wmx.aas_fbck_rsp.data_type",
+ FT_UINT8, BASE_DEC, VALS(vals_data_types), OFDMA_AAS_FBCK_RSP_DATA_TYPE_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_fbck_rsp_reserved,
+ {
+ "Reserved", "wmx.aas_fbck_rsp.reserved",
+ FT_UINT8, BASE_HEX, NULL, OFDMA_AAS_FBCK_REQ_FB_RSP_RESERVED_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_fbck_rsp_resolution_0,
+ {
+ "Frequency Measurement Resolution", "wmx.aas_fbck_rsp.resolution",
+ FT_UINT8, BASE_DEC, VALS(vals_resolutions_0), OFDMA_AAS_FBCK_REQ_FB_RSP_RESOLUTION_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_aas_fbck_rsp_resolution_1,
+ {
+ "Frequency Measurement Resolution", "wmx.aas_fbck_rsp.resolution",
+ FT_UINT8, BASE_DEC, VALS(vals_resolutions_1), OFDMA_AAS_FBCK_REQ_FB_RSP_RESOLUTION_MASK, NULL, HFILL
+ }
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_mgmt_msg_aas_fbck_req_decoder,
+ &ett_mac_mgmt_msg_aas_fbck_rsp_decoder,
+ };
+
+ proto_mac_mgmt_msg_aas_fbck_decoder = proto_register_protocol (
+ "WiMax AAS-FEEDBACK Messages", /* name */
+ "WiMax AAS-FEEDBACK (aas)", /* short name */
+ "wmx.aas" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_aas_fbck_decoder, hf_aas_fbck, array_length(hf_aas_fbck));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+void
+proto_reg_handoff_mac_mgmt_msg_aas(void)
+{
+ dissector_handle_t aas_handle;
+
+ aas_handle = create_dissector_handle(dissect_mac_mgmt_msg_aas_fbck_req_decoder, proto_mac_mgmt_msg_aas_fbck_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_AAS_FBCK_REQ, aas_handle);
+
+ aas_handle = create_dissector_handle(dissect_mac_mgmt_msg_aas_fbck_rsp_decoder, proto_mac_mgmt_msg_aas_fbck_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_AAS_FBCK_RSP, aas_handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_arq.c b/plugins/epan/wimax/msg_arq.c
new file mode 100644
index 0000000000..87e5bf8a8d
--- /dev/null
+++ b/plugins/epan/wimax/msg_arq.c
@@ -0,0 +1,455 @@
+/* msg_arq.c
+ * WiMax MAC Management ARQ Feedback, Discard, Reset Message decoders
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: John R. Underwood <junderx@yahoo.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+
+#include <epan/packet.h>
+#include "wimax_mac.h"
+
+void proto_register_mac_mgmt_msg_arq_feedback(void);
+void proto_reg_handoff_mac_mgmt_msg_arq(void);
+
+static gint proto_mac_mgmt_msg_arq_decoder = -1;
+
+static gint ett_mac_mgmt_msg_arq_decoder = -1;
+
+/* Setup protocol subtree array */
+static gint *ett[] =
+{
+ &ett_mac_mgmt_msg_arq_decoder,
+};
+
+
+/* ARQ fields */
+static gint hf_arq_cid = -1;
+static gint hf_arq_last = -1;
+static gint hf_arq_ack_type = -1;
+static gint hf_ack_type_reserved = -1;
+static gint hf_arq_bsn = -1;
+static gint hf_arq_num_ack_maps = -1;
+static gint hf_arq_selective_map = -1;
+static gint hf_arq_seq_format = -1;
+static gint hf_arq_0seq_ack_map = -1;
+static gint hf_arq_0seq1_len = -1;
+static gint hf_arq_0seq2_len = -1;
+static gint hf_arq_1seq_ack_map = -1;
+static gint hf_arq_1seq1_len = -1;
+static gint hf_arq_1seq2_len = -1;
+static gint hf_arq_1seq3_len = -1;
+static gint hf_arq_reserved = -1;
+
+static gint hf_arq_discard_cid = -1;
+static gint hf_arq_discard_reserved = -1;
+static gint hf_arq_discard_bsn = -1;
+
+static gint hf_arq_reset_cid = -1;
+static gint hf_arq_reset_type = -1;
+static gint hf_arq_reset_direction = -1;
+static gint hf_arq_reset_reserved = -1;
+
+/* STRING RESOURCES */
+
+#if 0
+static const true_false_string tfs_present = {
+ "present",
+ "absent"
+};
+#endif
+
+#if 0
+static const true_false_string tfs_rng_req_aas_broadcast = {
+ "SS cannot receive broadcast messages",
+ "SS can receive broadcast messages"
+};
+#endif
+
+static const true_false_string tfs_arq_last = {
+ "Last ARQ feedback IE in the list",
+ "More ARQ feedback IE in the list"
+};
+
+static const value_string vals_arq_ack_type[] = {
+ {0, "Selective ACK entry"},
+ {1, "Cumulative ACK entry"},
+ {2, "Cumulative with Selective ACK entry"},
+ {3, "Cumulative ACK with Block Sequence Ack entry"},
+ {0, NULL}
+};
+
+static const value_string vals_arq_reset_type[] = {
+ {0, "Original message from Initiator"},
+ {1, "Acknowledgment from Responder"},
+ {2, "Confirmation from Initiator"},
+ {3, "Reserved"},
+ {0, NULL}
+};
+
+static const value_string vals_arq_reset_direction[] = {
+ {0, "Uplink or downlink"},
+ {1, "Uplink"},
+ {2, "Downlink"},
+ {3, "Reserved"},
+ {0, NULL}
+};
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_arq_feedback(void)
+{
+ /* ARQ fields display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_arq_ack_type,
+ {
+ "ACK Type", "wmx.arq.ack_type",
+ FT_UINT8, BASE_DEC, VALS(vals_arq_ack_type), 0x60, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_bsn,
+ {
+ "BSN", "wmx.arq.bsn",
+ FT_UINT16, BASE_DEC, NULL, 0x1FFC, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_cid,
+ {
+ "Connection ID", "wmx.arq.cid",
+ FT_UINT16, BASE_DEC, NULL, 0x00, "The ID of the connection being referenced", HFILL
+ }
+ },
+ {
+ &hf_arq_discard_bsn,
+ {
+ "BSN", "wmx.arq.discard_bsn",
+ FT_UINT16, BASE_DEC, NULL, 0x07FF, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_discard_cid,
+ {
+ "Connection ID", "wmx.arq.discard_cid",
+ FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_discard_reserved,
+ {
+ "Reserved", "wmx.arq.discard_reserved",
+ FT_UINT8, BASE_DEC, NULL, 0xF8, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_last,
+ {
+ "LAST", "wmx.arq.last",
+ FT_BOOLEAN, 8, TFS(&tfs_arq_last), 0x80, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_num_ack_maps,
+ {
+ "Number of ACK Maps", "wmx.arq.num_maps",
+ FT_UINT8, BASE_DEC, NULL, 0x03, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_reserved,
+ {
+ "Reserved", "wmx.arq.reserved",
+ FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_reset_cid,
+ {
+ "Connection ID", "wmx.arq.reset_cid",
+ FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_reset_direction,
+ {
+ "Direction", "wmx.arq.reset_direction",
+ FT_UINT8, BASE_DEC, VALS(vals_arq_reset_direction), 0x30, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_reset_reserved,
+ {
+ "Reserved", "wmx.arq.reset_reserved",
+ FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_reset_type,
+ {
+ "Type", "wmx.arq.reset_type",
+ FT_UINT8, BASE_DEC, VALS(vals_arq_reset_type), 0xC0, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_selective_map,
+ {
+ "Selective ACK Map", "wmx.arq.selective_map",
+ FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_0seq_ack_map,
+ {
+ "Sequence ACK Map", "wmx.arq.seq_ack_map",
+ FT_UINT8, BASE_HEX, NULL, 0x60, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_1seq_ack_map,
+ {
+ "Sequence ACK Map", "wmx.arq.seq_ack_map",
+ FT_UINT8, BASE_HEX, NULL, 0x70, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_seq_format,
+ {
+ "Sequence Format", "wmx.arq.seq_format",
+ FT_UINT8, BASE_DEC, NULL, 0x80, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_0seq1_len,
+ {
+ "Sequence 1 Length", "wmx.arq.seq1_len",
+ FT_UINT16, BASE_DEC, NULL, 0x1F80, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_0seq2_len,
+ {
+ "Sequence 2 Length", "wmx.arq.seq2_len",
+ FT_UINT16, BASE_DEC, NULL, 0x007E, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_1seq1_len,
+ {
+ "Sequence 1 Length", "wmx.arq.seq1_len",
+ FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_1seq2_len,
+ {
+ "Sequence 2 Length", "wmx.arq.seq2_len",
+ FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL
+ }
+ },
+ {
+ &hf_arq_1seq3_len,
+ {
+ "Sequence 3 Length", "wmx.arq.seq3_len",
+ FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL
+ }
+ },
+ {
+ &hf_ack_type_reserved,
+ {
+ "Reserved", "wmx.ack_type.reserved",
+ FT_UINT8, BASE_DEC, NULL, 0x03, NULL, HFILL
+ }
+ }
+ };
+
+ proto_mac_mgmt_msg_arq_decoder = proto_register_protocol (
+ "WiMax ARQ Feedback/Discard/Reset Messages", /* name */
+ "WiMax ARQ Feedback/Discard/Reset (arq)", /* short name */
+ "wmx.arq" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_arq_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+/* Decode ARQ-Feedback messages. */
+static int dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint arq_feedback_ie_count = 0;
+ guint arq_cid;
+ gboolean arq_last = FALSE;
+ guint arq_ack_type;
+ guint arq_bsn;
+ guint arq_num_ack_maps;
+ guint tvb_len;
+ proto_item *arq_feedback_item;
+ proto_tree *arq_feedback_tree;
+ proto_item *arq_fb_item = NULL;
+ proto_tree *arq_fb_tree = NULL;
+ proto_item *ti = NULL;
+ guint i, seq_format;
+
+ { /* we are being asked for details */
+
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC payload type ARQ-Feedback */
+ arq_feedback_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_arq_decoder, tvb, offset, -1, "MAC Management Message, ARQ-Feedback");
+ /* add MAC ARQ Feedback subtree */
+ arq_feedback_tree = proto_item_add_subtree(arq_feedback_item, ett_mac_mgmt_msg_arq_decoder);
+
+ while(offset < tvb_len && !arq_last)
+ {
+ arq_feedback_ie_count++;
+ arq_cid = tvb_get_ntohs(tvb, offset);
+ arq_last = ((tvb_get_guint8(tvb, offset + 2) & 0x80) != 0);
+ arq_ack_type = (tvb_get_guint8(tvb, offset + 2) & 0x60) >> 5;
+ arq_bsn = (tvb_get_ntohs(tvb, offset + 2) & 0x1FFC) >> 2;
+ arq_num_ack_maps = 1 + (tvb_get_guint8(tvb, offset + 3) & 0x03);
+
+ arq_fb_item = proto_tree_add_protocol_format(arq_feedback_tree, proto_mac_mgmt_msg_arq_decoder, tvb, offset, tvb_len, "ARQ_Feedback_IE");
+ proto_item_append_text(arq_fb_item, ", CID: %u, %s ARQ feedback IE, %s, BSN: %u",
+ arq_cid, arq_last ? "Last" : "More", val_to_str_const(arq_ack_type, vals_arq_ack_type, ""), arq_bsn);
+ if (arq_ack_type != ARQ_CUMULATIVE_ACK_ENTRY) {
+ proto_item_append_text(arq_fb_item, ", %u ACK Map(s)", arq_num_ack_maps);
+ }
+ /* add ARQ Feedback IE subtree */
+ arq_fb_tree = proto_item_add_subtree(arq_fb_item, ett_mac_mgmt_msg_arq_decoder);
+ proto_tree_add_item(arq_fb_tree, hf_arq_cid, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(arq_fb_tree, hf_arq_last, tvb, offset + 2, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(arq_fb_tree, hf_arq_ack_type, tvb, offset + 2, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(arq_fb_tree, hf_arq_bsn, tvb, offset + 2, 2, ENC_BIG_ENDIAN);
+ if (arq_ack_type != ARQ_CUMULATIVE_ACK_ENTRY) {
+ ti = proto_tree_add_item(arq_fb_tree, hf_arq_num_ack_maps, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
+ proto_item_append_text(ti, " (%d map(s))", arq_num_ack_maps);
+ offset += 2;
+
+ for (i = 0; i < arq_num_ack_maps; i++) {
+ /* Each ACK Map is 16 bits. */
+ offset += 2;
+ if (arq_ack_type != 3) {
+ proto_tree_add_item(arq_fb_tree, hf_arq_selective_map, tvb, offset, 2, ENC_BIG_ENDIAN);
+ } else {
+ proto_tree_add_item(arq_fb_tree, hf_arq_seq_format, tvb, offset, 1, ENC_BIG_ENDIAN);
+ seq_format = (tvb_get_guint8(tvb, offset) & 0x80) >> 7;
+ if (seq_format == 0) {
+ proto_tree_add_item(arq_fb_tree, hf_arq_0seq_ack_map, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(arq_fb_tree, hf_arq_0seq1_len, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(arq_fb_tree, hf_arq_0seq2_len, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(arq_fb_tree, hf_arq_reserved, tvb, offset + 1, 1, ENC_BIG_ENDIAN);
+ } else {
+ proto_tree_add_item(arq_fb_tree, hf_arq_1seq_ack_map, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(arq_fb_tree, hf_arq_1seq1_len, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(arq_fb_tree, hf_arq_1seq2_len, tvb, offset + 1, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(arq_fb_tree, hf_arq_1seq3_len, tvb, offset + 1, 1, ENC_BIG_ENDIAN);
+ }
+ }
+ }
+ } else {
+ /* Number of ACK Maps bits are reserved when ACK TYPE == 1 */
+ proto_tree_add_item(arq_fb_tree, hf_ack_type_reserved, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
+ /* update the offset */
+ offset += 2;
+ }
+ /* update the offset */
+ offset += 2;
+ }
+ proto_item_append_text(arq_feedback_item, ", %u ARQ_feedback_IE(s)", arq_feedback_ie_count);
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Decode ARQ-Discard messages. */
+static int dissect_mac_mgmt_msg_arq_discard_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ proto_item *arq_discard_item;
+ proto_tree *arq_discard_tree;
+
+ { /* we are being asked for details */
+
+ /* display MAC payload type ARQ-Discard */
+ arq_discard_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_arq_decoder, tvb, 0, -1, "MAC Management Message, ARQ-Discard");
+ /* add MAC ARQ Discard subtree */
+ arq_discard_tree = proto_item_add_subtree(arq_discard_item, ett_mac_mgmt_msg_arq_decoder);
+
+ proto_tree_add_item(arq_discard_tree, hf_arq_discard_cid, tvb, 1, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(arq_discard_tree, hf_arq_discard_reserved, tvb, 3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(arq_discard_tree, hf_arq_discard_bsn, tvb, 3, 2, ENC_BIG_ENDIAN);
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Decode ARQ-Reset messages. */
+static int dissect_mac_mgmt_msg_arq_reset_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ proto_item *arq_reset_item;
+ proto_tree *arq_reset_tree;
+
+ { /* we are being asked for details */
+
+ /* display MAC payload type ARQ-Reset */
+ arq_reset_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_arq_decoder, tvb, 0, -1, "MAC Management Message, ARQ-Reset");
+ /* add MAC ARQ Reset subtree */
+ arq_reset_tree = proto_item_add_subtree(arq_reset_item, ett_mac_mgmt_msg_arq_decoder);
+
+ proto_tree_add_item(arq_reset_tree, hf_arq_reset_cid, tvb, 1, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(arq_reset_tree, hf_arq_reset_type, tvb, 3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(arq_reset_tree, hf_arq_reset_direction, tvb, 3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(arq_reset_tree, hf_arq_reset_reserved, tvb, 3, 1, ENC_BIG_ENDIAN);
+ }
+ return tvb_captured_length(tvb);
+}
+
+void
+proto_reg_handoff_mac_mgmt_msg_arq(void)
+{
+ dissector_handle_t arq_handle;
+
+ arq_handle = create_dissector_handle(dissect_mac_mgmt_msg_arq_feedback_decoder, proto_mac_mgmt_msg_arq_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_ARQ_FEEDBACK, arq_handle);
+
+ arq_handle = create_dissector_handle(dissect_mac_mgmt_msg_arq_discard_decoder, proto_mac_mgmt_msg_arq_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_ARQ_DISCARD, arq_handle);
+
+ arq_handle = create_dissector_handle(dissect_mac_mgmt_msg_arq_reset_decoder, proto_mac_mgmt_msg_arq_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_ARQ_RESET, arq_handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_clk_cmp.c b/plugins/epan/wimax/msg_clk_cmp.c
new file mode 100644
index 0000000000..5958bafbaf
--- /dev/null
+++ b/plugins/epan/wimax/msg_clk_cmp.c
@@ -0,0 +1,162 @@
+/* msg_clk_cmp.c
+ * WiMax MAC Management CLK_CMP Message decoders
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax_mac.h"
+
+void proto_register_mac_mgmt_msg_clk_cmp(void);
+void proto_reg_handoff_mac_mgmt_msg_clk_cmp(void);
+
+static gint proto_mac_mgmt_msg_clk_cmp_decoder = -1;
+
+static gint ett_mac_mgmt_msg_clk_cmp_decoder = -1;
+
+/* CLK_CMP fields */
+static gint hf_clk_cmp_clock_count = -1;
+static gint hf_clk_cmp_clock_id = -1;
+static gint hf_clk_cmp_seq_number = -1;
+static gint hf_clk_cmp_comparison_value = -1;
+/* static gint hf_clk_cmp_invalid_tlv = -1; */
+
+
+/* Decode CLK_CMP messages. */
+static int dissect_mac_mgmt_msg_clk_cmp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint i;
+ guint clock_count;
+ proto_item *clk_cmp_item;
+ proto_tree *clk_cmp_tree;
+
+ { /* we are being asked for details */
+ /* display MAC payload type CLK_CMP */
+ clk_cmp_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_clk_cmp_decoder, tvb, offset, -1, "Clock Comparison (CLK-CMP)");
+ /* add MAC CLK_CMP subtree */
+ clk_cmp_tree = proto_item_add_subtree(clk_cmp_item, ett_mac_mgmt_msg_clk_cmp_decoder);
+ /* get the clock count */
+ clock_count = tvb_get_guint8(tvb, offset);
+ /* display the clock count */
+ proto_tree_add_item(clk_cmp_tree, hf_clk_cmp_clock_count, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* set the offset for clock comparison */
+ offset++;
+ for (i = 0; i < clock_count; i++ )
+ { /* display the Clock ID */
+ proto_tree_add_item(clk_cmp_tree, hf_clk_cmp_clock_id, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ /* display the sequence number */
+ proto_tree_add_item(clk_cmp_tree, hf_clk_cmp_seq_number, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ /* display the comparison value */
+ proto_tree_add_item(clk_cmp_tree, hf_clk_cmp_comparison_value, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ }
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_clk_cmp(void)
+{
+ /* CLK_CMP fields display */
+ static hf_register_info hf_clk_cmp[] =
+ {
+ {
+ &hf_clk_cmp_clock_count,
+ {
+ "Clock Count", "wmx.clk_cmp.clock_count",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_clk_cmp_clock_id,
+ {
+ "Clock ID", "wmx.clk_cmp.clock_id",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_clk_cmp_comparison_value,
+ {
+ "Comparison Value", "wmx.clk_cmp.comparison_value",
+ FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_clk_cmp_invalid_tlv,
+ {
+ "Invalid TLV", "wmx.clk_cmp.invalid_tlv",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_clk_cmp_seq_number,
+ {
+ "Sequence Number", "wmx.clk_cmp.seq_number",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_mgmt_msg_clk_cmp_decoder,
+ };
+
+ proto_mac_mgmt_msg_clk_cmp_decoder = proto_register_protocol (
+ "WiMax CLK-CMP Message", /* name */
+ "WiMax CLK-CMP (clk)", /* short name */
+ "wmx.clk" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_clk_cmp_decoder, hf_clk_cmp, array_length(hf_clk_cmp));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+void
+proto_reg_handoff_mac_mgmt_msg_clk_cmp(void)
+{
+ dissector_handle_t handle;
+
+ handle = create_dissector_handle(dissect_mac_mgmt_msg_clk_cmp_decoder, proto_mac_mgmt_msg_clk_cmp_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_CLK_CMP, handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_dcd.c b/plugins/epan/wimax/msg_dcd.c
new file mode 100644
index 0000000000..e0e6fcb6c9
--- /dev/null
+++ b/plugins/epan/wimax/msg_dcd.c
@@ -0,0 +1,1263 @@
+/* msg_dcd.c
+ * WiMax MAC Management DCD Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+/*
+#define DEBUG
+*/
+
+#include <epan/packet.h>
+#include "wimax_tlv.h"
+#include "wimax_mac.h"
+#include "wimax_utils.h"
+
+/* Delete the following variable as soon as possible */
+extern gboolean include_cor2_changes;
+
+void proto_register_mac_mgmt_msg_dcd(void);
+void proto_reg_handoff_mac_mgmt_msg_dcd(void);
+
+static gint proto_mac_mgmt_msg_dcd_decoder = -1;
+static gint ett_mac_mgmt_msg_dcd_decoder = -1;
+
+/* fix fields */
+static gint hf_dcd_downlink_channel_id = -1;
+static gint hf_dcd_config_change_count = -1;
+static gint hf_dcd_dl_burst_profile_rsv = -1;
+static gint hf_dcd_dl_burst_profile_diuc = -1;
+
+static gint hf_dcd_bs_eirp = -1;
+static gint hf_dcd_frame_duration = -1;
+static gint hf_dcd_phy_type = -1;
+static gint hf_dcd_power_adjustment = -1;
+static gint hf_dcd_channel_nr = -1;
+static gint hf_dcd_ttg = -1;
+static gint hf_dcd_rtg = -1;
+#ifdef WIMAX_16D_2004
+static gint hf_dcd_rss = -1;
+#endif
+static gint hf_dcd_channel_switch_frame_nr = -1;
+static gint hf_dcd_frequency = -1;
+static gint hf_dcd_bs_id = -1;
+static gint hf_dcd_frame_duration_code = -1;
+static gint hf_dcd_frame_nr = -1;
+#ifdef WIMAX_16D_2004
+static gint hf_dcd_size_cqich_id = -1;
+#endif
+static gint hf_dcd_h_arq_ack_delay = -1;
+static gint hf_dcd_mac_version = -1;
+static gint hf_dcd_restart_count = -1;
+
+/* static gint hf_dl_burst_reserved = -1; */
+/* static gint hf_dl_burst_diuc = -1; */
+static gint hf_dcd_burst_freq = -1;
+static gint hf_dcd_burst_fec = -1;
+static gint hf_dcd_burst_diuc_exit_threshold = -1;
+static gint hf_dcd_burst_diuc_entry_threshold = -1;
+static gint hf_dcd_burst_tcs = -1;
+static gint hf_dcd_tlv_t_19_permutation_type_for_broadcast_regions_in_harq_zone = -1;
+static gint hf_dcd_tlv_t_20_maximum_retransmission = -1;
+static gint hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter = -1;
+static gint hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_physical_cinr_measurements = -1;
+static gint hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_rssi_measurements = -1;
+static gint hf_dcd_tlv_t_22_dl_amc_allocated_physical_bands_bitmap = -1;
+
+static gint hf_dcd_tlv_t_34_dl_region_definition = -1;
+static gint hf_dcd_tlv_t_34_dl_region_definition_num_region = -1;
+static gint hf_dcd_tlv_t_34_dl_region_definition_reserved = -1;
+static gint hf_dcd_tlv_t_34_dl_region_definition_symbol_offset = -1;
+static gint hf_dcd_eirxp = -1;
+static gint hf_dcd_tlv_t_34_dl_region_definition_subchannel_offset = -1;
+static gint hf_dcd_tlv_t_34_dl_region_definition_num_symbols = -1;
+static gint hf_dcd_tlv_t_34_dl_region_definition_num_subchannels = -1;
+static gint hf_dcd_tlv_t_50_ho_type_support = -1;
+static gint hf_dcd_tlv_t_50_ho_type_support_ho = -1;
+static gint hf_dcd_tlv_t_50_ho_type_support_mdho = -1;
+static gint hf_dcd_tlv_t_50_ho_type_support_fbss_ho = -1;
+static gint hf_dcd_tlv_t_50_ho_type_support_reserved = -1;
+static gint hf_dcd_tlv_t_31_h_add_threshold = -1;
+static gint hf_dcd_tlv_t_45_paging_interval_length = -1;
+static gint hf_dcd_tlv_t_45_paging_interval_reserved = -1;
+static gint hf_dcd_tlv_t_32_h_delete_threshold = -1;
+static gint hf_dcd_tlv_t_33_asr = -1;
+static gint hf_dcd_tlv_t_33_asr_m = -1;
+static gint hf_dcd_tlv_t_33_asr_l = -1;
+static gint hf_dcd_tlv_t_35_paging_group_id = -1;
+static gint hf_dcd_tlv_t_36_tusc1_permutation_active_subchannels_bitmap = -1;
+static gint hf_dcd_tlv_t_37_tusc2_permutation_active_subchannels_bitmap = -1;
+static gint hf_dcd_tlv_t_51_hysteresis_margin = -1;
+static gint hf_dcd_tlv_t_52_time_to_trigger_duration = -1;
+static gint hf_dcd_tlv_t_60_noise_interference = -1;
+static gint hf_dcd_tlv_t_153_downlink_burst_profile_for_mutiple_fec_types = -1;
+
+static gint hf_dcd_tlv_t_541_type_function_action = -1;
+static gint hf_dcd_tlv_t_541_type = -1;
+static gint hf_dcd_tlv_t_541_function = -1;
+static gint hf_dcd_tlv_t_541_action = -1;
+static gint hf_dcd_tlv_t_542_trigger_value = -1;
+static gint hf_dcd_tlv_t_543_trigger_averaging_duration = -1;
+
+static gint hf_dcd_unknown_type = -1;
+static gint hf_dcd_invalid_tlv = -1;
+
+/* DCD DIUC messages (table 143) */
+static const value_string diuc_msgs[] =
+{
+ { 0, "Downlink Burst Profile 1"},
+ { 1, "Downlink Burst Profile 2"},
+ { 2, "Downlink Burst Profile 3"},
+ { 3, "Downlink Burst Profile 4"},
+ { 4, "Downlink Burst Profile 5"},
+ { 5, "Downlink Burst Profile 6"},
+ { 6, "Downlink Burst Profile 7"},
+ { 7, "Downlink Burst Profile 8"},
+ { 8, "Downlink Burst Profile 9"},
+ { 9, "Downlink Burst Profile 10"},
+ {10, "Downlink Burst Profile 11"},
+ {11, "Downlink Burst Profile 12"},
+ {12, "Downlink Burst Profile 13"},
+ {13, "Reserved"},
+ {14, "Gap"},
+ {15, "End of DL-MAP"},
+ {0, NULL}
+};
+
+static const value_string vals_dcd_type[] =
+{
+ {0, "CINR metric"},
+ {1, "RSSI metric"},
+ {2, "RTD metric"},
+ {3, "Reserved"},
+ {0, NULL}
+};
+
+static const value_string vals_dcd_function[] =
+{
+ {0, "Reserved"},
+ {1, "Metric of neighbor BS is greater than absolute value"},
+ {2, "Metric of neighbor BS is less than absolute value"},
+ {3, "Metric of neighbor BS is greater than serving BS metric by relative value"},
+ {4, "Metric of neighbor BS is less than serving BS metric by relative value"},
+ {5, "Metric of serving BS greater than absolute value"},
+ {6, "Metric of serving BS less than absolute value"},
+ {7, "Reserved"},
+ {0, NULL}
+};
+
+static const value_string vals_dcd_action[] =
+{
+ {0, "Reserved"},
+ {1, "Respond on trigger with MOB_SCN-REP after the end of each scanning interval"},
+ {2, "Respond on trigger with MOB_MSH-REQ"},
+ {3, "On trigger, MS starts neighbor BS scanning process by sending MOB_SCN-REQ"},
+ {4, "Reserved"},
+ {0, NULL}
+};
+
+static const value_string vals_dcd_power_adjustmnt[] =
+{
+ {0, "Preserve Peak Power"},
+ {1, "Preserve Mean Power"},
+ {0, NULL}
+};
+
+#if 0
+static const true_false_string tfs_dcd_power_adjustment =
+{
+ "Preserve Mean Power",
+ "Preserve Peak Power"
+};
+#endif
+
+#if 0
+static const value_string vals_reg_rsp_status[] =
+{
+ {0, "OK"},
+ {1, "Message authentication failure"},
+ {0, NULL}
+};
+#endif
+
+static const value_string vals_dcd_burst_tcs[] =
+{
+ {0, "TCS disabled"},
+ {1, "TCS enabled"},
+ {0, NULL}
+};
+
+#if 0
+static const true_false_string tfs_dcd_burst_tcs =
+{
+ "TCS enabled",
+ "TCS disabled"
+};
+#endif
+
+static const value_string vals_dcd_frame_duration[] =
+{
+ {0, "2.5"},
+ {1, "4"},
+ {2, "5"},
+ {3, "8"},
+ {4, "10"},
+ {5, "12.5"},
+ {6, "20"},
+ {0, NULL}
+};
+
+#ifdef WIMAX_16D_2004
+static const value_string vals_dcd_size_of_cqich_id[] =
+{
+ {0, "Reserved"},
+ {1, "3 bits"},
+ {2, "4 bits"},
+ {3, "5 bits"},
+ {4, "6 bits"},
+ {5, "7 bits"},
+ {6, "8 bits"},
+ {7, "9 bits"},
+ {0, NULL}
+};
+#endif
+
+static const value_string vals_dcd_mac_version[] =
+{
+ { 1, "Conformance with IEEE Std 802.16-2001"},
+ { 2, "Conformance with IEEE Std 802.16c-2002 and its predecessors"},
+ { 3, "Conformance with IEEE Std 802.16a-2003 and its predecessors"},
+ { 4, "Conformance with IEEE Std 802.16-2004"},
+ { 5, "Conformance with IEEE Std 802.16-2004 and IEEE Std 802.16e-2005"},
+ { 6, "Conformance with IEEE Std 802.16-2004, IEEE Std 802.16e-2005 and IEEE Std 802.16f-2005"},
+ { 7, "Conformance with IEEE Std 802.16-2004, IEEE Std 802.16e-2005, IEEE Std 802.16f-2005 and IEEE Std 802.16g-2007"},
+ { 8, "Conformance with IEEE Std 802.16-2009"},
+ { 9, "Conformance with IEEE Std 802.16-2009 and IEEE Std 802.16j-2009"},
+ {10, "Reserved"},
+ {0, NULL}
+};
+
+/* table 363 */
+static const value_string vals_dcd_burst_fec_ofdma[] =
+{
+ { 0, "QPSK (CC) 1/2"},
+ { 1, "QPSK (CC) 3/4"},
+ { 2, "16-QAM (CC) 1/2"},
+ { 3, "16-QAM (CC) 3/4"},
+ { 4, "64-QAM (CC) 1/2"},
+ { 5, "64-QAM (CC) 2/3"},
+ { 6, "64-QAM (CC) 3/4"},
+ { 7, "QPSK (BTC) 1/2"},
+ { 8, "QPSK (BTC) 3/4 or 2/3"},
+ { 9, "16-QAM (BTC) 3/5"},
+ {10, "16-QAM (BTC) 4/5"},
+ {11, "64-QAM (BTC) 2/3 or 5/8"},
+ {12, "64-QAM (BTC) 5/6 or 4/5"},
+ {13, "QPSK (CTC) 1/2"},
+ {14, "Reserved"},
+ {15, "QPSK (CTC) 3/4"},
+ {16, "16-QAM (CTC) 1/2"},
+ {17, "16-QAM (CTC) 3/4"},
+ {18, "64-QAM (CTC) 1/2"},
+ {19, "64-QAM (CTC) 2/3"},
+ {20, "64-QAM (CTC) 3/4"},
+ {21, "64-QAM (CTC) 5/6"},
+ {22, "QPSK (ZT CC) 1/2"},
+ {23, "QPSK (ZT CC) 3/4"},
+ {24, "16-QAM (ZT CC) 1/2"},
+ {25, "16-QAM (ZT CC) 3/4"},
+ {26, "64-QAM (ZT CC) 1/2"},
+ {27, "64-QAM (ZT CC) 2/3"},
+ {28, "64-QAM (ZT CC) 3/4"},
+ {29, "QPSK (LDPC) 1/2"},
+ {30, "QPSK (LDPC) 2/3 A code"},
+ {31, "16-QAM (LDPC) 3/4 A code"},
+ {32, "16-QAM (LDPC) 1/2"},
+ {33, "16-QAM (LDPC) 2/3 A code"},
+ {34, "16-QAM (LDPC) 3/4 A code"},
+ {35, "64-QAM (LDPC) 1/2"},
+ {36, "64-QAM (LDPC) 2/3 A code"},
+ {37, "64-QAM (LDPC) 3/4 A code"},
+ {38, "QPSK (LDPC) 2/3 B code"},
+ {39, "QPSK (LDPC) 3/4 B code"},
+ {40, "16-QAM (LDPC) 2/3 B code"},
+ {41, "16-QAM (LDPC) 3/4 B code"},
+ {42, "64-QAM (LDPC) 2/3 B code"},
+ {43, "64-QAM (LDPC) 3/4 B code"},
+ {44, "QPSK (CC with optional interleaver) 1/2"},
+ {45, "QPSK (CC with optional interleaver) 3/4"},
+ {46, "16-QAM (CC with optional interleaver) 1/2"},
+ {47, "16-QAM (CC optional interleaver) 3/4"},
+ {48, "64-QAM (CC with optional interleaver) 2/3"},
+ {49, "64-QAM (CC with optional interleaver) 3/4"},
+ {50, "QPSK (LDPC) 5/6"},
+ {51, "16-QAM (LDPC) 5/6"},
+ {52, "64-QAM (LDPC) 5/6"},
+ {0, NULL}
+};
+
+static const value_string vals_dcd_permutation_type[] =
+{
+ {0, "PUSC"},
+ {1, "FUSC"},
+ {2, "optional FUSC"},
+ {3, "AMC"},
+ {0, NULL}
+};
+
+static const value_string tfs_support[] =
+{
+ {0, "not supported"},
+ {1, "supported"},
+ {0, NULL}
+};
+
+
+/* WiMax MAC Management DCD message (table 15) dissector */
+static int dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tvb_len, length;
+ gint tlv_type, tlv_len, tlv_offset, tlv_value_offset;
+ guint dl_burst_diuc, dl_num_regions;
+ proto_item *dcd_item, *tlv_item, *sub_item;
+ proto_tree *dcd_tree, *tlv_tree, *sub_tree;
+ tlv_info_t tlv_info;
+ gchar* proto_str;
+
+ { /* we are being asked for details */
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC payload type DCD */
+ dcd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dcd_decoder, tvb, offset, tvb_len, "Downlink Channel Descriptor (DCD)");
+ /* add MAC DCD subtree */
+ dcd_tree = proto_item_add_subtree(dcd_item, ett_mac_mgmt_msg_dcd_decoder);
+ /* Decode and display the Downlink Channel Descriptor (DCD) */
+ /* display the Downlink Channel ID */
+ proto_tree_add_item(dcd_tree, hf_dcd_downlink_channel_id, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* set the offset for the Configuration Change Count */
+ offset++;
+ /* display the Configuration Change Count */
+ proto_tree_add_item(dcd_tree, hf_dcd_config_change_count, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* set the offset for the TLV Encoded info */
+ offset++;
+ /* process the DCD TLV Encoded information (table 358) */
+ while(offset < tvb_len)
+ {
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "DCD TLV error");
+ proto_tree_add_item(dcd_tree, hf_dcd_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(dcd_tree, proto_mac_mgmt_msg_dcd_decoder, tvb, offset, (tlv_len + tlv_value_offset), "DCD Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, tlv_len, offset, tvb_len);
+#endif
+ /* update the offset */
+ offset += tlv_value_offset;
+ /* process DCD TLVs */
+ switch (tlv_type)
+ {
+ case DCD_DOWNLINK_BURST_PROFILE:
+ { /* Downlink Burst Profile TLV (table 363)*/
+ /* get the DIUC */
+ dl_burst_diuc = (tvb_get_guint8(tvb, offset) & 0x0F);
+ /* display TLV info */
+ /* add TLV subtree */
+ proto_str = wmem_strdup_printf(wmem_packet_scope(), "Downlink_Burst_Profile (DIUC=%u)", dl_burst_diuc);
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dcd_decoder, dcd_tree, proto_mac_mgmt_msg_dcd_decoder, tvb, offset-tlv_value_offset, tlv_len, proto_str);
+ /* detail display */
+ proto_tree_add_item(tlv_tree, hf_dcd_dl_burst_profile_rsv, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_dcd_dl_burst_profile_diuc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* process subTLVs */
+ for (tlv_offset = 1; tlv_offset < tlv_len; )
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, (offset+tlv_offset));
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ length = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "DL Burst Profile TLV error");
+ proto_tree_add_item(tlv_tree, hf_dcd_invalid_tlv, tvb, offset, (tlv_len - offset - tlv_offset), ENC_NA);
+ break;
+ }
+
+ switch (tlv_type)
+ {
+ case DCD_BURST_FREQUENCY:
+ {
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_burst_freq, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_BURST_FEC_CODE_TYPE:
+ {
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_burst_fec, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_BURST_DIUC_EXIT_THRESHOLD:
+ {
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_burst_diuc_exit_threshold, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_BURST_DIUC_ENTRY_THRESHOLD:
+ {
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_burst_diuc_entry_threshold, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_BURST_TCS_ENABLE:
+ {
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_burst_tcs, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
+ break;
+ }
+ default:
+ /* ??? */
+ break;
+ }
+ tlv_offset += (length+get_tlv_value_offset(&tlv_info));
+ }
+ break;
+ }
+ case DCD_BS_EIRP:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_bs_eirp, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_FRAME_DURATION:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_frame_duration, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_PHY_TYPE:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_phy_type, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_POWER_ADJUSTMENT:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_power_adjustment, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_CHANNEL_NR:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_channel_nr, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_TTG:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_ttg, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_RTG:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_rtg, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+#ifdef WIMAX_16D_2004
+ case DCD_RSS:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_rss, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+#else
+ case DCD_EIRXP:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_eirxp, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+#endif
+ case DCD_CHANNEL_SWITCH_FRAME_NR:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_channel_switch_frame_nr, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_FREQUENCY:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_frequency, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_BS_ID:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_bs_id, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_FRAME_DURATION_CODE:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_frame_duration_code, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_FRAME_NR:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_frame_nr, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+#ifdef WIMAX_16D_2004
+ case DCD_SIZE_CQICH_ID:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_size_cqich_id, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+#endif
+ case DCD_H_ARQ_ACK_DELAY:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_h_arq_ack_delay, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_MAC_VERSION:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_mac_version, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_TLV_T_19_PERMUTATION_TYPE_FOR_BROADCAST_REGION_IN_HARQ_ZONE:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_19_permutation_type_for_broadcast_regions_in_harq_zone, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_TLV_T_20_MAXIMUM_RETRANSMISSION:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_20_maximum_retransmission, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_TLV_T_21_DEFAULT_RSSI_AND_CINR_AVERAGING_PARAMETER:
+ {
+ tlv_item = add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_dcd_decoder);
+ proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_physical_cinr_measurements, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_rssi_measurements, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_TLV_T_22_DL_AMC_ALLOCATED_PHYSICAL_BANDS_BITMAP:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_22_dl_amc_allocated_physical_bands_bitmap, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ }
+ case DCD_TLV_T_34_DL_REGION_DEFINITION:
+ {
+ tlv_item = add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_34_dl_region_definition, tvb, offset-tlv_value_offset, ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_dcd_decoder);
+ dl_num_regions = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_num_region, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ tlv_offset = offset;
+ for(length = 0; length < dl_num_regions; length++)
+ {
+ proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_symbol_offset, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_subchannel_offset, tvb, (tlv_offset+1), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_num_symbols, tvb, (tlv_offset+2), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_num_subchannels, tvb, (tlv_offset+3), 1, ENC_BIG_ENDIAN);
+ tlv_offset += 4;
+ }
+ break;
+ }
+ case DCD_TLV_T_50_HO_TYPE_SUPPORT:
+ {
+ tlv_item = add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_50_ho_type_support, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_dcd_decoder);
+ proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_50_ho_type_support_ho, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_50_ho_type_support_mdho, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_50_ho_type_support_fbss_ho, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_50_ho_type_support_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_TLV_T_31_H_ADD_THRESHOLD:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_31_h_add_threshold, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_TLV_T_32_H_DELETE_THRESHOLD:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_32_h_delete_threshold, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_TLV_T_33_ASR:
+ {
+ tlv_item = add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_33_asr, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_dcd_decoder);
+ proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_33_asr_m, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_33_asr_l, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_TLV_T_35_PAGING_GROUP_ID:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_35_paging_group_id, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_TLV_T_36_TUSC1_PERMUTATION_ACTIVE_SUBCHANNELS_BITMAP:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_36_tusc1_permutation_active_subchannels_bitmap, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_TLV_T_37_TUSC2_PERMUTATION_ACTIVE_SUBCHANNELS_BITMAP:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_37_tusc2_permutation_active_subchannels_bitmap, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_TLV_T_51_HYSTERSIS_MARGIN:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_51_hysteresis_margin, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_TLV_T_52_TIME_TO_TRIGGER_DURATION:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_52_time_to_trigger_duration, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_TLV_T_54_TRIGGER:
+ { /* Trigger TLV (table 358a & 358b) */
+ /* add TLV subtree */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dcd_decoder, dcd_tree, proto_mac_mgmt_msg_dcd_decoder, tvb, offset-tlv_value_offset, tlv_len, "DCD Trigger");
+ for (tlv_offset = 0; tlv_offset < tlv_len; )
+ {
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, (offset + tlv_offset));
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ length = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Trigger TLV error");
+ proto_tree_add_item(tlv_tree, hf_dcd_invalid_tlv, tvb, offset, (tlv_len - offset - tlv_offset), ENC_NA);
+ break;
+ }
+ /* update the offset */
+ tlv_offset += get_tlv_value_offset(&tlv_info);
+ /* table 358a */
+ switch (tlv_type)
+ {
+ case DCD_TLV_T_541_TYPE_FUNCTION_ACTION:
+ { /* table 358b */
+ sub_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_tlv_t_541_type_function_action, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ sub_tree = proto_item_add_subtree(sub_item, ett_mac_mgmt_msg_dcd_decoder);
+ proto_tree_add_item(sub_tree, hf_dcd_tlv_t_541_type, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_dcd_tlv_t_541_function, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_dcd_tlv_t_541_action, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ }
+ break;
+ case DCD_TLV_T542_TRIGGER_VALUE:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_tlv_t_542_trigger_value, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ case DCD_TLV_T_543_TRIGGER_AVERAGING_DURATION:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_dcd_tlv_t_543_trigger_averaging_duration, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ }
+ tlv_offset += length;
+ }
+ break;
+ }
+ case DCD_TLV_T_60_NOISE_AND_INTERFERENCE:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_60_noise_interference, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_TLV_T_153_DOWNLINK_BURST_PROFILE_FOR_MULTIPLE_FEC_TYPES:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_153_downlink_burst_profile_for_mutiple_fec_types, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_RESTART_COUNT:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_restart_count, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case DCD_TLV_T_45_PAGING_INTERVAL_LENGTH:
+ {
+ if (include_cor2_changes) {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_45_paging_interval_reserved, tvb, offset-tlv_value_offset, ENC_NA);
+ } else {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_45_paging_interval_length, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ }
+ break;
+ }
+ default:
+ {
+ add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_unknown_type, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ }
+ }
+ offset += tlv_len;
+ } /* end of TLV process while loop */
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_dcd(void)
+{
+ /* DCD display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_dcd_tlv_t_33_asr,
+ {
+ "ASR (Anchor Switch Report) Slot Length (M) and Switching Period (L)", "wmx.dcd.asr",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_33_asr_l,
+ {
+ "ASR Switching Period (L)", "wmx.dcd.asr.l",
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_frames, 0x0f, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_33_asr_m,
+ {
+ "ASR Slot Length (M)", "wmx.dcd.asr.m",
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_frames, 0xf0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_bs_eirp,
+ {
+ "BS EIRP", "wmx.dcd.bs_eirp",
+ FT_INT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_dbm, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_bs_id,
+ {
+ "Base Station ID", "wmx.dcd.bs_id",
+ FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_restart_count,
+ {
+ "BS Restart Count", "wmx.dcd.bs_restart_count",
+ FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_dl_burst_diuc,
+ {
+ "DIUC", "wmx.dcd.burst.diuc",
+ FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_dcd_burst_diuc_entry_threshold,
+ {
+ "DIUC Minimum Entry Threshold (in 0.25 dB units)", "wmx.dcd.burst.diuc_entry_threshold",
+ FT_FLOAT, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_burst_diuc_exit_threshold,
+ {
+ "DIUC Mandatory Exit Threshold (in 0.25 dB units)", "wmx.dcd.burst.diuc_exit_threshold",
+ FT_FLOAT, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_burst_fec,
+ {
+ "FEC Code Type", "wmx.dcd.burst.fec",
+ FT_UINT8, BASE_DEC, VALS(vals_dcd_burst_fec_ofdma), 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_burst_freq,
+ {
+ "Frequency", "wmx.dcd.burst.freq",
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_khz, 0x00, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_dl_burst_reserved,
+ {
+ "Reserved", "wmx.dcd.burst.reserved",
+ FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_dcd_burst_tcs,
+ {
+ "TCS", "wmx.dcd.burst.tcs",
+ FT_UINT8, BASE_DEC, VALS(vals_dcd_burst_tcs), 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_channel_nr,
+ {
+ "Channel Nr", "wmx.dcd.channel_nr",
+ FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_config_change_count,
+ {
+ "Configuration Change Count", "wmx.dcd.config_change_count",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_physical_cinr_measurements,
+ {
+ "Default Averaging Parameter for Physical CINR Measurements (in multiples of 1/16)", "wmx.dcd.default_physical_cinr_meas_averaging_parameter",
+ FT_UINT8, BASE_HEX, NULL, 0xf0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter,
+ {
+ "Default RSSI and CINR Averaging Parameter", "wmx.dcd.default_rssi_and_cinr_averaging_parameter",
+ FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_rssi_measurements,
+ {
+ "Default Averaging Parameter for RSSI Measurements (in multiples of 1/16)", "wmx.dcd.default_rssi_meas_averaging_parameter",
+ FT_UINT8, BASE_HEX, NULL, 0x0f, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_22_dl_amc_allocated_physical_bands_bitmap,
+ {
+ "DL AMC Allocated Physical Bands Bitmap", "wmx.dcd.dl_amc_allocated_phy_bands_bitmap",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_dl_burst_profile_diuc,
+ {
+ "DIUC", "wmx.dcd.dl_burst_profile_diuc",
+ FT_UINT8, BASE_DEC, VALS(diuc_msgs), 0x0F, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_dl_burst_profile_rsv,
+ {
+ "Reserved", "wmx.dcd.dl_burst_profile_rsv",
+ FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_downlink_channel_id,
+ {
+ "Reserved", "wmx.dcd.dl_channel_id",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_153_downlink_burst_profile_for_mutiple_fec_types,
+ {
+ "Downlink Burst Profile for Multiple FEC Types","wimax.dcd.dl_burst_profile_multiple_fec_types",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_34_dl_region_definition,
+ {
+ "DL Region Definition", "wmx.dcd.dl_region_definition",
+ FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_34_dl_region_definition_num_region,
+ {
+ "Number of Regions", "wmx.dcd.dl_region_definition.num_region",
+ FT_UINT8, BASE_DEC, NULL, 0xFC, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_34_dl_region_definition_num_subchannels,
+ {
+ "Number of Subchannels", "wmx.dcd.dl_region_definition.num_subchannels",
+ FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_34_dl_region_definition_num_symbols,
+ {
+ "Number of OFDMA Symbols", "wmx.dcd.dl_region_definition.num_symbols",
+ FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_34_dl_region_definition_reserved,
+ {
+ "Reserved", "wmx.dcd.dl_region_definition.reserved",
+ FT_UINT8, BASE_DEC, NULL, 0x03, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_34_dl_region_definition_subchannel_offset,
+ {
+ "Subchannel Offset", "wmx.dcd.dl_region_definition.subchannel_offset",
+ FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_34_dl_region_definition_symbol_offset,
+ {
+ "OFDMA Symbol Offset", "wmx.dcd.dl_region_definition.symbol_offset",
+ FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+#ifndef WIMAX_16D_2004
+ {
+ &hf_dcd_eirxp,
+ {
+ "EIRXP (IR, max)", "wmx.dcd.eirxp",
+ FT_INT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_dbm, 0x00, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_dcd_frame_duration,
+ {
+ "Frame Duration", "wmx.dcd.frame_duration",
+ FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_frame_duration_code,
+ {
+ "Frame Duration Code", "wmx.dcd.frame_duration_code",
+ FT_UINT8, BASE_HEX, VALS(vals_dcd_frame_duration), 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_frame_nr,
+ {
+ "Frame Number", "wmx.dcd.frame_nr",
+ FT_UINT24, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_frequency,
+ {
+ "Downlink Center Frequency", "wmx.dcd.frequency",
+ FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_khz, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_31_h_add_threshold,
+ {
+ "H_add Threshold", "wmx.dcd.h_add_threshold",
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_db, 0x0, NULL, HFILL
+ }
+ },
+#ifdef WIMAX_16D_2004
+ {
+ &hf_dcd_h_arq_ack_delay,
+ {
+ "H-ARQ ACK Delay for DL Burst", "wmx.dcd.h_arq_ack_delay_dl_burst",
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_offset, 0x00, "", HFILL
+ }
+ },
+#else
+ {
+ &hf_dcd_h_arq_ack_delay,
+ {
+ "H-ARQ ACK Delay for UL Burst", "wmx.dcd.h_arq_ack_delay_ul_burst",
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_offset, 0x00, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_dcd_tlv_t_32_h_delete_threshold,
+ {
+ "H_delete Threshold", "wmx.dcd.h_delete_threshold",
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_db, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_50_ho_type_support,
+ {
+ "HO Type Support", "wmx.dcd.ho_type_support",
+ FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_50_ho_type_support_fbss_ho,
+ {
+ "FBSS HO", "wmx.dcd.ho_type_support.fbss_ho",
+ FT_UINT8, BASE_HEX, VALS(tfs_support), 0x20, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_50_ho_type_support_ho,
+ {
+ "HO", "wmx.dcd.ho_type_support.ho",
+ FT_UINT8, BASE_HEX, VALS(tfs_support), 0x80, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_50_ho_type_support_mdho,
+ {
+ "MDHO", "wmx.dcd.ho_type_support.mdho",
+ FT_UINT8, BASE_HEX, VALS(tfs_support), 0x40, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_50_ho_type_support_reserved,
+ {
+ "Reserved", "wmx.dcd.ho_type_support.reserved",
+ FT_UINT8, BASE_HEX, NULL, 0x1f, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_51_hysteresis_margin,
+ {
+ "Hysteresis Margin", "wmx.dcd.hysteresis_margin",
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_db, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_invalid_tlv,
+ {
+ "Invalid TLV", "wmx.dcd.invalid_tlv",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_mac_version,
+ {
+ "MAC Version", "wmx.dcd.mac_version",
+ FT_UINT8, BASE_DEC, VALS(vals_dcd_mac_version), 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_20_maximum_retransmission,
+ {
+ "Maximum Retransmission", "wmx.dcd.maximum_retransmission",
+ FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_60_noise_interference,
+ {
+ "Noise and Interference", "wmx.dcd.noise_interference",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_35_paging_group_id,
+ {
+ "Paging Group ID", "wmx.dcd.paging_group_id",
+ FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_36_tusc1_permutation_active_subchannels_bitmap,
+ {
+ "TUSC1 permutation active subchannels bitmap", "wmx.dcd.tusc1",
+ FT_UINT16, BASE_HEX, NULL, 0xFF80, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_37_tusc2_permutation_active_subchannels_bitmap,
+ {
+ "TUSC2 permutation active subchannels bitmap", "wmx.dcd.tusc2",
+ FT_UINT16, BASE_HEX, NULL, 0xFFF8, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_45_paging_interval_length,
+ {
+ "Paging Interval Length", "wmx.dcd.paging_interval_length",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_45_paging_interval_reserved,
+ {
+ "Reserved", "wmx.dcd.paging_interval_reserved",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_19_permutation_type_for_broadcast_regions_in_harq_zone,
+ {
+ "Permutation Type for Broadcast Region in HARQ Zone", "wmx.dcd.permutation_type_broadcast_region_in_harq_zone",
+ FT_UINT8, BASE_DEC, VALS(vals_dcd_permutation_type), 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_phy_type,
+ {
+ "PHY Type", "wmx.dcd.phy_type",
+ FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_power_adjustment,
+ {
+ "Power Adjustment Rule", "wmx.dcd.power_adjustment",
+ FT_UINT8, BASE_HEX, VALS(vals_dcd_power_adjustmnt), 0x00, NULL, HFILL
+ }
+ },
+#ifdef WIMAX_16D_2004
+ {
+ &hf_dcd_rss,
+ {
+ "RSS (IR, max)", "wmx.dcd.rss",
+ FT_INT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_dbm, 0x00, "", HFILL
+ }
+ },
+#endif
+ {
+ &hf_dcd_rtg,
+ {
+ "RTG", "wmx.dcd.rtg",
+ FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_ps, 0x00, NULL, HFILL
+ }
+ },
+#ifdef WIMAX_16D_2004
+ {
+ &hf_dcd_size_cqich_id,
+ {
+ "Size of CQICH-ID Field", "wmx.dcd.size_cqich_id",
+ FT_UINT8, BASE_DEC, VALS(vals_dcd_size_of_cqich_id), 0x00, "", HFILL
+ }
+ },
+#endif
+ {
+ &hf_dcd_channel_switch_frame_nr,
+ {
+ "Channel Switch Frame Number", "wmx.dcd.switch_frame",
+ FT_UINT24, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_52_time_to_trigger_duration,
+ {
+ "Time to Trigger Duration", "wmx.dcd.time_trigger_duration",
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_ms, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_543_trigger_averaging_duration,
+ {
+ "Trigger Averaging Duration", "wmx.dcd.trigger_averaging_duration",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_542_trigger_value,
+ {
+ "Trigger Value", "wmx.dcd.trigger_value",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_ttg,
+ {
+ "TTG", "wmx.dcd.ttg",
+ FT_UINT16, BASE_HEX|BASE_UNIT_STRING, &wimax_units_ps, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_541_type_function_action,
+ {
+ "Type/Function/Action", "wmx.dcd.type_function_action",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_541_action,
+ {
+ "Action", "wmx.dcd.type_function_action.action",
+ FT_UINT8, BASE_HEX, VALS(vals_dcd_action), 0x7, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_541_function,
+ {
+ "Function", "wmx.dcd.type_function_action.function",
+ FT_UINT8, BASE_HEX, VALS(vals_dcd_function), 0x38, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_tlv_t_541_type,
+ {
+ "Type", "wmx.dcd.type_function_action.type",
+ FT_UINT8, BASE_HEX, VALS(vals_dcd_type), 0xC0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dcd_unknown_type,
+ {
+ "Unknown DCD Type", "wmx.dcd.unknown_tlv_value",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_mgmt_msg_dcd_decoder,
+ };
+
+ proto_mac_mgmt_msg_dcd_decoder = proto_register_protocol (
+ "WiMax DCD Messages", /* name */
+ "WiMax DCD", /* short name */
+ "wmx.dcd" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_dcd_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+void proto_reg_handoff_mac_mgmt_msg_dcd(void)
+{
+ dissector_handle_t dcd_handle;
+
+ dcd_handle = create_dissector_handle(dissect_mac_mgmt_msg_dcd_decoder, proto_mac_mgmt_msg_dcd_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DCD, dcd_handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_dlmap.c b/plugins/epan/wimax/msg_dlmap.c
new file mode 100644
index 0000000000..6e2a0e4352
--- /dev/null
+++ b/plugins/epan/wimax/msg_dlmap.c
@@ -0,0 +1,3486 @@
+/* msg_dlmap.c
+ * WiMax MAC Management DL-MAP Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Mike Harvey <michael.harvey@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include <epan/expert.h>
+#include "wimax_mac.h"
+#include "crc.h"
+#include "wimax_bits.h"
+#include "wimax_utils.h"
+
+extern gboolean include_cor2_changes;
+
+void proto_register_mac_mgmt_msg_dlmap(void);
+void proto_reg_handoff_mac_mgmt_msg_dlmap(void);
+
+#define MAC_MGMT_MSG_DLMAP 2
+
+#define XBIT_HF(bits, hf) \
+ proto_tree_add_bits_item(tree, hf, tvb, bit, bits, ENC_BIG_ENDIAN); bit += bits;
+
+#define XBIT_HF_VALUE(var, bits, hf) \
+ do { \
+ var = TVB_BIT_BITS(bit, tvb, bits); \
+ proto_tree_add_bits_item(tree, hf, tvb, bit, bits, ENC_BIG_ENDIAN); \
+ bit += bits; \
+ } while(0)
+
+#define VBIT(var, bits, hf) \
+ do { \
+ var = TVB_BIT_BITS(bit, tvb, bits); \
+ proto_tree_add_uint(tree, hf, tvb, BITHI(bit,bits), var); \
+ bit += bits; \
+ } while(0)
+
+#define VNIB(var, nibs, hf) \
+ do { \
+ var = TVB_NIB_NIBS(nib, tvb, nibs); \
+ proto_tree_add_uint(tree, hf, tvb, NIBHI(nib, nibs), var); \
+ nib += nibs; \
+ } while(0)
+
+gint harq = 0; /* 1 if HARQ enabled (TODO) */
+gint fusc = 0; /* 1 if current zone permutation is FUSC or optional FUSC (TODO) */
+gint tusc = 0; /* 1 if current zone permutation is AMC, TUSC1 or TUSC2 (TODO) */
+gint ir_type = 0; /* reduced AAS map (TODO) */
+gint RCID_Type = 0;
+gint N_layer = 0;
+gint STC_Zone_Dedicated_Pilots = 0;
+gint STC_Zone_Matrix = 0;
+gint INC_CID = 0;
+gint sub_dl_ul_map = 0;
+
+static gint proto_mac_mgmt_msg_dlmap_decoder = -1;
+
+static gint ett_dlmap = -1;
+static gint ett_dlmap_ie = -1;
+/* static gint ett_dlmap_c_ie = -1; */
+static gint ett_109x = -1; /* SUB-DL-UL-MAP */
+static gint ett_109x_dl = -1;
+static gint ett_109x_ul = -1;
+static gint ett_275_phy = -1;
+static gint ett_275_1 = -1;
+static gint ett_277 = -1;
+static gint ett_277b = -1;
+static gint ett_278 = -1;
+static gint ett_279 = -1;
+static gint ett_280 = -1;
+static gint ett_281 = -1;
+static gint ett_282 = -1;
+static gint ett_283 = -1;
+static gint ett_284 = -1;
+static gint ett_285 = -1;
+static gint ett_286 = -1;
+static gint ett_286a = -1;
+static gint ett_286b = -1;
+static gint ett_286c = -1;
+static gint ett_286d = -1;
+static gint ett_286e = -1;
+static gint ett_286f = -1;
+static gint ett_286g = -1;
+static gint ett_286h = -1;
+static gint ett_286i = -1;
+static gint ett_286j = -1;
+static gint ett_286k = -1;
+static gint ett_286l = -1;
+static gint ett_286m = -1;
+static gint ett_286n = -1;
+static gint ett_286o = -1;
+static gint ett_286p = -1;
+static gint ett_286q = -1;
+static gint ett_286r = -1;
+static gint ett_286s = -1;
+static gint ett_286t = -1;
+static gint ett_286u = -1;
+static gint ett_286v = -1;
+static gint ett_286w = -1;
+static gint ett_286x = -1;
+static gint ett_286y = -1;
+static gint ett_286z = -1;
+static gint ett_305 = -1;
+/* static gint ett_305_dl = -1; */
+static gint ett_308a = -1;
+
+#define DCD_DOWNLINK_BURST_PROFILE 1
+#define DCD_BS_EIRP 2
+#define DCD_FRAME_DURATION 3
+#define DCD_PHY_TYPE 4
+#define DCD_POWER_ADJUSTMENT 5
+#define DCD_CHANNEL_NR 6
+#define DCD_TTG 7
+#define DCD_RTG 8
+#define DCD_RSS 9
+#define DCD_CHANNEL_SWITCH_FRAME_NR 10
+#define DCD_FREQUENCY 12
+#define DCD_BS_ID 13
+#define DCD_FRAME_DURATION_CODE 14
+#define DCD_FRAME_NR 15
+#define DCD_SIZE_CQICH_ID 16
+#define DCD_H_ARQ_ACK_DELAY 17
+#define DCD_MAC_VERSION 148
+#define DCD_RESTART_COUNT 154
+
+#define DCD_BURST_FREQUENCY 1
+#define DCD_BURST_FEC_CODE_TYPE 150
+#define DCD_BURST_DIUC_EXIT_THRESHOLD 151
+#define DCD_BURST_DIUC_ENTRY_THRESHOLD 152
+#define DCD_BURST_TCS_ENABLE 153
+
+#define DCD_TLV_T_541_TYPE_FUNCTION_ACTION 1
+#define DCD_TLV_T542_TRIGGER_VALUE 2
+#define DCD_TLV_T_543_TRIGGER_AVERAGING_DURATION 3
+#define DCD_TLV_T_19_PERMUTATION_TYPE_FOR_BROADCAST_REGION_IN_HARQ_ZONE 19
+#define DCD_TLV_T_20_MAXIMUM_RETRANSMISSION 20
+#define DCD_TLV_T_21_DEFAULT_RSSI_AND_CINR_AVERAGING_PARAMETER 21
+#define DCD_TLV_T_22_DL_AMC_ALLOCATED_PHYSICAL_BANDS_BITMAP 22
+#define DCD_TLV_T_31_H_ADD_THRESHOLD 31
+#define DCD_TLV_T_32_H_DELETE_THRESHOLD 32
+#define DCD_TLV_T_33_ASR 33
+#define DCD_TLV_T_34_DL_REGION_DEFINITION 34
+#define DCD_TLV_T_35_PAGING_GROUP_ID 35
+#define DCD_TLV_T_36_TUSC1_PERMUTATION_ACTIVE_SUBCHANNELS_BITMAP 36
+#define DCD_TLV_T_37_TUSC2_PERMUTATION_ACTIVE_SUBCHANNELS_BITMAP 37
+#define DCD_TLV_T_45_PAGING_INTERVAL_LENGTH 45
+#define DCD_TLV_T_50_HO_TYPE_SUPPORT 50
+#define DCD_TLV_T_51_HYSTERSIS_MARGIN 51
+#define DCD_TLV_T_52_TIME_TO_TRIGGER_DURATION 52
+#define DCD_TLV_T_54_TRIGGER 54
+#define DCD_TLV_T_153_DOWNLINK_BURST_PROFILE_FOR_MULTIPLE_FEC_TYPES 153
+
+#define DL_MAP_NCT_PMP 0
+#define DL_MAP_NCT_DM 1
+#define DL_MAP_NCT_PTP 2
+
+#if 0
+/* NCT messages */
+static const value_string nct_msgs[] =
+{
+ { DL_MAP_NCT_PMP, "PMP" },
+ { DL_MAP_NCT_PMP, "DM" },
+ { DL_MAP_NCT_PMP, "PTP" },
+ { 0, NULL }
+};
+#endif
+
+/* Repetition Coding Indications */
+static const value_string rep_msgs[] =
+{
+ { 0, "No Repetition Coding" },
+ { 1, "Repetition Coding of 2 Used" },
+ { 2, "Repetition Coding of 4 Used" },
+ { 3, "Repetition Coding of 6 Used" },
+ { 0, NULL }
+};
+
+/* DL Frame Prefix Coding Indications */
+static const value_string boost_msgs[] =
+{
+ { 0, "Normal (not boosted)" },
+ { 1, "+6dB" },
+ { 2, "-6dB" },
+ { 3, "+9dB" },
+ { 4, "+3dB" },
+ { 5, "-3dB" },
+ { 6, "-9dB" },
+ { 7, "-12dB" },
+ { 0, NULL }
+};
+
+/* OFDMA frame duration ms (Table 320)*/
+static const value_string frame_duration[] =
+{
+ { 0, "reserved"},
+ { 1, "2 ms"},
+ { 2, "2.5 ms"},
+ { 3, "4 ms"},
+ { 4, "5 ms"},
+ { 5, "8 ms"},
+ { 6, "10 ms"},
+ { 7, "12.5 ms"},
+ { 8, "20 ms"},
+ { 0, NULL}
+};
+
+/* OFDMA frames per second (Table 320)*/
+static const value_string frames_per_second[] =
+{
+ { 0, "reserved"},
+ { 1, "500"},
+ { 2, "400"},
+ { 3, "250"},
+ { 4, "200"},
+ { 5, "125"},
+ { 6, "100"},
+ { 7, "80"},
+ { 8, "50"},
+ { 0, NULL}
+};
+
+/* dl-map fields */
+static gint hf_dlmap_phy_fdur = -1;
+static gint hf_dlmap_phy_fdur_ms = -1;
+static gint hf_dlmap_phy_fdur_per_sec = -1;
+static gint hf_dlmap_phy_fnum = -1;
+/* static gint hf_dlmap_fch_expected = -1; */
+static gint hf_dlmap_dcd = -1;
+static gint hf_dlmap_bsid = -1;
+static gint hf_dlmap_ofdma_sym = -1;
+/* static gint hf_dlmap_ie = -1; */
+static gint hf_dlmap_ie_diuc = -1;
+static gint hf_dlmap_ie_reserved_extended2_duic = -1;
+static gint hf_dlmap_ie_reserved_extended_duic = -1;
+static gint hf_dlmap_ie_diuc_ext = -1;
+static gint hf_dlmap_ie_diuc_ext2 = -1;
+static gint hf_dlmap_ie_length = -1;
+static gint hf_dlmap_ie_bitmap = -1;
+static gint hf_dlmap_ie_bitmap_cqi = -1;
+static gint hf_dlmap_ie_bitmap_pusc = -1;
+static gint hf_dlmap_ie_bitmap_opt_pusc = -1;
+static gint hf_dlmap_ie_bitmap_amc = -1;
+static gint hf_dlmap_ie_bitmap_aas = -1;
+static gint hf_dlmap_ie_bitmap_periodic_ranging = -1;
+static gint hf_dlmap_ie_bitmap_sounding = -1;
+static gint hf_dlmap_ie_bitmap_mimo = -1;
+static gint hf_dlmap_ie_ncid = -1;
+static gint hf_dlmap_ie_cid = -1;
+static gint hf_dlmap_ie_offsym = -1;
+static gint hf_dlmap_ie_offsub = -1;
+static gint hf_dlmap_ie_boosting = -1;
+static gint hf_dlmap_ie_numsym = -1;
+static gint hf_dlmap_ie_numsub = -1;
+static gint hf_dlmap_ie_rep = -1;
+static gint hf_dlmap_ie_offsym2 = -1;
+static gint hf_dlmap_ie_offsub2 = -1;
+static gint hf_dlmap_ie_boosting2 = -1;
+static gint hf_dlmap_ie_numsym2 = -1;
+static gint hf_dlmap_ie_numsub2 = -1;
+static gint hf_dlmap_ie_rep2 = -1;
+
+/* static gint hf_dlmap_xie_diuc = -1; */
+/* static gint hf_dlmap_xie_len = -1; */
+
+static gint hf_dlmapc_compr = -1;
+static gint hf_dlmapc_ulmap = -1;
+static gint hf_dlmapc_rsv = -1;
+static gint hf_dlmapc_len = -1;
+/* static gint hf_dlmapc_sync = -1; */
+static gint hf_dlmapc_opid = -1;
+static gint hf_dlmapc_secid = -1;
+static gint hf_dlmapc_count = -1;
+
+#if 0
+static gint hf_109x_cmi = -1;
+static gint hf_109x_len = -1;
+static gint hf_109x_rcid = -1;
+static gint hf_109x_haoi = -1;
+static gint hf_109x_dl = -1;
+static gint hf_109x_ul = -1;
+static gint hf_109x_dlie = -1;
+static gint hf_109x_symofs = -1;
+static gint hf_109x_subofs = -1;
+static gint hf_109x_rsv = -1;
+#endif
+
+static gint hf_308a_cmi = -1;
+static gint hf_308a_ulmap = -1;
+static gint hf_308a_type = -1;
+static gint hf_308a_mult = -1;
+static gint hf_308a_rsv = -1;
+static gint hf_mac_header_compress_dlmap_crc = -1;
+static gint hf_mac_header_compress_dlmap_crc_status = -1;
+static gint hf_crc16 = -1;
+static gint hf_crc16_status = -1;
+static gint hf_padding = -1;
+static gint hf_cid_mask = -1;
+static gint hf_reserved = -1;
+
+/* Generated via "one time" script to help create filterable fields */
+static int hf_dlmap_rcid_ie_cid = -1;
+static int hf_dlmap_rcid_ie_prefix = -1;
+static int hf_dlmap_rcid_ie_cid11 = -1;
+static int hf_dlmap_rcid_ie_cid7 = -1;
+static int hf_dlmap_rcid_ie_cid3 = -1;
+static int hf_dlmap_dedicated_dl_control_length = -1;
+static int hf_dlmap_dedicated_dl_control_control_header = -1;
+static int hf_dlmap_dedicated_dl_control_num_sdma_layers = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_length = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_control_header_mimo_control_info = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_control_header_cqi_control_info = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_control_header_closed_mimo_control_info = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_n_layer = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_matrix = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_num_beamformed_streams = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_period = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_frame_offset = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_duration = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_allocation_index = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_cqich_num = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_feedback_type = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_antenna_grouping_index = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_num_stream = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_antenna_selection_index = -1;
+static int hf_dlmap_dedicated_mimo_dl_control_codebook_precoding_index = -1;
+static int hf_dlmap_n_sub_burst_isi = -1;
+static int hf_dlmap_harq_chase_n_ack_channel = -1;
+static int hf_dlmap_harq_chase_duration = -1;
+static int hf_dlmap_harq_chase_sub_burst_diuc_indicator = -1;
+static int hf_dlmap_reserved_uint = -1;
+static int hf_dlmap_harq_chase_diuc = -1;
+static int hf_dlmap_harq_chase_repetition_coding_indication = -1;
+static int hf_dlmap_harq_chase_acid = -1;
+static int hf_dlmap_harq_chase_ai_sn = -1;
+static int hf_dlmap_harq_chase_ack_disable = -1;
+static int hf_dlmap_harq_chase_dedicated_dl_control_indicator = -1;
+static int hf_dlmap_harq_chase_allocation_index = -1;
+static int hf_dlmap_harq_chase_period = -1;
+static int hf_dlmap_harq_chase_frame_offset = -1;
+static int hf_dlmap_harq_ir_ctc_n_ack_channel = -1;
+static int hf_dlmap_harq_ir_ctc_nep = -1;
+static int hf_dlmap_harq_ir_ctc_nsch = -1;
+static int hf_dlmap_harq_ir_ctc_spid = -1;
+static int hf_dlmap_harq_ir_ctc_acid = -1;
+static int hf_dlmap_harq_ir_ctc_ai_sn = -1;
+static int hf_dlmap_harq_ir_ctc_ack_disable = -1;
+static int hf_dlmap_harq_ir_ctc_dedicated_dl_control_indicator = -1;
+static int hf_dlmap_harq_ir_ctc_duration = -1;
+static int hf_dlmap_harq_ir_ctc_allocation_index = -1;
+static int hf_dlmap_harq_ir_ctc_period = -1;
+static int hf_dlmap_harq_ir_ctc_frame_offset = -1;
+static int hf_dlmap_harq_ir_cc_n_ack_channel = -1;
+static int hf_dlmap_harq_ir_cc_duration = -1;
+static int hf_dlmap_harq_ir_cc_sub_burst_diuc_indicator = -1;
+static int hf_dlmap_harq_ir_cc_diuc = -1;
+static int hf_dlmap_harq_ir_cc_repetition_coding_indication = -1;
+static int hf_dlmap_harq_ir_cc_acid = -1;
+static int hf_dlmap_harq_ir_cc_ai_sn = -1;
+static int hf_dlmap_harq_ir_cc_spid = -1;
+static int hf_dlmap_harq_ir_cc_ack_disable = -1;
+static int hf_dlmap_harq_ir_cc_dedicated_dl_control_indicator = -1;
+static int hf_dlmap_harq_ir_cc_allocation_index = -1;
+static int hf_dlmap_harq_ir_cc_period = -1;
+static int hf_dlmap_harq_ir_cc_frame_offset = -1;
+static int hf_dlmap_mimo_dl_chase_harq_n_ack_channel = -1;
+static int hf_dlmap_mimo_dl_chase_harq_mu_indicator = -1;
+static int hf_dlmap_mimo_dl_chase_harq_dedicated_mimo_dl_control_indicator = -1;
+static int hf_dlmap_mimo_dl_chase_harq_ack_disable = -1;
+static int hf_dlmap_mimo_dl_chase_harq_duration = -1;
+static int hf_dlmap_mimo_dl_chase_harq_diuc = -1;
+static int hf_dlmap_mimo_dl_chase_harq_repetition_coding_indication = -1;
+static int hf_dlmap_mimo_dl_chase_harq_acid = -1;
+static int hf_dlmap_mimo_dl_chase_harq_ai_sn = -1;
+static int hf_dlmap_mimo_dl_ir_harq_n_ack_channel = -1;
+static int hf_dlmap_mimo_dl_ir_harq_mu_indicator = -1;
+static int hf_dlmap_mimo_dl_ir_harq_dedicated_mimo_dl_control_indicator = -1;
+static int hf_dlmap_mimo_dl_ir_harq_ack_disable = -1;
+static int hf_dlmap_mimo_dl_ir_harq_nsch = -1;
+static int hf_dlmap_mimo_dl_ir_harq_nep = -1;
+static int hf_dlmap_mimo_dl_ir_harq_spid = -1;
+static int hf_dlmap_mimo_dl_ir_harq_acid = -1;
+static int hf_dlmap_mimo_dl_ir_harq_ai_sn = -1;
+static int hf_dlmap_mimo_dl_ir_harq_cc_n_ack_channel = -1;
+static int hf_dlmap_mimo_dl_ir_harq_cc_mu_indicator = -1;
+static int hf_dlmap_mimo_dl_ir_harq_cc_dedicated_mimo_dl_control_indicator = -1;
+static int hf_dlmap_mimo_dl_ir_harq_cc_ack_disable = -1;
+static int hf_dlmap_mimo_dl_ir_harq_cc_duration = -1;
+static int hf_dlmap_mimo_dl_ir_harq_cc_diuc = -1;
+static int hf_dlmap_mimo_dl_ir_harq_cc_repetition_coding_indication = -1;
+static int hf_dlmap_mimo_dl_ir_harq_cc_acid = -1;
+static int hf_dlmap_mimo_dl_ir_harq_cc_ai_sn = -1;
+static int hf_dlmap_mimo_dl_ir_harq_cc_spid = -1;
+static int hf_dlmap_mimo_dl_stc_harq_n_ack_channel = -1;
+static int hf_dlmap_mimo_dl_stc_harq_tx_count = -1;
+static int hf_dlmap_mimo_dl_stc_harq_duration = -1;
+static int hf_dlmap_mimo_dl_stc_harq_sub_burst_offset_indication = -1;
+static int hf_dlmap_mimo_dl_stc_harq_sub_burst_offset = -1;
+static int hf_dlmap_mimo_dl_stc_harq_ack_disable = -1;
+static int hf_dlmap_mimo_dl_stc_harq_dedicated_mimo_dl_control_indicator = -1;
+static int hf_dlmap_mimo_dl_stc_harq_diuc = -1;
+static int hf_dlmap_mimo_dl_stc_harq_repetition_coding_indication = -1;
+static int hf_dlmap_mimo_dl_stc_harq_acid = -1;
+static int hf_dlmap_mbs_map_extended_2_diuc = -1;
+static int hf_dlmap_mbs_map_mbs_zone_identifier = -1;
+static int hf_dlmap_mbs_map_macro_diversity_enhanced = -1;
+static int hf_dlmap_mbs_map_permutation = -1;
+static int hf_dlmap_mbs_map_dl_permbase = -1;
+static int hf_dlmap_mbs_map_prbs_id = -1;
+static int hf_dlmap_mbs_map_ofdma_symbol_offset = -1;
+static int hf_dlmap_mbs_map_diuc_change_indication = -1;
+static int hf_dlmap_mbs_map_boosting = -1;
+static int hf_dlmap_mbs_map_diuc = -1;
+static int hf_dlmap_mbs_map_num_subchannels = -1;
+static int hf_dlmap_mbs_map_num_ofdma_symbols = -1;
+static int hf_dlmap_mbs_map_repetition_coding_indication = -1;
+static int hf_dlmap_mbs_map_cid = -1;
+static int hf_dlmap_mbs_map_ofdma_symbols_offset = -1;
+static int hf_dlmap_mbs_map_subchannel_offset = -1;
+static int hf_dlmap_mbs_map_slc_3_indication = -1;
+static int hf_dlmap_mbs_map_next_mbs_map_ie_frame_offset = -1;
+static int hf_dlmap_skip_extended_2_diuc = -1;
+static int hf_dlmap_skip_mode = -1;
+static int hf_dlmap_harq_dl_map_extended_2_diuc = -1;
+static int hf_dlmap_harq_dl_map_rcid_type = -1;
+static int hf_dlmap_harq_dl_map_boosting = -1;
+static int hf_dlmap_harq_dl_map_region_id_use_indicator = -1;
+static int hf_dlmap_harq_dl_map_ofdma_symbol_offset = -1;
+static int hf_dlmap_harq_dl_map_subchannel_offset = -1;
+static int hf_dlmap_harq_dl_map_number_of_ofdma_symbols = -1;
+static int hf_dlmap_harq_dl_map_number_of_subchannels = -1;
+static int hf_dlmap_harq_dl_map_rectangular_sub_burst_indicator = -1;
+static int hf_dlmap_harq_dl_map_region_id = -1;
+static int hf_dlmap_harq_dl_map_mode = -1;
+static int hf_dlmap_harq_dl_map_sub_burst_ie_length = -1;
+static int hf_dlmap_harq_dl_map_reserved_mode = -1;
+static int hf_dlmap_harq_ack_bitmap_data = -1;
+static int hf_dlmap_enhanced_dl_map_extended_2_diuc = -1;
+static int hf_dlmap_enhanced_dl_map_num_assignment = -1;
+static int hf_dlmap_enhanced_dl_map_n_cid = -1;
+static int hf_dlmap_enhanced_dl_map_cid = -1;
+static int hf_dlmap_enhanced_dl_map_diuc = -1;
+static int hf_dlmap_enhanced_dl_map_boosting = -1;
+static int hf_dlmap_enhanced_dl_map_repetition_coding_indication = -1;
+static int hf_dlmap_enhanced_dl_map_region_id = -1;
+static int hf_dlmap_aas_sdma_dl_extended_2_diuc = -1;
+static int hf_dlmap_aas_sdma_dl_rcid_type = -1;
+static int hf_dlmap_aas_sdma_dl_num_burst_region = -1;
+static int hf_dlmap_aas_sdma_dl_ofdma_symbol_offset = -1;
+static int hf_dlmap_aas_sdma_dl_subchannel_offset = -1;
+static int hf_dlmap_aas_sdma_dl_num_ofdma_triple_symbols = -1;
+static int hf_dlmap_aas_sdma_dl_num_subchannels = -1;
+static int hf_dlmap_aas_sdma_dl_number_of_users = -1;
+static int hf_dlmap_aas_sdma_dl_encoding_mode = -1;
+static int hf_dlmap_aas_sdma_dl_cqich_allocation = -1;
+static int hf_dlmap_aas_sdma_dl_ackch_allocation = -1;
+static int hf_dlmap_aas_sdma_dl_pilot_pattern_modifier = -1;
+static int hf_dlmap_aas_sdma_dl_preamble_modifier_index = -1;
+static int hf_dlmap_aas_sdma_dl_pilot_pattern = -1;
+static int hf_dlmap_aas_sdma_dl_diuc = -1;
+static int hf_dlmap_aas_sdma_dl_repetition_coding_indication = -1;
+static int hf_dlmap_aas_sdma_dl_ack_ch_index = -1;
+static int hf_dlmap_aas_sdma_dl_acid = -1;
+static int hf_dlmap_aas_sdma_dl_ai_sn = -1;
+static int hf_dlmap_aas_sdma_dl_nep = -1;
+static int hf_dlmap_aas_sdma_dl_nsch = -1;
+static int hf_dlmap_aas_sdma_dl_spid = -1;
+static int hf_dlmap_aas_sdma_dl_allocation_index = -1;
+static int hf_dlmap_aas_sdma_dl_period = -1;
+static int hf_dlmap_aas_sdma_dl_frame_offset = -1;
+static int hf_dlmap_aas_sdma_dl_duration = -1;
+static int hf_dlmap_channel_measurement_channel_nr = -1;
+static int hf_dlmap_channel_measurement_ofdma_symbol_offset = -1;
+static int hf_dlmap_channel_measurement_cid = -1;
+static int hf_dlmap_stc_zone_ofdma_symbol_offset = -1;
+static int hf_dlmap_stc_zone_permutations = -1;
+static int hf_dlmap_stc_zone_use_all_sc_indicator = -1;
+static int hf_dlmap_stc_zone_stc = -1;
+static int hf_dlmap_stc_zone_matrix_indicator = -1;
+static int hf_dlmap_stc_zone_dl_permbase = -1;
+static int hf_dlmap_stc_zone_prbs_id = -1;
+static int hf_dlmap_stc_zone_amc_type = -1;
+static int hf_dlmap_stc_zone_midamble_presence = -1;
+static int hf_dlmap_stc_zone_midamble_boosting = -1;
+static int hf_dlmap_stc_zone_2_3_antenna_select = -1;
+static int hf_dlmap_stc_zone_dedicated_pilots = -1;
+static int hf_dlmap_aas_dl_ofdma_symbol_offset = -1;
+static int hf_dlmap_aas_dl_permutation = -1;
+static int hf_dlmap_aas_dl_dl_permbase = -1;
+static int hf_dlmap_aas_dl_downlink_preamble_config = -1;
+static int hf_dlmap_aas_dl_preamble_type = -1;
+static int hf_dlmap_aas_dl_prbs_id = -1;
+static int hf_dlmap_aas_dl_diversity_map = -1;
+static int hf_dlmap_data_location_another_bs_segment = -1;
+static int hf_dlmap_data_location_another_bs_used_subchannels = -1;
+static int hf_dlmap_data_location_another_bs_diuc = -1;
+static int hf_dlmap_data_location_another_bs_frame_advance = -1;
+static int hf_dlmap_data_location_another_bs_ofdma_symbol_offset = -1;
+static int hf_dlmap_data_location_another_bs_subchannel_offset = -1;
+static int hf_dlmap_data_location_another_bs_boosting = -1;
+static int hf_dlmap_data_location_another_bs_preamble_index = -1;
+static int hf_dlmap_data_location_another_bs_num_ofdma_symbols = -1;
+static int hf_dlmap_data_location_another_bs_num_subchannels = -1;
+static int hf_dlmap_data_location_another_bs_repetition_coding_indication = -1;
+static int hf_dlmap_data_location_another_bs_cid = -1;
+static int hf_dlmap_harq_map_pointer_diuc = -1;
+static int hf_dlmap_harq_map_pointer_num_slots = -1;
+static int hf_dlmap_harq_map_pointer_repetition_coding_indication = -1;
+static int hf_dlmap_harq_map_pointer_map_version = -1;
+static int hf_dlmap_harq_map_pointer_idle_users = -1;
+static int hf_dlmap_harq_map_pointer_sleep_users = -1;
+static int hf_dlmap_harq_map_pointer_cid_mask_length = -1;
+static int hf_dlmap_phymod_dl_preamble_modifier_type = -1;
+static int hf_dlmap_phymod_dl_preamble_frequency_shift_index = -1;
+static int hf_dlmap_phymod_dl_preamble_time_shift_index = -1;
+static int hf_dlmap_phymod_dl_pilot_pattern_modifier = -1;
+static int hf_dlmap_phymod_dl_pilot_pattern_index = -1;
+static int hf_dlmap_broadcast_ctrl_ptr_dcd_ucd_transmission_frame = -1;
+static int hf_dlmap_broadcast_ctrl_ptr_skip_broadcast_system_update = -1;
+static int hf_dlmap_broadcast_ctrl_ptr_broadcast_system_update_type = -1;
+static int hf_dlmap_broadcast_ctrl_ptr_broadcast_system_update_transmission_frame = -1;
+static int hf_dlmap_dl_pusc_burst_allocation_cid = -1;
+static int hf_dlmap_dl_pusc_burst_allocation_diuc = -1;
+static int hf_dlmap_dl_pusc_burst_allocation_segment = -1;
+static int hf_dlmap_dl_pusc_burst_allocation_boosting = -1;
+static int hf_dlmap_dl_pusc_burst_allocation_idcell = -1;
+static int hf_dlmap_dl_pusc_burst_allocation_dl_permbase = -1;
+static int hf_dlmap_dl_pusc_burst_allocation_prbs_id = -1;
+static int hf_dlmap_dl_pusc_burst_allocation_repetition_coding_indication = -1;
+static int hf_dlmap_dl_pusc_burst_allocation_used_subchannels = -1;
+static int hf_dlmap_dl_pusc_burst_allocation_ofdma_symbol_offset = -1;
+static int hf_dlmap_dl_pusc_burst_allocation_num_ofdma_symbols = -1;
+static int hf_dlmap_dl_pusc_burst_allocation_subchannel_offset = -1;
+static int hf_dlmap_dl_pusc_burst_allocation_num_subchannels = -1;
+static int hf_dlmap_pusc_asca_alloc_diuc = -1;
+static int hf_dlmap_pusc_asca_alloc_short_basic_cid = -1;
+static int hf_dlmap_pusc_asca_alloc_ofdma_symbol_offset = -1;
+static int hf_dlmap_pusc_asca_alloc_subchannel_offset = -1;
+static int hf_dlmap_pusc_asca_alloc_num_ofdma_symbols = -1;
+static int hf_dlmap_pusc_asca_alloc_num_symbols = -1;
+static int hf_dlmap_pusc_asca_alloc_repetition_coding_information = -1;
+static int hf_dlmap_pusc_asca_alloc_permutation_id = -1;
+static int hf_dlmap_reduced_aas_num_ie = -1;
+static int hf_dlmap_reduced_aas_periodicity = -1;
+static int hf_dlmap_reduced_aas_cid_included = -1;
+static int hf_dlmap_reduced_aas_dcd_count_included = -1;
+static int hf_dlmap_reduced_aas_phy_modification_included = -1;
+static int hf_dlmap_reduced_aas_cqich_control_indicator = -1;
+static int hf_dlmap_reduced_aas_encoding_mode = -1;
+static int hf_dlmap_reduced_aas_separate_mcs_enabled = -1;
+static int hf_dlmap_reduced_aas_duration = -1;
+static int hf_dlmap_reduced_aas_diuc = -1;
+static int hf_dlmap_reduced_aas_repetition_coding_indication = -1;
+static int hf_dlmap_reduced_aas_cid = -1;
+static int hf_dlmap_reduced_aas_allocation_index = -1;
+static int hf_dlmap_reduced_aas_report_period = -1;
+static int hf_dlmap_reduced_aas_frame_offset = -1;
+static int hf_dlmap_reduced_aas_report_duration = -1;
+static int hf_dlmap_reduced_aas_cqi_measurement_type = -1;
+static int hf_dlmap_reduced_aas_dcd_count = -1;
+static int hf_dlmap_reduced_aas_preamble_select = -1;
+static int hf_dlmap_reduced_aas_preamble_shift_index = -1;
+static int hf_dlmap_reduced_aas_pilot_pattern_modifier = -1;
+static int hf_dlmap_reduced_aas_pilot_pattern_index = -1;
+static int hf_dlmap_reduced_aas_dl_frame_offset = -1;
+static int hf_dlmap_reduced_aas_zone_symbol_offset = -1;
+static int hf_dlmap_reduced_aas_ofdma_symbol_offset = -1;
+static int hf_dlmap_reduced_aas_subchannel_offset = -1;
+static int hf_dlmap_reduced_aas_num_ofdma_triple_symbol = -1;
+static int hf_dlmap_reduced_aas_num_subchannels = -1;
+static int hf_dlmap_reduced_aas_num_ofdma_symbols = -1;
+static int hf_dlmap_reduced_aas_diuc_nep = -1;
+static int hf_dlmap_reduced_aas_dl_harq_ack_bitmap = -1;
+static int hf_dlmap_reduced_aas_ack_allocation_index = -1;
+static int hf_dlmap_reduced_aas_acid = -1;
+static int hf_dlmap_reduced_aas_ai_sn = -1;
+static int hf_dlmap_reduced_aas_nsch = -1;
+static int hf_dlmap_reduced_aas_spid = -1;
+
+
+
+static expert_field ei_dlmap_not_implemented = EI_INIT;
+static expert_field ei_crc16 = EI_INIT;
+static expert_field ei_mac_header_compress_dlmap_crc = EI_INIT;
+
+/* Copied and renamed from proto.c because global value_strings don't work for plugins */
+static const value_string plugin_proto_checksum_vals[] = {
+ { PROTO_CHECKSUM_E_BAD, "Bad" },
+ { PROTO_CHECKSUM_E_GOOD, "Good" },
+ { PROTO_CHECKSUM_E_UNVERIFIED, "Unverified" },
+ { PROTO_CHECKSUM_E_NOT_PRESENT, "Not present" },
+
+ { 0, NULL }
+};
+
+/********************************************************************
+ * DL-MAP Miscellaneous IEs and TLVs
+ *******************************************************************/
+
+gint RCID_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb, gint RCID_Type_lcl)
+{
+ /* RCID_IE 8.4.5.3 and 8.4.5.3.20.1 */
+ /* offset of IE in bits, length is variable */
+ gint bit = offset;
+ proto_item *ti = NULL;
+ proto_tree *tree = NULL;
+ gint Prefix = 0;
+ gint cid = 0;
+
+ if (RCID_Type_lcl == 0)
+ length = 16;
+ else {
+ Prefix = TVB_BIT_BIT(bit, tvb);
+ if (Prefix == 1) length = 12;
+ else if (RCID_Type_lcl == 1) length = 12;
+ else if (RCID_Type_lcl == 2) length = 8;
+ else if (RCID_Type_lcl == 3) length = 4;
+ }
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, length), ett_286j, &ti, "RCID_IE");
+
+ if (RCID_Type_lcl == 0) {
+ XBIT_HF_VALUE(cid, 16, hf_dlmap_rcid_ie_cid);
+ } else {
+ XBIT_HF_VALUE(Prefix, 1, hf_dlmap_rcid_ie_prefix);
+
+ if (Prefix == 1) {
+ /* RCID 11 */
+ XBIT_HF_VALUE(cid, 11, hf_dlmap_rcid_ie_cid11);
+ } else {
+ if (RCID_Type_lcl == 1) {
+ /* RCID 11 */
+ XBIT_HF_VALUE(cid, 11, hf_dlmap_rcid_ie_cid11);
+ } else if (RCID_Type_lcl == 2) {
+ /* RCID 7 */
+ XBIT_HF_VALUE(cid, 7, hf_dlmap_rcid_ie_cid7);
+ } else if (RCID_Type_lcl == 3) {
+ /* RCID 3 */
+ XBIT_HF_VALUE(cid, 3, hf_dlmap_rcid_ie_cid3);
+ }
+ }
+ }
+
+ proto_item_append_text(ti, " (CID = %d)", cid);
+
+ return length; /* return length in bits */
+}
+
+/********************************************************************
+ * DL-MAP Extended-2 HARQ sub-burst IEs (8.4.5.3.21)
+ *******************************************************************/
+
+static gint Dedicated_DL_Control_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* 8.4.5.3.20 */
+ /* offset of IE in nibbles, length is variable */
+ gint nib;
+ gint nibble;
+ proto_tree *tree;
+ gint len;
+
+ nib = offset;
+
+ length = TVB_NIB_NIBBLE(nib, tvb); /* length in nibbles */
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(nib, length+1), ett_286i, NULL, "Dedicated_DL_Control_IE");
+
+ VNIB(length, 1, hf_dlmap_dedicated_dl_control_length);
+ VNIB(nibble, 1, hf_dlmap_dedicated_dl_control_control_header);
+
+ if ((nibble & 1) == 1) {
+ nibble = TVB_NIB_NIBBLE(nib, tvb);
+ proto_tree_add_uint(tree, hf_dlmap_dedicated_dl_control_num_sdma_layers, tvb, NIBHI(nib,1), (nibble >> 2) & 0x3);
+ /* Bit padding */
+ if ((nib*4)+2 < (offset+length)*4) {
+ len = ((offset + length - nib) * 4) - 2;
+ proto_tree_add_bytes_format(tree, hf_reserved, tvb, BITHI(nib*4, len), NULL, "Reserved bits");
+ }
+ } else {
+ /* Nibble padding */
+ if (nib < offset+length) {
+ len = (offset + length) - nib;
+ proto_tree_add_bytes_format(tree, hf_reserved, tvb, NIBHI(nib,len), NULL, "Reserved bits");
+ }
+ }
+ return (length + 1);
+}
+
+static gint Dedicated_MIMO_DL_Control_IE(proto_tree *diuc_tree, gint offset, gint length _U_, tvbuff_t *tvb)
+{
+ /* offset of IE in bits, length is variable */
+ gint bit;
+ proto_tree *tree;
+ gint mci, cqi, cmi, matrix = 0, pad, CQICH_num, mimo_mode;
+ gint j;
+
+ bit = offset;
+
+ /* 8.4.5.3.21 table 286t */
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, 1), ett_286t, NULL, "Dedicated MIMO DL Control IE");
+
+ XBIT_HF_VALUE(length, 5, hf_dlmap_dedicated_mimo_dl_control_length);
+ XBIT_HF_VALUE(mci, 1, hf_dlmap_dedicated_mimo_dl_control_control_header_mimo_control_info);
+ XBIT_HF_VALUE(cqi, 1, hf_dlmap_dedicated_mimo_dl_control_control_header_cqi_control_info);
+ XBIT_HF_VALUE(cmi, 1, hf_dlmap_dedicated_mimo_dl_control_control_header_closed_mimo_control_info);
+ XBIT_HF_VALUE(N_layer, 2, hf_dlmap_dedicated_mimo_dl_control_n_layer);
+
+ /* MIMO Control Info */
+ if (mci == 1) {
+ XBIT_HF_VALUE(matrix, 2, hf_dlmap_dedicated_mimo_dl_control_matrix);
+ if (STC_Zone_Dedicated_Pilots == 1) {
+ XBIT_HF(2, hf_dlmap_dedicated_mimo_dl_control_num_beamformed_streams);
+ }
+ }
+
+ /* CQICH Control Info */
+ if (cqi == 1) {
+ XBIT_HF(3, hf_dlmap_dedicated_mimo_dl_control_period);
+ XBIT_HF(3, hf_dlmap_dedicated_mimo_dl_control_frame_offset);
+ XBIT_HF(4, hf_dlmap_dedicated_mimo_dl_control_duration);
+ for (j = 0; j < N_layer; j++) {
+ XBIT_HF(6, hf_dlmap_dedicated_mimo_dl_control_allocation_index);
+ }
+ XBIT_HF_VALUE(CQICH_num, 2, hf_dlmap_dedicated_mimo_dl_control_cqich_num);
+ for (j = 0; j < CQICH_num; j++) {
+ XBIT_HF(3, hf_dlmap_dedicated_mimo_dl_control_feedback_type);
+ XBIT_HF(6, hf_dlmap_dedicated_mimo_dl_control_allocation_index);
+ }
+ }
+
+ /* Closed MIMO Control Info */
+ if (cmi == 1) {
+ if (mci == 1) {
+ mimo_mode = matrix;
+ } else {
+ mimo_mode = STC_Zone_Matrix;
+ }
+ if (mimo_mode == 0 || mimo_mode == 1) {
+ XBIT_HF(3, hf_dlmap_dedicated_mimo_dl_control_antenna_grouping_index);
+ } else if (mimo_mode == 2) {
+ XBIT_HF(2, hf_dlmap_dedicated_mimo_dl_control_num_stream);
+ XBIT_HF(3, hf_dlmap_dedicated_mimo_dl_control_antenna_selection_index);
+ } else if (mimo_mode == 3) {
+ XBIT_HF(2, hf_dlmap_dedicated_mimo_dl_control_num_stream);
+ XBIT_HF(6, hf_dlmap_dedicated_mimo_dl_control_codebook_precoding_index);
+ }
+ }
+
+ /* padding to nibble */
+ pad = BIT_PADDING(bit,4);
+ if(pad){
+ proto_tree_add_bytes_format_value(tree, hf_padding, tvb, BITHI(bit,pad), NULL, "%d bits", pad);
+ bit += pad;
+ }
+
+ return (bit - offset);
+}
+
+static gint DL_HARQ_Chase_sub_burst_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* 8.4.5.3.21 DL_HARQ_Chase_sub_burst_IE */
+ /* offset of IE in nibbles, length is variable */
+ gint bit;
+ proto_tree *tree;
+ gint nsub, ddci, dur, sbi;
+ gint j;
+
+ bit = NIB_TO_BIT(offset);
+
+ /* 8.4.5.3.21 table 286m */
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, length), ett_286m, NULL, "DL_HARQ_Chase_sub_burst_IE");
+
+ XBIT_HF_VALUE(nsub, 4, hf_dlmap_n_sub_burst_isi);
+ XBIT_HF(4, hf_dlmap_harq_chase_n_ack_channel);
+
+ nsub += 1;
+ for (j = 0; j < nsub; j++) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ XBIT_HF_VALUE(dur, 10, hf_dlmap_harq_chase_duration);
+ XBIT_HF_VALUE(sbi, 1, hf_dlmap_harq_chase_sub_burst_diuc_indicator);
+ XBIT_HF(1, hf_dlmap_reserved_uint);
+
+ if (sbi == 1) {
+ XBIT_HF(4, hf_dlmap_harq_chase_diuc);
+ XBIT_HF(2, hf_dlmap_harq_chase_repetition_coding_indication);
+ XBIT_HF(2, hf_dlmap_reserved_uint);
+ }
+
+ XBIT_HF(4, hf_dlmap_harq_chase_acid);
+ XBIT_HF(1, hf_dlmap_harq_chase_ai_sn);
+ XBIT_HF(1, hf_dlmap_harq_chase_ack_disable);
+ XBIT_HF_VALUE(ddci, 2, hf_dlmap_harq_chase_dedicated_dl_control_indicator);
+
+ if ((ddci & 1) == 1) {
+ XBIT_HF_VALUE(dur, 4, hf_dlmap_harq_chase_duration);
+ if (dur != 0) {
+ XBIT_HF(6, hf_dlmap_harq_chase_allocation_index);
+ XBIT_HF(3, hf_dlmap_harq_chase_period);
+ XBIT_HF(3, hf_dlmap_harq_chase_frame_offset);
+ }
+ }
+
+ if ((ddci & 2) == 2) {
+ bit += Dedicated_DL_Control_IE(tree, BIT_TO_NIB(bit), length, tvb) * 4;
+ }
+ }
+
+ /* XBIT_HF(data, 4, "(DL HARQ Chase sub-burst IE)"); */
+ return (BIT_TO_NIB(bit) - offset);
+}
+
+static gint DL_HARQ_IR_CTC_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* offset of IE in nibbles, length is variable */
+ gint bit;
+ proto_tree *tree;
+ gint nsub, ddci, dur;
+ gint j;
+ guint32 calculated_crc;
+
+ bit = NIB_TO_BIT(offset);
+
+ /* 8.4.5.3.21 table 286n */
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, 4), ett_286n, NULL, "DL HARQ IR CTC sub-burst IE");
+
+ XBIT_HF_VALUE(nsub, 4, hf_dlmap_n_sub_burst_isi);
+ XBIT_HF(4, hf_dlmap_harq_ir_ctc_n_ack_channel);
+
+ nsub += 1;
+ for (j = 0; j < nsub; j++) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+
+ XBIT_HF(4, hf_dlmap_harq_ir_ctc_nep);
+ XBIT_HF(4, hf_dlmap_harq_ir_ctc_nsch);
+ XBIT_HF(2, hf_dlmap_harq_ir_ctc_spid);
+ XBIT_HF(4, hf_dlmap_harq_ir_ctc_acid);
+ XBIT_HF(1, hf_dlmap_harq_ir_ctc_ai_sn);
+ XBIT_HF(1, hf_dlmap_harq_ir_ctc_ack_disable);
+ XBIT_HF(2, hf_dlmap_reserved_uint);
+ XBIT_HF_VALUE(ddci, 2, hf_dlmap_harq_ir_ctc_dedicated_dl_control_indicator);
+
+ if ((ddci & 1) == 1) {
+ XBIT_HF_VALUE(dur, 4, hf_dlmap_harq_ir_ctc_duration);
+
+ if (dur != 0) {
+ XBIT_HF(6, hf_dlmap_harq_ir_ctc_allocation_index);
+ XBIT_HF(3, hf_dlmap_harq_ir_ctc_period);
+ XBIT_HF(3, hf_dlmap_harq_ir_ctc_frame_offset);
+ }
+ }
+ if ((ddci & 2) == 2) {
+ bit += Dedicated_DL_Control_IE(tree, BIT_TO_NIB(bit), length, tvb);
+ }
+ }
+
+ if (include_cor2_changes)
+ {
+ /* CRC-16 is always appended */
+ calculated_crc = wimax_mac_calc_crc16(tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ proto_tree_add_checksum(tree, tvb, BIT_ADDR(bit), hf_crc16, hf_crc16_status, &ei_crc16, pinfo, calculated_crc,
+ ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+ bit += 16;
+ }
+
+ return (BIT_TO_NIB(bit) - offset);
+}
+
+static gint DL_HARQ_IR_CC_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* offset of IE in nibbles, length is variable */
+ gint bit;
+ proto_tree *tree;
+ gint nsub, sbdi, ddci, dur;
+ gint j;
+ guint16 calculated_crc;
+
+ bit = NIB_TO_BIT(offset);
+
+ /* 8.4.5.3.21 table 286o */
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, 4), ett_286o, NULL, "DL HARQ IR CC sub-burst IE");
+
+ XBIT_HF_VALUE(nsub, 4, hf_dlmap_n_sub_burst_isi);
+ XBIT_HF(4, hf_dlmap_harq_ir_cc_n_ack_channel);
+
+ nsub += 1;
+ for (j = 0; j < nsub; j++) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type) / 4;
+
+ XBIT_HF(10, hf_dlmap_harq_ir_cc_duration);
+ XBIT_HF_VALUE(sbdi, 1, hf_dlmap_harq_ir_cc_sub_burst_diuc_indicator);
+ XBIT_HF(1, hf_dlmap_reserved_uint);
+
+ if (sbdi) {
+ XBIT_HF(4, hf_dlmap_harq_ir_cc_diuc);
+ XBIT_HF(2, hf_dlmap_harq_ir_cc_repetition_coding_indication);
+ XBIT_HF(2, hf_dlmap_reserved_uint);
+ }
+
+ XBIT_HF(4, hf_dlmap_harq_ir_cc_acid);
+ XBIT_HF(1, hf_dlmap_harq_ir_cc_ai_sn);
+ XBIT_HF(2, hf_dlmap_harq_ir_cc_spid);
+ XBIT_HF(1, hf_dlmap_harq_ir_cc_ack_disable);
+ XBIT_HF_VALUE(ddci, 2, hf_dlmap_harq_ir_cc_dedicated_dl_control_indicator);
+ XBIT_HF(2, hf_dlmap_reserved_uint);
+
+ if (ddci & 1) {
+ XBIT_HF_VALUE(dur, 4, hf_dlmap_harq_ir_cc_duration);
+
+ if (dur != 0) {
+ XBIT_HF(6, hf_dlmap_harq_ir_cc_allocation_index);
+ XBIT_HF(3, hf_dlmap_harq_ir_cc_period);
+ XBIT_HF(3, hf_dlmap_harq_ir_cc_frame_offset);
+ }
+ }
+ if ((ddci & 2) == 2) {
+ bit += Dedicated_DL_Control_IE(tree, BIT_TO_NIB(bit), length, tvb);
+ }
+ }
+
+ if (include_cor2_changes)
+ {
+ /* CRC-16 is always appended */
+ calculated_crc = wimax_mac_calc_crc16(tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ proto_tree_add_checksum(tree, tvb, BIT_ADDR(bit), hf_crc16, hf_crc16_status, &ei_crc16, pinfo, calculated_crc,
+ ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+ bit += 16;
+ }
+
+ return (BIT_TO_NIB(bit) - offset);
+}
+
+static gint MIMO_DL_Chase_HARQ_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* offset of IE in nibbles, length is variable */
+ gint bit;
+ gint data;
+ proto_tree *tree;
+ gint nsub, mui, dci, akd;
+ gint i, j;
+ guint16 calculated_crc;
+
+ bit = NIB_TO_BIT(offset);
+
+ /* 8.4.5.3.21 table 286p */
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, 1), ett_286p, NULL, "MIMO DL Chase HARQ sub-burst IE");
+
+ XBIT_HF_VALUE(nsub, 4, hf_dlmap_n_sub_burst_isi);
+ XBIT_HF(6, hf_dlmap_mimo_dl_chase_harq_n_ack_channel);
+
+ nsub += 1;
+ for (j = 0; j < nsub; j++) {
+ XBIT_HF_VALUE(mui, 1, hf_dlmap_mimo_dl_chase_harq_mu_indicator);
+ XBIT_HF_VALUE(dci, 1, hf_dlmap_mimo_dl_chase_harq_dedicated_mimo_dl_control_indicator);
+ XBIT_HF_VALUE(akd, 1, hf_dlmap_mimo_dl_chase_harq_ack_disable);
+ if (mui == 0) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ }
+ if (dci == 1) {
+ bit += Dedicated_MIMO_DL_Control_IE(tree, bit, length, tvb);
+ }
+ XBIT_HF(10, hf_dlmap_mimo_dl_chase_harq_duration);
+ for (i = 0; i < N_layer; i++) {
+ if (mui == 1) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ }
+ XBIT_HF(4, hf_dlmap_mimo_dl_chase_harq_diuc);
+ XBIT_HF(2, hf_dlmap_mimo_dl_chase_harq_repetition_coding_indication);
+ if (akd == 0) {
+ XBIT_HF(4, hf_dlmap_mimo_dl_chase_harq_acid);
+ XBIT_HF(1, hf_dlmap_mimo_dl_chase_harq_ai_sn);
+ }
+ }
+ }
+ /* Padding to nibble */
+ data = BIT_PADDING(bit, 4);
+ if (data) {
+ proto_tree_add_bytes_format_value(tree, hf_padding, tvb, BITHI(bit,data), NULL, "%d bits", data);
+ bit += data;
+ }
+
+ if (include_cor2_changes)
+ {
+ /* CRC-16 is always appended */
+ calculated_crc = wimax_mac_calc_crc16(tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ proto_tree_add_checksum(tree, tvb, BIT_ADDR(bit), hf_crc16, hf_crc16_status, &ei_crc16, pinfo, calculated_crc,
+ ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+ bit += 16;
+ }
+
+ return (BIT_TO_NIB(bit) - offset);
+}
+
+static gint MIMO_DL_IR_HARQ_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* offset of IE in nibbles, length is variable */
+ gint bit;
+ proto_tree *tree;
+ gint nsub, mui, dci, akd;
+ gint i, j;
+ guint16 calculated_crc;
+
+ bit = NIB_TO_BIT(offset);
+
+ /* 8.4.5.3.21 table 286q */
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, 4), ett_286q, NULL, "MIMO DL IR HARQ sub-burst IE");
+
+ XBIT_HF_VALUE(nsub, 4, hf_dlmap_n_sub_burst_isi);
+ XBIT_HF(6, hf_dlmap_mimo_dl_ir_harq_n_ack_channel);
+
+ nsub += 1;
+ for (j = 0; j < nsub; j++) {
+ XBIT_HF_VALUE(mui, 1, hf_dlmap_mimo_dl_ir_harq_mu_indicator);
+ XBIT_HF_VALUE(dci, 1, hf_dlmap_mimo_dl_ir_harq_dedicated_mimo_dl_control_indicator);
+ XBIT_HF_VALUE(akd, 1, hf_dlmap_mimo_dl_ir_harq_ack_disable);
+ if (mui == 0) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ }
+ if (dci == 1) {
+ bit += Dedicated_MIMO_DL_Control_IE(tree, bit, length, tvb);
+ }
+ XBIT_HF(4, hf_dlmap_mimo_dl_ir_harq_nsch);
+ for (i = 0; i < N_layer; i++) {
+ if (mui == 1) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ }
+ XBIT_HF(4, hf_dlmap_mimo_dl_ir_harq_nep);
+ if (akd) {
+ XBIT_HF(2, hf_dlmap_mimo_dl_ir_harq_spid);
+ XBIT_HF(4, hf_dlmap_mimo_dl_ir_harq_acid);
+ XBIT_HF(1, hf_dlmap_mimo_dl_ir_harq_ai_sn);
+ }
+ }
+ }
+
+ if (include_cor2_changes)
+ {
+ /* CRC-16 is always appended */
+ calculated_crc = wimax_mac_calc_crc16(tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ proto_tree_add_checksum(tree, tvb, BIT_ADDR(bit), hf_crc16, hf_crc16_status, &ei_crc16, pinfo, calculated_crc,
+ ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+ bit += 16;
+ }
+
+ return (BIT_TO_NIB(bit) - offset);
+}
+
+static gint MIMO_DL_IR_HARQ_for_CC_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* offset of IE in nibbles, length is variable */
+ gint bit;
+ proto_tree *tree;
+ gint nsub, mui, dci, akd;
+ gint i, j;
+ guint16 calculated_crc;
+
+ bit = NIB_TO_BIT(offset);
+
+ /* 8.4.5.3.21 table 286r */
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, 1), ett_286r, NULL, "MIMO DL IR HARQ for CC sub-burst IE");
+
+ XBIT_HF_VALUE(nsub, 4, hf_dlmap_n_sub_burst_isi);
+ XBIT_HF(6, hf_dlmap_mimo_dl_ir_harq_cc_n_ack_channel);
+
+ nsub += 1;
+ for (j = 0; j < nsub; j++) {
+ XBIT_HF_VALUE(mui, 1, hf_dlmap_mimo_dl_ir_harq_cc_mu_indicator);
+ XBIT_HF_VALUE(dci, 1, hf_dlmap_mimo_dl_ir_harq_cc_dedicated_mimo_dl_control_indicator);
+ XBIT_HF_VALUE(akd, 1, hf_dlmap_mimo_dl_ir_harq_cc_ack_disable);
+ if (mui == 0) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ }
+ if (dci == 1) {
+ bit += Dedicated_MIMO_DL_Control_IE(tree, bit, length, tvb);
+ }
+ XBIT_HF(10, hf_dlmap_mimo_dl_ir_harq_cc_duration);
+ for (i = 0; i < N_layer; i++) {
+ if (mui == 1) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ }
+ XBIT_HF(4, hf_dlmap_mimo_dl_ir_harq_cc_diuc);
+ XBIT_HF(2, hf_dlmap_mimo_dl_ir_harq_cc_repetition_coding_indication);
+ if (akd == 0) {
+ XBIT_HF(4, hf_dlmap_mimo_dl_ir_harq_cc_acid);
+ XBIT_HF(1, hf_dlmap_mimo_dl_ir_harq_cc_ai_sn);
+ XBIT_HF(2, hf_dlmap_mimo_dl_ir_harq_cc_spid);
+ }
+ }
+ }
+
+ if (include_cor2_changes)
+ {
+ /* CRC-16 is always appended */
+ calculated_crc = wimax_mac_calc_crc16(tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ proto_tree_add_checksum(tree, tvb, BIT_ADDR(bit), hf_crc16, hf_crc16_status, &ei_crc16, pinfo, calculated_crc,
+ ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+ bit += 16;
+ }
+
+ return (BIT_TO_NIB(bit) - offset);
+}
+
+static gint MIMO_DL_STC_HARQ_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* offset of IE in nibbles, length is variable */
+ gint bit;
+ proto_tree *tree;
+ gint nsub, sbi, txc, akd, dmci;
+ gint j;
+ guint16 calculated_crc;
+
+ bit = NIB_TO_BIT(offset);
+
+ /* 8.4.5.3.21 table 286s */
+ tree = proto_tree_add_subtree(diuc_tree, tvb, BITHI(bit, 1), ett_286s, NULL, "MIMO DL STC HARQ sub-burst IE");
+
+ XBIT_HF_VALUE(nsub, 4, hf_dlmap_n_sub_burst_isi);
+ XBIT_HF(6, hf_dlmap_mimo_dl_stc_harq_n_ack_channel);
+
+ nsub += 1;
+ for (j = 0; j < nsub; j++) {
+ XBIT_HF_VALUE(txc, 2, hf_dlmap_mimo_dl_stc_harq_tx_count);
+ XBIT_HF(10, hf_dlmap_mimo_dl_stc_harq_duration);
+ XBIT_HF_VALUE(sbi, 1, hf_dlmap_mimo_dl_stc_harq_sub_burst_offset_indication);
+ XBIT_HF(3, hf_dlmap_reserved_uint);
+ if (sbi == 1) {
+ XBIT_HF(8, hf_dlmap_mimo_dl_stc_harq_sub_burst_offset);
+ }
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ XBIT_HF_VALUE(akd, 1, hf_dlmap_mimo_dl_stc_harq_ack_disable);
+ if (txc == 0) {
+ XBIT_HF_VALUE(dmci, 1, hf_dlmap_mimo_dl_stc_harq_dedicated_mimo_dl_control_indicator);
+ if (dmci == 1) {
+ bit += Dedicated_MIMO_DL_Control_IE(tree, bit, length, tvb);
+ }
+ XBIT_HF(4, hf_dlmap_mimo_dl_stc_harq_diuc);
+ XBIT_HF(2, hf_dlmap_mimo_dl_stc_harq_repetition_coding_indication);
+ }
+ if (akd == 0) {
+ XBIT_HF(4, hf_dlmap_mimo_dl_stc_harq_acid);
+ }
+ }
+
+ if (include_cor2_changes)
+ {
+ /* CRC-16 is always appended */
+ calculated_crc = wimax_mac_calc_crc16(tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ proto_tree_add_checksum(tree, tvb, BIT_ADDR(bit), hf_crc16, hf_crc16_status, &ei_crc16, pinfo, calculated_crc,
+ ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+ bit += 16;
+ }
+
+ return (BIT_TO_NIB(bit) - offset);
+}
+
+/********************************************************************
+ * DL-MAP Extended-2 IEs
+ *******************************************************************/
+
+static gint MBS_MAP_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended-2 IE = 0 */
+ /* 8.4.5.3.12 MBS_MAP_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ gint data;
+ proto_tree *tree;
+ gint mde, dci, s3i;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286a, NULL, "MBS_MAP_IE");
+
+ XBIT_HF(4, hf_dlmap_mbs_map_extended_2_diuc);
+ VBIT(data, 8, hf_dlmap_ie_length);
+
+ XBIT_HF(7, hf_dlmap_mbs_map_mbs_zone_identifier);
+ XBIT_HF_VALUE(mde, 1, hf_dlmap_mbs_map_macro_diversity_enhanced);
+ if (mde == 1)
+ {
+ XBIT_HF(2, hf_dlmap_mbs_map_permutation);
+ XBIT_HF(5, hf_dlmap_mbs_map_dl_permbase);
+ XBIT_HF(2, hf_dlmap_mbs_map_prbs_id);
+ XBIT_HF(7, hf_dlmap_mbs_map_ofdma_symbol_offset);
+ XBIT_HF_VALUE(dci, 1, hf_dlmap_mbs_map_diuc_change_indication);
+ XBIT_HF(3, hf_dlmap_reserved_uint);
+ if (dci == 1) {
+ XBIT_HF(3, hf_dlmap_reserved_uint);
+ XBIT_HF(3, hf_dlmap_mbs_map_boosting);
+ XBIT_HF(4, hf_dlmap_mbs_map_diuc);
+ XBIT_HF(6, hf_dlmap_mbs_map_num_subchannels);
+ XBIT_HF(6, hf_dlmap_mbs_map_num_ofdma_symbols);
+ XBIT_HF(2, hf_dlmap_mbs_map_repetition_coding_indication);
+ }
+ } else {
+ XBIT_HF(4, hf_dlmap_mbs_map_diuc);
+ XBIT_HF(16, hf_dlmap_mbs_map_cid);
+ XBIT_HF(8, hf_dlmap_mbs_map_ofdma_symbols_offset);
+ XBIT_HF(6, hf_dlmap_mbs_map_subchannel_offset);
+ XBIT_HF(3, hf_dlmap_mbs_map_boosting);
+ XBIT_HF_VALUE(s3i, 1, hf_dlmap_mbs_map_slc_3_indication);
+ XBIT_HF(6, hf_dlmap_mbs_map_num_ofdma_symbols);
+ XBIT_HF(6, hf_dlmap_mbs_map_num_subchannels);
+ XBIT_HF(2, hf_dlmap_mbs_map_repetition_coding_indication);
+ if (s3i == 1) {
+ XBIT_HF(8, hf_dlmap_mbs_map_next_mbs_map_ie_frame_offset);
+ }
+ }
+ data = BIT_PADDING(bit, 4);
+ if (data) {
+ proto_tree_add_bytes_format_value(tree, hf_padding, tvb, BITHI(bit,data), NULL, "%d bits", data);
+ bit += data;
+ }
+ return BIT_TO_NIB(bit);
+}
+
+static gint HO_Anchor_Active_DL_MAP_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended-2 IE = 1 */
+ /* 8.4.5.3.14 [2] HO_Anchor_Active_DL-MAP_IE TODO 1.1 */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint nib;
+ gint data;
+ proto_tree *tree;
+
+ nib = offset;
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286c, NULL, "HO_Anchor_Active_DL_MAP_IE");
+
+ VNIB(data, 1, hf_dlmap_ie_diuc_ext2);
+ VNIB(data, 2, hf_dlmap_ie_length);
+ proto_tree_add_expert(diuc_tree, pinfo, &ei_dlmap_not_implemented, tvb, NIBHI(nib, length-3));
+ return nib;
+}
+
+static gint HO_Active_Anchor_DL_MAP_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended-2 IE = 2 */
+ /* 8.4.5.3.15 HO_Active_Anchor_DL_MAP_IE TODO 1.1 */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint nib;
+ gint data;
+ proto_tree *tree;
+
+ nib = offset;
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286d, NULL, "HO_Active_Anchor_DL_MAP_IE");
+
+ VNIB(data, 1, hf_dlmap_ie_diuc_ext2);
+ VNIB(data, 2, hf_dlmap_ie_length);
+ proto_tree_add_expert(diuc_tree, pinfo, &ei_dlmap_not_implemented, tvb, NIBHI(nib, length-3));
+ return nib;
+}
+
+static gint HO_CID_Translation_MAP_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended-2 IE = 3 */
+ /* 8.4.5.3.16 HO_CID_Translation_MAP_IE TODO 1.1 */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint nib;
+ gint data;
+ proto_tree *tree;
+
+ nib = offset;
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286e, NULL, "CID_Translation_MAP_IE");
+
+ VNIB(data, 1, hf_dlmap_ie_diuc_ext2);
+ VNIB(data, 2, hf_dlmap_ie_length);
+ proto_tree_add_expert(diuc_tree, pinfo, &ei_dlmap_not_implemented, tvb, NIBHI(nib, length-3));
+ return nib;
+}
+
+static gint MIMO_in_another_BS_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended-2 IE = 4 */
+ /* 8.4.5.3.17 [2] MIMO_in_another_BS_IE (not implemented)*/
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint nib;
+ gint data;
+ proto_tree *tree;
+
+ nib = offset;
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286f, NULL, "MIMO_in_another_BS_IE");
+
+ VNIB(data, 1, hf_dlmap_ie_diuc_ext2);
+ VNIB(data, 2, hf_dlmap_ie_length);
+ proto_tree_add_expert(diuc_tree, pinfo, &ei_dlmap_not_implemented, tvb, NIBHI(nib, length-3));
+ return nib;
+}
+
+static gint Macro_MIMO_DL_Basic_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* dl-map extended-2 ie = 5 */
+ /* 8.4.5.3.18 [2] Macro-MIMO_DL_Basic_IE (not implemented) */
+ /* offset of tlv in nibbles, length of tlv in nibbles */
+ gint nib;
+ gint data;
+ proto_tree *tree;
+
+ nib = offset;
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286g, NULL, "Macro_MIMO_DL_Basic_IE");
+
+ VNIB(data, 1, hf_dlmap_ie_diuc_ext2);
+ VNIB(data, 2, hf_dlmap_ie_length);
+ proto_tree_add_expert(diuc_tree, pinfo, &ei_dlmap_not_implemented, tvb, NIBHI(nib, length-3));
+ return nib;
+}
+
+static gint Skip_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended-2 IE = 6 */
+ /* 8.4.5.3.20.2 Skip_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ gint data;
+ proto_tree *tree;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286k, NULL, "Skip_IE");
+
+ XBIT_HF(4, hf_dlmap_skip_extended_2_diuc);
+ VBIT(data, 8, hf_dlmap_ie_length);
+
+ XBIT_HF(1, hf_dlmap_skip_mode);
+ XBIT_HF(7, hf_dlmap_reserved_uint);
+
+ return BIT_TO_NIB(bit);
+}
+
+static gint HARQ_DL_MAP_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended-2 IE = 7 */
+ /* 8.4.5.3.21 [2] HARQ_DL_MAP_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ proto_tree *tree;
+ gint len, lastbit, rui, mode, sub_len, pad;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286l, NULL, "HARQ_DL_MAP_IE");
+
+ XBIT_HF(4, hf_dlmap_harq_dl_map_extended_2_diuc);
+ VBIT(len, 2, hf_dlmap_ie_length);
+
+ XBIT_HF_VALUE(RCID_Type, 2, hf_dlmap_harq_dl_map_rcid_type);
+ XBIT_HF(2, hf_dlmap_reserved_uint);
+
+ /* while data remains */
+ length = NIB_TO_BIT(length);
+ /* Subtract extra nibble to be sure to stop in time. */
+ lastbit = bit + BYTE_TO_BIT(len) - 14 - 4;
+ while (bit < lastbit) {
+ XBIT_HF(3, hf_dlmap_harq_dl_map_boosting);
+ XBIT_HF_VALUE(rui, 1, hf_dlmap_harq_dl_map_region_id_use_indicator);
+
+ if (rui == 0) {
+ XBIT_HF(8, hf_dlmap_harq_dl_map_ofdma_symbol_offset);
+ XBIT_HF(7, hf_dlmap_harq_dl_map_subchannel_offset);
+ XBIT_HF(7, hf_dlmap_harq_dl_map_number_of_ofdma_symbols);
+ XBIT_HF(7, hf_dlmap_harq_dl_map_number_of_subchannels);
+ if (include_cor2_changes)
+ {
+ XBIT_HF(1, hf_dlmap_harq_dl_map_rectangular_sub_burst_indicator); /* Implemented: "Rectangular Sub-Burst Indicator" field added */
+ XBIT_HF(2, hf_dlmap_reserved_uint); /* and "Reserved" field resized from 3 bits to 2 bits */
+ }
+ else
+ {
+ XBIT_HF(3, hf_dlmap_reserved_uint);
+ }
+ } else {
+ XBIT_HF(8, hf_dlmap_harq_dl_map_region_id);
+ }
+ XBIT_HF_VALUE(mode, 4, hf_dlmap_harq_dl_map_mode);
+ XBIT_HF_VALUE(sub_len, 8, hf_dlmap_harq_dl_map_sub_burst_ie_length);
+
+ /* 8.4.5.3.21 */
+ /* length of these are variable, each returns length in nibbles */
+ if (mode == 0) {
+ DL_HARQ_Chase_sub_burst_IE(tree, BIT_TO_NIB(bit), length, tvb);
+ } else if (mode == 1) {
+ DL_HARQ_IR_CTC_sub_burst_IE(tree, pinfo, BIT_TO_NIB(bit), length, tvb);
+ } else if (mode == 2) {
+ DL_HARQ_IR_CC_sub_burst_IE(tree, pinfo, BIT_TO_NIB(bit), length, tvb);
+ } else if (mode == 3) {
+ MIMO_DL_Chase_HARQ_sub_burst_IE(tree, pinfo, BIT_TO_NIB(bit), length, tvb);
+ } else if (mode == 4) {
+ MIMO_DL_IR_HARQ_sub_burst_IE(tree, pinfo, BIT_TO_NIB(bit), length, tvb);
+ } else if (mode == 5) {
+ MIMO_DL_IR_HARQ_for_CC_sub_burst_IE(tree, pinfo, BIT_TO_NIB(bit), length, tvb);
+ } else if (mode == 6) {
+ MIMO_DL_STC_HARQ_sub_burst_IE(tree, pinfo, BIT_TO_NIB(bit), length, tvb);
+ } else {
+ proto_tree_add_bits_item(tree, hf_dlmap_harq_dl_map_reserved_mode, tvb, bit, 1, ENC_BIG_ENDIAN);
+ break; /* cannot continue */
+ }
+ bit += NIB_TO_BIT(sub_len);
+ }
+
+ pad = NIB_TO_BIT(offset) + length - bit;
+ if (pad) {
+ proto_tree_add_bytes_format_value(tree, hf_padding, tvb, BITHI(bit,pad), NULL, "%d bits",pad);
+ bit += pad;
+ }
+
+ return BIT_TO_NIB(bit);
+}
+
+static gint HARQ_ACK_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended-2 IE = 8 */
+ /* 8.4.5.3.22 HARQ_ACK IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint data;
+ gint nib;
+ proto_tree *tree;
+
+ nib = offset;
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286u, NULL, "HARQ_ACK_IE");
+
+ VNIB(data, 1, hf_dlmap_ie_diuc_ext2);
+ VNIB(data, 2, hf_dlmap_ie_length);
+
+ proto_tree_add_item(diuc_tree, hf_dlmap_harq_ack_bitmap_data, tvb, NIBHI(nib,length-3), ENC_NA);
+
+ return nib;
+}
+
+static gint Enhanced_DL_MAP_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended-2 IE = 9 */
+ /* 8.4.5.3.23 Enhanced DL MAP IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ gint data;
+ proto_tree *tree;
+ gint numass, n_cid;
+ gint i, n;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286v, NULL, "Enhanced_DL-MAP_IE");
+
+ XBIT_HF(4, hf_dlmap_enhanced_dl_map_extended_2_diuc);
+ VBIT(data, 8, hf_dlmap_ie_length);
+
+ XBIT_HF_VALUE(numass, 4, hf_dlmap_enhanced_dl_map_num_assignment);
+ for (i = 0; i < numass; i++) {
+ if (INC_CID == 1) {
+ XBIT_HF_VALUE(n_cid, 8, hf_dlmap_enhanced_dl_map_n_cid);
+ for (n = 0; n < n_cid; n++) {
+ XBIT_HF(16, hf_dlmap_enhanced_dl_map_cid);
+ }
+ }
+ XBIT_HF(4, hf_dlmap_enhanced_dl_map_diuc);
+ XBIT_HF(3, hf_dlmap_enhanced_dl_map_boosting);
+ XBIT_HF(2, hf_dlmap_enhanced_dl_map_repetition_coding_indication);
+ XBIT_HF(8, hf_dlmap_enhanced_dl_map_region_id);
+ XBIT_HF(3, hf_dlmap_reserved_uint);
+ }
+ return BIT_TO_NIB(bit);
+}
+
+static gint Closed_loop_MIMO_DL_Enhanced_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended-2 IE = 0xA */
+ /* 8.4.5.3.24 Closed-loop MIMO DL Enhanced IE (not implemented) */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint nib;
+ gint data;
+ proto_tree *tree;
+
+ nib = offset;
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286w, NULL, "CL_MIMO_DL_Enhanced_IE");
+
+ VNIB(data, 1, hf_dlmap_ie_diuc_ext2);
+ VNIB(data, 2, hf_dlmap_ie_length);
+ proto_tree_add_expert(diuc_tree, pinfo, &ei_dlmap_not_implemented, tvb, NIBHI(nib, length-3));
+ return nib;
+}
+
+static gint AAS_SDMA_DL_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended-2 IE = 0xE */
+ /* 8.4.5.3.26 AAS_SDMA_DL_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ gint data;
+ proto_tree *tree;
+ gint num_region, num_users, pilot_pattern, encoding_mode, ackch_alloc, cqich_alloc;
+ gint aas_preamble = 1;
+ gint zone_permut = 0; /* TODO */
+ gint i, j;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286y, NULL, "AAS_SDMA_DL_IE");
+
+ XBIT_HF(4, hf_dlmap_aas_sdma_dl_extended_2_diuc);
+ VBIT(data, 8, hf_dlmap_ie_length);
+
+ XBIT_HF_VALUE(RCID_Type, 2, hf_dlmap_aas_sdma_dl_rcid_type);
+ XBIT_HF_VALUE(num_region, 4, hf_dlmap_aas_sdma_dl_num_burst_region);
+ XBIT_HF(2, hf_dlmap_reserved_uint);
+ for (i = 0; i < num_region; i++) {
+ XBIT_HF(8, hf_dlmap_aas_sdma_dl_ofdma_symbol_offset);
+ if (zone_permut == 0) {
+ XBIT_HF(8, hf_dlmap_aas_sdma_dl_subchannel_offset);
+ XBIT_HF(5, hf_dlmap_aas_sdma_dl_num_ofdma_triple_symbols);
+ XBIT_HF(6, hf_dlmap_aas_sdma_dl_num_subchannels);
+ } else {
+ XBIT_HF(6, hf_dlmap_aas_sdma_dl_subchannel_offset);
+ XBIT_HF(7, hf_dlmap_aas_sdma_dl_num_ofdma_triple_symbols);
+ XBIT_HF(6, hf_dlmap_aas_sdma_dl_num_subchannels);
+ }
+ XBIT_HF_VALUE(num_users, 3, hf_dlmap_aas_sdma_dl_number_of_users);
+ XBIT_HF(2, hf_dlmap_reserved_uint);
+ for (j = 0; j < num_users; j++) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ XBIT_HF_VALUE(encoding_mode, 2, hf_dlmap_aas_sdma_dl_encoding_mode);
+ XBIT_HF_VALUE(cqich_alloc, 1, hf_dlmap_aas_sdma_dl_cqich_allocation);
+ XBIT_HF_VALUE(ackch_alloc, 1, hf_dlmap_aas_sdma_dl_ackch_allocation);
+ XBIT_HF_VALUE(pilot_pattern, 1, hf_dlmap_aas_sdma_dl_pilot_pattern_modifier);
+ if (aas_preamble) {
+ XBIT_HF(4, hf_dlmap_aas_sdma_dl_preamble_modifier_index);
+ }
+ if (pilot_pattern) {
+ XBIT_HF(2, hf_dlmap_aas_sdma_dl_pilot_pattern);
+ XBIT_HF(1, hf_dlmap_reserved_uint);
+ } else {
+ XBIT_HF(3, hf_dlmap_reserved_uint);
+ }
+ if (encoding_mode == 0x0) {
+ XBIT_HF(4, hf_dlmap_aas_sdma_dl_diuc);
+ XBIT_HF(2, hf_dlmap_aas_sdma_dl_repetition_coding_indication);
+ XBIT_HF(2, hf_dlmap_reserved_uint);
+ }
+ if (encoding_mode == 0x1) {
+ if (ackch_alloc) {
+ XBIT_HF(5, hf_dlmap_aas_sdma_dl_ack_ch_index);
+ } else {
+ XBIT_HF(1, hf_dlmap_reserved_uint);
+ }
+ XBIT_HF(4, hf_dlmap_aas_sdma_dl_diuc);
+ XBIT_HF(2, hf_dlmap_aas_sdma_dl_repetition_coding_indication);
+ XBIT_HF(4, hf_dlmap_aas_sdma_dl_acid);
+ XBIT_HF(1, hf_dlmap_aas_sdma_dl_ai_sn);
+ }
+ if (encoding_mode == 0x2) {
+ if (ackch_alloc) {
+ XBIT_HF(5, hf_dlmap_aas_sdma_dl_ack_ch_index);
+ } else {
+ XBIT_HF(1, hf_dlmap_reserved_uint);
+ }
+ XBIT_HF(4, hf_dlmap_aas_sdma_dl_nep);
+ XBIT_HF(4, hf_dlmap_aas_sdma_dl_nsch);
+ XBIT_HF(2, hf_dlmap_aas_sdma_dl_spid);
+ XBIT_HF(4, hf_dlmap_aas_sdma_dl_acid);
+ XBIT_HF(1, hf_dlmap_aas_sdma_dl_ai_sn);
+ }
+ if (encoding_mode == 0x3) {
+ if (ackch_alloc) {
+ XBIT_HF(5, hf_dlmap_aas_sdma_dl_ack_ch_index);
+ XBIT_HF(2, hf_dlmap_reserved_uint);
+ } else {
+ XBIT_HF(3, hf_dlmap_reserved_uint);
+ }
+ XBIT_HF(4, hf_dlmap_aas_sdma_dl_diuc);
+ XBIT_HF(2, hf_dlmap_aas_sdma_dl_repetition_coding_indication);
+ XBIT_HF(2, hf_dlmap_aas_sdma_dl_spid);
+ XBIT_HF(4, hf_dlmap_aas_sdma_dl_acid);
+ XBIT_HF(1, hf_dlmap_aas_sdma_dl_ai_sn);
+ }
+ if (cqich_alloc) {
+ XBIT_HF(6, hf_dlmap_aas_sdma_dl_allocation_index);
+ XBIT_HF(3, hf_dlmap_aas_sdma_dl_period);
+ XBIT_HF(3, hf_dlmap_aas_sdma_dl_frame_offset);
+ XBIT_HF(4, hf_dlmap_aas_sdma_dl_duration);
+ }
+ }
+ }
+ data = BIT_PADDING(bit,4);
+ /* Should this be an optional field? Or do we want it, even if it has a length of zero? */
+ proto_tree_add_bytes_format_value(tree, hf_padding, tvb, BITHI(bit,data), NULL, "%d bits", data);
+ bit += data;
+
+ return BIT_TO_NIB(bit);
+}
+
+
+
+/********************************************************************
+ * DL-MAP Extended IEs
+ *******************************************************************/
+
+static gint Channel_Measurement_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended IE = 0 */
+ /* 8.4.5.3.5 [1] Channel_Measurement_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint nib;
+ gint data;
+ proto_tree *tree;
+
+ nib = offset;
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_280, NULL, "Channel_Measurement_IE");
+
+ VNIB(data, 1, hf_dlmap_ie_diuc_ext);
+ VNIB(data, 1, hf_dlmap_ie_length);
+
+ VNIB(data, 2, hf_dlmap_channel_measurement_channel_nr);
+ VNIB(data, 2, hf_dlmap_channel_measurement_ofdma_symbol_offset);
+ VNIB(data, 4, hf_dlmap_channel_measurement_cid);
+ return nib;
+}
+
+static gint STC_Zone_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended IE = 1 */
+ /* 8.4.5.3.4 STC_Zone_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ /* set globals: STC_Zone_Dedicated_Pilots, STC_Zone_Matrix
+ * used in 8.4.5.3.21.1 Dedicated MIMO Control IE 286t */
+ gint bit;
+ gint data;
+ proto_tree *tree;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_279, NULL, "STC_Zone_IE");
+
+ VBIT(data, 4, hf_dlmap_ie_diuc_ext);
+ VBIT(data, 4, hf_dlmap_ie_length);
+
+ XBIT_HF(8, hf_dlmap_stc_zone_ofdma_symbol_offset);
+ XBIT_HF(2, hf_dlmap_stc_zone_permutations);
+ XBIT_HF(1, hf_dlmap_stc_zone_use_all_sc_indicator);
+ XBIT_HF(2, hf_dlmap_stc_zone_stc);
+ XBIT_HF_VALUE(STC_Zone_Matrix, 2, hf_dlmap_stc_zone_matrix_indicator);
+ XBIT_HF(5, hf_dlmap_stc_zone_dl_permbase);
+ XBIT_HF(2, hf_dlmap_stc_zone_prbs_id);
+ XBIT_HF(2, hf_dlmap_stc_zone_amc_type);
+ XBIT_HF(1, hf_dlmap_stc_zone_midamble_presence);
+ XBIT_HF(1, hf_dlmap_stc_zone_midamble_boosting);
+ XBIT_HF(1, hf_dlmap_stc_zone_2_3_antenna_select);
+ XBIT_HF_VALUE(STC_Zone_Dedicated_Pilots, 1, hf_dlmap_stc_zone_dedicated_pilots);
+ XBIT_HF(4, hf_dlmap_reserved_uint);
+
+ return BIT_TO_NIB(bit);
+}
+
+static gint AAS_DL_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended IE = 2 */
+ /* 8.4.5.3.3 AAS_DL_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ gint data;
+ proto_tree *tree;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_278, NULL, "AAS_DL_IE");
+
+ VBIT(data, 4, hf_dlmap_ie_diuc_ext);
+ VBIT(data, 4, hf_dlmap_ie_length);
+
+ XBIT_HF(8, hf_dlmap_aas_dl_ofdma_symbol_offset);
+ XBIT_HF(3, hf_dlmap_aas_dl_permutation);
+ XBIT_HF(6, hf_dlmap_aas_dl_dl_permbase);
+ XBIT_HF(2, hf_dlmap_aas_dl_downlink_preamble_config);
+ XBIT_HF(1, hf_dlmap_aas_dl_preamble_type);
+ XBIT_HF(2, hf_dlmap_aas_dl_prbs_id);
+ XBIT_HF(1, hf_dlmap_aas_dl_diversity_map);
+ XBIT_HF(1, hf_dlmap_reserved_uint);
+
+ return BIT_TO_NIB(bit);
+}
+
+static gint Data_location_in_another_BS_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended IE = 3 */
+ /* 8.4.5.3.6 Data_location_in_another_BS_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ gint data;
+ proto_tree *tree;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_281, NULL, "Data location in another BS IE");
+
+ VBIT(data, 4, hf_dlmap_ie_diuc_ext);
+ VBIT(data, 4, hf_dlmap_ie_length);
+
+ XBIT_HF(2, hf_dlmap_data_location_another_bs_segment);
+ XBIT_HF(6, hf_dlmap_data_location_another_bs_used_subchannels);
+ XBIT_HF(4, hf_dlmap_data_location_another_bs_diuc);
+ XBIT_HF(3, hf_dlmap_data_location_another_bs_frame_advance);
+ XBIT_HF(1, hf_dlmap_reserved_uint);
+ XBIT_HF(8, hf_dlmap_data_location_another_bs_ofdma_symbol_offset);
+ XBIT_HF(6, hf_dlmap_data_location_another_bs_subchannel_offset);
+ XBIT_HF(3, hf_dlmap_data_location_another_bs_boosting);
+ XBIT_HF(7, hf_dlmap_data_location_another_bs_preamble_index);
+ XBIT_HF(8, hf_dlmap_data_location_another_bs_num_ofdma_symbols);
+ XBIT_HF(6, hf_dlmap_data_location_another_bs_num_subchannels);
+ XBIT_HF(2, hf_dlmap_data_location_another_bs_repetition_coding_indication);
+ XBIT_HF(16, hf_dlmap_data_location_another_bs_cid);
+
+ return BIT_TO_NIB(bit);
+}
+
+static gint CID_Switch_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended IE = 4 */
+ /* 8.4.5.3.7 [1] CID_Switch_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint nib;
+ gint data;
+ proto_tree *tree;
+
+ nib = offset;
+
+ INC_CID = INC_CID ? 0 : 1;
+
+ tree = proto_tree_add_subtree_format(diuc_tree, tvb, NIBHI(offset, length), ett_282, NULL, "CID_Switch_IE (INC_CID = %d)", INC_CID);
+
+ VNIB(data, 1, hf_dlmap_ie_diuc_ext);
+ VNIB(data, 1, hf_dlmap_ie_length);
+
+ return nib;
+}
+
+static gint MIMO_DL_Basic_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended IE = 5 */
+ /* 8.4.5.3.8 MIMO_DL_Basic_IE (not implemented) */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint nib;
+ gint data;
+ proto_tree *tree;
+
+ nib = offset;
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_283, NULL, "MIMO_DL_Basic_IE");
+
+ VNIB(data, 1, hf_dlmap_ie_diuc_ext2);
+ VNIB(data, 2, hf_dlmap_ie_length);
+ proto_tree_add_expert(diuc_tree, pinfo, &ei_dlmap_not_implemented, tvb, NIBHI(nib, length-2));
+ return nib;
+}
+
+static gint MIMO_DL_Enhanced_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended IE = 6 */
+ /* 8.4.5.3.9 MIMO_DL_Enhanced_IE (not implemented) */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint nib;
+ gint data;
+ proto_tree *tree;
+
+ nib = offset;
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_284, NULL, "MIMO_DL_Enhanced_IE");
+
+ VNIB(data, 1, hf_dlmap_ie_diuc_ext2);
+ VNIB(data, 2, hf_dlmap_ie_length);
+ proto_tree_add_expert(diuc_tree, pinfo, &ei_dlmap_not_implemented, tvb, NIBHI(nib, length-2));
+ return nib;
+}
+
+static gint HARQ_Map_Pointer_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended IE = 7 */
+ /* 8.4.5.3.10 [2] HARQ_Map_Pointer_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ gint data;
+ proto_tree *tree;
+ gint length_in_bits, map, mask_len;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_285, NULL, "HARQ_Map_Pointer_IE");
+
+ VBIT(data, 4, hf_dlmap_ie_diuc_ext);
+ VBIT(data, 4, hf_dlmap_ie_length);
+
+ length_in_bits = NIB_TO_BIT(length-1);
+ while (bit < length_in_bits) {
+ XBIT_HF(4, hf_dlmap_harq_map_pointer_diuc);
+ XBIT_HF(8, hf_dlmap_harq_map_pointer_num_slots);
+ XBIT_HF(2, hf_dlmap_harq_map_pointer_repetition_coding_indication);
+ XBIT_HF_VALUE(map, 2, hf_dlmap_harq_map_pointer_map_version);
+ if (map == 2) {
+ XBIT_HF(1, hf_dlmap_harq_map_pointer_idle_users);
+ XBIT_HF(1, hf_dlmap_harq_map_pointer_sleep_users);
+ XBIT_HF_VALUE(mask_len, 2, hf_dlmap_harq_map_pointer_cid_mask_length);
+ if (mask_len == 0) {
+ /* 12 bits */
+ proto_tree_add_bytes_format_value(diuc_tree, hf_cid_mask, tvb, BITHI(bit,12), NULL, "12 bits");
+ bit += 12;
+ } else if (mask_len == 1) {
+ /* 20 bits */
+ proto_tree_add_bytes_format_value(diuc_tree, hf_cid_mask, tvb, BITHI(bit,20), NULL, "20 bits");
+ bit += 20;
+ } else if (mask_len == 2) {
+ /* 36 bits */
+ proto_tree_add_bytes_format_value(diuc_tree, hf_cid_mask, tvb, BITHI(bit,36), NULL, "36 bits");
+ bit += 36;
+ } else if (mask_len == 3) {
+ /* 52 bits */
+ proto_tree_add_bytes_format_value(diuc_tree, hf_cid_mask, tvb, BITHI(bit,52), NULL, "52 bits");
+ bit += 52;
+ }
+ }
+ }
+ return BIT_TO_NIB(bit);
+}
+
+static gint PHYMOD_DL_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended IE = 8 */
+ /* 8.4.5.3.11 PHYMOD_DL_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ gint data;
+ proto_tree *tree;
+ gint pmt;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286, NULL, "PHYMOD_DL_IE");
+
+ VBIT(data, 4, hf_dlmap_ie_diuc_ext);
+ VBIT(data, 4, hf_dlmap_ie_length);
+
+ XBIT_HF_VALUE(pmt, 1, hf_dlmap_phymod_dl_preamble_modifier_type);
+ if (pmt == 0) {
+ XBIT_HF(4, hf_dlmap_phymod_dl_preamble_frequency_shift_index);
+ } else {
+ XBIT_HF(4, hf_dlmap_phymod_dl_preamble_time_shift_index);
+ }
+ XBIT_HF(1, hf_dlmap_phymod_dl_pilot_pattern_modifier);
+ XBIT_HF(2, hf_dlmap_phymod_dl_pilot_pattern_index);
+
+ return BIT_TO_NIB(bit);
+}
+
+static gint Broadcast_Control_Pointer_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended IE = 0xA */
+ /* 8.4.5.3.25 Broadcast Control Pointer IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ gint data;
+ proto_tree *tree;
+ gint skip;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286x, NULL, "Broadcast Control Pointer IE");
+
+ VBIT(data, 4, hf_dlmap_ie_diuc_ext);
+ VBIT(data, 4, hf_dlmap_ie_length);
+
+ XBIT_HF(7, hf_dlmap_broadcast_ctrl_ptr_dcd_ucd_transmission_frame);
+ XBIT_HF_VALUE(skip, 1, hf_dlmap_broadcast_ctrl_ptr_skip_broadcast_system_update);
+ if (skip == 0) {
+ XBIT_HF(1, hf_dlmap_broadcast_ctrl_ptr_broadcast_system_update_type);
+ XBIT_HF(7, hf_dlmap_broadcast_ctrl_ptr_broadcast_system_update_transmission_frame);
+ }
+ return BIT_TO_NIB(bit);
+}
+
+static gint DL_PUSC_Burst_Allocation_in_Other_Segment_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended IE = 0xB */
+ /* 8.4.5.3.13 DL PUSC Burst Allocation in Other Segment IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ gint data;
+ proto_tree *tree;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286b, NULL, "DL_PUSC_Burst_Allocation_in_Other_Segment_IE");
+
+ VBIT(data, 4, hf_dlmap_ie_diuc_ext);
+ VBIT(data, 4, hf_dlmap_ie_length);
+
+ XBIT_HF(16, hf_dlmap_dl_pusc_burst_allocation_cid);
+ XBIT_HF(4, hf_dlmap_dl_pusc_burst_allocation_diuc);
+ XBIT_HF(2, hf_dlmap_dl_pusc_burst_allocation_segment);
+ XBIT_HF(3, hf_dlmap_dl_pusc_burst_allocation_boosting);
+ XBIT_HF(5, hf_dlmap_dl_pusc_burst_allocation_idcell);
+ XBIT_HF(5, hf_dlmap_dl_pusc_burst_allocation_dl_permbase);
+ XBIT_HF(2, hf_dlmap_dl_pusc_burst_allocation_prbs_id);
+ XBIT_HF(2, hf_dlmap_dl_pusc_burst_allocation_repetition_coding_indication);
+ XBIT_HF(6, hf_dlmap_dl_pusc_burst_allocation_used_subchannels);
+ XBIT_HF(8, hf_dlmap_dl_pusc_burst_allocation_ofdma_symbol_offset);
+ XBIT_HF(1, hf_dlmap_reserved_uint);
+ XBIT_HF(7, hf_dlmap_dl_pusc_burst_allocation_num_ofdma_symbols);
+ XBIT_HF(6, hf_dlmap_dl_pusc_burst_allocation_subchannel_offset);
+ XBIT_HF(6, hf_dlmap_dl_pusc_burst_allocation_num_subchannels);
+ XBIT_HF(7, hf_dlmap_reserved_uint);
+ return BIT_TO_NIB(bit);
+}
+
+static gint PUSC_ASCA_Alloc_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended IE = 0xC */
+ /* 8.4.5.3.27 PUSC_ASCA_Alloc_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ gint data;
+ proto_tree *tree;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286z, NULL, "PUSC_ASCA_Alloc_IE");
+
+ VBIT(data, 4, hf_dlmap_ie_diuc_ext);
+ VBIT(data, 4, hf_dlmap_ie_length);
+ XBIT_HF(4, hf_dlmap_pusc_asca_alloc_diuc);
+ XBIT_HF(12, hf_dlmap_pusc_asca_alloc_short_basic_cid);
+ XBIT_HF(8, hf_dlmap_pusc_asca_alloc_ofdma_symbol_offset);
+ XBIT_HF(6, hf_dlmap_pusc_asca_alloc_subchannel_offset);
+ XBIT_HF(7, hf_dlmap_pusc_asca_alloc_num_ofdma_symbols);
+ XBIT_HF(6, hf_dlmap_pusc_asca_alloc_num_symbols);
+ XBIT_HF(2, hf_dlmap_pusc_asca_alloc_repetition_coding_information);
+ XBIT_HF(4, hf_dlmap_pusc_asca_alloc_permutation_id);
+ XBIT_HF(7, hf_dlmap_reserved_uint);
+
+ return BIT_TO_NIB(bit);
+}
+
+static gint UL_interference_and_noise_level_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* DL-MAP Extended IE = 0xF */
+ /* 8.4.5.3.19 UL_interference_and_noise_level_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ proto_tree *tree;
+ gint nib = offset;
+ gint bitmap, data;
+
+ tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286h, NULL, "UL_interference_and_noise_level_IE");
+
+ VNIB(data, 1, hf_dlmap_ie_diuc_ext);
+ VNIB(data, 1, hf_dlmap_ie_length);
+ VNIB(bitmap, 2, hf_dlmap_ie_bitmap);
+
+ if (bitmap & 0x01) {
+ VNIB(data, 2, hf_dlmap_ie_bitmap_cqi);
+ }
+ if (bitmap & 0x02) {
+ VNIB(data, 2, hf_dlmap_ie_bitmap_pusc);
+ }
+ if (bitmap & 0x04) {
+ VNIB(data, 2, hf_dlmap_ie_bitmap_opt_pusc);
+ }
+ if (bitmap & 0x08) {
+ VNIB(data, 2, hf_dlmap_ie_bitmap_amc);
+ }
+ if (bitmap & 0x10) {
+ VNIB(data, 2, hf_dlmap_ie_bitmap_aas);
+ }
+ if (bitmap & 0x20) {
+ VNIB(data, 2, hf_dlmap_ie_bitmap_periodic_ranging);
+ }
+ if (bitmap & 0x40) {
+ VNIB(data, 2, hf_dlmap_ie_bitmap_sounding);
+ }
+ if (bitmap & 0x80) {
+ VNIB(data, 2, hf_dlmap_ie_bitmap_mimo);
+ }
+
+ return nib;
+}
+
+/********************************************************************
+ * DL-MAP Plugin
+ *******************************************************************/
+
+static gint dissect_dlmap_ie(proto_tree *ie_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* decode a single DL-MAP IE and return the
+ * length of the IE in nibbles
+ * offset = start of IE (nibbles)
+ * length = total length of IE (nibbles) */
+ proto_item *ti = NULL;
+ proto_tree *tree = NULL;
+
+ gint nibble = offset;
+ gint diuc;
+ gint ext2_diuc;
+ gint len;
+ gint ext_diuc;
+
+ gint alt_format = 0;
+ guint data = 0;
+ gint i;
+ /*gint papr = 0;*/
+ gint ie_len = 9;
+
+ gint n_cid;
+
+ /* 8.4.5.3 DL-MAP IE format - table 275 */
+ diuc = TVB_NIB_NIBBLE(nibble, tvb);
+ if (diuc == 14)
+ {
+ /* 8.4.5.3.2.2 [2] Extended-2 DIUC dependent IE table 277b */
+ ext2_diuc = TVB_NIB_NIBBLE(1+nibble, tvb);
+ len = TVB_NIB_BYTE(1+nibble+1, tvb);
+
+ ti = proto_tree_add_uint(ie_tree, hf_dlmap_ie_diuc, tvb, NIBHI(nibble, 1+3+len*2), diuc);
+ proto_item_append_text(ti, " (Extended-2)");
+ tree = proto_item_add_subtree(ti, ett_277b);
+ nibble++;
+
+ len = 3 + BYTE_TO_NIB(len);
+
+ /* table 277c [2] */
+ switch (ext2_diuc)
+ {
+ case 0x00:
+ /* 8.4.5.3.12 MBS_MAP_IE */
+ nibble = MBS_MAP_IE(tree, nibble, len, tvb);
+ break;
+ case 0x01:
+ /* 8.4.5.3.14 HO_Anchor_Active_DL-MAP_IE */
+ nibble = HO_Anchor_Active_DL_MAP_IE(tree, pinfo, nibble, len, tvb);
+ break;
+ case 0x02:
+ /* 8.4.5.3.15 HO_Active_Anchor_DL_MAP_IE */
+ nibble = HO_Active_Anchor_DL_MAP_IE(tree, pinfo, nibble, len, tvb);
+ break;
+ case 0x03:
+ /* 8.4.5.3.16 HO_CID_Translation_MAP_IE */
+ nibble = HO_CID_Translation_MAP_IE(tree, pinfo, nibble, len, tvb);
+ break;
+ case 0x04:
+ /* 8.4.5.3.17 MIMO_in_another_BS_IE */
+ nibble = MIMO_in_another_BS_IE(tree, pinfo, nibble, len, tvb);
+ break;
+ case 0x05:
+ /* 8.4.5.3.18 Macro-MIMO_DL_Basic_IE */
+ nibble = Macro_MIMO_DL_Basic_IE(tree, pinfo, nibble, len, tvb);
+ break;
+ case 0x06:
+ /* 8.4.5.3.20.2 Skip_IE */
+ nibble = Skip_IE(tree, nibble, len, tvb);
+ break;
+ case 0x07:
+ /* 8.4.5.3.21 HARQ_DL_MAP_IE */
+ nibble = HARQ_DL_MAP_IE(tree, pinfo, nibble, len, tvb);
+ break;
+ case 0x08:
+ /* 8.4.5.3.22 HARQ_ACK IE */
+ nibble = HARQ_ACK_IE(tree, nibble, len, tvb);
+ break;
+ case 0x09:
+ /* 8.4.5.3.23 Enhanced DL MAP IE */
+ nibble = Enhanced_DL_MAP_IE(tree, nibble, len, tvb);
+ break;
+ case 0x0a:
+ /* 8.4.5.3.24 Closed-loop MIMO DL Enhanced IE */
+ nibble = Closed_loop_MIMO_DL_Enhanced_IE(tree, pinfo, nibble, len, tvb);
+ break;
+ case 0x0b:
+ nibble = MIMO_DL_Basic_IE(tree, pinfo, nibble, len, tvb);
+ break;
+ case 0x0c:
+ nibble = MIMO_DL_Enhanced_IE(tree, pinfo, nibble, len, tvb);
+ break;
+
+ case 0x0e:
+ nibble = AAS_SDMA_DL_IE(tree, nibble, len, tvb);
+ break;
+
+ default:
+ proto_tree_add_bytes_format(tree, hf_dlmap_ie_reserved_extended2_duic, tvb, NIBHI(nibble,len), NULL, "(reserved Extended-2 DIUC: %d)", ext2_diuc);
+ nibble += len;
+ break;
+
+ }
+ }
+ else if (diuc == 15)
+ {
+ /* 8.4.5.3.2.1 [1] Extended DIUC dependent IE - table 277 */
+ ext_diuc = TVB_NIB_NIBBLE(1+nibble, tvb);
+ len = TVB_NIB_NIBBLE(1+nibble+1, tvb);
+
+ ti = proto_tree_add_uint(ie_tree, hf_dlmap_ie_diuc, tvb, NIBHI(nibble, 1+2+len*2), diuc);
+ proto_item_append_text(ti, " (Extended)");
+ tree = proto_item_add_subtree(ti, ett_277);
+ nibble++;
+
+ len = 2 + BYTE_TO_NIB(len);
+
+ /* TODO 8.4.5.3.27 PUSC_ASCA_IE -- unspecified ExtDIUC? */
+
+ /* 8.4.5.3.2.1 table 277a */
+ switch (ext_diuc)
+ {
+ case 0x00:
+ /* 8.4.5.3.? Channel_Measurement_IE */
+ nibble = Channel_Measurement_IE(tree, nibble, len, tvb);
+ break;
+ case 0x01:
+ /* 8.4.5.3.4 STC_Zone_IE */
+ nibble = STC_Zone_IE(tree, nibble, len, tvb);
+ break;
+ case 0x02:
+ /* 8.4.5.3.3 AAS_DL_IE */
+ nibble = AAS_DL_IE(tree, nibble, len, tvb);
+ break;
+ case 0x03:
+ /* 8.4.5.3.6 Data_location_in_another_BS_IE */
+ nibble = Data_location_in_another_BS_IE(tree, nibble, len, tvb);
+ break;
+ case 0x04:
+ /* 8.4.5.3.7 CID_Switch_IE */
+ nibble = CID_Switch_IE(tree, nibble, len, tvb);
+ break;
+ case 0x07:
+ /* 8.4.5.3.10 HARQ_Map_Pointer_IE */
+ nibble = HARQ_Map_Pointer_IE(tree, nibble, len, tvb);
+ break;
+ case 0x08:
+ /* 8.4.5.3.11 PHYMOD_DL_IE */
+ nibble = PHYMOD_DL_IE(tree, nibble, len, tvb);
+ break;
+ case 0x0a:
+ /* 8.4.5.3.25 Broadcast Control Pointer IE */
+ nibble = Broadcast_Control_Pointer_IE(tree, nibble, len, tvb);
+ break;
+ case 0x0b:
+ /* 8.4.5.3.13 DL PUSC Burst Allocation in Other Segment IE */
+ nibble = DL_PUSC_Burst_Allocation_in_Other_Segment_IE(tree, nibble, len, tvb);
+ break;
+ case 0x0c:
+ nibble = PUSC_ASCA_Alloc_IE(tree, nibble, len, tvb);
+ break;
+
+ case 0x0f:
+ /* 8.4.5.3.19 UL_interference_and_noise_level_IE */
+ nibble = UL_interference_and_noise_level_IE(tree, nibble, len, tvb);
+ break;
+
+ default:
+ proto_tree_add_bytes_format(tree, hf_dlmap_ie_reserved_extended_duic, tvb, NIBHI(nibble,len), NULL, "(reserved Extended DIUC: %d)", ext_diuc);
+ nibble += len;
+ break;
+ }
+ }
+ else
+ {
+ /* Downlink IE */
+ alt_format = 0;
+ /*papr = 0; XX: not used ? */
+ ie_len = 9;
+
+ /* TODO: alt_format = 1 if (Permutation == 0x11) and (AMC type is 2x3 or 1x6) */
+
+ /* precalculate IE len for correct highlighting */
+ if (INC_CID && !sub_dl_ul_map) {
+ ie_len += 2 + (TVB_NIB_BYTE(nibble+1, tvb) * 4);
+ }
+
+ /* DL-MAP_IE */
+ ti = proto_tree_add_uint(ie_tree, hf_dlmap_ie_diuc, tvb, NIBHI(nibble, ie_len), diuc);
+ tree = proto_item_add_subtree(ti, ett_275_1);
+ nibble += 1;
+
+ if (diuc == 13) {
+ /* 8.4.5.3.1 [1] Gap/PAPR Reduction */
+ /*papr = 1; XX: not used ? */
+ proto_item_append_text(ti, " (Gap/PAPR Reduction)");
+ }
+
+
+ if (INC_CID)
+ {
+ n_cid = TVB_NIB_BYTE(nibble, tvb);
+ proto_tree_add_uint(tree, hf_dlmap_ie_ncid, tvb, NIBHI(nibble, 2), n_cid);
+ nibble += 2;
+
+ for (i = 0; i < n_cid; i++)
+ {
+ if (sub_dl_ul_map) {
+ /* RCID_IE 8.4.5.3 and 8.4.5.3.20.1, only part of SUB-DL-UL-MAP */
+ /* RCID_Type comes from 6.3.2.3.43.2 [2] Format_configuration_IE in Compact_DL-MAP_IE */
+ nibble += RCID_IE(tree, nibble*4, length, tvb, RCID_Type) / 4;
+ } else {
+ data = TVB_NIB_WORD(nibble, tvb);
+ proto_tree_add_uint(tree, hf_dlmap_ie_cid, tvb, NIBHI(nibble, 4), data);
+ nibble += 4;
+ }
+ }
+ }
+
+ data = TVB_NIB_LONG(nibble, tvb);
+ if (alt_format) {
+ proto_tree_add_uint(tree, hf_dlmap_ie_offsym2, tvb, NIBHI(nibble, 8), data);
+ proto_tree_add_uint(tree, hf_dlmap_ie_offsub2, tvb, NIBHI(nibble, 8), data);
+ proto_tree_add_uint(tree, hf_dlmap_ie_boosting2, tvb, NIBHI(nibble, 8), data);
+ proto_tree_add_uint(tree, hf_dlmap_ie_numsym2, tvb, NIBHI(nibble, 8), data);
+ proto_tree_add_uint(tree, hf_dlmap_ie_numsub2, tvb, NIBHI(nibble, 8), data);
+ proto_tree_add_uint(tree, hf_dlmap_ie_rep2, tvb, NIBHI(nibble, 8), data);
+ } else {
+ proto_tree_add_uint(tree, hf_dlmap_ie_offsym, tvb, NIBHI(nibble, 8), data);
+ proto_tree_add_uint(tree, hf_dlmap_ie_offsub, tvb, NIBHI(nibble, 8), data);
+ proto_tree_add_uint(tree, hf_dlmap_ie_boosting, tvb, NIBHI(nibble, 8), data);
+ proto_tree_add_uint(tree, hf_dlmap_ie_numsym, tvb, NIBHI(nibble, 8), data);
+ proto_tree_add_uint(tree, hf_dlmap_ie_numsub, tvb, NIBHI(nibble, 8), data);
+ proto_tree_add_uint(tree, hf_dlmap_ie_rep, tvb, NIBHI(nibble, 8), data);
+ }
+ nibble += 8;
+ }
+
+ /* length in nibbles */
+ return (nibble - offset);
+}
+
+
+static int dissect_mac_mgmt_msg_dlmap_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree, void* data _U_)
+{
+ /* 6.3.2.3.2 [2] DL-MAP table 16 */
+ guint offset = 0;
+ gint length, nib, pad;
+ proto_item *ti = NULL;
+ proto_tree *dlmap_tree = NULL;
+ proto_tree *ie_tree = NULL;
+ proto_tree *phy_tree = NULL;
+ gint tvb_len = tvb_reported_length(tvb);
+
+ INC_CID = 0;
+
+ /* add protocol */
+ ti = proto_tree_add_protocol_format(base_tree, proto_mac_mgmt_msg_dlmap_decoder, tvb, offset, -1, "DL-MAP");
+ dlmap_tree = proto_item_add_subtree(ti, ett_dlmap);
+
+ /* PHY Synchronization Field 8.4.5.1 */
+ {
+ phy_tree = proto_tree_add_subtree(dlmap_tree, tvb, offset, 4, ett_275_phy, NULL, "Phy Synchronization Field");
+ proto_tree_add_item(phy_tree, hf_dlmap_phy_fdur_ms, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(phy_tree, hf_dlmap_phy_fdur_per_sec, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(phy_tree, hf_dlmap_phy_fdur, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+ proto_tree_add_item(phy_tree, hf_dlmap_phy_fnum, tvb, offset, 3, ENC_BIG_ENDIAN);
+ offset += 3;
+ }
+ proto_tree_add_item(dlmap_tree, hf_dlmap_dcd, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+ proto_tree_add_item(dlmap_tree, hf_dlmap_bsid, tvb, offset, 6, ENC_NA);
+ offset += 6;
+ proto_tree_add_item(dlmap_tree, hf_dlmap_ofdma_sym, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+
+ /* DL-MAP IEs */
+ length = tvb_len - offset; /* remaining length in bytes */
+ ie_tree = proto_tree_add_subtree_format(dlmap_tree, tvb, offset, length, ett_dlmap_ie, NULL, "DL-MAP IEs (%d bytes)", length);
+
+ /* length = BYTE_TO_NIB(length); */ /* convert length to nibbles */
+
+ nib = BYTE_TO_NIB(offset);
+ while (nib < ((tvb_len*2)-1)) {
+ nib += dissect_dlmap_ie(ie_tree, pinfo, nib, tvb_len * 2, tvb);
+ }
+ pad = NIB_PADDING(nib);
+ if (pad) {
+ proto_tree_add_bytes_format(dlmap_tree, hf_padding, tvb, NIBHI(nib,1), NULL, "Padding nibble");
+ nib++;
+ }
+ return tvb_captured_length(tvb);
+}
+
+gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree)
+{
+ /* 8.4.5.6.1 [2] Compressed DL-MAP */
+ /* decode a compressed dl-map and return the length in bytes; */
+ /* if there is a compressed ul-map, also decode that and include in the length */
+ guint offset = 0;
+ proto_item *ti = NULL;
+ proto_item *ti_phy = NULL;
+ proto_item *ti_dlmap_ies = NULL;
+ proto_tree *tree = NULL;
+ proto_tree *ie_tree = NULL;
+ proto_tree *phy_tree = NULL;
+ gint ulmap_appended;
+ guint length, lennib, pad;
+ guint mac_len, dl_ie_count;
+ guint tvb_len = tvb_reported_length(tvb);
+ guint nib = 0;
+ guint32 mac_crc, calculated_crc;
+
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Compressed DL-MAP");
+
+ INC_CID = 0;
+
+ length = tvb_get_ntohs(tvb, offset) & 0x07FF; /* compressed map length is 11 bits */
+ mac_len = length;
+ lennib = BYTE_TO_NIB(length);
+
+ ulmap_appended = (tvb_get_guint8(tvb, offset) >> 4) & 1; /* UL MAP appended? */
+
+ /* display MAC Compressed DL-MAP and create subtree */
+ ti = proto_tree_add_protocol_format(base_tree, proto_mac_mgmt_msg_dlmap_decoder, tvb, offset, length, "Compressed DL-MAP (%u bytes)", length);
+ tree = proto_item_add_subtree(ti, ett_305);
+
+ /* decode dlmap fields */
+ proto_tree_add_item(tree, hf_dlmapc_compr, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_dlmapc_ulmap, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_dlmapc_rsv, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_dlmapc_len, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* PHY Synchronization Field 8.4.5.1 */
+ {
+ phy_tree = proto_tree_add_subtree(tree, tvb, offset+2, 4, ett_275_phy, &ti_phy, "Phy Synchronization Field");
+ proto_tree_add_item(phy_tree, hf_dlmap_phy_fdur_ms, tvb, offset+2, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(phy_tree, hf_dlmap_phy_fdur_per_sec, tvb, offset+2, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(phy_tree, hf_dlmap_phy_fnum, tvb, offset+3, 3, ENC_BIG_ENDIAN);
+ }
+ proto_tree_add_item(tree, hf_dlmap_dcd, tvb, offset+6, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_dlmapc_opid, tvb, offset+7, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_dlmapc_secid, tvb, offset+8, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_dlmap_ofdma_sym, tvb, offset+9, 1, ENC_BIG_ENDIAN); /* 2005 */
+ proto_tree_add_item(tree, hf_dlmapc_count, tvb, offset+10,1, ENC_BIG_ENDIAN);
+ dl_ie_count = tvb_get_guint8(tvb, offset + 10);
+ offset += 11;
+ nib = BYTE_TO_NIB(offset);
+
+ /* DL-MAP IEs */
+ length -= 15; /* remaining length in bytes (11 bytes above + CRC at end) */
+ if (dl_ie_count) {
+ ie_tree = proto_tree_add_subtree_format(tree, tvb, offset, length, ett_dlmap_ie, &ti_dlmap_ies, "DL-MAP IEs (%d bytes)", length);
+
+ /* length = BYTE_TO_NIB(mac_len - (int)sizeof(mac_crc) - 1); */ /* convert length to nibbles */
+
+ while (dl_ie_count--) {
+ nib += dissect_dlmap_ie(ie_tree, pinfo, nib, tvb_len * 2, tvb);
+ }
+ pad = NIB_PADDING(nib);
+ if (pad) {
+ proto_tree_add_bytes_format(tree, hf_padding, tvb, NIBHI(nib,1), NULL, "Padding nibble");
+ nib++;
+ }
+ }
+
+ if (ulmap_appended) {
+ /* Replace the text of items to set the correct length in bytes.*/
+ proto_item_set_text(ti, "Compressed DL-MAP (%u bytes)", NIB_ADDR(nib));
+ proto_item_set_text(ti_dlmap_ies, "DL-MAP IEs (%u bytes)",NIB_ADDR(nib)- offset);
+
+ /* set the length of items */
+ proto_item_set_end(ti_dlmap_ies, tvb, NIB_ADDR(nib));
+ proto_item_set_end(ti, tvb, NIB_ADDR(nib));
+
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Compressed UL-MAP");
+
+ /* subtract 8 from lennib (CRC) */
+ wimax_decode_ulmapc(base_tree, pinfo, nib, lennib - 8, tvb);
+ }
+
+ /* CRC is always appended */
+ /* check the length */
+ if (MIN(tvb_len, tvb_reported_length(tvb)) >= mac_len)
+ {
+ /* calculate the CRC */
+ calculated_crc = wimax_mac_calc_crc32(tvb_get_ptr(tvb, 0, mac_len - (int)sizeof(mac_crc)), mac_len - (int)sizeof(mac_crc));
+ proto_tree_add_checksum(base_tree, tvb, mac_len - (int)sizeof(mac_crc), hf_mac_header_compress_dlmap_crc, hf_mac_header_compress_dlmap_crc_status, &ei_mac_header_compress_dlmap_crc,
+ pinfo, calculated_crc, ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+ }
+ else
+ { /* display error message */
+ proto_tree_add_protocol_format(base_tree, proto_mac_mgmt_msg_dlmap_decoder, tvb, 0, tvb_len, "CRC missing - the frame is too short (%u bytes)", tvb_len);
+ }
+
+ return mac_len;
+}
+#if 0
+static gint wimax_decode_sub_dl_ul_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree)
+{
+ /* decode a SUB-DL-UL-MAP message 6.3.2.3.60 and return the length in bytes */
+ /* first three bits are 0x7, which following a compressed DL map indicates this message */
+ proto_tree *tree = NULL;
+ proto_tree *ie_tree = NULL;
+ proto_item *generic_item = NULL;
+ gint data;
+ gint i, numie;
+ guint16 calculated_crc;
+
+ gint length = tvb_reported_length(tvb);
+ gint nib = 0;
+ gint lennib = BYTE_TO_NIB(length);
+
+ sub_dl_ul_map = 1; /* set flag */
+
+ tree = proto_tree_add_subtree(base_tree, tvb, NIBHI(nib,lennib-nib), ett_109x, NULL, "SUB-DL-UL-MAP");
+
+ data = TVB_NIB_WORD(nib,tvb);
+ proto_tree_add_uint(tree, hf_109x_cmi, tvb, NIBHI(nib,4), data);
+ proto_tree_add_uint(tree, hf_109x_len, tvb, NIBHI(nib,4), data);
+ proto_tree_add_uint(tree, hf_109x_rcid, tvb, NIBHI(nib,4), data);
+ proto_tree_add_uint(tree, hf_109x_haoi, tvb, NIBHI(nib,4), data);
+ nib += 4;
+
+ /* HARQ ACK offset indicator */
+ if (data & 1) {
+ data = TVB_NIB_BYTE(nib,tvb);
+ proto_tree_add_uint(tree, hf_109x_dl, tvb, NIBHI(nib,2), data);
+ nib += 2;
+ data = TVB_NIB_BYTE(nib,tvb);
+ proto_tree_add_uint(tree, hf_109x_ul, tvb, NIBHI(nib,2), data);
+ nib += 2;
+ }
+
+ numie = TVB_NIB_BYTE(nib,tvb);
+ proto_tree_add_uint(tree, hf_109x_dlie, tvb, NIBHI(nib,2), numie);
+ nib += 2;
+
+ /* DL-MAP IEs */
+ ie_tree = proto_tree_add_subtree(tree, tvb, NIBHI(nib,1), ett_109x_dl, NULL, "DL-MAP IEs");
+ for (i = 0; i < numie; i++) {
+ nib += dissect_dlmap_ie(ie_tree, pinfo, nib, lennib - nib, tvb);
+ }
+
+ data = TVB_NIB_BYTE(nib,tvb);
+ proto_tree_add_uint(tree, hf_109x_symofs, tvb, NIBHI(nib,2), data);
+ nib += 2;
+ data = TVB_NIB_BYTE(nib,tvb);
+ proto_tree_add_uint(tree, hf_109x_subofs, tvb, NIBHI(nib,2), data);
+ proto_tree_add_uint(tree, hf_109x_rsv, tvb, NIBHI(nib,2), data);
+ nib += 2;
+
+ /* UL-MAP IEs */
+ ie_tree = proto_tree_add_subtree(tree, tvb, NIBHI(nib,lennib-nib), ett_109x_ul, NULL, "UL-MAP IEs");
+ for ( ; nib < lennib - 1; ) {
+ nib += dissect_ulmap_ie(ie_tree, nib, lennib - nib, tvb);
+ }
+
+ /* padding */
+ if (nib & 1) {
+ proto_tree_add_bytes_format(tree, hf_padding, tvb, NIBHI(nib,1), NULL, "Padding Nibble");
+ nib++;
+ }
+
+ /* CRC-16 is always appended */
+ calculated_crc = wimax_mac_calc_crc16(tvb_get_ptr(tvb, 0, NIB_TO_BYTE(nib)), NIB_TO_BYTE(nib));
+ proto_tree_add_checksum(tree, tvb, NIBHI(nib,4), hf_crc16, hf_crc16_status, &ei_crc16, pinfo, calculated_crc,
+ ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+ /* nib += 4; */
+
+ sub_dl_ul_map = 0; /* clear flag */
+ /* return length */
+ return length;
+}
+#endif
+
+gint wimax_decode_dlmap_reduced_aas(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *base_tree)
+{
+ /* 8.4.5.8.1 [2] Reduced AAS private DL-MAP */
+ /* if there is an appended UL-MAP, also decode that */
+ guint offset = 0;
+ proto_item *ti = NULL;
+ proto_tree *tree = NULL;
+ gint ulmap_appended;
+ gint length;
+ gint tvb_len = tvb_reported_length(tvb);
+ gint bit = 0;
+ guint data, pad, mult;
+ gint numie = 1;
+ gint i;
+ guint16 calculated_crc;
+ gint smcs,cidi,dcdi,phyi,cqci;
+
+ length = tvb_len;
+
+ /* display MAC Reduced_AAS_Private_DL-MAP and create subtree */
+ ti = proto_tree_add_protocol_format(base_tree, proto_mac_mgmt_msg_dlmap_decoder, tvb, offset, length, "Reduced_AAS_Private_DL-MAP");
+ tree = proto_item_add_subtree(ti, ett_308a);
+
+ VBIT(data, 3, hf_308a_cmi);
+ VBIT(ulmap_appended, 1, hf_308a_ulmap);
+ VBIT(data, 2, hf_308a_type);
+ VBIT(mult, 1, hf_308a_mult);
+ VBIT(data, 1, hf_308a_rsv);
+
+ if (mult) {
+ XBIT_HF_VALUE(numie, 8, hf_dlmap_reduced_aas_num_ie);
+ }
+
+ for (i = 0; i < numie; i++) {
+ XBIT_HF(2, hf_dlmap_reduced_aas_periodicity);
+ XBIT_HF_VALUE(cidi, 1, hf_dlmap_reduced_aas_cid_included);
+ XBIT_HF_VALUE(dcdi, 1, hf_dlmap_reduced_aas_dcd_count_included);
+ XBIT_HF_VALUE(phyi, 1, hf_dlmap_reduced_aas_phy_modification_included);
+ XBIT_HF_VALUE(cqci, 1, hf_dlmap_reduced_aas_cqich_control_indicator);
+ XBIT_HF(2, hf_dlmap_reduced_aas_encoding_mode);
+ XBIT_HF_VALUE(smcs, 1, hf_dlmap_reduced_aas_separate_mcs_enabled);
+
+ if (smcs) {
+ XBIT_HF(10, hf_dlmap_reduced_aas_duration);
+ XBIT_HF(4, hf_dlmap_reduced_aas_diuc);
+ XBIT_HF(2, hf_dlmap_reduced_aas_repetition_coding_indication);
+ }
+ if (cidi) {
+ XBIT_HF(16, hf_dlmap_reduced_aas_cid);
+ }
+ if (cqci) {
+ XBIT_HF(6, hf_dlmap_reduced_aas_allocation_index);
+ XBIT_HF(3, hf_dlmap_reduced_aas_report_period);
+ XBIT_HF(3, hf_dlmap_reduced_aas_frame_offset);
+ XBIT_HF(4, hf_dlmap_reduced_aas_report_duration);
+ XBIT_HF(2, hf_dlmap_reduced_aas_cqi_measurement_type);
+ XBIT_HF(2, hf_dlmap_reserved_uint);
+ }
+ if (dcdi) {
+ XBIT_HF(8, hf_dlmap_reduced_aas_dcd_count);
+ }
+ if (phyi) {
+ XBIT_HF(1, hf_dlmap_reduced_aas_preamble_select);
+ XBIT_HF(4, hf_dlmap_reduced_aas_preamble_shift_index);
+ XBIT_HF(1, hf_dlmap_reduced_aas_pilot_pattern_modifier);
+ XBIT_HF(2, hf_dlmap_reduced_aas_pilot_pattern_index);
+ }
+ XBIT_HF(3, hf_dlmap_reduced_aas_dl_frame_offset);
+ if (fusc) {
+ XBIT_HF(8, hf_dlmap_reduced_aas_zone_symbol_offset);
+ }
+ XBIT_HF(8, hf_dlmap_reduced_aas_ofdma_symbol_offset);
+ if (tusc) {
+ XBIT_HF(8, hf_dlmap_reduced_aas_subchannel_offset);
+ XBIT_HF(5, hf_dlmap_reduced_aas_num_ofdma_triple_symbol);
+ XBIT_HF(6, hf_dlmap_reduced_aas_num_subchannels);
+ } else {
+ XBIT_HF(6, hf_dlmap_reduced_aas_subchannel_offset);
+ XBIT_HF(7, hf_dlmap_reduced_aas_num_ofdma_symbols);
+ XBIT_HF(6, hf_dlmap_reduced_aas_num_subchannels);
+ }
+ XBIT_HF(4, hf_dlmap_reduced_aas_diuc_nep);
+ if (harq) {
+ XBIT_HF(1, hf_dlmap_reduced_aas_dl_harq_ack_bitmap);
+ XBIT_HF(6, hf_dlmap_reduced_aas_ack_allocation_index);
+ XBIT_HF(4, hf_dlmap_reduced_aas_acid);
+ XBIT_HF(1, hf_dlmap_reduced_aas_ai_sn);
+ if (ir_type) {
+ XBIT_HF(4, hf_dlmap_reduced_aas_nsch);
+ XBIT_HF(2, hf_dlmap_reduced_aas_spid);
+ XBIT_HF(2, hf_dlmap_reserved_uint);
+ }
+ }
+ XBIT_HF(2, hf_dlmap_reduced_aas_repetition_coding_indication);
+ if (ulmap_appended) {
+ /* offset and length are in bits */
+ bit += wimax_decode_ulmap_reduced_aas(tree, offset, length*8, tvb);
+ }
+ XBIT_HF(3, hf_dlmap_reserved_uint);
+ }
+
+ /* padding */
+ pad = BIT_PADDING(bit,8);
+ if (pad) {
+ proto_tree_add_bytes_format_value(tree, hf_padding, tvb, BITHI(bit,pad), NULL, "%d bits",pad);
+ bit += pad;
+ }
+
+ /* CRC-16 is always appended */
+ calculated_crc = wimax_mac_calc_crc16(tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ proto_tree_add_checksum(tree, tvb, BIT_ADDR(bit), hf_crc16, hf_crc16_status, &ei_crc16, pinfo, calculated_crc,
+ ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+ bit += 16;
+
+ return BIT_TO_BYTE(bit) - offset;
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_dlmap(void)
+{
+ /* DL-MAP fields display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_dlmap_bsid,
+ {
+ "Base Station ID", "wmx.dlmap.bsid",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_dcd,
+ {
+ "DCD Count", "wmx.dlmap.dcd",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_dlmap_fch_expected,
+ {
+ "FCH Expected", "wmx.dlmap.fch_expected",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie,
+ {
+ "DL-MAP IE", "wmx.dlmap.ie",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_dlmap_ie_boosting,
+ {
+ "Boosting", "wmx.dlmap.ie.boosting",
+ FT_UINT32, BASE_DEC, VALS(boost_msgs), 0x00038000, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_boosting2,
+ {
+ "Boosting", "wmx.dlmap.ie.boosting",
+ FT_UINT32, BASE_DEC, VALS(boost_msgs), 0x0000E000, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_cid,
+ {
+ "CID", "wmx.dlmap.ie.cid",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_diuc,
+ {
+ "DIUC", "wmx.dlmap.ie.diuc",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_diuc_ext,
+ {
+ "Extended DIUC", "wmx.dlmap.ie.ext_diuc",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_diuc_ext2,
+ {
+ "Extended-2 DIUC", "wmx.dlmap.ie.ext2_diuc",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_reserved_extended2_duic,
+ {
+ "Reserved Extended-2 DIUC", "wmx.dlmap.ie.ext2_diuc_reserved",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_reserved_extended_duic,
+ {
+ "Reserved Extended DIUC", "wmx.dlmap.ie.ext_diuc_reserved",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_length,
+ {
+ "Length", "wmx.dlmap.ie.length",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_bitmap,
+ {
+ "Bitmap", "wmx.dlmap.ie.bitmap",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_bitmap_cqi,
+ {
+ "CQI/ACK/Periodic Ranging region NI", "wmx.dlmap.ie.bitmap.cqi",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_bitmap_pusc,
+ {
+ "PUSC region NI", "wmx.dlmap.ie.bitmap.pusc",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_bitmap_opt_pusc,
+ {
+ "Optional PUSC region NI", "wmx.dlmap.ie.bitmap.opt_pusc",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_bitmap_amc,
+ {
+ "AMC region NI", "wmx.dlmap.ie.bitmap.amc",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_bitmap_aas,
+ {
+ "AAS region NI", "wmx.dlmap.ie.bitmap.aas",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_bitmap_periodic_ranging,
+ {
+ "Periodic Ranging region NI", "wmx.dlmap.ie.bitmap.periodic_ranging",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_bitmap_sounding,
+ {
+ "Sounding region NI", "wmx.dlmap.ie.bitmap.sounding",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_bitmap_mimo,
+ {
+ "MIMO region NI", "wmx.dlmap.ie.bitmap.mimo",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_ncid,
+ {
+ "N_CID", "wmx.dlmap.ie.ncid",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_numsub,
+ {
+ "Number of Subchannels", "wmx.dlmap.ie.numsub",
+ FT_UINT32, BASE_DEC, NULL, 0x000000FC, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_numsym,
+ {
+ "Number of OFDMA Symbols", "wmx.dlmap.ie.numsym",
+ FT_UINT32, BASE_DEC, NULL, 0x00007F00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_numsub2,
+ {
+ "Number of Subchannels", "wmx.dlmap.ie.numsub",
+ FT_UINT32, BASE_DEC, NULL, 0x000000FC, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_numsym2,
+ {
+ "Number of OFDMA Symbols", "wmx.dlmap.ie.numsym",
+ FT_UINT32, BASE_DEC, NULL, 0x00001F00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_offsub,
+ {
+ "Subchannel Offset", "wmx.dlmap.ie.offsub",
+ FT_UINT32, BASE_DEC, NULL, 0x00FC0000, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_offsym,
+ {
+ "OFDMA Symbol Offset", "wmx.dlmap.ie.offsym",
+ FT_UINT32, BASE_DEC, NULL, 0xFF000000, NULL, HFILL
+ }
+ },
+ /* alt ie format */
+ {
+ &hf_dlmap_ie_offsub2,
+ {
+ "Subchannel Offset", "wmx.dlmap.ie.offsub",
+ FT_UINT32, BASE_DEC, NULL, 0x00FF0000, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_offsym2,
+ {
+ "OFDMA Symbol Offset", "wmx.dlmap.ie.offsym",
+ FT_UINT32, BASE_DEC, NULL, 0xFF000000, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_rep,
+ {
+ "Repetition Coding Indication", "wmx.dlmap.ie.rep",
+ FT_UINT32, BASE_DEC, VALS(rep_msgs), 0x00000003, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ie_rep2,
+ {
+ "Repetition Coding Indication", "wmx.dlmap.ie.rep",
+ FT_UINT32, BASE_DEC, VALS(rep_msgs), 0x00000003, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_ofdma_sym,
+ {
+ "Num OFDMA Symbols", "wmx.dlmap.ofdma_sym",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_phy_fdur,
+ {
+ "Frame Duration Code", "wmx.dlmap.phy_fdur",
+ FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_phy_fdur_ms,
+ {
+ "Frame Duration", "wmx.dlmap.phy_fdur",
+ FT_UINT8, BASE_HEX, VALS(frame_duration), 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_phy_fdur_per_sec,
+ {
+ "Frames per second", "wmx.dlmap.phy_fdur",
+ FT_UINT8, BASE_HEX, VALS(frames_per_second), 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_phy_fnum,
+ {
+ "Frame Number", "wmx.dlmap.phy_fnum",
+ FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmapc_compr,
+ {
+ "Compressed map indicator", "wmx.dlmapc.compr",
+ FT_UINT16, BASE_DEC, NULL, 0xe000, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmapc_count,
+ {
+ "DL IE Count", "wmx.dlmapc.count",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmapc_len,
+ {
+ "Map message length", "wmx.dlmapc.len",
+ FT_UINT16, BASE_DEC, NULL, 0x07FF, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmapc_opid,
+ {
+ "Operator ID", "wmx.dlmapc.opid",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmapc_rsv,
+ {
+ "Reserved", "wmx.dlmapc.rsv",
+ FT_UINT16, BASE_DEC, NULL, 0x0800, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmapc_secid,
+ {
+ "Sector ID", "wmx.dlmapc.secid",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_dlmapc_sync,
+ {
+ "PHY Synchronization Field", "wmx.dlmapc.sync",
+ FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_dlmapc_ulmap,
+ {
+ "UL-MAP appended", "wmx.dlmapc.ulmap",
+ FT_UINT16, BASE_DEC, NULL, 0x1000, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_dlmap_xie_diuc,
+ {
+ "Extended DIUC", "wmx.dlmapc.xie_diuc",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dlmap_xie_len,
+ {
+ "Length", "wmx.dlmapc.xie_len",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+
+ {
+ &hf_109x_cmi,
+ {
+ "SUB-DL-UL-MAP map indicator", "wmx.dlul.cmi",
+ FT_UINT16, BASE_DEC, NULL, 0xE000, NULL, HFILL
+ }
+ },
+ {
+ &hf_109x_dl,
+ {
+ "DL HARQ ACK offset", "wmx.dlul.dl",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_109x_dlie,
+ {
+ "DL IE Count", "wmx.dlul.dlie",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_109x_haoi,
+ {
+ "HARQ ACK offset indicator", "wmx.dlul.haoi",
+ FT_UINT16, BASE_DEC, NULL, 0x0001, NULL, HFILL
+ }
+ },
+ {
+ &hf_109x_len,
+ {
+ "Map message length - The length is limited to 735 bytes at most", "wmx.dlul.len",
+ FT_UINT16, BASE_DEC, NULL, 0x1FF8, NULL, HFILL
+ }
+ },
+ {
+ &hf_109x_rcid,
+ {
+ "RCID_Type", "wmx.dlul.rcid",
+ FT_UINT16, BASE_DEC, NULL, 0x0006, NULL, HFILL
+ }
+ },
+ {
+ &hf_109x_subofs,
+ {
+ "Subchannel offset", "wmx.dlul.subofs",
+ FT_UINT8, BASE_DEC, NULL, 0xFE, NULL, HFILL
+ }
+ },
+ {
+ &hf_109x_symofs,
+ {
+ "OFDMA Symbol offset of subsequent sub-bursts "
+ "in this Sub-DL-UL-MAP message with reference to "
+ "the start of UL sub-frame.", "wmx.dlul.symofs",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_109x_rsv,
+ {
+ "Reserved", "wmx.dlul.rsv",
+ FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_109x_ul,
+ {
+ "UL HARQ ACK offset", "wmx.dlul.ul",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_308a_cmi,
+ {
+ "Compressed map indicator", "wmx.dlmap.reduced_aas_private.cmi",
+ FT_UINT8, BASE_DEC, NULL, 0xe0, NULL, HFILL
+ }
+ },
+ {
+ &hf_308a_mult,
+ {
+ "Multiple IE", "wmx.dlmap.reduced_aas_private.mult",
+ FT_UINT8, BASE_DEC, NULL, 0x02, NULL, HFILL
+ }
+ },
+ {
+ &hf_308a_rsv,
+ {
+ "Reserved", "wmx.dlmap.reduced_aas_private.rsv",
+ FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_308a_type,
+ {
+ "Compressed Map Type", "wmx.dlmap.reduced_aas_private.type",
+ FT_UINT8, BASE_DEC, NULL, 0x0d, NULL, HFILL
+ }
+ },
+ {
+ &hf_308a_ulmap,
+ {
+ "UL-MAP appended", "wmx.dlmap.reduced_aas_private.ulmap",
+ FT_UINT8, BASE_DEC, NULL, 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_compress_dlmap_crc,
+ {
+ "CRC", "wmx.compress_dlmap_crc",
+ FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_header_compress_dlmap_crc_status,
+ {
+ "CRC Status", "wmx.compress_dlmap_crc.status",
+ FT_UINT8, BASE_NONE, VALS(plugin_proto_checksum_vals), 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_crc16,
+ {
+ "CRC-16", "wmx.dlmap.crc16",
+ FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_crc16_status,
+ {
+ "CRC-16 Status", "wmx.dlmap.crc16.status",
+ FT_UINT8, BASE_NONE, VALS(plugin_proto_checksum_vals), 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_padding,
+ {
+ "Padding", "wmx.dlmap.padding",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_cid_mask,
+ {
+ "CID Mask", "wmx.dlmap.cid_mask",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reserved,
+ {
+ "Reserved", "wmx.dlmap.reserved",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ /* Generated via "one time" script to help create filterable fields */
+ { &hf_dlmap_rcid_ie_cid, { "CID", "wmx.dlmap.rcid_ie.cid", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_rcid_ie_prefix, { "Prefix", "wmx.dlmap.rcid_ie.prefix", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_rcid_ie_cid11, { "CID11", "wmx.dlmap.rcid_ie.cid11", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_rcid_ie_cid7, { "CID7", "wmx.dlmap.rcid_ie.cid7", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_rcid_ie_cid3, { "CID3", "wmx.dlmap.rcid_ie.cid3", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_dl_control_length, { "Length", "wmx.dlmap.dedicated_dl_control.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_dl_control_control_header, { "Control Header", "wmx.dlmap.dedicated_dl_control.control_header", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_dl_control_num_sdma_layers, { "Num SDMA Layers", "wmx.dlmap.dedicated_dl_control.num_sdma_layers", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_length, { "Length (nibbles)", "wmx.dlmap.dedicated_mimo_dl_control.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_control_header_mimo_control_info, { "Control Header (MIMO Control Info)", "wmx.dlmap.dedicated_mimo_dl_control.control_header_mimo_control_info", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_control_header_cqi_control_info, { "Control Header (CQI Control Info)", "wmx.dlmap.dedicated_mimo_dl_control.control_header_cqi_control_info", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_control_header_closed_mimo_control_info, { "Control Header (Closed MIMO Control Info)", "wmx.dlmap.dedicated_mimo_dl_control.control_header_closed_mimo_control_info", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_n_layer, { "N_layer", "wmx.dlmap.dedicated_mimo_dl_control.n_layer", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_matrix, { "Matrix", "wmx.dlmap.dedicated_mimo_dl_control.matrix", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_num_beamformed_streams, { "Num_Beamformed_Streams", "wmx.dlmap.dedicated_mimo_dl_control.num_beamformed_streams", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_period, { "Period", "wmx.dlmap.dedicated_mimo_dl_control.period", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_frame_offset, { "Frame Offset", "wmx.dlmap.dedicated_mimo_dl_control.frame_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_duration, { "Duration", "wmx.dlmap.dedicated_mimo_dl_control.duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_allocation_index, { "Allocation Index", "wmx.dlmap.dedicated_mimo_dl_control.allocation_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_cqich_num, { "CQICH_Num", "wmx.dlmap.dedicated_mimo_dl_control.cqich_num", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_feedback_type, { "Feedback type", "wmx.dlmap.dedicated_mimo_dl_control.feedback_type", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_antenna_grouping_index, { "Antenna Grouping Index", "wmx.dlmap.dedicated_mimo_dl_control.antenna_grouping_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_num_stream, { "Num_stream", "wmx.dlmap.dedicated_mimo_dl_control.num_stream", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_antenna_selection_index, { "Antenna Selection Index", "wmx.dlmap.dedicated_mimo_dl_control.antenna_selection_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dedicated_mimo_dl_control_codebook_precoding_index, { "Codebook Precoding Index", "wmx.dlmap.dedicated_mimo_dl_control.codebook_precoding_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_n_sub_burst_isi, { "N sub burst[ISI]", "wmx.dlmap.n_sub_burst_isi", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_chase_n_ack_channel, { "N ACK channel", "wmx.dlmap.harq_chase.n_ack_channel", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_chase_duration, { "Duration", "wmx.dlmap.harq_chase.duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_chase_sub_burst_diuc_indicator, { "Sub-Burst DIUC Indicator", "wmx.dlmap.harq_chase.sub_burst_diuc_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reserved_uint, { "Reserved", "wmx.dlmap.reserved.uint", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_chase_diuc, { "DIUC", "wmx.dlmap.harq_chase.diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_chase_repetition_coding_indication, { "Repetition Coding Indication", "wmx.dlmap.harq_chase.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_chase_acid, { "ACID", "wmx.dlmap.harq_chase.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_chase_ai_sn, { "AI_SN", "wmx.dlmap.harq_chase.ai_sn", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_chase_ack_disable, { "ACK disable", "wmx.dlmap.harq_chase.ack_disable", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_chase_dedicated_dl_control_indicator, { "Dedicated DL Control Indicator", "wmx.dlmap.harq_chase.dedicated_dl_control_indicator", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_chase_allocation_index, { "Allocation Index", "wmx.dlmap.harq_chase.allocation_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_chase_period, { "Period (p)", "wmx.dlmap.harq_chase.period", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_chase_frame_offset, { "Frame offset", "wmx.dlmap.harq_chase.frame_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_ctc_n_ack_channel, { "N ACK channel", "wmx.dlmap.harq_ir_ctc.n_ack_channel", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_ctc_nep, { "N(EP)", "wmx.dlmap.harq_ir_ctc.n_ep", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_ctc_nsch, { "N(SCH)", "wmx.dlmap.harq_ir_ctc.n_sch", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_ctc_spid, { "SPID", "wmx.dlmap.harq_ir_ctc.spid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_ctc_acid, { "ACID", "wmx.dlmap.harq_ir_ctc.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_ctc_ai_sn, { "AI_SN", "wmx.dlmap.harq_ir_ctc.ai_sn", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_ctc_ack_disable, { "ACK disable", "wmx.dlmap.harq_ir_ctc.ack_disable", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_ctc_dedicated_dl_control_indicator, { "Dedicated DL Control Indicator", "wmx.dlmap.harq_ir_ctc.dedicated_dl_control_indicator", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_ctc_duration, { "Duration (d)", "wmx.dlmap.harq_ir_ctc.duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_ctc_allocation_index, { "Allocation Index", "wmx.dlmap.harq_ir_ctc.allocation_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_ctc_period, { "Period (p)", "wmx.dlmap.harq_ir_ctc.period", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_ctc_frame_offset, { "Frame offset", "wmx.dlmap.harq_ir_ctc.frame_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_cc_n_ack_channel, { "N ACK channel", "wmx.dlmap.harq_ir_cc.n_ack_channel", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_cc_duration, { "Duration", "wmx.dlmap.harq_ir_cc.duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_cc_sub_burst_diuc_indicator, { "Sub-Burst DIUC Indicator", "wmx.dlmap.harq_ir_cc.sub_burst_diuc_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_cc_diuc, { "DIUC", "wmx.dlmap.harq_ir_cc.diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_cc_repetition_coding_indication, { "Repetition Coding Indication", "wmx.dlmap.harq_ir_cc.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_cc_acid, { "ACID", "wmx.dlmap.harq_ir_cc.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_cc_ai_sn, { "AI_SN", "wmx.dlmap.harq_ir_cc.ai_sn", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_cc_spid, { "SPID", "wmx.dlmap.harq_ir_cc.spid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_cc_ack_disable, { "ACK disable", "wmx.dlmap.harq_ir_cc.ack_disable", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_cc_dedicated_dl_control_indicator, { "Dedicated DL Control Indicator", "wmx.dlmap.harq_ir_cc.dedicated_dl_control_indicator", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_cc_allocation_index, { "Allocation Index", "wmx.dlmap.harq_ir_cc.allocation_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_cc_period, { "Period (p)", "wmx.dlmap.harq_ir_cc.period", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ir_cc_frame_offset, { "Frame offset", "wmx.dlmap.harq_ir_cc.frame_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_chase_harq_n_ack_channel, { "N ACK channel", "wmx.dlmap.mimo_dl_chase_harq.n_ack_channel", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_chase_harq_mu_indicator, { "MU Indicator", "wmx.dlmap.mimo_dl_chase_harq.mu_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_chase_harq_dedicated_mimo_dl_control_indicator, { "Dedicated MIMO DL Control Indicator", "wmx.dlmap.mimo_dl_chase_harq.dedicated_mimo_dl_control_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_chase_harq_ack_disable, { "ACK Disable", "wmx.dlmap.mimo_dl_chase_harq.ack_disable", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_chase_harq_duration, { "Duration", "wmx.dlmap.mimo_dl_chase_harq.duration", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_chase_harq_diuc, { "DIUC", "wmx.dlmap.mimo_dl_chase_harq.diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_chase_harq_repetition_coding_indication, { "Repetition Coding Indication", "wmx.dlmap.mimo_dl_chase_harq.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_chase_harq_acid, { "ACID", "wmx.dlmap.mimo_dl_chase_harq.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_chase_harq_ai_sn, { "AI_SN", "wmx.dlmap.mimo_dl_chase_harq.ai_sn", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_n_ack_channel, { "N ACK channel", "wmx.dlmap.mimo_dl_ir_harq.n_ack_channel", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_mu_indicator, { "MU Indicator", "wmx.dlmap.mimo_dl_ir_harq.mu_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_dedicated_mimo_dl_control_indicator, { "Dedicated MIMO DL Control Indicator", "wmx.dlmap.mimo_dl_ir_harq.dedicated_mimo_dl_control_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_ack_disable, { "ACK Disable", "wmx.dlmap.mimo_dl_ir_harq.ack_disable", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_nsch, { "N(SCH)", "wmx.dlmap.mimo_dl_ir_harq.n_sch", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_nep, { "N(EP)", "wmx.dlmap.mimo_dl_ir_harq.n_ep", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_spid, { "SPID", "wmx.dlmap.mimo_dl_ir_harq.spid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_acid, { "ACID", "wmx.dlmap.mimo_dl_ir_harq.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_ai_sn, { "AI_SN", "wmx.dlmap.mimo_dl_ir_harq.ai_sn", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_cc_n_ack_channel, { "N ACK channel", "wmx.dlmap.mimo_dl_ir_harq_cc.n_ack_channel", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_cc_mu_indicator, { "MU Indicator", "wmx.dlmap.mimo_dl_ir_harq_cc.mu_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_cc_dedicated_mimo_dl_control_indicator, { "Dedicated MIMO DL Control Indicator", "wmx.dlmap.mimo_dl_ir_harq_cc.dedicated_mimo_dl_control_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_cc_ack_disable, { "ACK Disable", "wmx.dlmap.mimo_dl_ir_harq_cc.ack_disable", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_cc_duration, { "Duration", "wmx.dlmap.mimo_dl_ir_harq_cc.duration", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_cc_diuc, { "DIUC", "wmx.dlmap.mimo_dl_ir_harq_cc.diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_cc_repetition_coding_indication, { "Repetition Coding Indication", "wmx.dlmap.mimo_dl_ir_harq_cc.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_cc_acid, { "ACID", "wmx.dlmap.mimo_dl_ir_harq_cc.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_cc_ai_sn, { "AI_SN", "wmx.dlmap.mimo_dl_ir_harq_cc.ai_sn", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_ir_harq_cc_spid, { "SPID", "wmx.dlmap.mimo_dl_ir_harq_cc.spid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_stc_harq_n_ack_channel, { "N ACK channel", "wmx.dlmap.mimo_dl_stc_harq.n_ack_channel", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_stc_harq_tx_count, { "TX Count", "wmx.dlmap.mimo_dl_stc_harq.tx_count", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_stc_harq_duration, { "Duration", "wmx.dlmap.mimo_dl_stc_harq.duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_stc_harq_sub_burst_offset_indication, { "Sub-burst offset indication", "wmx.dlmap.mimo_dl_stc_harq.sub_burst_offset_indication", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_stc_harq_sub_burst_offset, { "Sub-burst offset", "wmx.dlmap.mimo_dl_stc_harq.sub_burst_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_stc_harq_ack_disable, { "ACK Disable", "wmx.dlmap.mimo_dl_stc_harq.ack_disable", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_stc_harq_dedicated_mimo_dl_control_indicator, { "Dedicated MIMO DL Control Indicator", "wmx.dlmap.mimo_dl_stc_harq.dedicated_mimo_dl_control_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_stc_harq_diuc, { "DIUC", "wmx.dlmap.mimo_dl_stc_harq.diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_stc_harq_repetition_coding_indication, { "Repetition coding Indication", "wmx.dlmap.mimo_dl_stc_harq.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mimo_dl_stc_harq_acid, { "ACID", "wmx.dlmap.mimo_dl_stc_harq.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_extended_2_diuc, { "Extended-2 DIUC", "wmx.dlmap.mbs_map.extended_2_diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_mbs_zone_identifier, { "MBS Zone identifier", "wmx.dlmap.mbs_map.mbs_zone_identifier", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_macro_diversity_enhanced, { "Macro diversity enhanced", "wmx.dlmap.mbs_map.macro_diversity_enhanced", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_permutation, { "Permutation", "wmx.dlmap.mbs_map.permutation", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_dl_permbase, { "DL_PermBase", "wmx.dlmap.mbs_map.dl_permbase", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_prbs_id, { "PRBS_ID", "wmx.dlmap.mbs_map.prbs_id", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_ofdma_symbol_offset, { "OFDMA_Symbol_Offset", "wmx.dlmap.mbs_map.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_diuc_change_indication, { "DIUC_change_indication", "wmx.dlmap.mbs_map.diuc_change_indication", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_boosting, { "Boosting", "wmx.dlmap.mbs_map.boosting", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_diuc, { "DIUC", "wmx.dlmap.mbs_map.diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_num_subchannels, { "No. Subchannels", "wmx.dlmap.mbs_map.num_subchannels", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_num_ofdma_symbols, { "No. OFDMA Symbols", "wmx.dlmap.mbs_map.num_ofdma_symbols", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_repetition_coding_indication, { "Repetition Coding Indication", "wmx.dlmap.mbs_map.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_cid, { "CID", "wmx.dlmap.mbs_map.cid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_ofdma_symbols_offset, { "OFDMA Symbols Offset", "wmx.dlmap.mbs_map.ofdma_symbols_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_subchannel_offset, { "Subchannel offset", "wmx.dlmap.mbs_map.subchannel_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_slc_3_indication, { "SLC_3_indication", "wmx.dlmap.mbs_map.slc_3_indication", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_mbs_map_next_mbs_map_ie_frame_offset, { "Next MBS_MAP_IE frame offset", "wmx.dlmap.mbs_map.next_mbs_map_ie_frame_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_skip_extended_2_diuc, { "Extended-2 DIUC", "wmx.dlmap.skip.extended_2_diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_skip_mode, { "Mode", "wmx.dlmap.skip.mode", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_dl_map_extended_2_diuc, { "Extended-2 DIUC", "wmx.dlmap.harq_dl_map.extended_2_diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_dl_map_rcid_type, { "RCID_Type", "wmx.dlmap.harq_dl_map.rcid_type", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_dl_map_boosting, { "Boosting", "wmx.dlmap.harq_dl_map.boosting", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_dl_map_region_id_use_indicator, { "Region_ID use indicator", "wmx.dlmap.harq_dl_map.region_id_use_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_dl_map_ofdma_symbol_offset, { "OFDMA symbol offset", "wmx.dlmap.harq_dl_map.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_dl_map_subchannel_offset, { "Subchannel offset", "wmx.dlmap.harq_dl_map.subchannel_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_dl_map_number_of_ofdma_symbols, { "Number of OFDMA symbols", "wmx.dlmap.harq_dl_map.number_of_ofdma_symbols", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_dl_map_number_of_subchannels, { "Number of subchannels", "wmx.dlmap.harq_dl_map.number_of_subchannels", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_dl_map_rectangular_sub_burst_indicator, { "Rectangular Sub-Burst Indicator", "wmx.dlmap.harq_dl_map.rectangular_sub_burst_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_dl_map_region_id, { "Region_ID", "wmx.dlmap.harq_dl_map.region_id", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_dl_map_mode, { "Mode", "wmx.dlmap.harq_dl_map.mode", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_dl_map_sub_burst_ie_length, { "Sub-burst IE Length", "wmx.dlmap.harq_dl_map.sub_burst_ie_length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_dl_map_reserved_mode, { "Reserved Mode", "wmx.dlmap.harq_dl_map.reserved_mode", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_ack_bitmap_data, { "Bitmap data", "wmx.dlmap.harq_ack.bitmap_data", FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_enhanced_dl_map_extended_2_diuc, { "Extended-2 DIUC", "wmx.dlmap.enhanced_dl_map.extended_2_diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_enhanced_dl_map_num_assignment, { "Num_Assignment", "wmx.dlmap.enhanced_dl_map.num_assignment", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_enhanced_dl_map_n_cid, { "N_CID", "wmx.dlmap.enhanced_dl_map.n_cid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_enhanced_dl_map_cid, { "CID", "wmx.dlmap.enhanced_dl_map.cid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_enhanced_dl_map_diuc, { "DIUC", "wmx.dlmap.enhanced_dl_map.diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_enhanced_dl_map_boosting, { "Boosting", "wmx.dlmap.enhanced_dl_map.boosting", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_enhanced_dl_map_repetition_coding_indication, { "Repetition Coding Indication", "wmx.dlmap.enhanced_dl_map.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_enhanced_dl_map_region_id, { "Region_ID", "wmx.dlmap.enhanced_dl_map.region_id", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_extended_2_diuc, { "Extended-2 DIUC", "wmx.dlmap.aas_sdma_dl.extended_2_diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_rcid_type, { "RCID_Type", "wmx.dlmap.aas_sdma_dl.rcid_type", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_num_burst_region, { "Num_Burst_Region", "wmx.dlmap.aas_sdma_dl.num_burst_region", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_ofdma_symbol_offset, { "OFDMA Symbol Offset", "wmx.dlmap.aas_sdma_dl.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_subchannel_offset, { "Subchannel offset", "wmx.dlmap.aas_sdma_dl.subchannel_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_num_ofdma_triple_symbols, { "No. OFDMA triple symbols", "wmx.dlmap.aas_sdma_dl.num_ofdma_triple_symbols", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_num_subchannels, { "No. subchannels", "wmx.dlmap.aas_sdma_dl.num_subchannels", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_number_of_users, { "Number of Users", "wmx.dlmap.aas_sdma_dl.number_of_users", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_encoding_mode, { "Encoding Mode", "wmx.dlmap.aas_sdma_dl.encoding_mode", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_cqich_allocation, { "CQICH Allocation", "wmx.dlmap.aas_sdma_dl.cqich_allocation", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_ackch_allocation, { "ACKCH Allocation", "wmx.dlmap.aas_sdma_dl.ackch_allocation", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_pilot_pattern_modifier, { "Pilot Pattern Modifier", "wmx.dlmap.aas_sdma_dl.pilot_pattern_modifier", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_preamble_modifier_index, { "Preamble Modifier Index", "wmx.dlmap.aas_sdma_dl.preamble_modifier_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_pilot_pattern, { "Pilot Pattern", "wmx.dlmap.aas_sdma_dl.pilot_pattern", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_diuc, { "DIUC", "wmx.dlmap.aas_sdma_dl.diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_repetition_coding_indication, { "Repetition Coding Indication", "wmx.dlmap.aas_sdma_dl.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_ack_ch_index, { "ACK CH Index", "wmx.dlmap.aas_sdma_dl.ack_ch_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_acid, { "ACID", "wmx.dlmap.aas_sdma_dl.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_ai_sn, { "AI_SN", "wmx.dlmap.aas_sdma_dl.ai_sn", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_nep, { "N(EP)", "wmx.dlmap.aas_sdma_dl.n_ep", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_nsch, { "N(SCH)", "wmx.dlmap.aas_sdma_dl.n_sch", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_spid, { "SPID", "wmx.dlmap.aas_sdma_dl.spid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_allocation_index, { "Allocation Index", "wmx.dlmap.aas_sdma_dl.allocation_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_period, { "Period (p)", "wmx.dlmap.aas_sdma_dl.period", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_frame_offset, { "Frame offset", "wmx.dlmap.aas_sdma_dl.frame_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_sdma_dl_duration, { "Duration (d)", "wmx.dlmap.aas_sdma_dl.duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_channel_measurement_channel_nr, { "Channel Nr", "wmx.dlmap.channel_measurement.channel_nr", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_channel_measurement_ofdma_symbol_offset, { "OFDMA Symbol Offset", "wmx.dlmap.channel_measurement.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_channel_measurement_cid, { "CID", "wmx.dlmap.channel_measurement.cid", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_stc_zone_ofdma_symbol_offset, { "OFDMA Symbol Offset", "wmx.dlmap.stc_zone.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_stc_zone_permutations, { "Permutations", "wmx.dlmap.stc_zone.permutations", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_stc_zone_use_all_sc_indicator, { "Use All SC indicator", "wmx.dlmap.stc_zone.use_all_sc_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_stc_zone_stc, { "STC", "wmx.dlmap.stc_zone.stc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_stc_zone_matrix_indicator, { "Matrix indicator", "wmx.dlmap.stc_zone.matrix_indicator", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_stc_zone_dl_permbase, { "DL_PermBase", "wmx.dlmap.stc_zone.dl_permbase", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_stc_zone_prbs_id, { "PRBS_ID", "wmx.dlmap.stc_zone.prbs_id", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_stc_zone_amc_type, { "AMC type", "wmx.dlmap.stc_zone.amc_type", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_stc_zone_midamble_presence, { "Midamble Presence", "wmx.dlmap.stc_zone.midamble_presence", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_stc_zone_midamble_boosting, { "Midamble Boosting", "wmx.dlmap.stc_zone.midamble_boosting", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_stc_zone_2_3_antenna_select, { "2/3 antenna select", "wmx.dlmap.stc_zone.2_3_antenna_select", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_stc_zone_dedicated_pilots, { "Dedicated Pilots", "wmx.dlmap.stc_zone.dedicated_pilots", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_dl_ofdma_symbol_offset, { "OFDMA Symbol Offset", "wmx.dlmap.aas_dl.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_dl_permutation, { "Permutation", "wmx.dlmap.aas_dl.permutation", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_dl_dl_permbase, { "DL_PermBase", "wmx.dlmap.aas_dl.dl_permbase", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_dl_downlink_preamble_config, { "Downlink_preamble_config", "wmx.dlmap.aas_dl.downlink_preamble_config", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_dl_preamble_type, { "Preamble type", "wmx.dlmap.aas_dl.preamble_type", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_dl_prbs_id, { "PRBS_ID", "wmx.dlmap.aas_dl.prbs_id", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_aas_dl_diversity_map, { "Diversity Map", "wmx.dlmap.aas_dl.diversity_map", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_data_location_another_bs_segment, { "Segment", "wmx.dlmap.data_location_another_bs.segment", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_data_location_another_bs_used_subchannels, { "Used subchannels", "wmx.dlmap.data_location_another_bs.used_subchannels", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_data_location_another_bs_diuc, { "DIUC", "wmx.dlmap.data_location_another_bs.diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_data_location_another_bs_frame_advance, { "Frame Advance", "wmx.dlmap.data_location_another_bs.frame_advance", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_data_location_another_bs_ofdma_symbol_offset, { "OFDMA Symbol Offset", "wmx.dlmap.data_location_another_bs.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_data_location_another_bs_subchannel_offset, { "Subchannel Offset", "wmx.dlmap.data_location_another_bs.subchannel_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_data_location_another_bs_boosting, { "Boosting", "wmx.dlmap.data_location_another_bs.boosting", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_data_location_another_bs_preamble_index, { "Preamble Index", "wmx.dlmap.data_location_another_bs.preamble_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_data_location_another_bs_num_ofdma_symbols, { "No. OFDMA Symbols", "wmx.dlmap.data_location_another_bs.num_ofdma_symbols", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_data_location_another_bs_num_subchannels, { "No. Subchannels", "wmx.dlmap.data_location_another_bs.num_subchannels", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_data_location_another_bs_repetition_coding_indication, { "Repetition Coding Indication", "wmx.dlmap.data_location_another_bs.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_data_location_another_bs_cid, { "CID", "wmx.dlmap.data_location_another_bs.cid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_map_pointer_diuc, { "DIUC", "wmx.dlmap.harq_map_pointer.diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_map_pointer_num_slots, { "No. Slots", "wmx.dlmap.harq_map_pointer.num_slots", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_map_pointer_repetition_coding_indication, { "Repetition Coding Indication", "wmx.dlmap.harq_map_pointer.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_map_pointer_map_version, { "Map Version", "wmx.dlmap.harq_map_pointer.map_version", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_map_pointer_idle_users, { "Idle users", "wmx.dlmap.harq_map_pointer.idle_users", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_map_pointer_sleep_users, { "Sleep users", "wmx.dlmap.harq_map_pointer.sleep_users", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_harq_map_pointer_cid_mask_length, { "CID Mask Length", "wmx.dlmap.harq_map_pointer.cid_mask_length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_phymod_dl_preamble_modifier_type, { "Preamble Modifier Type", "wmx.dlmap.phymod_dl.preamble_modifier_type", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_phymod_dl_preamble_frequency_shift_index, { "Preamble frequency shift index", "wmx.dlmap.phymod_dl.preamble_frequency_shift_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_phymod_dl_preamble_time_shift_index, { "Preamble Time Shift Index", "wmx.dlmap.phymod_dl.preamble_time_shift_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_phymod_dl_pilot_pattern_modifier, { "Pilot Pattern Modifier", "wmx.dlmap.phymod_dl.pilot_pattern_modifier", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_phymod_dl_pilot_pattern_index, { "Pilot Pattern Index", "wmx.dlmap.phymod_dl.pilot_pattern_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_broadcast_ctrl_ptr_dcd_ucd_transmission_frame, { "DCD_UCD Transmission Frame", "wmx.dlmap.broadcast_ctrl_ptr.dcd_ucd_transmission_frame", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_broadcast_ctrl_ptr_skip_broadcast_system_update, { "Skip Broadcast_System_Update", "wmx.dlmap.broadcast_ctrl_ptr.skip_broadcast_system_update", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_broadcast_ctrl_ptr_broadcast_system_update_type, { "Broadcast_System_Update_Type", "wmx.dlmap.broadcast_ctrl_ptr.broadcast_system_update_type", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_broadcast_ctrl_ptr_broadcast_system_update_transmission_frame, { "Broadcast_System_Update_Transmission_Frame", "wmx.dlmap.broadcast_ctrl_ptr.broadcast_system_update_transmission_frame", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dl_pusc_burst_allocation_cid, { "CID", "wmx.dlmap.dl_pusc_burst_allocation.cid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dl_pusc_burst_allocation_diuc, { "DIUC", "wmx.dlmap.dl_pusc_burst_allocation.diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dl_pusc_burst_allocation_segment, { "Segment", "wmx.dlmap.dl_pusc_burst_allocation.segment", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dl_pusc_burst_allocation_boosting, { "Boosting", "wmx.dlmap.dl_pusc_burst_allocation.boosting", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dl_pusc_burst_allocation_idcell, { "IDcell", "wmx.dlmap.dl_pusc_burst_allocation.idcell", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dl_pusc_burst_allocation_dl_permbase, { "DL_PermBase", "wmx.dlmap.dl_pusc_burst_allocation.dl_permbase", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dl_pusc_burst_allocation_prbs_id, { "PRBS_ID", "wmx.dlmap.dl_pusc_burst_allocation.prbs_id", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dl_pusc_burst_allocation_repetition_coding_indication, { "Repetition coding indication", "wmx.dlmap.dl_pusc_burst_allocation.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dl_pusc_burst_allocation_used_subchannels, { "Used Subchannels", "wmx.dlmap.dl_pusc_burst_allocation.used_subchannels", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dl_pusc_burst_allocation_ofdma_symbol_offset, { "OFDMA symbol offset", "wmx.dlmap.dl_pusc_burst_allocation.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dl_pusc_burst_allocation_num_ofdma_symbols, { "# OFDMA symbols", "wmx.dlmap.dl_pusc_burst_allocation.num_ofdma_symbols", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dl_pusc_burst_allocation_subchannel_offset, { "Subchannel offset", "wmx.dlmap.dl_pusc_burst_allocation.subchannel_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_dl_pusc_burst_allocation_num_subchannels, { "# subchannels", "wmx.dlmap.dl_pusc_burst_allocation.num_subchannels", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_pusc_asca_alloc_diuc, { "DIUC", "wmx.dlmap.pusc_asca_alloc.diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_pusc_asca_alloc_short_basic_cid, { "Short Basic CID", "wmx.dlmap.pusc_asca_alloc.short_basic_cid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_pusc_asca_alloc_ofdma_symbol_offset, { "OFDMA Symbol offset", "wmx.dlmap.pusc_asca_alloc.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_pusc_asca_alloc_subchannel_offset, { "Subchannel offset", "wmx.dlmap.pusc_asca_alloc.subchannel_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_pusc_asca_alloc_num_ofdma_symbols, { "# OFDMA Symbols", "wmx.dlmap.pusc_asca_alloc.num_ofdma_symbols", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_pusc_asca_alloc_num_symbols, { "# Symbols", "wmx.dlmap.pusc_asca_alloc.num_symbols", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_pusc_asca_alloc_repetition_coding_information, { "Repetition Coding Information", "wmx.dlmap.pusc_asca_alloc.repetition_coding_information", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_pusc_asca_alloc_permutation_id, { "Permutation ID", "wmx.dlmap.pusc_asca_alloc.permutation_id", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_num_ie, { "NUM IE", "wmx.dlmap.reduced_aas.num_ie", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_periodicity, { "Periodicity", "wmx.dlmap.reduced_aas.periodicity", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_cid_included, { "CID Included", "wmx.dlmap.reduced_aas.cid_included", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_dcd_count_included, { "DCD Count Included", "wmx.dlmap.reduced_aas.dcd_count_included", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_phy_modification_included, { "PHY modification included", "wmx.dlmap.reduced_aas.phy_modification_included", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_cqich_control_indicator, { "CQICH control indicator", "wmx.dlmap.reduced_aas.cqich_control_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_encoding_mode, { "Encoding Mode", "wmx.dlmap.reduced_aas.encoding_mode", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_separate_mcs_enabled, { "Separate MCS Enabled", "wmx.dlmap.reduced_aas.separate_mcs_enabled", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_duration, { "Duration", "wmx.dlmap.reduced_aas.duration", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_diuc, { "DIUC", "wmx.dlmap.reduced_aas.diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_repetition_coding_indication, { "Repetition Coding Indication", "wmx.dlmap.reduced_aas.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_cid, { "CID", "wmx.dlmap.reduced_aas.cid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_allocation_index, { "Allocation Index", "wmx.dlmap.reduced_aas.allocation_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_report_period, { "Report Period", "wmx.dlmap.reduced_aas.report_period", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_frame_offset, { "Frame Offset", "wmx.dlmap.reduced_aas.frame_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_report_duration, { "Report Duration", "wmx.dlmap.reduced_aas.report_duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_cqi_measurement_type, { "CQI Measurement Type", "wmx.dlmap.reduced_aas.cqi_measurement_type", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_dcd_count, { "DCD Count", "wmx.dlmap.reduced_aas.dcd_count", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_preamble_select, { "Preamble Select", "wmx.dlmap.reduced_aas.preamble_select", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_preamble_shift_index, { "Preamble Shift Index", "wmx.dlmap.reduced_aas.preamble_shift_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_pilot_pattern_modifier, { "Pilot Pattern Modifier", "wmx.dlmap.reduced_aas.pilot_pattern_modifier", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_pilot_pattern_index, { "Pilot Pattern Index", "wmx.dlmap.reduced_aas.pilot_pattern_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_dl_frame_offset, { "DL Frame Offset", "wmx.dlmap.reduced_aas.dl_frame_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_zone_symbol_offset, { "Zone Symbol Offset", "wmx.dlmap.reduced_aas.zone_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_ofdma_symbol_offset, { "OFDMA Symbol Offset", "wmx.dlmap.reduced_aas.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_subchannel_offset, { "Subchannel Offset", "wmx.dlmap.reduced_aas.subchannel_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_num_ofdma_triple_symbol, { "No. OFDMA triple symbol", "wmx.dlmap.reduced_aas.num_ofdma_triple_symbol", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_num_subchannels, { "No. subchannels", "wmx.dlmap.reduced_aas.num_subchannels", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_num_ofdma_symbols, { "No. OFDMA symbols", "wmx.dlmap.reduced_aas.num_ofdma_symbols", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_diuc_nep, { "DIUC/N(EP)", "wmx.dlmap.reduced_aas.diuc_nep", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_dl_harq_ack_bitmap, { "DL HARQ ACK bitmap", "wmx.dlmap.reduced_aas.dl_harq_ack_bitmap", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_ack_allocation_index, { "ACK Allocation Index", "wmx.dlmap.reduced_aas.ack_allocation_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_acid, { "ACID", "wmx.dlmap.reduced_aas.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_ai_sn, { "AI_SN", "wmx.dlmap.reduced_aas.ai_sn", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_nsch, { "N(SCH)", "wmx.dlmap.reduced_aas.nsch", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_dlmap_reduced_aas_spid, { "SPID", "wmx.dlmap.reduced_aas.spid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_dlmap,
+ &ett_dlmap_ie,
+ /* &ett_dlmap_c_ie, */
+ &ett_109x,
+ &ett_109x_dl,
+ &ett_109x_ul,
+ &ett_275_phy,
+ &ett_275_1,
+ &ett_277,
+ &ett_277b,
+ &ett_278,
+ &ett_279,
+ &ett_280,
+ &ett_281,
+ &ett_282,
+ &ett_283,
+ &ett_284,
+ &ett_285,
+ &ett_286,
+ &ett_286a,
+ &ett_286b,
+ &ett_286c,
+ &ett_286d,
+ &ett_286e,
+ &ett_286f,
+ &ett_286g,
+ &ett_286h,
+ &ett_286i,
+ &ett_286j,
+ &ett_286k,
+ &ett_286l,
+ &ett_286m,
+ &ett_286n,
+ &ett_286o,
+ &ett_286p,
+ &ett_286q,
+ &ett_286r,
+ &ett_286s,
+ &ett_286t,
+ &ett_286u,
+ &ett_286v,
+ &ett_286w,
+ &ett_286x,
+ &ett_286y,
+ &ett_286z,
+ &ett_305,
+ /* &ett_305_dl, */
+ &ett_308a,
+ };
+
+ static ei_register_info ei[] = {
+ { &ei_dlmap_not_implemented, { "wmx.dlmap.not_implemented", PI_UNDECODED, PI_WARN, "Not implemented", EXPFILL }},
+ { &ei_crc16, { "wmx.dlmap.bad_checksum", PI_CHECKSUM, PI_ERROR, "Bad checksum", EXPFILL }},
+ { &ei_mac_header_compress_dlmap_crc, { "wmx.compress_dlmap.bad_checksum", PI_CHECKSUM, PI_ERROR, "Bad checksum", EXPFILL }},
+ };
+
+ expert_module_t* expert_mac_mgmt_msg_dlmap;
+
+ proto_mac_mgmt_msg_dlmap_decoder = proto_register_protocol (
+ "WiMax DLMAP Messages", /* name */
+ "WiMax DLMAP", /* short name */
+ "wmx.dlmap" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_dlmap_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+ expert_mac_mgmt_msg_dlmap = expert_register_protocol(proto_mac_mgmt_msg_dlmap_decoder);
+ expert_register_field_array(expert_mac_mgmt_msg_dlmap, ei, array_length(ei));
+}
+
+void proto_reg_handoff_mac_mgmt_msg_dlmap(void)
+{
+ dissector_handle_t dlmap_handle;
+
+ dlmap_handle = create_dissector_handle(dissect_mac_mgmt_msg_dlmap_decoder, proto_mac_mgmt_msg_dlmap_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DL_MAP, dlmap_handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_dreg.c b/plugins/epan/wimax/msg_dreg.c
new file mode 100644
index 0000000000..ec612cbbed
--- /dev/null
+++ b/plugins/epan/wimax/msg_dreg.c
@@ -0,0 +1,539 @@
+/* msg_dreg.c
+ * WiMax MAC Management DREG-REQ, DREG-CMD Message decoders
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: John R. Underwood <junderx@yahoo.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+
+#include <epan/packet.h>
+#include "wimax_tlv.h"
+#include "wimax_mac.h"
+#include "wimax_utils.h"
+
+extern gboolean include_cor2_changes;
+
+void proto_register_mac_mgmt_msg_dreg_req(void);
+void proto_register_mac_mgmt_msg_dreg_cmd(void);
+void proto_reg_handoff_mac_mgmt_msg_dreg(void);
+
+/* Forward reference */
+static void dissect_dreg_tlv(proto_tree *dreg_tree, gint tlv_type, tvbuff_t *tvb, guint tlv_offset, guint tlv_len);
+
+static gint proto_mac_mgmt_msg_dreg_req_decoder = -1;
+static gint proto_mac_mgmt_msg_dreg_cmd_decoder = -1;
+
+static gint ett_mac_mgmt_msg_dreg_decoder = -1;
+
+/* Setup protocol subtree array */
+static gint *ett[] =
+{
+ &ett_mac_mgmt_msg_dreg_decoder,
+};
+
+/* DREG fields */
+/* static gint hf_ack_type_reserved = -1; */
+static gint hf_dreg_cmd_action = -1;
+static gint hf_dreg_cmd_action_cor2 = -1;
+static gint hf_dreg_cmd_reserved = -1;
+static gint hf_dreg_paging_cycle = -1;
+static gint hf_dreg_paging_offset = -1;
+static gint hf_dreg_paging_group_id = -1;
+static gint hf_dreg_req_duration = -1;
+static gint hf_paging_controller_id = -1;
+static gint hf_mac_hash_skip_threshold = -1;
+static gint hf_dreg_paging_cycle_request = -1;
+static gint hf_dreg_retain_ms_service_sbc = -1;
+static gint hf_dreg_retain_ms_service_pkm = -1;
+static gint hf_dreg_retain_ms_service_reg = -1;
+static gint hf_dreg_retain_ms_service_network_address = -1;
+static gint hf_dreg_retain_ms_service_tod = -1;
+static gint hf_dreg_retain_ms_service_tftp = -1;
+static gint hf_dreg_retain_ms_service_full_service = -1;
+static gint hf_dreg_consider_paging_pref = -1;
+static gint hf_tlv_value = -1;
+static gint hf_dreg_req_action = -1;
+static gint hf_dreg_req_reserved = -1;
+static gint hf_dreg_invalid_tlv = -1;
+
+/* STRING RESOURCES */
+static const value_string vals_dreg_req_code[] = {
+ {0, "SS De-Registration request from BS and network"},
+ {1, "MS request for De-Registration from serving BS and initiation of Idle Mode"},
+ {2, "MS response for the Unsolicited De-Registration initiated by BS"},
+ {3, "Reject for the unsolicited DREG-CMD with action \
+code 05 (idle mode request) by the BS. \
+Applicable only when MS has pending UL data to transmit"},
+ {4, "Reserved"},
+ {0, NULL}
+};
+
+static const value_string vals_dreg_cmd_action[] = {
+ {0, "SS shall immediately terminate service with the BS and \
+should attempt network entry at another BS"},
+ {1, "SS shall listen to the current channel BS but shall not \
+transmit until an RES-CMD message or DREG-CMD with \
+Action Code 02 or 03 is received"},
+ {2, "SS shall listen to the BS but only transmit \
+on the Basic, and Primary Management Connections"},
+ {3, "SS shall return to normal operation and may transmit on \
+any of its active connections"},
+ {4, "SS shall terminate current Normal Operations with the BS; \
+the BS shall transmit this action code only in response \
+to any SS DREG-REQ message"},
+ {5, "MS shall immediately begin de-registration from serving \
+BS and request initiation of MS Idle Mode"},
+ {6, "The MS may retransmit the DREG-REQ message after the \
+time duration (REQ-duration) provided in the message"},
+ {7, "The MS shall not retransmit the DREG-REQ message and shall \
+wait for the DREG-CMD message. BS transmittal of a \
+subsequent DREG-CMD with Action Code 03 shall cancel \
+this restriction"},
+ {0, NULL}
+};
+
+static const value_string vals_dreg_cmd_action_cor2[] = {
+ {0, "SS shall immediately terminate service with the BS and \
+should attempt network entry at another BS"},
+ {1, "SS shall listen to the current channel BS but shall not \
+transmit until an RES-CMD message or DREG-CMD with \
+Action Code 02 or 03 is received"},
+ {2, "SS shall listen to the BS but only transmit \
+on the Basic, and Primary Management Connections"},
+ {3, "SS shall return to normal operation and may transmit on \
+any of its active connections"},
+ {4, "Only valid in response to a DREG-REQ message with DREG \
+Code = 00. SS shall terminate current Normal Operations with the BS"},
+ {5, "MS shall immediately begin de-registration from serving \
+BS and request initiation of MS Idle Mode"},
+ {6, "Only valid in response to a DREG-REQ message with DREG \
+Code = 01. The MS may retransmit the DREG-REQ message after the \
+REQ-duration provided in the message; \
+BS sending a subsequent DREG-CMD message with \
+Action Code 03 cancels this restriction"},
+ {0, NULL}
+};
+
+/* Decode sub-TLV's of either DREG-REQ or DREG-CMD. */
+static void dissect_dreg_tlv(proto_tree *dreg_tree, gint tlv_type, tvbuff_t *tvb, guint tlv_offset, guint tlv_len)
+{
+ switch (tlv_type) {
+ case DREG_PAGING_INFO:
+ proto_tree_add_item(dreg_tree, hf_dreg_paging_cycle, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dreg_tree, hf_dreg_paging_offset, tvb, tlv_offset + 2, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dreg_tree, hf_dreg_paging_group_id, tvb, tlv_offset + 3, 2, ENC_BIG_ENDIAN);
+ break;
+ case DREG_REQ_DURATION:
+ proto_tree_add_item(dreg_tree, hf_dreg_req_duration, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case DREG_PAGING_CONTROLLER_ID:
+ proto_tree_add_item(dreg_tree, hf_paging_controller_id, tvb, tlv_offset, 6, ENC_NA);
+ break;
+ case DREG_IDLE_MODE_RETAIN_INFO:
+ proto_tree_add_item(dreg_tree, hf_dreg_retain_ms_service_sbc, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dreg_tree, hf_dreg_retain_ms_service_pkm, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dreg_tree, hf_dreg_retain_ms_service_reg, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dreg_tree, hf_dreg_retain_ms_service_network_address, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dreg_tree, hf_dreg_retain_ms_service_tod, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dreg_tree, hf_dreg_retain_ms_service_tftp, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dreg_tree, hf_dreg_retain_ms_service_full_service, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dreg_tree, hf_dreg_consider_paging_pref, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case DREG_MAC_HASH_SKIP_THRESHOLD:
+ proto_tree_add_item(dreg_tree, hf_mac_hash_skip_threshold, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ break;
+ case DREG_PAGING_CYCLE_REQUEST:
+ proto_tree_add_item(dreg_tree, hf_dreg_paging_cycle_request, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ break;
+ default:
+ proto_tree_add_item(dreg_tree, hf_tlv_value, tvb, tlv_offset, tlv_len, ENC_NA);
+ break;
+ }
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_dreg_req(void)
+{
+ /* DREG fields display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_dreg_consider_paging_pref,
+ {
+ "Consider Paging Preference of each Service Flow in resource retention", "wmx.dreg.consider_paging_preference",
+ FT_UINT8, BASE_DEC, NULL, 0x80, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_invalid_tlv,
+ {
+ "Invalid TLV", "wmx.dreg.invalid_tlv",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_mac_hash_skip_threshold,
+ {
+ "MAC Hash Skip Threshold", "wmx.dreg.mac_hash_skip_threshold",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_paging_controller_id,
+ {
+ "Paging Controller ID", "wmx.dreg.paging_controller_id",
+ FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_paging_cycle,
+ {
+ "PAGING CYCLE", "wmx.dreg.paging_cycle",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_paging_cycle_request,
+ {
+ "Paging Cycle Request", "wmx.dreg.paging_cycle_request",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_paging_group_id,
+ {
+ "Paging-group-ID", "wmx.dreg.paging_group_id",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_paging_offset,
+ {
+ "PAGING OFFSET", "wmx.dreg.paging_offset",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_req_duration,
+ {
+ "REQ-duration (Waiting value for the DREG-REQ message re-transmission in frames)", "wmx.dreg.req_duration",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_retain_ms_service_full_service,
+ {
+ "Retain MS service and operation information associated with Full service", "wmx.dreg.retain_ms_full_service",
+ FT_UINT8, BASE_DEC, NULL, 0x40, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_retain_ms_service_network_address,
+ {
+ "Retain MS service and operational information associated with Network Address", "wmx.dreg.retain_ms_service_network_address",
+ FT_UINT8, BASE_DEC, NULL, 0x08, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_retain_ms_service_pkm,
+ {
+ "Retain MS service and operational information associated with PKM-REQ/RSP", "wmx.dreg.retain_ms_service_pkm",
+ FT_UINT8, BASE_DEC, NULL, 0x02, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_retain_ms_service_reg,
+ {
+ "Retain MS service and operational information associated with REG-REQ/RSP", "wmx.dreg.retain_ms_service_reg",
+ FT_UINT8, BASE_DEC, NULL, 0x04, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_retain_ms_service_sbc,
+ {
+ "Retain MS service and operational information associated with SBC-REQ/RSP", "wmx.dreg.retain_ms_service_sbc",
+ FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_retain_ms_service_tftp,
+ {
+ "Retain MS service and operational information associated with TFTP messages", "wmx.dreg.retain_ms_service_tftp",
+ FT_UINT8, BASE_DEC, NULL, 0x20, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_retain_ms_service_tod,
+ {
+ "Retain MS service and operational information associated with Time of Day", "wmx.dreg.retain_ms_service_tod",
+ FT_UINT8, BASE_DEC, NULL, 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_cmd_action,
+ {
+ "DREG-CMD Action code", "wmx.dreg_cmd.action",
+ FT_UINT8, BASE_DEC, VALS(vals_dreg_cmd_action), 0x07, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_cmd_action_cor2,
+ {
+ "DREG-CMD Action code", "wmx.dreg_cmd.action",
+ FT_UINT8, BASE_DEC, VALS(vals_dreg_cmd_action_cor2), 0x07, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_cmd_reserved,
+ {
+ "Reserved", "wmx.dreg_cmd.action_reserved",
+ FT_UINT8, BASE_DEC, NULL, 0xF8, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_req_action,
+ {
+ "DREG-REQ Action code", "wmx.dreg_req.action",
+ FT_UINT8, BASE_DEC, VALS(vals_dreg_req_code), 0x03, NULL, HFILL
+ }
+ },
+ {
+ &hf_dreg_req_reserved,
+ {
+ "Reserved", "wmx.dreg_req.action_reserved",
+ FT_UINT8, BASE_DEC, NULL, 0xFC, NULL, HFILL
+ }
+ },
+ {
+ &hf_tlv_value,
+ {
+ "Value", "wmx.dreg.unknown_tlv_value",
+ FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_ack_type_reserved,
+ {
+ "Reserved", "wmx.ack_type_reserved",
+ FT_UINT8, BASE_DEC, NULL, 0x03, NULL, HFILL
+ }
+ }
+#endif
+ };
+
+ proto_mac_mgmt_msg_dreg_req_decoder = proto_register_protocol (
+ "WiMax DREG-REQ Messages", /* name */
+ "WiMax DREG-REQ", /* short name */
+ "wmx.dreg_req" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_dreg_req_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_dreg_cmd(void)
+{
+ proto_mac_mgmt_msg_dreg_cmd_decoder = proto_register_protocol (
+ "WiMax DREG-CMD Messages", /* name */
+ "WiMax DREG-CMD", /* short name */
+ "wmx.dreg_cmd" /* abbrev */
+ );
+}
+
+/* Decode DREG-REQ messages. */
+static int dissect_mac_mgmt_msg_dreg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tlv_offset;
+ guint tvb_len;
+ proto_item *dreg_req_item;
+ proto_tree *dreg_req_tree;
+ proto_tree *tlv_tree = NULL;
+ tlv_info_t tlv_info;
+ gint tlv_type;
+ gint tlv_len;
+ gboolean hmac_found = FALSE;
+
+ { /* we are being asked for details */
+
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC payload type DREG-REQ */
+ dreg_req_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dreg_req_decoder, tvb, 0, -1, "MAC Management Message, DREG-REQ");
+ /* add MAC DREG REQ subtree */
+ dreg_req_tree = proto_item_add_subtree(dreg_req_item, ett_mac_mgmt_msg_dreg_decoder);
+ /* display the Action Code */
+ proto_tree_add_item(dreg_req_tree, hf_dreg_req_action, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* show the Reserved bits */
+ proto_tree_add_item(dreg_req_tree, hf_dreg_req_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+
+ while(offset < tvb_len)
+ {
+ /* Get the TLV data. */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "DREG-REQ TLV error");
+ proto_tree_add_item(dreg_req_tree, hf_dreg_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the offset to the TLV data */
+ tlv_offset = offset + get_tlv_value_offset(&tlv_info);
+
+ switch (tlv_type) {
+ case HMAC_TUPLE: /* Table 348d */
+ /* decode and display the HMAC Tuple */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dreg_decoder, dreg_req_tree, proto_mac_mgmt_msg_dreg_req_decoder, tvb, offset, tlv_len, "HMAC Tuple");
+ wimax_hmac_tuple_decoder(tlv_tree, tvb, tlv_offset, tlv_len);
+ hmac_found = TRUE;
+ break;
+ case CMAC_TUPLE: /* Table 348b */
+ /* decode and display the CMAC Tuple */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dreg_decoder, dreg_req_tree, proto_mac_mgmt_msg_dreg_req_decoder, tvb, offset, tlv_len, "CMAC Tuple");
+ wimax_cmac_tuple_decoder(tlv_tree, tvb, tlv_offset, tlv_len);
+ break;
+ default:
+ /* Decode DREG-REQ sub-TLV's */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dreg_decoder, dreg_req_tree, proto_mac_mgmt_msg_dreg_req_decoder, tvb, offset, tlv_len, "DREG-REQ sub-TLV's");
+ dissect_dreg_tlv(tlv_tree, tlv_type, tvb, tlv_offset, tlv_len);
+ break;
+ }
+
+
+ offset = tlv_len + tlv_offset;
+ } /* end of TLV process while loop */
+ if (!hmac_found)
+ proto_item_append_text(dreg_req_tree, " (HMAC Tuple is missing !)");
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Decode DREG-CMD messages. */
+static int dissect_mac_mgmt_msg_dreg_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tlv_offset;
+ guint tvb_len;
+ proto_item *dreg_cmd_item;
+ proto_tree *dreg_cmd_tree;
+ proto_tree *tlv_tree = NULL;
+ tlv_info_t tlv_info;
+ gint tlv_type;
+ gint tlv_len;
+ gboolean hmac_found = FALSE;
+
+ { /* we are being asked for details */
+
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC payload type DREG-CMD */
+ dreg_cmd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dreg_cmd_decoder, tvb, 0, -1, "MAC Management Message, DREG-CMD");
+ /* add MAC DREG CMD subtree */
+ dreg_cmd_tree = proto_item_add_subtree(dreg_cmd_item, ett_mac_mgmt_msg_dreg_decoder);
+ /* display the Action Code */
+ if (include_cor2_changes)
+ proto_tree_add_item(dreg_cmd_tree, hf_dreg_cmd_action_cor2, tvb, offset, 1, ENC_BIG_ENDIAN);
+ else
+ proto_tree_add_item(dreg_cmd_tree, hf_dreg_cmd_action, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* show the Reserved bits */
+ proto_tree_add_item(dreg_cmd_tree, hf_dreg_cmd_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset ++;
+
+ while(offset < tvb_len)
+ {
+ /* Get the TLV data. */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "DREG-CMD TLV error");
+ proto_tree_add_item(dreg_cmd_tree, hf_dreg_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the offset to the TLV data */
+ tlv_offset = offset + get_tlv_value_offset(&tlv_info);
+
+ switch (tlv_type) {
+ case HMAC_TUPLE: /* Table 348d */
+ /* decode and display the HMAC Tuple */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dreg_decoder, dreg_cmd_tree, proto_mac_mgmt_msg_dreg_cmd_decoder, tvb, offset, tlv_len, "HMAC Tuple");
+ wimax_hmac_tuple_decoder(tlv_tree, tvb, tlv_offset, tlv_len);
+ hmac_found = TRUE;
+ break;
+ case CMAC_TUPLE: /* Table 348b */
+ /* decode and display the CMAC Tuple */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dreg_decoder, dreg_cmd_tree, proto_mac_mgmt_msg_dreg_cmd_decoder, tvb, offset, tlv_len, "CMAC Tuple");
+ wimax_cmac_tuple_decoder(tlv_tree, tvb, tlv_offset, tlv_len);
+ break;
+ default:
+ /* Decode DREG-CMD sub-TLV's */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dreg_decoder, dreg_cmd_tree, proto_mac_mgmt_msg_dreg_cmd_decoder, tvb, offset, tlv_len, "DREG-CMD sub-TLV's");
+ dissect_dreg_tlv(tlv_tree, tlv_type, tvb, tlv_offset, tlv_len);
+ break;
+ }
+
+ offset = tlv_len + tlv_offset;
+ } /* end of TLV process while loop */
+ if (!hmac_found)
+ proto_item_append_text(dreg_cmd_tree, " (HMAC Tuple is missing !)");
+ }
+ return tvb_captured_length(tvb);
+}
+
+void
+proto_reg_handoff_mac_mgmt_msg_dreg(void)
+{
+ dissector_handle_t dreg_handle;
+
+ dreg_handle = create_dissector_handle(dissect_mac_mgmt_msg_dreg_req_decoder, proto_mac_mgmt_msg_dreg_req_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DREG_REQ, dreg_handle);
+
+ dreg_handle = create_dissector_handle(dissect_mac_mgmt_msg_dreg_cmd_decoder, proto_mac_mgmt_msg_dreg_cmd_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DREG_CMD, dreg_handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_dsa.c b/plugins/epan/wimax/msg_dsa.c
new file mode 100644
index 0000000000..6fb2b67ac1
--- /dev/null
+++ b/plugins/epan/wimax/msg_dsa.c
@@ -0,0 +1,195 @@
+/* msg_dsa.c
+ * WiMax MAC Management DSA-REQ/RSP/ACK Messages decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+/*
+#define DEBUG
+*/
+
+#include <epan/packet.h>
+#include "wimax_mac.h"
+#include "wimax_utils.h"
+
+void proto_register_mac_mgmt_msg_dsa(void);
+void proto_reg_handoff_mac_mgmt_msg_dsa(void);
+
+static gint proto_mac_mgmt_msg_dsa_decoder = -1;
+static gint ett_mac_mgmt_msg_dsa_req_decoder = -1;
+static gint ett_mac_mgmt_msg_dsa_rsp_decoder = -1;
+static gint ett_mac_mgmt_msg_dsa_ack_decoder = -1;
+
+/* fix fields */
+static gint hf_dsa_transaction_id = -1;
+static gint hf_dsa_confirmation_code = -1;
+
+static int dissect_mac_mgmt_msg_dsa_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ proto_item *dsa_item;
+ proto_tree *dsa_tree;
+
+ { /* we are being asked for details */
+
+ /* display MAC message type */
+ dsa_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsa_decoder, tvb, offset, -1,
+ "Dynamic Service Addition Request (DSA-REQ)");
+ /* add MAC DSx subtree */
+ dsa_tree = proto_item_add_subtree(dsa_item, ett_mac_mgmt_msg_dsa_req_decoder);
+ /* Decode and display the Uplink Channel Descriptor (UCD) */
+ /* display the Transaction ID */
+ proto_tree_add_item(dsa_tree, hf_dsa_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset += 2;
+ /* process DSA-REQ message TLV Encode Information */
+ wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsa_tree);
+ }
+ return tvb_captured_length(tvb);
+}
+
+static int dissect_mac_mgmt_msg_dsa_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ proto_item *dsa_item;
+ proto_tree *dsa_tree;
+
+ { /* we are being asked for details */
+ /* display MAC message type */
+ dsa_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsa_decoder, tvb, offset, -1,
+ "Dynamic Service Addition Response (DSA-RSP)");
+ /* add MAC DSx subtree */
+ dsa_tree = proto_item_add_subtree(dsa_item, ett_mac_mgmt_msg_dsa_rsp_decoder);
+ /* Decode and display the Uplink Channel Descriptor (UCD) */
+ /* display the Transaction ID */
+ proto_tree_add_item(dsa_tree, hf_dsa_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset += 2;
+ /* display the Confirmation Code */
+ proto_tree_add_item(dsa_tree, hf_dsa_confirmation_code, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ /* process DSA RSP message TLV Encode Information */
+ wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsa_tree);
+ }
+ return tvb_captured_length(tvb);
+}
+
+static int dissect_mac_mgmt_msg_dsa_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ proto_item *dsa_item;
+ proto_tree *dsa_tree;
+
+ { /* we are being asked for details */
+ /* display MAC message type */
+ dsa_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsa_decoder, tvb, offset, -1,
+ "Dynamic Service Addition Acknowledge (DSA-ACK)");
+ /* add MAC DSx subtree */
+ dsa_tree = proto_item_add_subtree(dsa_item, ett_mac_mgmt_msg_dsa_ack_decoder);
+ /* Decode and display the Uplink Channel Descriptor (UCD) */
+ /* display the Transaction ID */
+ proto_tree_add_item(dsa_tree, hf_dsa_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset += 2;
+ /* display the Confirmation Code */
+ proto_tree_add_item(dsa_tree, hf_dsa_confirmation_code, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ /* process DSA-REQ message TLV Encode Information */
+ wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsa_tree);
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_dsa(void)
+{
+ /* DSx display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_dsa_confirmation_code,
+ {
+ "Confirmation code", "wmx.dsa.confirmation_code",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dsa_transaction_id,
+ {
+ "Transaction ID", "wmx.dsa.transaction_id",
+ FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_mgmt_msg_dsa_req_decoder,
+ &ett_mac_mgmt_msg_dsa_rsp_decoder,
+ &ett_mac_mgmt_msg_dsa_ack_decoder,
+ };
+
+ proto_mac_mgmt_msg_dsa_decoder = proto_register_protocol (
+ "WiMax DSA Messages", /* name */
+ "WiMax DSA", /* short name */
+ "wmx.dsa" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_dsa_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+void
+proto_reg_handoff_mac_mgmt_msg_dsa (void)
+{
+ dissector_handle_t dsa_handle;
+
+ dsa_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsa_req_decoder, proto_mac_mgmt_msg_dsa_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSA_REQ, dsa_handle);
+
+ dsa_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsa_rsp_decoder, proto_mac_mgmt_msg_dsa_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSA_RSP, dsa_handle);
+
+ dsa_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsa_ack_decoder, proto_mac_mgmt_msg_dsa_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSA_ACK, dsa_handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_dsc.c b/plugins/epan/wimax/msg_dsc.c
new file mode 100644
index 0000000000..192e9f4a2a
--- /dev/null
+++ b/plugins/epan/wimax/msg_dsc.c
@@ -0,0 +1,198 @@
+/* msg_dsc.c
+ * WiMax MAC Management DSC-REQ/RSP/ACK Messages decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+/*
+#define DEBUG
+*/
+
+#include <epan/packet.h>
+#include "wimax_mac.h"
+#include "wimax_utils.h"
+
+void proto_register_mac_mgmt_msg_dsc(void);
+void proto_reg_handoff_mac_mgmt_msg_dsc(void);
+
+static gint proto_mac_mgmt_msg_dsc_decoder = -1;
+static gint ett_mac_mgmt_msg_dsc_req_decoder = -1;
+static gint ett_mac_mgmt_msg_dsc_rsp_decoder = -1;
+static gint ett_mac_mgmt_msg_dsc_ack_decoder = -1;
+
+/* fix fields */
+static gint hf_dsc_transaction_id = -1;
+static gint hf_dsc_confirmation_code = -1;
+
+
+static int dissect_mac_mgmt_msg_dsc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ proto_item *dsc_item;
+ proto_tree *dsc_tree;
+
+ { /* we are being asked for details */
+
+ /* display MAC message type */
+ dsc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsc_decoder, tvb, offset, -1,
+ "Dynamic Service Change Request (DSC-REQ)");
+ /* add MAC DSx subtree */
+ dsc_tree = proto_item_add_subtree(dsc_item, ett_mac_mgmt_msg_dsc_req_decoder);
+ /* Decode and display the Uplink Channel Descriptor (UCD) */
+ /* display the Transaction ID */
+ proto_tree_add_item(dsc_tree, hf_dsc_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset += 2;
+ /* process DSC REQ message TLV Encode Information */
+ wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsc_tree);
+ }
+ return tvb_captured_length(tvb);
+}
+
+static int dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ proto_item *dsc_item;
+ proto_tree *dsc_tree;
+
+ { /* we are being asked for details */
+ /* display MAC message type */
+ dsc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsc_decoder, tvb, offset, -1,
+ "Dynamic Service Change Response (DSC-RSP)");
+ /* add MAC DSx subtree */
+ dsc_tree = proto_item_add_subtree(dsc_item, ett_mac_mgmt_msg_dsc_rsp_decoder);
+ /* Decode and display the Uplink Channel Descriptor (UCD) */
+ /* display the Transaction ID */
+ proto_tree_add_item(dsc_tree, hf_dsc_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset += 2;
+ /* display the Confirmation Code */
+ proto_tree_add_item(dsc_tree, hf_dsc_confirmation_code, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ /* process DSC RSP message TLV Encode Information */
+ wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsc_tree);
+ }
+ return tvb_captured_length(tvb);
+}
+
+static int dissect_mac_mgmt_msg_dsc_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ proto_item *dsc_item;
+ proto_tree *dsc_tree;
+
+ { /* we are being asked for details */
+ /* display MAC message type */
+ dsc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsc_decoder, tvb, offset, -1,
+ "Dynamic Service Change Acknowledge (DSC-ACK)");
+ /* add MAC DSx subtree */
+ dsc_tree = proto_item_add_subtree(dsc_item, ett_mac_mgmt_msg_dsc_ack_decoder);
+ /* Decode and display the Uplink Channel Descriptor (UCD) */
+ /* display the Transaction ID */
+ proto_tree_add_item(dsc_tree, hf_dsc_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset += 2;
+ /* display the Confirmation Code */
+ proto_tree_add_item(dsc_tree, hf_dsc_confirmation_code, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ /* process DSC ACK message TLV Encode Information */
+ wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsc_tree);
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_dsc(void)
+{
+ /* DSx display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_dsc_confirmation_code,
+ {
+ "Confirmation code", "wmx.dsc.confirmation_code",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dsc_transaction_id,
+ {
+ "Transaction ID", "wmx.dsc.transaction_id",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_mgmt_msg_dsc_req_decoder,
+ &ett_mac_mgmt_msg_dsc_rsp_decoder,
+ &ett_mac_mgmt_msg_dsc_ack_decoder
+ };
+
+ proto_mac_mgmt_msg_dsc_decoder = proto_register_protocol (
+ "WiMax DSC Messages", /* name */
+ "WiMax DSC", /* short name */
+ "wmx.dsc" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_dsc_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ register_dissector("mac_mgmt_msg_dsc_rsp_handler", dissect_mac_mgmt_msg_dsc_rsp_decoder, -1);
+}
+
+void
+proto_reg_handoff_mac_mgmt_msg_dsc(void)
+{
+ dissector_handle_t dsc_handle;
+
+ dsc_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsc_req_decoder, proto_mac_mgmt_msg_dsc_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSC_REQ, dsc_handle);
+
+ dsc_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsc_rsp_decoder, proto_mac_mgmt_msg_dsc_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSC_RSP, dsc_handle);
+
+ dsc_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsc_ack_decoder, proto_mac_mgmt_msg_dsc_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSC_ACK, dsc_handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_dsd.c b/plugins/epan/wimax/msg_dsd.c
new file mode 100644
index 0000000000..ce558df2f1
--- /dev/null
+++ b/plugins/epan/wimax/msg_dsd.c
@@ -0,0 +1,290 @@
+/* msg_dsd.c
+ * WiMax MAC Management DSD-REQ/RSP Messages decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+/*
+#define DEBUG
+*/
+
+#include <epan/packet.h>
+#include "wimax_tlv.h"
+#include "wimax_mac.h"
+#include "wimax_utils.h"
+
+void proto_register_mac_mgmt_msg_dsd(void);
+void proto_reg_handoff_mac_mgmt_msg_dsd(void);
+
+static gint proto_mac_mgmt_msg_dsd_decoder = -1;
+static gint ett_mac_mgmt_msg_dsd_req_decoder = -1;
+static gint ett_mac_mgmt_msg_dsd_rsp_decoder = -1;
+/* static gint ett_dsd_ul_sfe_decoder = -1; */
+/* static gint ett_dsd_dl_sfe_decoder = -1; */
+/* static gint ett_dsd_hmac_tuple = -1; */
+/* static gint ett_dsd_cmac_tuple = -1; */
+
+/* fix fields */
+static gint hf_dsd_transaction_id = -1;
+static gint hf_dsd_service_flow_id = -1;
+static gint hf_dsd_confirmation_code = -1;
+static gint hf_dsd_invalid_tlv = -1;
+static gint hf_dsd_unknown_type = -1;
+
+
+static int dissect_mac_mgmt_msg_dsd_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tvb_len, tlv_len, tlv_value_offset;
+ gint tlv_type;
+ proto_item *dsd_item;
+ proto_tree *dsd_tree;
+ proto_tree *tlv_tree = NULL;
+ tlv_info_t tlv_info;
+
+ { /* we are being asked for details */
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC message type */
+ dsd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsd_decoder, tvb, offset, -1,
+ "Dynamic Service Deletion Request (DSD-REQ)");
+ /* add MAC DSx subtree */
+ dsd_tree = proto_item_add_subtree(dsd_item, ett_mac_mgmt_msg_dsd_req_decoder);
+ /* Decode and display the DSD message */
+ /* display the Transaction ID */
+ proto_tree_add_item(dsd_tree, hf_dsd_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset += 2;
+ /* display the Service Flow ID */
+ proto_tree_add_item(dsd_tree, hf_dsd_service_flow_id, tvb, offset, 4, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset += 4;
+ /* process DSD REQ message TLV Encode Information */
+ while(offset < tvb_len)
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "DSD-REQ TLV error");
+ proto_tree_add_item(dsd_tree, hf_dsd_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(dsd_tree, proto_mac_mgmt_msg_dsd_decoder, tvb, offset, tlv_len + tlv_value_offset, "DSD-REQ TLV Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, tlv_len + tlv_value_offset, offset, tvb_len);
+#endif
+ /* process TLV */
+ switch (tlv_type)
+ {
+ case HMAC_TUPLE: /* Table 348d */
+ /* decode and display the HMAC Tuple */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dsd_req_decoder, dsd_tree, proto_mac_mgmt_msg_dsd_decoder, tvb, offset, tlv_len, "HMAC Tuple");
+ wimax_hmac_tuple_decoder(tlv_tree, tvb, offset+tlv_value_offset, tlv_len);
+ break;
+ case CMAC_TUPLE: /* Table 348b */
+ /* decode and display the CMAC Tuple */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dsd_req_decoder, dsd_tree, proto_mac_mgmt_msg_dsd_decoder, tvb, offset, tlv_len, "CMAC Tuple");
+ wimax_cmac_tuple_decoder(tlv_tree, tvb, offset+tlv_value_offset, tlv_len);
+ break;
+ default:
+ /* display the unknown tlv in hex */
+ add_tlv_subtree(&tlv_info, dsd_tree, hf_dsd_unknown_type, tvb, offset, ENC_NA);
+ break;
+ }
+ offset += (tlv_len+tlv_value_offset);
+ } /* end of while loop */
+ }
+ return tvb_captured_length(tvb);
+}
+
+static int dissect_mac_mgmt_msg_dsd_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tvb_len, tlv_len, tlv_value_offset;
+ gint tlv_type;
+ proto_item *dsd_item;
+ proto_tree *dsd_tree;
+ proto_tree *tlv_tree = NULL;
+ tlv_info_t tlv_info;
+
+ { /* we are being asked for details */
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC message type */
+ dsd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsd_decoder, tvb, offset, -1,
+ "Dynamic Service Deletion Response (DSD-RSP)");
+ /* add MAC DSx subtree */
+ dsd_tree = proto_item_add_subtree(dsd_item, ett_mac_mgmt_msg_dsd_rsp_decoder);
+ /* Decode and display the DSD message */
+ /* display the Transaction ID */
+ proto_tree_add_item(dsd_tree, hf_dsd_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset += 2;
+ /* display the Confirmation Code */
+ proto_tree_add_item(dsd_tree, hf_dsd_confirmation_code, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset++;
+ /* display the Service Flow ID */
+ proto_tree_add_item(dsd_tree, hf_dsd_service_flow_id, tvb, offset, 4, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset += 4;
+ /* process DSD RSP message TLV Encode Information */
+ while(offset < tvb_len)
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "DSD RSP TLV error");
+ proto_tree_add_item(dsd_tree, hf_dsd_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(dsd_tree, proto_mac_mgmt_msg_dsd_decoder, tvb, offset, tlv_len + tlv_value_offset, "DSD-RSP TLV Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, tlv_len + tlv_value_offset, offset, tvb_len);
+#endif
+ /* process TLV */
+ switch (tlv_type)
+ {
+ case HMAC_TUPLE: /* Table 348d */
+ /* decode and display the HMAC Tuple */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dsd_req_decoder, dsd_tree, proto_mac_mgmt_msg_dsd_decoder, tvb, offset, tlv_len, "HMAC Tuple");
+ wimax_hmac_tuple_decoder(tlv_tree, tvb, offset+tlv_value_offset, tlv_len);
+ break;
+ case CMAC_TUPLE: /* Table 348b */
+ /* decode and display the CMAC Tuple */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dsd_req_decoder, dsd_tree, proto_mac_mgmt_msg_dsd_decoder, tvb, offset, tlv_len, "CMAC Tuple");
+ wimax_cmac_tuple_decoder(tlv_tree, tvb, offset+tlv_value_offset, tlv_len);
+ break;
+ default:
+ add_tlv_subtree(&tlv_info, dsd_tree, hf_dsd_unknown_type, tvb, offset, ENC_NA);
+ break;
+ }
+ offset += (tlv_len+tlv_value_offset);
+ } /* end of while loop */
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_dsd(void)
+{
+ /* DSx display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_dsd_confirmation_code,
+ {
+ "Confirmation code", "wmx.dsd.confirmation_code",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dsd_service_flow_id,
+ {
+ "Service Flow ID", "wmx.dsd.service_flow_id",
+ FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dsd_transaction_id,
+ {
+ "Transaction ID", "wmx.dsd.transaction_id",
+ FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dsd_invalid_tlv,
+ {
+ "Invalid TLV", "wmx.dsd.invalid_tlv",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_dsd_unknown_type,
+ {
+ "Unknown type", "wmx.dsd.unknown_type",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_mgmt_msg_dsd_req_decoder,
+ &ett_mac_mgmt_msg_dsd_rsp_decoder,
+ /* &ett_dsd_ul_sfe_decoder, */
+ /* &ett_dsd_dl_sfe_decoder, */
+ /* &ett_dsd_hmac_tuple, */
+ /* &ett_dsd_cmac_tuple, */
+ };
+
+ proto_mac_mgmt_msg_dsd_decoder = proto_register_protocol (
+ "WiMax DSD Messages", /* name */
+ "WiMax DSD", /* short name */
+ "wmx.dsd" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_dsd_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+void
+proto_reg_handoff_mac_mgmt_msg_dsd(void)
+{
+ dissector_handle_t dsd_handle;
+
+ dsd_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsd_req_decoder, proto_mac_mgmt_msg_dsd_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSD_REQ, dsd_handle);
+
+ dsd_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsd_rsp_decoder, proto_mac_mgmt_msg_dsd_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSD_RSP, dsd_handle);
+}
+
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_dsx_rvd.c b/plugins/epan/wimax/msg_dsx_rvd.c
new file mode 100644
index 0000000000..a6ea77eb2f
--- /dev/null
+++ b/plugins/epan/wimax/msg_dsx_rvd.c
@@ -0,0 +1,119 @@
+/* msg_dsx_rvd.c
+ * WiMax MAC Management DSX-RVD Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax_mac.h"
+
+void proto_register_mac_mgmt_msg_dsx_rvd(void);
+void proto_reg_handoff_mac_mgmt_msg_dsx_rvd(void);
+
+static gint proto_mac_mgmt_msg_dsx_rvd_decoder = -1;
+static gint ett_mac_mgmt_msg_dsx_rvd_decoder = -1;
+
+/* fix fields */
+static gint hf_dsx_rvd_transaction_id = -1;
+static gint hf_dsx_rvd_confirmation_code = -1;
+
+
+/* Decode DSX-RVD messages. */
+static int dissect_mac_mgmt_msg_dsx_rvd_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ proto_item *dsx_rvd_item;
+ proto_tree *dsx_rvd_tree;
+
+ { /* we are being asked for details */
+ /* display MAC message type */
+ dsx_rvd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsx_rvd_decoder, tvb, offset, -1, "DSx Received (DSX-RVD)");
+ /* add MAC DSx subtree */
+ dsx_rvd_tree = proto_item_add_subtree(dsx_rvd_item, ett_mac_mgmt_msg_dsx_rvd_decoder);
+ /* display the Transaction ID */
+ proto_tree_add_item(dsx_rvd_tree, hf_dsx_rvd_transaction_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* move to next field */
+ offset += 2;
+ /* display the Confirmation Code */
+ proto_tree_add_item(dsx_rvd_tree, hf_dsx_rvd_confirmation_code, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_dsx_rvd(void)
+{
+ /* DSX_RVD display */
+ static hf_register_info hf_dsx_rvd[] =
+ {
+ {
+ &hf_dsx_rvd_confirmation_code,
+ { "Confirmation code", "wmx.dsx_rvd.confirmation_code", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_dsx_rvd_transaction_id,
+ { "Transaction ID", "wmx.dsx_rvd.transaction_id", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_mgmt_msg_dsx_rvd_decoder,
+ };
+
+ proto_mac_mgmt_msg_dsx_rvd_decoder = proto_register_protocol (
+ "WiMax DSX-RVD Message", /* name */
+ "WiMax DSX-RVD (dsx_rvd)", /* short name */
+ "wmx.dsx_rvd" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_dsx_rvd_decoder, hf_dsx_rvd, array_length(hf_dsx_rvd));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+void
+proto_reg_handoff_mac_mgmt_msg_dsx_rvd(void)
+{
+ dissector_handle_t handle;
+
+ handle = create_dissector_handle(dissect_mac_mgmt_msg_dsx_rvd_decoder, proto_mac_mgmt_msg_dsx_rvd_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSX_RVD, handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_fpc.c b/plugins/epan/wimax/msg_fpc.c
new file mode 100644
index 0000000000..9658ab28c4
--- /dev/null
+++ b/plugins/epan/wimax/msg_fpc.c
@@ -0,0 +1,178 @@
+/* msg_fpc.c
+ * WiMax MAC Management FPC Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: John R. Underwood <junderx@yahoo.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax_mac.h"
+
+
+void proto_register_mac_mgmt_msg_fpc(void);
+void proto_reg_handoff_mac_mgmt_msg_fpc(void);
+
+static gint proto_mac_mgmt_msg_fpc_decoder = -1;
+
+static gint ett_mac_mgmt_msg_fpc_decoder = -1;
+
+/* FPC fields */
+static gint hf_fpc_number_of_stations = -1;
+static gint hf_fpc_basic_cid = -1;
+static gint hf_fpc_power_adjust = -1;
+static gint hf_fpc_power_measurement_frame = -1;
+/* static gint hf_fpc_invalid_tlv = -1; */
+
+
+/* Decode FPC messages. */
+static int dissect_mac_mgmt_msg_fpc_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint i;
+ guint number_stations;
+ guint tvb_len;
+ proto_item *fpc_item;
+ proto_tree *fpc_tree;
+ gint8 value;
+ gfloat power_change;
+
+ { /* we are being asked for details */
+
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC payload type FPC */
+ fpc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_fpc_decoder, tvb, 0, -1, "MAC Management Message, FPC");
+ /* add MAC FPC subtree */
+ fpc_tree = proto_item_add_subtree(fpc_item, ett_mac_mgmt_msg_fpc_decoder);
+
+ /* display the Number of stations */
+ proto_tree_add_item(fpc_tree, hf_fpc_number_of_stations, tvb, offset, 1, ENC_BIG_ENDIAN);
+
+ number_stations = tvb_get_guint8(tvb, offset);
+ offset++;
+ for (i = 0; ((i < number_stations) && (offset >= tvb_len)); i++ ) {
+ /* display the Basic CID*/
+ proto_tree_add_item(fpc_tree, hf_fpc_basic_cid, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+
+ /* display the Power adjust value */
+ value = (gint8)tvb_get_guint8(tvb, offset);
+ power_change = (float)0.25 * value; /* 0.25dB incr */
+
+ /* display the Power adjust value in dB */
+ proto_tree_add_float_format_value(fpc_tree, hf_fpc_power_adjust, tvb, offset, 1, power_change, " %.2f dB", power_change);
+ offset++;
+
+ /* display the Power measurement frame */
+ proto_tree_add_item(fpc_tree, hf_fpc_power_measurement_frame, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+ }
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_fpc(void)
+{
+ /* FPC fields display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_fpc_basic_cid,
+ {
+ "Basic CID", "wmx.fpc.basic_cid",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_fpc_invalid_tlv,
+ {
+ "Invalid TLV", "wmx.fpc.invalid_tlv",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_fpc_number_of_stations,
+ {
+ "Number of stations", "wmx.fpc.number_stations",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_fpc_power_adjust,
+ {
+ "Power Adjust", "wmx.fpc.power_adjust",
+ FT_FLOAT, BASE_NONE, NULL, 0x0, "Signed change in power level (incr of 0.25dB) that the SS shall apply to its current power setting", HFILL
+ }
+ },
+ {
+ &hf_fpc_power_measurement_frame,
+ {
+ "Power measurement frame", "wmx.fpc.power_measurement_frame",
+ FT_INT8, BASE_DEC, NULL, 0x0, "The 8 LSB of the frame number in which the BS measured the power corrections referred to in the message", HFILL
+ }
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_mgmt_msg_fpc_decoder,
+ };
+
+ proto_mac_mgmt_msg_fpc_decoder = proto_register_protocol (
+ "WiMax FPC Message", /* name */
+ "WiMax FPC (fpc)", /* short name */
+ "wmx.fpc" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_fpc_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+void
+proto_reg_handoff_mac_mgmt_msg_fpc(void)
+{
+ dissector_handle_t fpc_handle;
+
+ fpc_handle = create_dissector_handle(dissect_mac_mgmt_msg_fpc_decoder, proto_mac_mgmt_msg_fpc_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_FPC, fpc_handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_pkm.c b/plugins/epan/wimax/msg_pkm.c
new file mode 100644
index 0000000000..d375f3d350
--- /dev/null
+++ b/plugins/epan/wimax/msg_pkm.c
@@ -0,0 +1,189 @@
+/* msg_pkm.c
+ * WiMax MAC Management PKM-REQ/RSP Messages decoders
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#if 0
+#define DEBUG /* for debug only */
+#endif
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax_tlv.h"
+#include "wimax_mac.h"
+#include "wimax_utils.h"
+
+void proto_register_mac_mgmt_msg_pkm(void);
+void proto_reg_handoff_mac_mgmt_msg_pkm(void);
+
+static gint proto_mac_mgmt_msg_pkm_decoder = -1;
+static gint ett_mac_mgmt_msg_pkm_req_decoder = -1;
+static gint ett_mac_mgmt_msg_pkm_rsp_decoder = -1;
+
+static const value_string vals_pkm_msg_code[] =
+{
+ { 3, "SA ADD"},
+ { 4, "Auth Request"},
+ { 5, "Auth Reply"},
+ { 6, "Auth Reject"},
+ { 7, "Key Request"},
+ { 8, "Key Reply"},
+ { 9, "Key Reject"},
+ {10, "Auth Invalid"},
+ {11, "TEK Invalid"},
+ {12, "Auth Info"},
+ {13, "PKMv2 RSA-Request"},
+ {14, "PKMv2 RSA-Reply"},
+ {15, "PKMv2 RSA-Reject"},
+ {16, "PKMv2 RSA-Acknowledgement"},
+ {17, "PKMv2 EAP Start"},
+ {18, "PKMv2 EAP-Transfer"},
+ {19, "PKMv2 Authenticated EAP-Transfer"},
+ {20, "PKMv2 SA TEK Challenge"},
+ {21, "PKMv2 SA TEK Request"},
+ {22, "PKMv2 SA TEK Response"},
+ {23, "PKMv2 Key-Request"},
+ {24, "PKMv2 Key-Reply"},
+ {25, "PKMv2 Key-Reject"},
+ {26, "PKMv2 SA-Addition"},
+ {27, "PKMv2 TEK-Invalid"},
+ {28, "PKMv2 Group-Key-Update-Command"},
+ {29, "PKMv2 EAP Complete"},
+ {30, "PKMv2 Authenticated EAP Start"},
+ { 0, NULL}
+};
+
+/* fix fields */
+static gint hf_pkm_msg_code = -1;
+static gint hf_pkm_msg_pkm_id = -1;
+
+
+/* Wimax Mac PKM-REQ Message Dissector */
+static int dissect_mac_mgmt_msg_pkm_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ proto_item *pkm_item;
+ proto_tree *pkm_tree;
+
+ /* display MAC payload type PKM-REQ */
+ pkm_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_pkm_decoder, tvb, offset, -1, "Privacy Key Management Request (PKM-REQ)");
+ /* add MAC PKM subtree */
+ pkm_tree = proto_item_add_subtree(pkm_item, ett_mac_mgmt_msg_pkm_req_decoder);
+ /* Decode and display the Privacy Key Management Request Message (PKM-REQ) (table 24) */
+ /* display the PKM Code */
+ proto_tree_add_item(pkm_tree, hf_pkm_msg_code, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* set the offset for the PKM ID */
+ offset++;
+ /* display the PKM ID */
+ proto_tree_add_item(pkm_tree, hf_pkm_msg_pkm_id, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* set the offset for the TLV Encoded info */
+ offset++;
+ wimax_pkm_tlv_encoded_attributes_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, pkm_tree);
+ return tvb_captured_length(tvb);
+}
+
+/* Wimax Mac PKM-RSP Message Dissector */
+static int dissect_mac_mgmt_msg_pkm_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ proto_item *pkm_item;
+ proto_tree *pkm_tree;
+
+ /* display MAC payload type PKM-RSP */
+ pkm_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_pkm_decoder, tvb, offset, -1, "Privacy Key Management Response (PKM-RSP)");
+ /* add MAC PKM subtree */
+ pkm_tree = proto_item_add_subtree(pkm_item, ett_mac_mgmt_msg_pkm_rsp_decoder);
+ /* Decode and display the Privacy Key Management Response (PKM-RSP) (table 25) */
+ /* display the PKM Code */
+ proto_tree_add_item(pkm_tree, hf_pkm_msg_code, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* set the offset for the PKM ID */
+ offset++;
+ /* display the PKM ID */
+ proto_tree_add_item(pkm_tree, hf_pkm_msg_pkm_id, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* set the offset for the TLV Encoded info */
+ offset++;
+ /* process the PKM TLV Encoded Attributes */
+ wimax_pkm_tlv_encoded_attributes_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, pkm_tree);
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac PKM-REQ/RSP Messages Dissectors */
+void proto_register_mac_mgmt_msg_pkm(void)
+{
+ /* PKM display */
+ static hf_register_info hf_pkm[] =
+ {
+ {
+ &hf_pkm_msg_code,
+ {"Code", "wmx.pkm.msg_code",FT_UINT8, BASE_DEC, VALS(vals_pkm_msg_code),0x0, NULL, HFILL}
+ },
+ {
+ &hf_pkm_msg_pkm_id,
+ {"PKM Identifier", "wmx.pkm.msg_pkm_identifier",FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett_pkm[] =
+ {
+ &ett_mac_mgmt_msg_pkm_req_decoder,
+ &ett_mac_mgmt_msg_pkm_rsp_decoder,
+ };
+
+ proto_mac_mgmt_msg_pkm_decoder = proto_register_protocol (
+ "WiMax PKM-REQ/RSP Messages", /* name */
+ "WiMax PKM-REQ/RSP (pkm)", /* short name */
+ "wmx.pkm" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_pkm_decoder, hf_pkm, array_length(hf_pkm));
+ proto_register_subtree_array(ett_pkm, array_length(ett_pkm));
+}
+
+void proto_reg_handoff_mac_mgmt_msg_pkm(void)
+{
+ dissector_handle_t mac_mgmt_msg_pkm_req_handle;
+ dissector_handle_t mac_mgmt_msg_pkm_rsp_handle;
+
+ mac_mgmt_msg_pkm_req_handle = create_dissector_handle(dissect_mac_mgmt_msg_pkm_req_decoder, proto_mac_mgmt_msg_pkm_decoder);
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_PKM_REQ, mac_mgmt_msg_pkm_req_handle );
+ mac_mgmt_msg_pkm_rsp_handle = create_dissector_handle(dissect_mac_mgmt_msg_pkm_rsp_decoder, proto_mac_mgmt_msg_pkm_decoder);
+ dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_PKM_RSP, mac_mgmt_msg_pkm_rsp_handle );
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_pmc.c b/plugins/epan/wimax/msg_pmc.c
new file mode 100644
index 0000000000..5ec213576e
--- /dev/null
+++ b/plugins/epan/wimax/msg_pmc.c
@@ -0,0 +1,258 @@
+/* msg_pmc.c
+ * WiMax MAC Management PMC-REQ, PMC-RSP Message decoders
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: John R. Underwood <junderx@yahoo.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+
+#include <epan/packet.h>
+#include "wimax_mac.h"
+
+extern gboolean include_cor2_changes;
+
+void proto_register_mac_mgmt_msg_pmc_req(void);
+void proto_register_mac_mgmt_msg_pmc_rsp(void);
+void proto_reg_handoff_mac_mgmt_msg_pmc(void);
+
+static gint proto_mac_mgmt_msg_pmc_req_decoder = -1;
+static gint proto_mac_mgmt_msg_pmc_rsp_decoder = -1;
+
+static gint ett_mac_mgmt_msg_pmc_decoder = -1;
+
+/* Setup protocol subtree array */
+static gint *ett[] =
+{
+ &ett_mac_mgmt_msg_pmc_decoder,
+};
+
+/* PMC fields */
+static gint hf_pmc_req_pwr_control_mode_change = -1;
+static gint hf_pmc_req_pwr_control_mode_change_cor2 = -1;
+static gint hf_pmc_req_tx_power_level = -1;
+static gint hf_pmc_req_confirmation = -1;
+static gint hf_pmc_req_reserved = -1;
+static gint hf_pmc_rsp_start_frame = -1;
+static gint hf_pmc_rsp_power_adjust = -1;
+static gint hf_pmc_rsp_offset_BS_per_MS = -1;
+
+/* STRING RESOURCES */
+static const value_string vals_pmc_req_pwr[] = {
+ {0, "Closed loop power control mode"},
+ {1, "Reserved"},
+ {2, "Open loop power control passive mode"},
+ {3, "Open loop power control active mode"},
+ {0, NULL}
+};
+
+static const value_string vals_pmc_req_pwr_cor2[] = {
+ {0, "Closed loop power control mode"},
+ {1, "Open loop power control passive mode with Offset_SSperSS retention"},
+ {2, "Open loop power control passive mode with Offset_SSperSS reset"},
+ {3, "Open loop power control active mode"},
+ {0, NULL}
+};
+
+static const value_string vals_pmc_req_confirmation[] = {
+ {0, "MS requests to change the power control mode"},
+ {1, "MS confirms the receipt of PMC_RSP from BS"},
+ {0, NULL}
+};
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_pmc_req(void)
+{
+ /* PMC fields display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_pmc_req_confirmation,
+ {
+ "Confirmation", "wmx.pmc_req.confirmation",
+ FT_UINT16, BASE_DEC, VALS(vals_pmc_req_confirmation), 0x0020, NULL, HFILL
+ }
+ },
+ {
+ &hf_pmc_req_pwr_control_mode_change,
+ {
+ "Power control mode change", "wmx.pmc_req.power_control_mode",
+ FT_UINT16, BASE_DEC, VALS(vals_pmc_req_pwr), 0xC000, NULL, HFILL
+ }
+ },
+ {
+ &hf_pmc_req_pwr_control_mode_change_cor2,
+ {
+ "Power control mode change", "wmx.pmc_req.power_control_mode",
+ FT_UINT16, BASE_DEC, VALS(vals_pmc_req_pwr_cor2), 0xC000, NULL, HFILL
+ }
+ },
+ {
+ &hf_pmc_req_reserved,
+ {
+ "Reserved", "wmx.pmc_req.reserved",
+ FT_UINT16, BASE_DEC, NULL, 0x001F, NULL, HFILL
+ }
+ },
+ {
+ &hf_pmc_req_tx_power_level,
+ {
+ "UL Tx power level for the burst that carries this header", "wmx.pmc_req.ul_tx_power_level",
+ FT_UINT16, BASE_DEC, NULL, 0x3FC0, "When the Tx power is different from slot to slot, the maximum value is reported", HFILL
+ }
+ },
+ {
+ &hf_pmc_rsp_offset_BS_per_MS,
+ {
+ "Offset_BS per MS", "wmx.pmc_rsp.offset_BS_per_MS",
+ FT_FLOAT, BASE_NONE, NULL, 0x0, "Signed change in power level (incr of 0.25 dB) that the MS shall apply to the open loop power control formula in 8.4.10.3.2", HFILL
+ }
+ },
+ {
+ &hf_pmc_rsp_power_adjust,
+ {
+ "Power adjust", "wmx.pmc_rsp.power_adjust",
+ FT_FLOAT, BASE_NONE, NULL, 0x0, "Signed change in power level (incr of 0.25 dB) that the MS shall apply to its current transmission power. When subchannelization is employed, the SS shall interpret as a required change to the Tx power density", HFILL
+ }
+ },
+ {
+ &hf_pmc_rsp_start_frame,
+ {
+ "Start frame", "wmx.pmc_rsp.start_frame",
+ FT_UINT16, BASE_HEX, NULL, 0x3F00, "Apply mode change from current frame when 6 LSBs of frame match this", HFILL
+ }
+ }
+ };
+
+ proto_mac_mgmt_msg_pmc_req_decoder = proto_register_protocol (
+ "WiMax PMC-REQ Messages", /* name */
+ "WiMax PMC-REQ", /* short name */
+ "wmx.pmc_req" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_pmc_req_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_pmc_rsp(void)
+{
+ proto_mac_mgmt_msg_pmc_rsp_decoder = proto_register_protocol (
+ "WiMax PMC-RSP Messages", /* name */
+ "WiMax PMC-RSP", /* short name */
+ "wmx.pmc_rsp" /* abbrev */
+ );
+}
+
+/* Decode PMC-REQ messages. */
+static int dissect_mac_mgmt_msg_pmc_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ proto_item *pmc_req_item;
+ proto_tree *pmc_req_tree;
+
+ { /* we are being asked for details */
+
+ /* display MAC payload type PMC-REQ */
+ pmc_req_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_pmc_req_decoder, tvb, 0, -1, "MAC Management Message, PMC-REQ");
+ /* add MAC PMC REQ subtree */
+ pmc_req_tree = proto_item_add_subtree(pmc_req_item, ett_mac_mgmt_msg_pmc_decoder);
+ /* display the Power Control Mode Change */
+ proto_tree_add_item(pmc_req_tree, hf_pmc_req_pwr_control_mode_change, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* show the Transmit Power Level */
+ proto_tree_add_item(pmc_req_tree, hf_pmc_req_tx_power_level, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the Confirmation/request */
+ proto_tree_add_item(pmc_req_tree, hf_pmc_req_confirmation, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* show the Reserved bits */
+ proto_tree_add_item(pmc_req_tree, hf_pmc_req_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Decode PMC-RSP messages. */
+static int dissect_mac_mgmt_msg_pmc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ proto_item *pmc_rsp_item;
+ proto_tree *pmc_rsp_tree;
+ guint8 pwr_control_mode;
+ gint8 value;
+ gfloat power_change;
+
+ { /* we are being asked for details */
+
+ /* display MAC payload type PMC-RSP */
+ pmc_rsp_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_pmc_rsp_decoder, tvb, 0, -1, "MAC Management Message, PMC-RSP");
+ /* add MAC PMC RSP subtree */
+ pmc_rsp_tree = proto_item_add_subtree(pmc_rsp_item, ett_mac_mgmt_msg_pmc_decoder);
+
+ /* display the Power Control Mode Change */
+ if (include_cor2_changes)
+ proto_tree_add_item(pmc_rsp_tree, hf_pmc_req_pwr_control_mode_change_cor2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ else
+ proto_tree_add_item(pmc_rsp_tree, hf_pmc_req_pwr_control_mode_change, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the Power Adjust start frame */
+ proto_tree_add_item(pmc_rsp_tree, hf_pmc_rsp_start_frame, tvb, offset, 2, ENC_BIG_ENDIAN);
+ pwr_control_mode = 0xC0 & tvb_get_guint8(tvb, offset);
+ offset++;
+
+ value = (gint8)tvb_get_guint8(tvb, offset);
+ power_change = (float)0.25 * value; /* 0.25dB incr */
+ /* Check if Power Control Mode is 0 */
+ if (pwr_control_mode == 0) {
+ /* display the amount of power change requested */
+ proto_tree_add_float_format_value(pmc_rsp_tree, hf_pmc_rsp_power_adjust, tvb, offset, 1, power_change, " %.2f dB", power_change);
+ } else {
+ /* display the amount of MS power change requested */
+ proto_tree_add_float_format_value(pmc_rsp_tree, hf_pmc_rsp_offset_BS_per_MS, tvb, offset, 1, power_change, " %.2f dB", power_change);
+ }
+ }
+ return tvb_captured_length(tvb);
+}
+
+void
+proto_reg_handoff_mac_mgmt_msg_pmc(void)
+{
+ dissector_handle_t pmc_handle;
+
+ pmc_handle = create_dissector_handle(dissect_mac_mgmt_msg_pmc_req_decoder, proto_mac_mgmt_msg_pmc_req_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_PMC_REQ, pmc_handle);
+
+ pmc_handle = create_dissector_handle(dissect_mac_mgmt_msg_pmc_rsp_decoder, proto_mac_mgmt_msg_pmc_rsp_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_PMC_RSP, pmc_handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_prc_lt_ctrl.c b/plugins/epan/wimax/msg_prc_lt_ctrl.c
new file mode 100644
index 0000000000..38733a7ace
--- /dev/null
+++ b/plugins/epan/wimax/msg_prc_lt_ctrl.c
@@ -0,0 +1,148 @@
+/* msg_prc_lt_ctrl.c
+ * WiMax MAC Management PRC-LT-CTRL Message decoders
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: John R. Underwood <junderx@yahoo.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax_mac.h"
+
+
+void proto_register_mac_mgmt_msg_prc_lt_ctrl(void);
+void proto_reg_handoff_mac_mgmt_msg_prc_lt_ctrl(void);
+
+static gint proto_mac_mgmt_msg_prc_lt_ctrl_decoder = -1;
+
+static gint ett_mac_mgmt_msg_prc_lt_ctrl_decoder = -1;
+
+/* PRC-LT-CTRL fields */
+static gint hf_prc_lt_ctrl_precoding = -1;
+static gint hf_prc_lt_ctrl_precoding_delay = -1;
+/* static gint hf_prc_lt_ctrl_invalid_tlv = -1; */
+
+static const value_string vals_turn_on[] = {
+ {0, "Turn off"},
+ {1, "Turn on"},
+ {0, NULL}
+};
+
+
+/* Decode PRC-LT-CTRL messages. */
+static int dissect_mac_mgmt_msg_prc_lt_ctrl_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ proto_item *prc_lt_ctrl_item;
+ proto_tree *prc_lt_ctrl_tree;
+
+ { /* we are being asked for details */
+
+ /* display MAC payload type PRC-LT-CTRL */
+ prc_lt_ctrl_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_prc_lt_ctrl_decoder, tvb, 0, -1, "MAC Management Message, PRC-LT-CTRL");
+
+ /* add MAC PRC-LT-CTRL subtree */
+ prc_lt_ctrl_tree = proto_item_add_subtree(prc_lt_ctrl_item, ett_mac_mgmt_msg_prc_lt_ctrl_decoder);
+
+ /* display whether to Setup or Tear-down the
+ * long-term MIMO precoding delay */
+ proto_tree_add_item(prc_lt_ctrl_tree, hf_prc_lt_ctrl_precoding, tvb, offset, 1, ENC_BIG_ENDIAN);
+
+ /* display the Precoding Delay */
+ proto_tree_add_item(prc_lt_ctrl_tree, hf_prc_lt_ctrl_precoding_delay, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_prc_lt_ctrl(void)
+{
+ /* PRC-LT-CTRL fields display */
+ static hf_register_info hf[] =
+ {
+#if 0
+ {
+ &hf_prc_lt_ctrl_invalid_tlv,
+ {
+ "Invalid TLV", "wmx.prc_lt_ctrl.invalid_tlv",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_prc_lt_ctrl_precoding,
+ {
+ "Setup/Tear-down long-term precoding with feedback",
+ "wimax.prc_lt_ctrl.precoding",
+ FT_UINT8, BASE_DEC, VALS(vals_turn_on), 0x80, NULL, HFILL
+ }
+ },
+ {
+ &hf_prc_lt_ctrl_precoding_delay,
+ {
+ "BS precoding application delay",
+ "wimax.prc_lt_ctrl.precoding_delay",
+ FT_UINT8, BASE_DEC, NULL, 0x60, NULL, HFILL
+ }
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_mgmt_msg_prc_lt_ctrl_decoder,
+ };
+
+ proto_mac_mgmt_msg_prc_lt_ctrl_decoder = proto_register_protocol (
+ "WiMax PRC-LT-CTRL Message", /* name */
+ "WiMax PRC-LT-CTRL (prc)", /* short name */
+ "wmx.prc" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_prc_lt_ctrl_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+void
+proto_reg_handoff_mac_mgmt_msg_prc_lt_ctrl(void)
+{
+ dissector_handle_t handle;
+
+ handle = create_dissector_handle(dissect_mac_mgmt_msg_prc_lt_ctrl_decoder, proto_mac_mgmt_msg_prc_lt_ctrl_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_PRC_LT_CTRL, handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_reg_req.c b/plugins/epan/wimax/msg_reg_req.c
new file mode 100644
index 0000000000..1feefbeb68
--- /dev/null
+++ b/plugins/epan/wimax/msg_reg_req.c
@@ -0,0 +1,1452 @@
+/* msg_reg_req.c
+ * WiMax MAC Management REG-REQ Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: John R. Underwood <junderx@yahoo.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#define WIMAX_16E_2005
+
+#include <epan/packet.h>
+#include "wimax_tlv.h"
+#include "wimax_mac.h"
+#include "wimax_utils.h"
+
+extern gboolean include_cor2_changes;
+
+void proto_register_mac_mgmt_msg_reg_req(void);
+void proto_reg_handoff_mac_mgmt_msg_reg_req(void);
+
+static gint proto_mac_mgmt_msg_reg_req_decoder = -1;
+static gint ett_mac_mgmt_msg_reg_req_decoder = -1;
+
+/* REG-REQ fields */
+static gint hf_reg_ss_mgmt_support = -1;
+static gint hf_reg_ip_mgmt_mode = -1;
+static gint hf_reg_ip_version = -1;
+static gint hf_reg_req_secondary_mgmt_cid = -1;
+static gint hf_reg_ul_cids = -1;
+static gint hf_reg_max_classifiers = -1;
+static gint hf_reg_phs = -1;
+static gint hf_reg_arq = -1;
+static gint hf_reg_dsx_flow_control = -1;
+static gint hf_reg_mac_crc_support = -1;
+static gint hf_reg_mca_flow_control = -1;
+static gint hf_reg_mcast_polling_cids = -1;
+static gint hf_reg_num_dl_trans_cid = -1;
+static gint hf_reg_mac_address = -1;
+static gint hf_reg_tlv_t_20_1_max_mac_level_data_per_dl_frame = -1;
+static gint hf_reg_tlv_t_20_2_max_mac_level_data_per_ul_frame = -1;
+static gint hf_reg_tlv_t_21_packing_support = -1;
+static gint hf_reg_tlv_t_22_mac_extended_rtps_support = -1;
+static gint hf_reg_tlv_t_23_max_num_bursts_concurrently_to_the_ms = -1;
+static gint hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_dhcp = -1;
+static gint hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_mobile_ipv4 = -1;
+static gint hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_dhcpv6 = -1;
+static gint hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_ipv6 = -1;
+static gint hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_rsvd = -1;
+static gint hf_reg_tlv_t_27_handover_fbss_mdho_ho_disable = -1;
+static gint hf_reg_tlv_t_27_handover_fbss_mdho_dl_rf_monitoring_maps = -1;
+static gint hf_reg_tlv_t_27_handover_mdho_dl_monitoring_single_map = -1;
+static gint hf_reg_tlv_t_27_handover_mdho_dl_monitoring_maps = -1;
+static gint hf_reg_tlv_t_27_handover_mdho_ul_multiple = -1;
+static gint hf_reg_tlv_t_27_handover_reserved = -1;
+static gint hf_reg_tlv_t_29_ho_process_opt_ms_timer = -1;
+static gint hf_reg_tlv_t_31_mobility_handover = -1;
+static gint hf_reg_tlv_t_31_mobility_sleep_mode = -1;
+static gint hf_reg_tlv_t_31_mobility_idle_mode = -1;
+static gint hf_reg_req_tlv_t_32_sleep_mode_recovery_time = -1;
+static gint hf_ms_previous_ip_address_v4 = -1;
+static gint hf_ms_previous_ip_address_v6 = -1;
+static gint hf_idle_mode_timeout = -1;
+static gint hf_reg_req_tlv_t_45_ms_periodic_ranging_timer = -1;
+static gint hf_reg_tlv_t_40_arq_ack_type_selective_ack_entry = -1;
+static gint hf_reg_tlv_t_40_arq_ack_type_cumulative_ack_entry = -1;
+static gint hf_reg_tlv_t_40_arq_ack_type_cumulative_with_selective_ack_entry = -1;
+static gint hf_reg_tlv_t_40_arq_ack_type_cumulative_ack_with_block_sequence_ack = -1;
+static gint hf_reg_tlv_t_40_arq_ack_type_reserved = -1;
+static gint hf_reg_tlv_t_41_ho_connections_param_processing_time = -1;
+static gint hf_reg_tlv_t_42_ho_tek_processing_time = -1;
+static gint hf_reg_tlv_t_43_bandwidth_request_ul_tx_power_report_header_support = -1;
+static gint hf_reg_tlv_t_43_bandwidth_request_cinr_report_header_support = -1;
+static gint hf_reg_tlv_t_43_cqich_allocation_request_header_support = -1;
+static gint hf_reg_tlv_t_43_phy_channel_report_header_support = -1;
+static gint hf_reg_tlv_t_43_bandwidth_request_ul_sleep_control_header_support = -1;
+static gint hf_reg_tlv_t_43_sn_report_header_support = -1;
+static gint hf_reg_tlv_t_43_feedback_header_support = -1;
+static gint hf_reg_tlv_t_43_sdu_sn_extended_subheader_support_and_parameter = -1;
+static gint hf_reg_tlv_t_43_sdu_sn_parameter = -1;
+static gint hf_reg_tlv_t_43_dl_sleep_control_extended_subheader = -1;
+static gint hf_reg_tlv_t_43_feedback_request_extended_subheader = -1;
+static gint hf_reg_tlv_t_43_mimo_mode_feedback_extended_subheader = -1;
+static gint hf_reg_tlv_t_43_ul_tx_power_report_extended_subheader = -1;
+static gint hf_reg_tlv_t_43_mini_feedback_extended_subheader = -1;
+static gint hf_reg_tlv_t_43_sn_request_extended_subheader = -1;
+static gint hf_reg_tlv_t_43_pdu_sn_short_extended_subheader = -1;
+static gint hf_reg_tlv_t_43_pdu_sn_long_extended_subheader = -1;
+static gint hf_reg_tlv_t_43_reserved = -1;
+static gint hf_reg_tlv_t_46_handover_indication_readiness_timer = -1;
+static gint hf_reg_req_min_time_for_intra_fa = -1;
+static gint hf_reg_req_min_time_for_inter_fa = -1;
+static gint hf_reg_encap_atm_4 = -1;
+static gint hf_reg_encap_ipv4_4 = -1;
+static gint hf_reg_encap_ipv6_4 = -1;
+static gint hf_reg_encap_802_3_4 = -1;
+static gint hf_reg_encap_802_1q_4 = -1;
+static gint hf_reg_encap_ipv4_802_3_4 = -1;
+static gint hf_reg_encap_ipv6_802_3_4 = -1;
+static gint hf_reg_encap_ipv4_802_1q_4 = -1;
+static gint hf_reg_encap_ipv6_802_1q_4 = -1;
+static gint hf_reg_encap_packet_8023_ethernet_and_rohc_header_compression_4 = -1;
+static gint hf_reg_encap_packet_8023_ethernet_and_ecrtp_header_compression_4 = -1;
+static gint hf_reg_encap_packet_ip_rohc_header_compression_4 = -1;
+static gint hf_reg_encap_packet_ip_ecrtp_header_compression_4 = -1;
+static gint hf_reg_encap_rsvd_4 = -1;
+static gint hf_reg_encap_atm_2 = -1;
+static gint hf_reg_encap_ipv4_2 = -1;
+static gint hf_reg_encap_ipv6_2 = -1;
+static gint hf_reg_encap_802_3_2 = -1;
+static gint hf_reg_encap_802_1q_2 = -1;
+static gint hf_reg_encap_ipv4_802_3_2 = -1;
+static gint hf_reg_encap_ipv6_802_3_2 = -1;
+static gint hf_reg_encap_ipv4_802_1q_2 = -1;
+static gint hf_reg_encap_ipv6_802_1q_2 = -1;
+static gint hf_reg_encap_packet_8023_ethernet_and_rohc_header_compression_2 = -1;
+static gint hf_reg_encap_packet_8023_ethernet_and_ecrtp_header_compression_2 = -1;
+static gint hf_reg_encap_packet_ip_rohc_header_compression_2 = -1;
+static gint hf_reg_encap_packet_ip_ecrtp_header_compression_2 = -1;
+static gint hf_reg_encap_rsvd_2 = -1;
+static gint hf_tlv_type = -1;
+static gint hf_reg_invalid_tlv = -1;
+static gint hf_reg_power_saving_class_type_i = -1;
+static gint hf_reg_power_saving_class_type_ii = -1;
+static gint hf_reg_power_saving_class_type_iii = -1;
+static gint hf_reg_multi_active_power_saving_classes = -1;
+static gint hf_reg_total_power_saving_class_instances = -1;
+static gint hf_reg_power_saving_class_reserved = -1;
+static gint hf_reg_power_saving_class_capability = -1;
+static gint hf_reg_ip_phs_sdu_encap = -1;
+static gint hf_reg_tlv_t_26_method_alloc_ip_addr_secondary_mgmnt_conn = -1;
+static gint hf_reg_tlv_t_27_handover_supported = -1;
+static gint hf_reg_tlv_t_31_mobility_features_supported = -1;
+static gint hf_reg_tlv_t_40_arq_ack_type = -1;
+static gint hf_reg_tlv_t_43_mac_header_ext_header_support = -1;
+static gint hf_reg_req_bs_switching_timer = -1;
+
+/* STRING RESOURCES */
+
+static const true_false_string tfs_reg_ip_mgmt_mode = {
+ "IP-managed mode",
+ "Unmanaged mode"
+};
+
+static const true_false_string tfs_reg_ss_mgmt_support = {
+ "secondary management connection",
+ "no secondary management connection"
+};
+
+#if 0
+static const true_false_string tfs_arq_enable = {
+ "ARQ Requested/Accepted",
+ "ARQ Not Requested/Accepted"
+};
+#endif
+
+#if 0
+static const true_false_string tfs_arq_deliver_in_order = {
+ "Order of delivery is preserved",
+ "Order of delivery is not preserved"
+};
+#endif
+
+static const true_false_string tfs_reg_fbss_mdho_ho_disable = {
+ "Disable",
+ "Enable"
+};
+
+static const value_string vals_reg_ip_version[] = {
+ {0x1, "IPv4"},
+ {0x2, "IPV6"},
+ {0, NULL}
+};
+
+static const value_string vals_reg_phs_support[] = {
+ {0, "no PHS support"},
+ {1, "ATM PHS"},
+ {2, "Packet PHS"},
+ {3, "ATM and Packet PHS"},
+ {0, NULL}
+};
+
+static const true_false_string tfs_supported = {
+ "supported",
+ "unsupported"
+};
+
+static const true_false_string tfs_mac_crc_support = {
+ "MAC CRC Support (Default)",
+ "No MAC CRC Support"
+};
+
+static const value_string tfs_support[] = {
+ {0, "not supported"},
+ {1, "supported"},
+ {0, NULL}
+};
+
+static const value_string unique_no_limit[] = {
+ {0, "no limit"},
+ {0, NULL}
+};
+
+/* Decode REG-REQ sub-TLV's. */
+void dissect_extended_tlv(proto_tree *reg_req_tree, gint tlv_type, tvbuff_t *tvb, guint tlv_offset, guint tlv_len, packet_info *pinfo, guint offset, gint proto_registry)
+{
+ proto_item *tlv_item;
+ proto_tree *tlv_tree;
+ guint tvb_len;
+ tlv_info_t tlv_info;
+ guint tlv_end;
+ guint length;
+ guint nblocks;
+
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+
+#ifdef WIMAX_16E_2005
+ switch (tlv_type) {
+ case REG_ARQ_PARAMETERS:
+ /* display ARQ Service Flow Encodings info */
+ /* add subtree */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_reg_req_decoder, reg_req_tree, proto_registry, tvb, offset, tlv_len, "ARQ Service Flow Encodings");
+ /* decode and display the DL Service Flow Encodings */
+ wimax_service_flow_encodings_decoder(tvb_new_subset_length(tvb, tlv_offset, tlv_len), pinfo, tlv_tree);
+ break;
+ case REG_SS_MGMT_SUPPORT:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_ss_mgmt_support, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_IP_MGMT_MODE:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_ip_mgmt_mode, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_IP_VERSION:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_ip_version, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_UL_TRANSPORT_CIDS_SUPPORTED:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_ul_cids, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+
+ case REG_POWER_SAVING_CLASS_CAPABILITY:
+ tlv_item = add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_power_saving_class_capability, tvb, offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_reg_req_decoder);
+ proto_tree_add_item(tlv_tree, hf_reg_power_saving_class_type_i, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_power_saving_class_type_ii, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_power_saving_class_type_iii, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_multi_active_power_saving_classes, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_total_power_saving_class_instances, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_power_saving_class_reserved, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ break;
+ case REG_IP_PHS_SDU_ENCAP:
+ tlv_item = add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_ip_phs_sdu_encap, tvb, offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_reg_req_decoder);
+
+#ifdef WIMAX_16E_2005
+ if (tlv_len == 2){
+ proto_tree_add_item(tlv_tree, hf_reg_encap_atm_2, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_ipv4_2, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_ipv6_2, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_802_3_2, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_802_1q_2, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_ipv4_802_3_2, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_ipv6_802_3_2, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_ipv4_802_1q_2, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_ipv6_802_1q_2, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_packet_8023_ethernet_and_rohc_header_compression_2, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_packet_8023_ethernet_and_ecrtp_header_compression_2, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_packet_ip_rohc_header_compression_2, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_packet_ip_ecrtp_header_compression_2, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_rsvd_2, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ } else if(tlv_len == 4){
+ proto_tree_add_item(tlv_tree, hf_reg_encap_atm_4, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_ipv4_4, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_ipv6_4, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_802_3_4, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_802_1q_4, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_ipv4_802_3_4, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_ipv6_802_3_4, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_ipv4_802_1q_4, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_ipv6_802_1q_4, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_packet_8023_ethernet_and_rohc_header_compression_4, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_packet_8023_ethernet_and_ecrtp_header_compression_4, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_packet_ip_rohc_header_compression_4, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_packet_ip_ecrtp_header_compression_4, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_encap_rsvd_4, tvb, tlv_offset, tlv_len, ENC_BIG_ENDIAN);
+ }
+#endif
+ break;
+ case REG_MAX_CLASSIFIERS_SUPPORTED:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_max_classifiers, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_PHS_SUPPORT:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_phs, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_ARQ_SUPPORT:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_arq, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_DSX_FLOW_CONTROL:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_dsx_flow_control, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_MAC_CRC_SUPPORT:
+ if (!include_cor2_changes) {
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_mac_crc_support, tvb, offset, ENC_NA);
+ } else {
+ /* Unknown TLV Type */
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_tlv_type, tvb, offset, ENC_NA);
+ }
+ break;
+ case REG_MCA_FLOW_CONTROL:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_mca_flow_control, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_MCAST_POLLING_CIDS:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_mcast_polling_cids, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_NUM_DL_TRANS_CID:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_num_dl_trans_cid, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_MAC_ADDRESS:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_mac_address, tvb, offset, ENC_NA);
+ break;
+ case REG_TLV_T_20_MAX_MAC_DATA_PER_FRAME_SUPPORT:
+ /* display Maximum MAC level data per frame info */
+ /* add subtree */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_reg_req_decoder, reg_req_tree, proto_registry, tvb, offset, tlv_len, "Maximum MAC level data per frame");
+ /* decode and display Maximum MAC level data per frame for UL & DL */
+ /* Set endpoint of the subTLVs (tlv_offset + length) */
+ tlv_end = tlv_offset + tlv_len;
+ /* process subTLVs */
+ while ( tlv_offset < tlv_end )
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, tlv_offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ length = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "REG-REQ TLV error");
+ proto_tree_add_item(reg_req_tree, hf_reg_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* update the offset */
+ tlv_offset += get_tlv_value_offset(&tlv_info);
+ nblocks = tvb_get_ntohs(tvb, tlv_offset);
+ switch (tlv_type)
+ {
+ case REG_TLV_T_20_1_MAX_MAC_LEVEL_DATA_PER_DL_FRAME:
+ tlv_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_reg_tlv_t_20_1_max_mac_level_data_per_dl_frame, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ if ( nblocks == 0 )
+ {
+ proto_item_append_text(tlv_item, " (Unlimited bytes)");
+ } else {
+ proto_item_append_text(tlv_item, " (%d bytes)", 256 * nblocks);
+ }
+ break;
+ case REG_TLV_T_20_2_MAX_MAC_LEVEL_DATA_PER_UL_FRAME:
+ tlv_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_reg_tlv_t_20_2_max_mac_level_data_per_ul_frame, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ if ( nblocks == 0 )
+ {
+ proto_item_append_text(tlv_item, " (Unlimited bytes)");
+ } else {
+ proto_item_append_text(tlv_item, " (%d bytes)", 256 * nblocks);
+ }
+ break;
+ default:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_reg_invalid_tlv, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ break;
+ }
+ tlv_offset += length;
+ }
+ break;
+
+ case REG_TLV_T_21_PACKING_SUPPORT:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_tlv_t_21_packing_support, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_TLV_T_22_MAC_EXTENDED_RTPS_SUPPORT:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_tlv_t_22_mac_extended_rtps_support, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_TLV_T_23_MAX_NUM_BURSTS_TRANSMITTED_CONCURRENTLY_TO_THE_MS:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_tlv_t_23_max_num_bursts_concurrently_to_the_ms, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_TLV_T_26_METHOD_FOR_ALLOCATING_IP_ADDR_SECONDARY_MGMNT_CONNECTION:
+ tlv_item = add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_tlv_t_26_method_alloc_ip_addr_secondary_mgmnt_conn, tvb, offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_reg_req_decoder);
+ proto_tree_add_item(tlv_tree, hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_dhcp, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_mobile_ipv4, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_dhcpv6, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_ipv6, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_rsvd, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case REG_TLV_T_27_HANDOVER_SUPPORTED:
+ tlv_item = add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_tlv_t_27_handover_supported, tvb, offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_reg_req_decoder);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_27_handover_fbss_mdho_ho_disable, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_27_handover_fbss_mdho_dl_rf_monitoring_maps, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_27_handover_mdho_dl_monitoring_single_map, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_27_handover_mdho_dl_monitoring_maps, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_27_handover_mdho_ul_multiple, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_27_handover_reserved, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case REG_TLV_T_29_HO_PROCESS_OPTIMIZATION_MS_TIMER:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_tlv_t_29_ho_process_opt_ms_timer, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_TLV_T_31_MOBILITY_FEATURES_SUPPORTED:
+ tlv_item = add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_tlv_t_31_mobility_features_supported, tvb, offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_reg_req_decoder);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_31_mobility_handover, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_31_mobility_sleep_mode, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_31_mobility_idle_mode, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case REG_TLV_T_40_ARQ_ACK_TYPE:
+ tlv_item = add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_tlv_t_40_arq_ack_type, tvb, offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_reg_req_decoder);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_40_arq_ack_type_selective_ack_entry, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_40_arq_ack_type_cumulative_ack_entry, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_40_arq_ack_type_cumulative_with_selective_ack_entry, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_40_arq_ack_type_cumulative_ack_with_block_sequence_ack, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_40_arq_ack_type_reserved, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case REG_TLV_T_41_MS_HO_CONNECTIONS_PARAM_PROCESSING_TIME:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_tlv_t_41_ho_connections_param_processing_time, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_TLV_T_42_MS_HO_TEK_PROCESSING_TIME:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_tlv_t_42_ho_tek_processing_time, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_TLV_T_43_MAC_HEADER_AND_EXTENDED_SUBHEADER_SUPPORT:
+ tlv_item = add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_tlv_t_43_mac_header_ext_header_support, tvb, offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_reg_req_decoder);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_bandwidth_request_ul_tx_power_report_header_support, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_bandwidth_request_cinr_report_header_support, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_cqich_allocation_request_header_support, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_phy_channel_report_header_support, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_bandwidth_request_ul_sleep_control_header_support, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_sn_report_header_support, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_feedback_header_support, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_sdu_sn_extended_subheader_support_and_parameter, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_sdu_sn_parameter, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_dl_sleep_control_extended_subheader, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_feedback_request_extended_subheader, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_mimo_mode_feedback_extended_subheader, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_ul_tx_power_report_extended_subheader, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_mini_feedback_extended_subheader, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_sn_request_extended_subheader, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_pdu_sn_short_extended_subheader, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_pdu_sn_long_extended_subheader, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_tlv_t_43_reserved, tvb, tlv_offset, 3, ENC_BIG_ENDIAN);
+ break;
+ case REG_REQ_BS_SWITCHING_TIMER:
+ tlv_item = add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_req_bs_switching_timer, tvb, offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_reg_req_decoder);
+ proto_tree_add_item(tlv_tree, hf_reg_req_min_time_for_intra_fa, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_reg_req_min_time_for_inter_fa, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case VENDOR_SPECIFIC_INFO:
+ case VENDOR_ID_ENCODING:
+ case CURRENT_TX_POWER:
+ case MAC_VERSION_ENCODING:
+ case CMAC_TUPLE: /* Table 348b */
+ wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, reg_req_tree);
+ break;
+ default:
+ add_tlv_subtree(&tlv_info, reg_req_tree, proto_registry, tvb, offset, ENC_NA);
+ break;
+ }
+#endif
+}
+
+
+/* Decode REG-REQ messages. */
+static int dissect_mac_mgmt_msg_reg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tlv_offset;
+ guint tvb_len;
+ proto_item *reg_req_item = NULL;
+ proto_tree *reg_req_tree = NULL;
+ proto_tree *tlv_tree = NULL;
+ gboolean hmac_found = FALSE;
+ tlv_info_t tlv_info;
+ gint tlv_type;
+ gint tlv_len;
+
+ { /* we are being asked for details */
+
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC payload type REG-REQ */
+ reg_req_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_reg_req_decoder, tvb, offset, tvb_len, "MAC Management Message, REG-REQ");
+ /* add MAC REG-REQ subtree */
+ reg_req_tree = proto_item_add_subtree(reg_req_item, ett_mac_mgmt_msg_reg_req_decoder);
+
+ while(offset < tvb_len)
+ {
+ /* Get the TLV data. */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "REG-REQ TLV error");
+ proto_tree_add_item(reg_req_tree, hf_reg_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the offset to the TLV data */
+ tlv_offset = offset + get_tlv_value_offset(&tlv_info);
+
+ switch (tlv_type) {
+ case REG_ARQ_PARAMETERS:
+ case REG_SS_MGMT_SUPPORT:
+ case REG_IP_MGMT_MODE:
+ case REG_IP_VERSION:
+ case REG_UL_TRANSPORT_CIDS_SUPPORTED:
+ case REG_IP_PHS_SDU_ENCAP:
+ case REG_MAX_CLASSIFIERS_SUPPORTED:
+ case REG_PHS_SUPPORT:
+ case REG_ARQ_SUPPORT:
+ case REG_DSX_FLOW_CONTROL:
+ case REG_MAC_CRC_SUPPORT:
+ case REG_MCA_FLOW_CONTROL:
+ case REG_MCAST_POLLING_CIDS:
+ case REG_NUM_DL_TRANS_CID:
+ case REG_MAC_ADDRESS:
+#ifdef WIMAX_16E_2005
+ case REG_TLV_T_20_MAX_MAC_DATA_PER_FRAME_SUPPORT:
+ case REG_TLV_T_21_PACKING_SUPPORT:
+ case REG_TLV_T_22_MAC_EXTENDED_RTPS_SUPPORT:
+ case REG_TLV_T_23_MAX_NUM_BURSTS_TRANSMITTED_CONCURRENTLY_TO_THE_MS:
+ case REG_TLV_T_26_METHOD_FOR_ALLOCATING_IP_ADDR_SECONDARY_MGMNT_CONNECTION:
+ case REG_TLV_T_27_HANDOVER_SUPPORTED:
+ case REG_TLV_T_29_HO_PROCESS_OPTIMIZATION_MS_TIMER:
+ case REG_TLV_T_31_MOBILITY_FEATURES_SUPPORTED:
+ case REG_TLV_T_40_ARQ_ACK_TYPE:
+ case REG_TLV_T_41_MS_HO_CONNECTIONS_PARAM_PROCESSING_TIME:
+ case REG_TLV_T_42_MS_HO_TEK_PROCESSING_TIME:
+ case REG_TLV_T_43_MAC_HEADER_AND_EXTENDED_SUBHEADER_SUPPORT:
+ case REG_REQ_BS_SWITCHING_TIMER:
+ case REG_POWER_SAVING_CLASS_CAPABILITY:
+#endif
+ /* Decode REG-REQ sub-TLV's. */
+ dissect_extended_tlv(reg_req_tree, tlv_type, tvb, tlv_offset, tlv_len, pinfo, offset, proto_mac_mgmt_msg_reg_req_decoder);
+ break;
+ case REG_REQ_SECONDARY_MGMT_CID:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_req_secondary_mgmt_cid, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_REQ_TLV_T_32_SLEEP_MODE_RECOVERY_TIME:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_req_tlv_t_32_sleep_mode_recovery_time, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_REQ_TLV_T_33_MS_PREV_IP_ADDR:
+ if ( tlv_len == 4 ) {
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_ms_previous_ip_address_v4, tvb, offset, ENC_BIG_ENDIAN);
+ } else if ( tlv_len == 16 ) {
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_ms_previous_ip_address_v6, tvb, offset, ENC_NA);
+ }
+ break;
+ case REG_TLV_T_37_IDLE_MODE_TIMEOUT:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_idle_mode_timeout, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_REQ_TLV_T_45_MS_PERIODIC_RANGING_TIMER_INFO:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_req_tlv_t_45_ms_periodic_ranging_timer, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_HANDOVER_INDICATION_READINESS_TIMER:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_reg_tlv_t_46_handover_indication_readiness_timer, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+
+ case DSx_UPLINK_FLOW:
+ /* display Uplink Service Flow Encodings info */
+ /* add subtree */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_reg_req_decoder, reg_req_tree, proto_mac_mgmt_msg_reg_req_decoder, tvb, offset, tlv_len, "Uplink Service Flow Encodings");
+ /* decode and display the DL Service Flow Encodings */
+ wimax_service_flow_encodings_decoder(tvb_new_subset_length(tvb, tlv_offset, tlv_len), pinfo, tlv_tree);
+ break;
+ case DSx_DOWNLINK_FLOW:
+ /* display Downlink Service Flow Encodings info */
+ /* add subtree */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_reg_req_decoder, reg_req_tree, proto_mac_mgmt_msg_reg_req_decoder, tvb, offset, tlv_len, "Downlink Service Flow Encodings");
+ /* decode and display the DL Service Flow Encodings */
+ wimax_service_flow_encodings_decoder(tvb_new_subset_length(tvb, tlv_offset, tlv_len), pinfo, tlv_tree);
+ break;
+ case HMAC_TUPLE: /* Table 348d */
+ /* decode and display the HMAC Tuple */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_reg_req_decoder, reg_req_tree, proto_mac_mgmt_msg_reg_req_decoder, tvb, offset, tlv_len, "HMAC Tuple");
+ wimax_hmac_tuple_decoder(tlv_tree, tvb, tlv_offset, tlv_len);
+ hmac_found = TRUE;
+ break;
+ case CMAC_TUPLE: /* Table 348b */
+ /* decode and display the CMAC Tuple */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_reg_req_decoder, reg_req_tree, proto_mac_mgmt_msg_reg_req_decoder, tvb, offset, tlv_len, "CMAC Tuple");
+ wimax_cmac_tuple_decoder(tlv_tree, tvb, tlv_offset, tlv_len);
+ break;
+ default:
+ add_tlv_subtree(&tlv_info, reg_req_tree, hf_tlv_type, tvb, offset, ENC_NA);
+ break;
+ }
+ /* update the offset */
+ offset = tlv_len + tlv_offset;
+ } /* End while() looping through the tvb. */
+ if (!hmac_found)
+ proto_item_append_text(reg_req_tree, " (HMAC Tuple is missing !)");
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_reg_req(void)
+{
+ /* REG-REQ fields display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_dhcp,
+ {
+ "DHCP", "wmx.reg.alloc_sec_mgmt_dhcp",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_dhcpv6,
+ {
+ "DHCPv6", "wmx.reg.alloc_sec_mgmt_dhcpv6",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x04, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_ipv6,
+ {
+ "IPv6 Stateless Address Autoconfiguration", "wmx.reg.alloc_sec_mgmt_ipv6",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x08, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_mobile_ipv4,
+ {
+ "Mobile IPv4", "wmx.reg.alloc_sec_mgmt_mobile_ipv4",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x02, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_rsvd,
+ {
+ "Reserved", "wmx.reg.alloc_sec_mgmt_rsvd",
+ FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_arq,
+ {
+ "ARQ support", "wmx.reg.arq",
+ FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported), 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_40_arq_ack_type_cumulative_ack_entry,
+ {
+ "Cumulative ACK entry", "wmx.reg.arq_ack_type_cumulative_ack_entry",
+ FT_UINT8, BASE_DEC, NULL, 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_40_arq_ack_type_cumulative_ack_with_block_sequence_ack,
+ {
+ "Cumulative ACK with Block Sequence ACK", "wmx.reg.arq_ack_type_cumulative_ack_with_block_sequence_ack",
+ FT_UINT8, BASE_DEC, NULL, 0x8, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_40_arq_ack_type_cumulative_with_selective_ack_entry,
+ {
+ "Cumulative with Selective ACK entry", "wmx.reg.arq_ack_type_cumulative_with_selective_ack_entry",
+ FT_UINT8, BASE_DEC, NULL, 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_40_arq_ack_type_reserved,
+ {
+ "Reserved", "wmx.reg.arq_ack_type_reserved",
+ FT_UINT8, BASE_DEC, NULL, 0xf0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_40_arq_ack_type_selective_ack_entry,
+ {
+ "Selective ACK entry", "wmx.reg.arq_ack_type_selective_ack_entry",
+ FT_UINT8, BASE_DEC, NULL, 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_bandwidth_request_cinr_report_header_support,
+ {
+ "Bandwidth request and CINR report header support", "wmx.reg.bandwidth_request_cinr_report_header_support",
+ FT_UINT24, BASE_DEC, VALS(tfs_support), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_bandwidth_request_ul_sleep_control_header_support,
+ {
+ "Bandwidth request and uplink sleep control header support", "wmx.reg.bandwidth_request_ul_sleep_control_header_support",
+ FT_UINT24, BASE_DEC, VALS(tfs_support), 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_cqich_allocation_request_header_support,
+ {
+ "CQICH Allocation Request header support", "wmx.reg.cqich_allocation_request_header_support",
+ FT_UINT24, BASE_DEC, VALS(tfs_support), 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_dl_sleep_control_extended_subheader,
+ {
+ "Downlink sleep control extended subheader", "wmx.reg.dl_sleep_control_extended_subheader",
+ FT_UINT24, BASE_DEC, VALS(tfs_support), 0x800, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_dsx_flow_control,
+ {
+ "DSx flow control", "wmx.reg.dsx_flow_control",
+ FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_no_limit), 0x0, NULL, HFILL
+ }
+ },
+ /* When REG-REQ TLV 7 is length 2 */
+ {
+ &hf_reg_encap_802_1q_2,
+ {
+ "Packet, 802.1Q VLAN", "wmx.reg.encap_802_1q",
+ FT_UINT16, BASE_HEX, NULL, 0x0010, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_802_3_2,
+ {
+ "Packet, 802.3/Ethernet", "wmx.reg.encap_802_3",
+ FT_UINT16, BASE_HEX, NULL, 0x00000008, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_atm_2,
+ {
+ "ATM", "wmx.reg.encap_atm",
+ FT_UINT16, BASE_HEX, NULL, 0x00000001, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_ipv4_2,
+ {
+ "Packet, IPv4", "wmx.reg.encap_ipv4",
+ FT_UINT16, BASE_HEX, NULL, 0x00000002, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_ipv6_2,
+ {
+ "Packet, IPv6", "wmx.reg.encap_ipv6",
+ FT_UINT16, BASE_HEX, NULL, 0x00000004, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_ipv4_802_1q_2,
+ {
+ "Packet, IPv4 over 802.1Q VLAN", "wmx.reg.encap_ipv4_802_1q",
+ FT_UINT16, BASE_HEX, NULL, 0x00000080, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_ipv4_802_3_2,
+ {
+ "Packet, IPv4 over 802.3/Ethernet", "wmx.reg.encap_ipv4_802_3",
+ FT_UINT16, BASE_HEX, NULL, 0x00000020, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_ipv6_802_1q_2,
+ {
+ "Packet, IPv6 over 802.1Q VLAN", "wmx.reg.encap_ipv6_802_1q",
+ FT_UINT16, BASE_HEX, NULL, 0x00000100, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_ipv6_802_3_2,
+ {
+ "Packet, IPv6 over 802.3/Ethernet", "wmx.reg.encap_ipv6_802_3",
+ FT_UINT16, BASE_HEX, NULL, 0x00000040, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_packet_8023_ethernet_and_ecrtp_header_compression_2,
+ {
+ "Packet, 802.3/Ethernet (with optional 802.1Q VLAN tags) and ECRTP header compression", "wmx.reg.encap_packet_802_3_ethernet_and_ecrtp_header_compression",
+ FT_UINT16, BASE_HEX, NULL, 0x00000400, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_packet_8023_ethernet_and_rohc_header_compression_2,
+ {
+ "Packet, 802.3/Ethernet (with optional 802.1Q VLAN tags) and ROHC header compression", "wmx.reg.encap_packet_802_3_ethernet_and_rohc_header_compression",
+ FT_UINT16, BASE_HEX, NULL, 0x00000200, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_packet_ip_ecrtp_header_compression_2,
+ {
+ "Packet, IP (v4 or v6) with ECRTP header compression", "wmx.reg.encap_packet_ip_ecrtp_header_compression",
+ FT_UINT16, BASE_HEX, NULL, 0x00001000, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_packet_ip_rohc_header_compression_2,
+ {
+ "Packet, IP (v4 or v6) with ROHC header compression", "wmx.reg.encap_packet_ip_rohc_header_compression",
+ FT_UINT16, BASE_HEX, NULL, 0x00000800, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_rsvd_2,
+ {
+ "Reserved", "wmx.reg.encap_rsvd",
+ FT_UINT16, BASE_HEX, NULL, 0x0000E000, NULL, HFILL
+ }
+ },
+ /* When REG-REQ TLV 7 is length 4 */
+ {
+ &hf_reg_encap_802_1q_4,
+ {
+ "Packet, 802.1Q VLAN", "wmx.reg.encap_802_1q",
+ FT_UINT32, BASE_HEX, NULL, 0x0010, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_802_3_4,
+ {
+ "Packet, 802.3/Ethernet", "wmx.reg.encap_802_3",
+ FT_UINT32, BASE_HEX, NULL, 0x00000008, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_atm_4,
+ {
+ "ATM", "wmx.reg.encap_atm",
+ FT_UINT32, BASE_HEX, NULL, 0x00000001, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_ipv4_4,
+ {
+ "Packet, IPv4", "wmx.reg.encap_ipv4",
+ FT_UINT32, BASE_HEX, NULL, 0x00000002, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_ipv4_802_1q_4,
+ {
+ "Packet, IPv4 over 802.1Q VLAN", "wmx.reg.encap_ipv4_802_1q",
+ FT_UINT32, BASE_HEX, NULL, 0x00000080, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_ipv4_802_3_4,
+ {
+ "Packet, IPv4 over 802.3/Ethernet", "wmx.reg.encap_ipv4_802_3",
+ FT_UINT32, BASE_HEX, NULL, 0x00000020, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_ipv6_4,
+ {
+ "Packet, IPv6", "wmx.reg.encap_ipv6",
+ FT_UINT32, BASE_HEX, NULL, 0x00000004, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_ipv6_802_1q_4,
+ {
+ "Packet, IPv6 over 802.1Q VLAN", "wmx.reg.encap_ipv6_802_1q",
+ FT_UINT32, BASE_HEX, NULL, 0x00000100, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_ipv6_802_3_4,
+ {
+ "Packet, IPv6 over 802.3/Ethernet", "wmx.reg.encap_ipv6_802_3",
+ FT_UINT32, BASE_HEX, NULL, 0x00000040, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_packet_8023_ethernet_and_ecrtp_header_compression_4,
+ {
+ "Packet, 802.3/Ethernet (with optional 802.1Q VLAN tags) and ECRTP header compression", "wmx.reg.encap_packet_802_3_ethernet_and_ecrtp_header_compression",
+ FT_UINT32, BASE_HEX, NULL, 0x00000400, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_packet_8023_ethernet_and_rohc_header_compression_4,
+ {
+ "Packet, 802.3/Ethernet (with optional 802.1Q VLAN tags) and ROHC header compression", "wmx.reg.encap_packet_802_3_ethernet_and_rohc_header_compression",
+ FT_UINT32, BASE_HEX, NULL, 0x00000200, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_packet_ip_ecrtp_header_compression_4,
+ {
+ "Packet, IP (v4 or v6) with ECRTP header compression", "wmx.reg.encap_packet_ip_ecrtp_header_compression",
+ FT_UINT32, BASE_HEX, NULL, 0x00001000, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_packet_ip_rohc_header_compression_4,
+ {
+ "Packet, IP (v4 or v6) with ROHC header compression", "wmx.reg.encap_packet_ip_rohc_header_compression",
+ FT_UINT32, BASE_HEX, NULL, 0x00000800, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_encap_rsvd_4,
+ {
+ "Reserved", "wmx.reg.encap_rsvd",
+ FT_UINT32, BASE_HEX, NULL, 0xFFFFE000, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_22_mac_extended_rtps_support,
+ {
+ "MAC extended rtPS support", "wmx.reg.ext_rtps_support",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_27_handover_fbss_mdho_dl_rf_monitoring_maps,
+ {
+ "FBSS/MDHO DL RF Combining with monitoring MAPs from active BSs", "wmx.reg.fbss_mdho_dl_rf_combining",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x02, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_bandwidth_request_ul_tx_power_report_header_support,
+ {
+ "Bandwidth request and UL Tx Power Report header support",
+ "wmx.reg.bandwidth_request_ul_tx_pwr_report_header_support",
+ FT_UINT24, BASE_DEC, VALS(tfs_support), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_27_handover_fbss_mdho_ho_disable,
+ {
+ "MDHO/FBSS HO. BS ignore all other bits when set to 1", "wmx.reg.fbss_mdho_ho_disable",
+ FT_BOOLEAN, 8, TFS(&tfs_reg_fbss_mdho_ho_disable), 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_feedback_header_support,
+ {
+ "Feedback header support", "wmx.reg.feedback_header_support",
+ FT_UINT24, BASE_DEC, VALS(tfs_support), 0x40, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_feedback_request_extended_subheader,
+ {
+ "Feedback request extended subheader", "wmx.reg.feedback_request_extended_subheader",
+ FT_UINT24, BASE_DEC, VALS(tfs_support), 0x1000, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_46_handover_indication_readiness_timer,
+ {
+ "Handover indication readiness timer", "wmx.reg.handover_indication_readiness_timer",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_27_handover_reserved,
+ {
+ "Reserved", "wmx.reg.handover_reserved",
+ FT_UINT8, BASE_DEC, NULL, 0xE0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_41_ho_connections_param_processing_time,
+ {
+ "MS HO connections parameters processing time", "wmx.reg.ho_connections_param_processing_time",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_29_ho_process_opt_ms_timer,
+ {
+ "HO Process Optimization MS Timer", "wmx.reg.ho_process_opt_ms_timer",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_42_ho_tek_processing_time,
+ {
+ "MS HO TEK processing time", "wmx.reg.ho_tek_processing_time",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_idle_mode_timeout,
+ {
+ "Idle Mode Timeout", "wmx.reg.idle_mode_timeout",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_ip_mgmt_mode,
+ {
+ "IP management mode", "wmx.reg.ip_mgmt_mode",
+ FT_BOOLEAN, BASE_NONE, TFS(&tfs_reg_ip_mgmt_mode), 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_ip_version,
+ {
+ "IP version", "wmx.reg.ip_version",
+ FT_UINT8, BASE_HEX, VALS(vals_reg_ip_version), 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_mac_address,
+ {
+ "MAC Address of the SS", "wmx.reg.mac_address",
+ FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_mac_crc_support,
+ {
+ "MAC CRC", "wmx.reg.mac_crc_support",
+ FT_BOOLEAN, BASE_NONE, TFS(&tfs_mac_crc_support), 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_max_classifiers,
+ {
+ "Maximum number of classification rules", "wmx.reg.max_classifiers",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_23_max_num_bursts_concurrently_to_the_ms,
+ {
+ "Maximum number of bursts transmitted concurrently to the MS", "wmx.reg.max_num_bursts_to_ms",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_mca_flow_control,
+ {
+ "MCA flow control", "wmx.reg.mca_flow_control",
+ FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_no_limit), 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_mcast_polling_cids,
+ {
+ "Multicast polling group CID support", "wmx.reg.mcast_polling_cids",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_27_handover_mdho_ul_multiple,
+ {
+ "MDHO UL Multiple transmission", "wmx.reg.mdh_ul_multiple",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_27_handover_mdho_dl_monitoring_maps,
+ {
+ "MDHO DL soft combining with monitoring MAPs from active BSs", "wmx.reg.mdho_dl_monitor_maps",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x08, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_27_handover_mdho_dl_monitoring_single_map,
+ {
+ "MDHO DL soft Combining with monitoring single MAP from anchor BS", "wmx.reg.mdho_dl_monitor_single_map",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x04, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_mimo_mode_feedback_extended_subheader,
+ {
+ "MIMO mode feedback request extended subheader", "wmx.reg.mimo_mode_feedback_request_extended_subheader",
+ FT_UINT24, BASE_DEC, VALS(tfs_support), 0x2000, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_mini_feedback_extended_subheader,
+ {
+ "Mini-feedback extended subheader", "wmx.reg.mini_feedback_extended_subheader",
+ FT_UINT24, BASE_DEC, VALS(tfs_support), 0x8000, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_31_mobility_handover,
+ {
+ "Mobility (handover)", "wmx.reg.mobility_handover",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_31_mobility_idle_mode,
+ {
+ "Idle mode", "wmx.reg.mobility_idle_mode",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x04, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_31_mobility_sleep_mode,
+ {
+ "Sleep mode", "wmx.reg.mobility_sleep_mode",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x02, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_num_dl_trans_cid,
+ {
+ "Number of Downlink transport CIDs the SS can support", "wmx.reg.dl_cids_supported",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_21_packing_support,
+ {
+ "Packing support", "wmx.reg.packing.support",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_pdu_sn_long_extended_subheader,
+ {
+ "PDU SN (long) extended subheader", "wmx.reg.pdu_sn_long_extended_subheader",
+ FT_UINT24, BASE_DEC, VALS(tfs_support), 0x40000, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_pdu_sn_short_extended_subheader,
+ {
+ "PDU SN (short) extended subheader", "wmx.reg.pdu_sn_short_extended_subheader",
+ FT_UINT24, BASE_DEC, VALS(tfs_support), 0x20000, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_phs,
+ {
+ "PHS support", "wmx.reg.phs",
+ FT_UINT8, BASE_DEC, VALS(vals_reg_phs_support), 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_phy_channel_report_header_support,
+ {
+ "PHY channel report header support", "wmx.reg.phy_channel_report_header_support",
+ FT_UINT24, BASE_DEC, VALS(tfs_support), 0x8, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_reserved,
+ {
+ "Reserved", "wmx.reg.reserved",
+ FT_UINT24, BASE_DEC, NULL, 0xf80000, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_sdu_sn_extended_subheader_support_and_parameter,
+ {
+ "SDU_SN extended subheader support", "wmx.reg.sdu_sn_extended_subheader_support",
+ FT_UINT24, BASE_DEC, VALS(tfs_support), 0x80, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_sdu_sn_parameter,
+ {
+ "SDU_SN parameter", "wmx.reg.sdu_sn_parameter",
+ FT_UINT24, BASE_DEC, NULL, 0x700, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_sn_report_header_support,
+ {
+ "SN report header support", "wmx.reg.sn_report_header_support",
+ FT_UINT24, BASE_DEC, VALS(tfs_support), 0x20, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_sn_request_extended_subheader,
+ {
+ "SN request extended subheader", "wmx.reg.sn_request_extended_subheader",
+ FT_UINT24, BASE_DEC, VALS(tfs_support), 0x10000, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_ss_mgmt_support,
+ {
+ "SS management support", "wmx.reg.ss_mgmt_support",
+ FT_BOOLEAN, BASE_NONE, TFS(&tfs_reg_ss_mgmt_support), 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_ul_cids,
+ {
+ "Number of Uplink transport CIDs the SS can support", "wmx.reg.ul_cids_supported",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_ul_tx_power_report_extended_subheader,
+ {
+ "UL Tx power report extended subheader", "wmx.reg.ul_tx_power_report_extended_subheader",
+ FT_UINT24, BASE_DEC, VALS(tfs_support), 0x4000, NULL, HFILL
+ }
+ },
+ {
+ &hf_tlv_type,
+ {
+ "Unknown TLV Type", "wmx.reg.unknown_tlv_type",
+ FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_invalid_tlv,
+ {
+ "Invalid TLV", "wmx.reg_req.invalid_tlv",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_20_1_max_mac_level_data_per_dl_frame,
+ {
+ "Maximum MAC level DL data per frame", "wmx.reg_req.max_mac_dl_data",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_20_2_max_mac_level_data_per_ul_frame,
+ {
+ "Maximum MAC level UL data per frame", "wmx.reg_req.max_mac_ul_data",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_req_min_time_for_inter_fa,
+ {
+ "Minimum time for inter-FA HO, default=3", "wmx.reg_req.min_time_for_inter_fa",
+ FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_req_min_time_for_intra_fa,
+ {
+ "Minimum time for intra-FA HO, default=2", "wmx.reg_req.min_time_for_intra_fa",
+ FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_req_tlv_t_45_ms_periodic_ranging_timer,
+ {
+ "MS periodic ranging timer information", "wmx.reg_req.ms_periodic_ranging_timer_info",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* IPv4 Mask */
+ &hf_ms_previous_ip_address_v4,
+ {
+ "MS Previous IP address", "wmx.reg_req.ms_prev_ip_addr_v4",
+ FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* IPv6 Source Address */
+ &hf_ms_previous_ip_address_v6,
+ {
+ "MS Previous IP address", "wmx.reg_req.ms_prev_ip_addr_v6",
+ FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_req_secondary_mgmt_cid,
+ {
+ "Secondary Management CID", "wmx.reg_req.secondary_mgmt_cid",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_req_tlv_t_32_sleep_mode_recovery_time,
+ {
+ "Frames required for the MS to switch from sleep to awake-mode", "wmx.reg_req.sleep_recovery",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_power_saving_class_type_i,
+ {
+ "Power saving class type I supported", "wmx.reg.power_saving_class_type_i",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_power_saving_class_type_ii,
+ {
+ "Power saving class type II supported", "wmx.reg.power_saving_class_type_ii",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x02, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_power_saving_class_type_iii,
+ {
+ "Power saving class type III supported", "wmx.reg.power_saving_class_type_iii",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x04, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_multi_active_power_saving_classes,
+ {
+ "Multiple active power saving classes supported", "wmx.reg.multi_active_power_saving_classes",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x08, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_total_power_saving_class_instances,
+ {
+ "Total number of power saving class instances of all", "wmx.reg_req.total_power_saving_class_instances",
+ FT_UINT16, BASE_DEC, NULL, 0x1F0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_power_saving_class_reserved,
+ {
+ "Reserved", "wmx.reg.reserved",
+ FT_UINT16, BASE_DEC, NULL, 0xFE00, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_power_saving_class_capability,
+ {
+ "Power saving class capability", "wmx.reg.power_saving_class_capability",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_ip_phs_sdu_encap,
+ {
+ "Classification/PHS options and SDU encapsulation support", "wmx.reg.ip_phs_sdu_encap",
+ FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_26_method_alloc_ip_addr_secondary_mgmnt_conn,
+ {
+ "Method for allocating IP address for the secondary management connection", "wmx.reg.method_alloc_ip_addr_secondary_mgmnt_conn",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_27_handover_supported,
+ {
+ "Handover Support", "wmx.reg.handover_supported",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_31_mobility_features_supported,
+ {
+ "Mobility Features Supported", "wmx.reg.mobility_features_supported",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_40_arq_ack_type,
+ {
+ "ARQ ACK Type", "wmx.reg.arq_ack_type",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_tlv_t_43_mac_header_ext_header_support,
+ {
+ "MAC header and extended subheader support", "wmx.reg.mac_header_ext_header_support",
+ FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_req_bs_switching_timer,
+ {
+ "BS switching timer", "wmx.reg.bs_switching_timer",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_mgmt_msg_reg_req_decoder
+ };
+
+
+ proto_mac_mgmt_msg_reg_req_decoder = proto_register_protocol (
+ "WiMax REG-REQ Messages", /* name */
+ "WiMax REG-REQ", /* short name */
+ "wmx.reg_req" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_reg_req_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+void proto_reg_handoff_mac_mgmt_msg_reg_req(void)
+{
+ dissector_handle_t reg_req_handle;
+
+ reg_req_handle = create_dissector_handle(dissect_mac_mgmt_msg_reg_req_decoder, proto_mac_mgmt_msg_reg_req_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_REG_REQ, reg_req_handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_reg_rsp.c b/plugins/epan/wimax/msg_reg_rsp.c
new file mode 100644
index 0000000000..6ffbfbdd58
--- /dev/null
+++ b/plugins/epan/wimax/msg_reg_rsp.c
@@ -0,0 +1,379 @@
+/* msg_reg_rsp.c
+ * WiMax MAC Management REG-RSP Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: John R. Underwood <junderx@yahoo.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#define WIMAX_16E_2005
+
+#define FRAG_LAST 0x1
+
+#include <epan/packet.h>
+#include "wimax_tlv.h"
+#include "wimax_mac.h"
+#include "wimax_utils.h"
+
+void proto_register_mac_mgmt_msg_reg_rsp(void);
+void proto_reg_handoff_mac_mgmt_msg_reg_rsp(void);
+
+extern gboolean include_cor2_changes;
+
+static dissector_handle_t dsc_rsp_handle = NULL;
+
+static gint proto_mac_mgmt_msg_reg_rsp_decoder = -1;
+static gint ett_mac_mgmt_msg_reg_rsp_decoder = -1;
+static gint ett_reg_rsp_message_tree = -1;
+
+/* NCT messages */
+
+/* REG-RSP fields */
+static gint hf_reg_rsp_status = -1;
+static gint hf_tlv_type = -1;
+/* static gint hf_tlv_value = -1; */
+static gint hf_reg_rsp_secondary_mgmt_cid = -1;
+static gint hf_reg_invalid_tlv = -1;
+static gint hf_reg_rsp_new_cid_after_ho = -1;
+static gint hf_reg_rsp_service_flow_id = -1;
+static gint hf_reg_rsp_system_resource_retain_time = -1;
+static gint hf_reg_total_provisioned_sf = -1;
+
+/* STRING RESOURCES */
+
+static const value_string vals_reg_rsp_status [] = {
+ {0, "OK"},
+ {1, "Message authentication failure"},
+ {0, NULL}
+};
+
+
+
+/* Decode REG-RSP messages. */
+static int dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tlv_offset;
+ guint tvb_len;
+ proto_item *reg_rsp_item;
+ proto_tree *reg_rsp_tree;
+ proto_item *tlv_item = NULL;
+ proto_tree *tlv_tree = NULL;
+ proto_tree *sub_tree = NULL;
+ gboolean hmac_found = FALSE;
+ tlv_info_t tlv_info;
+ gint tlv_type;
+ guint tlv_len;
+ guint this_offset = 0;
+ tlv_info_t sub_tlv_info;
+ gint sub_tlv_type;
+ gint sub_tlv_len;
+ guint sub_tlv_offset;
+
+ { /* we are being asked for details */
+
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC payload type REG-RSP */
+ reg_rsp_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_reg_rsp_decoder, tvb, offset, tvb_len, "MAC Management Message, REG-RSP");
+ /* add MAC REG-RSP subtree */
+ reg_rsp_tree = proto_item_add_subtree(reg_rsp_item, ett_mac_mgmt_msg_reg_rsp_decoder);
+ proto_tree_add_item(reg_rsp_tree, hf_reg_rsp_status, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ while (offset < tvb_len)
+ {
+ /* Get the TLV data. */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if (tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "REG-RSP TLV error");
+ proto_tree_add_item(reg_rsp_tree, hf_reg_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the offset to the TLV data */
+ tlv_offset = offset + get_tlv_value_offset(&tlv_info);
+
+ switch (tlv_type) {
+ case REG_ARQ_PARAMETERS:
+ case REG_SS_MGMT_SUPPORT:
+ case REG_IP_MGMT_MODE:
+ case REG_IP_VERSION:
+ case REG_UL_TRANSPORT_CIDS_SUPPORTED:
+ case REG_IP_PHS_SDU_ENCAP:
+ case REG_MAX_CLASSIFIERS_SUPPORTED:
+ case REG_PHS_SUPPORT:
+ case REG_ARQ_SUPPORT:
+ case REG_DSX_FLOW_CONTROL:
+ case REG_MCA_FLOW_CONTROL:
+ case REG_MCAST_POLLING_CIDS:
+ case REG_NUM_DL_TRANS_CID:
+ case REG_MAC_ADDRESS:
+#ifdef WIMAX_16E_2005
+ case REG_TLV_T_20_MAX_MAC_DATA_PER_FRAME_SUPPORT:
+ case REG_TLV_T_21_PACKING_SUPPORT:
+ case REG_TLV_T_22_MAC_EXTENDED_RTPS_SUPPORT:
+ case REG_TLV_T_23_MAX_NUM_BURSTS_TRANSMITTED_CONCURRENTLY_TO_THE_MS:
+ case REG_TLV_T_26_METHOD_FOR_ALLOCATING_IP_ADDR_SECONDARY_MGMNT_CONNECTION:
+ case REG_TLV_T_27_HANDOVER_SUPPORTED:
+ case REG_TLV_T_29_HO_PROCESS_OPTIMIZATION_MS_TIMER:
+ case REG_TLV_T_31_MOBILITY_FEATURES_SUPPORTED:
+ case REG_TLV_T_40_ARQ_ACK_TYPE:
+ case REG_TLV_T_41_MS_HO_CONNECTIONS_PARAM_PROCESSING_TIME:
+ case REG_TLV_T_42_MS_HO_TEK_PROCESSING_TIME:
+ case REG_TLV_T_43_MAC_HEADER_AND_EXTENDED_SUBHEADER_SUPPORT:
+ case REG_POWER_SAVING_CLASS_CAPABILITY:
+#endif
+ dissect_extended_tlv(reg_rsp_tree, tlv_type, tvb, tlv_offset, tlv_len, pinfo, offset, proto_mac_mgmt_msg_reg_rsp_decoder);
+ break;
+ case REG_RSP_SECONDARY_MGMT_CID:
+ add_tlv_subtree(&tlv_info, reg_rsp_tree, hf_reg_rsp_secondary_mgmt_cid, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+
+ case REG_RSP_TLV_T_36_TOTAL_PROVISIONED_SERVICE_FLOW_DSAs:
+ add_tlv_subtree(&tlv_info, reg_rsp_tree, hf_reg_total_provisioned_sf, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+
+ case REG_RSP_TLV_T_24_CID_UPDATE_ENCODINGS:
+ /* Display CID update encodings */
+ /* add subtree */
+ sub_tree = add_protocol_subtree(&tlv_info, ett_reg_rsp_message_tree, reg_rsp_tree, proto_mac_mgmt_msg_reg_rsp_decoder, tvb, offset, tlv_len, "CID update encodings");
+ /* Use a local copy of tlv_offset */
+ this_offset = tlv_offset;
+ while(this_offset < tlv_len) {
+ /* Get the sub TLV data. */
+ init_tlv_info(&sub_tlv_info, tvb, this_offset);
+ /* get the sub TLV type */
+ sub_tlv_type = get_tlv_type(&sub_tlv_info);
+ /* get the TLV length */
+ sub_tlv_len = get_tlv_length(&sub_tlv_info);
+ if (tlv_type == -1 || sub_tlv_len > MAX_TLV_LEN || sub_tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "REG-RSP TLV error");
+ proto_tree_add_item(reg_rsp_tree, hf_reg_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the offset to the sub TLV data */
+ sub_tlv_offset = this_offset + get_tlv_value_offset(&sub_tlv_info);
+ switch (sub_tlv_type) {
+ case REG_RSP_TLV_T_24_1_CID_UPDATE_ENCODINGS_NEW_CID:
+ add_tlv_subtree(&sub_tlv_info, sub_tree, hf_reg_rsp_new_cid_after_ho, tvb, this_offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_RSP_TLV_T_24_2_CID_UPDATE_ENCODINGS_SFID:
+ add_tlv_subtree(&sub_tlv_info, sub_tree, hf_reg_rsp_service_flow_id, tvb, this_offset, ENC_BIG_ENDIAN);
+ break;
+ case REG_RSP_TLV_T_24_3_CID_UPDATE_ENCODINGS_CONNECTION_INFO:
+ tlv_tree = add_protocol_subtree(&sub_tlv_info, ett_reg_rsp_message_tree, sub_tree, proto_mac_mgmt_msg_reg_rsp_decoder, tvb, this_offset, sub_tlv_len, "CID Update Encodings Connection Info");
+ /* Decode the DSC_RSP subTLV's */
+ call_dissector(dsc_rsp_handle, tvb_new_subset_length(tvb, sub_tlv_offset, sub_tlv_len), pinfo, tlv_tree);
+ break;
+ default:
+ add_tlv_subtree(&sub_tlv_info, sub_tree, hf_tlv_type, tvb, this_offset, ENC_NA);
+ break;
+ }
+ this_offset = sub_tlv_len + sub_tlv_offset;
+ }
+ break;
+ case REG_RSP_TLV_T_28_HO_SYSTEM_RESOURCE_RETAIN_TIME:
+ tlv_item = add_tlv_subtree(&tlv_info, reg_rsp_tree, hf_reg_rsp_system_resource_retain_time, tvb, offset, ENC_BIG_ENDIAN);
+ if (include_cor2_changes) {
+ proto_item_append_text(tlv_item, " (in units of 100 milliseconds)");
+ } else {
+ proto_item_append_text(tlv_item, " (multiple of 100 milliseconds)");
+ }
+ break;
+ case DSx_UPLINK_FLOW:
+ /* display Uplink Service Flow Encodings info */
+ /* add subtree */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_reg_rsp_decoder, reg_rsp_tree, proto_mac_mgmt_msg_reg_rsp_decoder, tvb, offset, tlv_len, "Uplink Service Flow Encodings");
+ /* decode and display the DL Service Flow Encodings */
+ wimax_service_flow_encodings_decoder(tvb_new_subset_length(tvb, tlv_offset, tlv_len), pinfo, tlv_tree);
+ break;
+ case DSx_DOWNLINK_FLOW:
+ /* display Downlink Service Flow Encodings info */
+ /* add subtree */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_reg_rsp_decoder, reg_rsp_tree, proto_mac_mgmt_msg_reg_rsp_decoder, tvb, offset, tlv_len, "Downlink Service Flow Encodings");
+ /* decode and display the DL Service Flow Encodings */
+ wimax_service_flow_encodings_decoder(tvb_new_subset_length(tvb, tlv_offset, tlv_len), pinfo, tlv_tree);
+ break;
+ case HMAC_TUPLE: /* Table 348d */
+ /* decode and display the HMAC Tuple */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_reg_rsp_decoder, reg_rsp_tree, proto_mac_mgmt_msg_reg_rsp_decoder, tvb, offset, tlv_len, "HMAC Tuple");
+ wimax_hmac_tuple_decoder(tlv_tree, tvb, offset+2, tlv_len);
+ hmac_found = TRUE;
+ break;
+ case CMAC_TUPLE: /* Table 348b */
+ /* decode and display the CMAC Tuple */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_reg_rsp_decoder, reg_rsp_tree, proto_mac_mgmt_msg_reg_rsp_decoder, tvb, offset, tlv_len, "CMAC Tuple");
+ wimax_cmac_tuple_decoder(tlv_tree, tvb, offset+2, tlv_len);
+ break;
+ case SHORT_HMAC_TUPLE:
+ case SHORT_HMAC_TUPLE_COR2:
+ if ((!include_cor2_changes && (tlv_type == SHORT_HMAC_TUPLE)) ||
+ (include_cor2_changes && (tlv_type == SHORT_HMAC_TUPLE_COR2))) {
+ /* decode and display the Short HMAC Tuple */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_reg_rsp_decoder, reg_rsp_tree, proto_mac_mgmt_msg_reg_rsp_decoder, tvb, offset, tlv_len, "Short HMAC Tuple");
+ wimax_short_hmac_tuple_decoder(tlv_tree, tvb, tlv_offset, tlv_len);
+ } else {
+ /* Unknown TLV Type */
+ add_tlv_subtree(&tlv_info, reg_rsp_tree, hf_tlv_type, tvb, offset, ENC_NA);
+ }
+ break;
+ case VENDOR_SPECIFIC_INFO:
+ case VENDOR_ID_ENCODING:
+ case MAC_VERSION_ENCODING:
+ wimax_common_tlv_encoding_decoder(tvb_new_subset_length(tvb, offset, (tvb_len - offset)), pinfo, reg_rsp_tree);
+ break;
+ default:
+ add_tlv_subtree(&tlv_info, reg_rsp_tree, hf_tlv_type, tvb, offset, ENC_NA);
+ break;
+ }
+
+ offset = tlv_len + tlv_offset;
+ } /* end of TLV process while loop */
+ if (!hmac_found)
+ proto_item_append_text(reg_rsp_tree, " (HMAC Tuple is missing !)");
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_reg_rsp(void)
+{
+ /* REG-RSP fields display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_reg_invalid_tlv,
+ {
+ "Invalid TLV", "wmx.reg_rsp.invalid_tlv",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_rsp_new_cid_after_ho,
+ {
+ "New CID after handover to new BS", "wmx.reg_rsp.new_cid_after_ho",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_rsp_status,
+ {
+ "Response", "wmx.reg_rsp.response",
+ FT_UINT8, BASE_HEX, VALS(vals_reg_rsp_status), 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_rsp_secondary_mgmt_cid,
+ {
+ "Secondary Management CID", "wmx.reg_rsp.secondary_mgmt_cid",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_total_provisioned_sf,
+ {
+ "Total Number of Provisional Service Flow", "wmx.reg_rsp.total_provisional_sf",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_rsp_service_flow_id,
+ {
+ "Service flow ID", "wmx.reg_rsp.service_flow_id",
+ FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_reg_rsp_system_resource_retain_time,
+ {
+ "System Resource Retain Time", "wmx.reg_rsp.system_resource_retain_time",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_tlv_type,
+ {
+ "Unknown TLV Type", "wmx.reg_rsp.unknown_tlv_type",
+ FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_tlv_value,
+ {
+ "Value", "wmx.reg_rsp.tlv_value",
+ FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ }
+#endif
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_mgmt_msg_reg_rsp_decoder,
+ &ett_reg_rsp_message_tree
+ };
+
+ proto_mac_mgmt_msg_reg_rsp_decoder = proto_register_protocol (
+ "WiMax REG-RSP Messages", /* name */
+ "WiMax REG-RSP", /* short name */
+ "wmx.reg_rsp" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_reg_rsp_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ register_dissector("mac_mgmt_msg_reg_rsp_handler", dissect_mac_mgmt_msg_reg_rsp_decoder, -1);
+}
+
+void proto_reg_handoff_mac_mgmt_msg_reg_rsp(void)
+{
+ dissector_handle_t reg_rsp_handle;
+
+ dsc_rsp_handle = find_dissector("mac_mgmt_msg_dsc_rsp_handler");
+
+ reg_rsp_handle = create_dissector_handle(dissect_mac_mgmt_msg_reg_rsp_decoder, proto_mac_mgmt_msg_reg_rsp_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_REG_RSP, reg_rsp_handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_rep.c b/plugins/epan/wimax/msg_rep.c
new file mode 100644
index 0000000000..4b1f60ccff
--- /dev/null
+++ b/plugins/epan/wimax/msg_rep.c
@@ -0,0 +1,1576 @@
+/* msg_rep.c
+ * WiMax MAC Management REP-REQ/RSP Messages decoders
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#if 0
+#define DEBUG /* for debug only*/
+#endif
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax_tlv.h"
+#include "wimax_mac.h"
+#include "wimax_utils.h"
+
+void proto_register_mac_mgmt_msg_rep(void);
+void proto_reg_handoff_mac_mgmt_msg_rep(void);
+
+static gint proto_mac_mgmt_msg_rep_decoder = -1;
+static gint ett_mac_mgmt_msg_rep_req_decoder = -1;
+static gint ett_mac_mgmt_msg_rep_rsp_decoder = -1;
+
+static const value_string vals_channel_types[] =
+{
+ { 0, "Normal Subchannel"},
+ { 1, "Band AMC Channel"},
+ { 2, "Safety Channel"},
+ { 3, "Sounding"},
+ { 0, NULL}
+};
+
+static const value_string vals_type_of_zones[] =
+{
+ { 0, "PUSC Zone with 'use all SC=0'"},
+ { 1, "PUSC Zone with 'use all SC=1'/PUSC AAS Zone"},
+ { 2, "FUSC Zone"},
+ { 3, "Optional FUSC Zone"},
+ { 4, "Safety Channel Region"},
+ { 5, "AMC Zone (only applicable to AAS zone)"},
+ { 6, "Reserved"},
+ { 7, "Reserved"},
+ { 0, NULL}
+};
+
+static const value_string vals_data_cinr_measurements[] =
+{
+ { 0, "From Pilot Subcarriers"},
+ { 1, "From Data Subcarriers"},
+ { 0, NULL}
+};
+
+static const value_string vals_cinr_report_types[] =
+{
+ { 0, "Mean Of CINR Only"},
+ { 1, "Both Mean And Standard Deviation Of CINR"},
+ { 0, NULL}
+};
+
+static const value_string vals_type_of_measurements[] =
+{
+ { 0, "From Preamble For Frequency Reuse Configuration 1"},
+ { 1, "From Preamble For Frequency Reuse Configuration 3"},
+ { 2, "From Preamble For Band AMC"},
+ { 3, "Reserved"},
+ { 0, NULL}
+};
+
+/* fix fields */
+static gint hf_rep_unknown_type = -1;
+static gint hf_rep_invalid_tlv = -1;
+
+static gint hf_rep_req_report_request = -1;
+static gint hf_rep_req_report_type = -1;
+static gint hf_rep_req_rep_type_bit0 = -1;
+static gint hf_rep_req_rep_type_bit1 = -1;
+static gint hf_rep_req_rep_type_bit2 = -1;
+static gint hf_rep_req_rep_type_bit3_6 = -1;
+static gint hf_rep_req_rep_type_bit7 = -1;
+static gint hf_rep_req_channel_number = -1;
+static gint hf_rep_req_channel_type = -1;
+static gint hf_rep_req_channel_type_request = -1;
+static gint hf_rep_req_channel_type_reserved = -1;
+static gint hf_rep_req_zone_spec_phy_cinr_request = -1;
+static gint hf_rep_req_preamble_phy_cinr_request = -1;
+static gint hf_rep_req_zone_spec_effective_cinr_request = -1;
+static gint hf_rep_req_preamble_effective_cinr_request = -1;
+static gint hf_rep_req_channel_selectivity_report = -1;
+
+static gint hf_rep_req_zone_spec_phy_cinr_req_bit0_2 = -1;
+static gint hf_rep_req_zone_spec_phy_cinr_req_bit3 = -1;
+static gint hf_rep_req_zone_spec_phy_cinr_req_bit4 = -1;
+static gint hf_rep_req_zone_spec_phy_cinr_req_bit5_6 = -1;
+static gint hf_rep_req_zone_spec_phy_cinr_req_bit7 = -1;
+static gint hf_rep_req_zone_spec_phy_cinr_req_bit8_13 = -1;
+static gint hf_rep_req_zone_spec_phy_cinr_req_bit14_17 = -1;
+static gint hf_rep_req_zone_spec_phy_cinr_req_bit18 = -1;
+static gint hf_rep_req_zone_spec_phy_cinr_req_bit19_23 = -1;
+
+static gint hf_rep_req_zone_spec_effective_cinr_req_bit0_2 = -1;
+static gint hf_rep_req_zone_spec_effective_cinr_req_bit3 = -1;
+static gint hf_rep_req_zone_spec_effective_cinr_req_bit4 = -1;
+static gint hf_rep_req_zone_spec_effective_cinr_req_bit5_6 = -1;
+static gint hf_rep_req_zone_spec_effective_cinr_req_bit7 = -1;
+static gint hf_rep_req_zone_spec_effective_cinr_req_bit8_13 = -1;
+static gint hf_rep_req_zone_spec_effective_cinr_req_bit14_15 = -1;
+
+static gint hf_rep_req_preamble_phy_cinr_req_bit0_1 = -1;
+static gint hf_rep_req_preamble_phy_cinr_req_bit2_5 = -1;
+static gint hf_rep_req_preamble_phy_cinr_req_bit6 = -1;
+static gint hf_rep_req_preamble_phy_cinr_req_bit7 = -1;
+
+static gint hf_rep_req_preamble_effective_cinr_req_bit0_1 = -1;
+static gint hf_rep_req_preamble_effective_cinr_req_bit2_7 = -1;
+
+static gint hf_rep_req_channel_selectivity_rep_bit0 = -1;
+static gint hf_rep_req_channel_selectivity_rep_bit1_7 = -1;
+
+static gint hf_rep_rsp_report_type = -1;
+static gint hf_rep_rsp_report_type_channel_number = -1;
+static gint hf_rep_rsp_report_type_frame_number = -1;
+static gint hf_rep_rsp_report_type_duration = -1;
+static gint hf_rep_rsp_report_type_basic_report = -1;
+static gint hf_rep_rsp_report_type_basic_report_bit0 = -1;
+static gint hf_rep_rsp_report_type_basic_report_bit1 = -1;
+static gint hf_rep_rsp_report_type_basic_report_bit2 = -1;
+static gint hf_rep_rsp_report_type_basic_report_bit3 = -1;
+static gint hf_rep_rsp_report_type_basic_report_reserved = -1;
+static gint hf_rep_rsp_report_type_cinr_report = -1;
+static gint hf_rep_rsp_report_type_cinr_report_mean = -1;
+static gint hf_rep_rsp_report_type_cinr_report_deviation = -1;
+static gint hf_rep_rsp_report_type_rssi_report = -1;
+static gint hf_rep_rsp_report_type_rssi_report_mean = -1;
+static gint hf_rep_rsp_report_type_rssi_report_deviation = -1;
+static gint hf_rep_rsp_current_transmitted_power = -1;
+static gint hf_rep_rsp_channel_type_report = -1;
+static gint hf_rep_rsp_channel_type_subchannel = -1;
+static gint hf_rep_rsp_channel_type_band_amc = -1;
+static gint hf_rep_rsp_channel_type_safety_channel = -1;
+static gint hf_rep_rsp_channel_type_enhanced_band_amc = -1;
+static gint hf_rep_rsp_channel_type_sounding = -1;
+
+static gint hf_rep_rsp_zone_spec_phy_cinr_report = -1;
+static gint hf_rep_rsp_zone_spec_phy_cinr_rep_mean = -1;
+static gint hf_rep_rsp_zone_spec_phy_cinr_rep_report_type = -1;
+static gint hf_rep_rsp_zone_spec_phy_cinr_rep_reserved1 = -1;
+static gint hf_rep_rsp_zone_spec_phy_cinr_rep_deviation = -1;
+static gint hf_rep_rsp_zone_spec_phy_cinr_rep_reserved2 = -1;
+static gint hf_rep_rsp_zone_spec_phy_cinr_rep_pusc_sc0 = -1;
+static gint hf_rep_rsp_zone_spec_phy_cinr_rep_pusc_sc1 = -1;
+static gint hf_rep_rsp_zone_spec_phy_cinr_rep_fusc = -1;
+static gint hf_rep_rsp_zone_spec_phy_cinr_rep_optional_fusc = -1;
+static gint hf_rep_rsp_zone_spec_phy_cinr_rep_safety_channel = -1;
+static gint hf_rep_rsp_zone_spec_phy_cinr_rep_amc = -1;
+static gint hf_rep_rsp_preamble_phy_cinr_report = -1;
+static gint hf_rep_rsp_preamble_phy_cinr_rep_configuration_1 = -1;
+static gint hf_rep_rsp_preamble_phy_cinr_rep_configuration_3 = -1;
+static gint hf_rep_rsp_preamble_phy_cinr_rep_band_amc_zone = -1;
+static gint hf_rep_rsp_zone_spec_effective_cinr_report = -1;
+static gint hf_rep_rsp_zone_spec_effective_cinr_rep_effective_cinr = -1;
+static gint hf_rep_rsp_zone_spec_effective_cinr_rep_report_type = -1;
+static gint hf_rep_rsp_zone_spec_effective_cinr_rep_cqich_id = -1;
+static gint hf_rep_rsp_preamble_effective_cinr_report = -1;
+static gint hf_rep_rsp_preamble_effective_cinr_rep_cqich_id = -1;
+static gint hf_rep_rsp_channel_selectivity_report = -1;
+static gint hf_rep_rsp_zone_spec_effective_cinr_rep_pusc_sc0 = -1;
+static gint hf_rep_rsp_zone_spec_effective_cinr_rep_pusc_sc1 = -1;
+static gint hf_rep_rsp_zone_spec_effective_cinr_rep_fusc = -1;
+static gint hf_rep_rsp_zone_spec_effective_cinr_rep_optional_fusc = -1;
+static gint hf_rep_rsp_zone_spec_effective_cinr_rep_amc_aas = -1;
+static gint hf_rep_rsp_preamble_effective_cinr_rep_configuration_1 = -1;
+static gint hf_rep_rsp_preamble_effective_cinr_rep_configuration_3 = -1;
+static gint hf_rep_rsp_channel_selectivity_rep_frequency_a = -1;
+static gint hf_rep_rsp_channel_selectivity_rep_frequency_b = -1;
+static gint hf_rep_rsp_channel_selectivity_rep_frequency_c = -1;
+
+/* bit masks */
+#define REP_REQ_REPORT_TYPE_BIT0 0x01
+#define REP_REQ_REPORT_TYPE_BIT1 0x02
+#define REP_REQ_REPORT_TYPE_BIT2 0x04
+#define REP_REQ_REPORT_TYPE_BIT3_6 0x78
+#define REP_REQ_REPORT_TYPE_BIT7 0x80
+
+#define REP_REQ_CHANNEL_TYPE_REQUEST 0x03
+#define REP_REQ_CHANNEL_TYPE_RESERVED 0xFC
+
+#define REP_REQ_TYPE_OF_ZONE_REQUEST_BIT0_2 0x000007
+#define REP_REQ_TYPE_OF_ZONE_REQUEST_BIT3 0x000008
+#define REP_REQ_TYPE_OF_ZONE_REQUEST_BIT4 0x000010
+#define REP_REQ_TYPE_OF_ZONE_REQUEST_BIT5_6 0x000060
+#define REP_REQ_TYPE_OF_ZONE_REQUEST_BIT7 0x000080
+#define REP_REQ_TYPE_OF_ZONE_REQUEST_BIT8_13 0x003F00
+#define REP_REQ_TYPE_OF_ZONE_REQUEST_BIT14_17 0x03C000
+#define REP_REQ_TYPE_OF_ZONE_REQUEST_BIT18 0x040000
+#define REP_REQ_TYPE_OF_ZONE_REQUEST_BIT19_23 0xF80000
+
+#define REP_REQ_TYPE_OF_ZONE_REQUEST_16_BIT0_2 0x0007
+#define REP_REQ_TYPE_OF_ZONE_REQUEST_16_BIT3 0x0008
+#define REP_REQ_TYPE_OF_ZONE_REQUEST_16_BIT4 0x0010
+#define REP_REQ_TYPE_OF_ZONE_REQUEST_16_BIT5_6 0x0060
+#define REP_REQ_TYPE_OF_ZONE_REQUEST_16_BIT7 0x0080
+#define REP_REQ_TYPE_OF_ZONE_REQUEST_16_BIT8_13 0x3F00
+#define REP_REQ_TYPE_OF_ZONE_REQUEST_16_BIT14_15 0xC000
+
+#define REP_REQ_PREAMBLE_PHY_CINR_REQUEST_BIT0_1 0x03
+#define REP_REQ_PREAMBLE_PHY_CINR_REQUEST_BIT2_5 0x3C
+#define REP_REQ_PREAMBLE_PHY_CINR_REQUEST_BIT6 0x40
+#define REP_REQ_PREAMBLE_PHY_CINR_REQUEST_BIT7 0x80
+
+#define REP_REQ_PREAMBLE_EFFECTIVE_CINR_REQUEST_BIT0_1 0x03
+#define REP_REQ_PREAMBLE_EFFECTIVE_CINR_REQUEST_BIT2_7 0xFC
+
+#define REP_REQ_CHANNEL_SELECTIVITY_REPORT_BIT0 0x01
+#define REP_REQ_CHANNEL_SELECTIVITY_REPORT_BIT1_7 0xFE
+
+#define REP_RSP_REPORT_TYPE_BASIC_REPORT_BIT0 0x01
+#define REP_RSP_REPORT_TYPE_BASIC_REPORT_BIT1 0x02
+#define REP_RSP_REPORT_TYPE_BASIC_REPORT_BIT2 0x04
+#define REP_RSP_REPORT_TYPE_BASIC_REPORT_BIT3 0x08
+#define REP_RSP_REPORT_TYPE_BASIC_REPORT_RSV 0xF0
+
+#define REP_RSP_ZONE_SPEC_PHY_CINR_MEAN_MASK 0x1F
+#define REP_RSP_ZONE_SPEC_PHY_CINR_REP_TYPE_MASK 0x20
+#define REP_RSP_ZONE_SPEC_PHY_CINR_RSV1_MASK 0xC0
+#define REP_RSP_ZONE_SPEC_PHY_CINR_DEVIATION_MASK 0x1F
+#define REP_RSP_ZONE_SPEC_PHY_CINR_RSV2_MASK 0xE0
+
+#define REP_RSP_ZONE_SPEC_EFFECTIVE_CINR_EFFECTIVE_CINR_MASK 0x0F
+#define REP_RSP_ZONE_SPEC_EFFECTIVE_CINR_REPORT_TYPE_MASK 0x10
+#define REP_RSP_ZONE_SPEC_EFFECTIVE_CINR_CQICH_ID_MASK 0xE0
+#define REP_RSP_ZONE_SPEC_EFFECTIVE_CINR_CQICH_ID_4_MASK 0xF0
+
+
+/* Wimax Mac REP-REQ Message Dissector */
+static int dissect_mac_mgmt_msg_rep_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tvb_len;
+ gint tlv_type, tlv_len, tlv_value_offset, length, tlv_offset;
+ proto_item *rep_item, *tlv_item, *ti_item;
+ proto_tree *rep_tree, *tlv_tree, *ti_tree;
+ tlv_info_t tlv_info;
+
+ { /* we are being asked for details */
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC payload type REP-REQ */
+ rep_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_rep_decoder, tvb, offset, -1, "Report Request (REP-REQ)");
+ /* add MAC REP-REQ subtree */
+ rep_tree = proto_item_add_subtree(rep_item, ett_mac_mgmt_msg_rep_req_decoder);
+
+ /* process the REP-REQ TLVs */
+ while(offset < tvb_len)
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "REP-REQ TLV error");
+ proto_tree_add_item(rep_tree, hf_rep_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(rep_tree, proto_mac_mgmt_msg_rep_decoder, tvb, offset, (tlv_len + tlv_value_offset), "REP-REQ Type: %u (%u bytes, offset=%u, length=%u, tvb_len=%u)", tlv_type, (tlv_len + tlv_value_offset), offset, tlv_len, tvb_len);
+#endif
+ /* update the offset for the TLV value */
+ offset += tlv_value_offset;
+ /* process REP-REQ TLV Encoded information (11.11) */
+ switch (tlv_type)
+ {
+ case REP_REQ_REPORT_REQUEST:
+ /* process the REP-REQ report request TLVs */
+ tlv_item = add_tlv_subtree(&tlv_info, rep_tree, hf_rep_req_report_request, tvb, offset-tlv_value_offset, FALSE);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rep_req_decoder);
+ for( tlv_offset = 0; tlv_offset < tlv_len; )
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, (offset + tlv_offset));
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ length = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "REP-REQ Report Request TLV error");
+ proto_tree_add_item(tlv_tree, hf_rep_invalid_tlv, tvb, (offset + tlv_offset), (tlv_len - offset - tlv_offset), ENC_NA);
+ break;
+ }
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(rep_tree, proto_mac_mgmt_msg_rep_decoder, tvb, offset, (length + tlv_value_offset), "REP-REQ Report Request Type: %u (%u bytes, offset=%u, length=%u, tvb_len=%u)", tlv_type, (length + tlv_value_offset), offset, length, tvb_len);
+#endif
+ /* update the offset */
+ tlv_offset += get_tlv_value_offset(&tlv_info);
+ switch (tlv_type)
+ {
+ case REP_REQ_REPORT_TYPE:
+ /* decode and display the Report type */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_req_report_type, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_req_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_req_rep_type_bit0, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_rep_type_bit1, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_rep_type_bit2, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_rep_type_bit3_6, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+/* proto_item_append_text(ti, " dB");*/
+ proto_tree_add_item(ti_tree, hf_rep_req_rep_type_bit7, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ break;
+ case REP_REQ_CHANNEL_NUMBER:
+ /* decode and display the Channel Number */
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_req_channel_number, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ case REP_REQ_CHANNEL_TYPE:
+ /* decode and display the Channel Type */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_req_channel_type, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_req_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_req_channel_type_request, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_channel_type_reserved, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ break;
+ case REP_REQ_ZONE_SPEC_PHY_CINR_REQ:
+ /* decode and display the zone specific physical cinr request */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_req_zone_spec_phy_cinr_request, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_req_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_req_zone_spec_phy_cinr_req_bit0_2, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_zone_spec_phy_cinr_req_bit3, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_zone_spec_phy_cinr_req_bit4, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_zone_spec_phy_cinr_req_bit5_6, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_zone_spec_phy_cinr_req_bit7, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_zone_spec_phy_cinr_req_bit8_13, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_zone_spec_phy_cinr_req_bit14_17, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_zone_spec_phy_cinr_req_bit18, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_zone_spec_phy_cinr_req_bit19_23, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ break;
+ case REP_REQ_PREAMBLE_PHY_CINR_REQ:
+ /* decode and display the preamble phy cinr request */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_req_preamble_phy_cinr_request, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_req_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_req_preamble_phy_cinr_req_bit0_1, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_preamble_phy_cinr_req_bit2_5, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_preamble_phy_cinr_req_bit6, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_preamble_phy_cinr_req_bit7, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ break;
+ case REP_REQ_ZONE_SPEC_EFF_CINR_REQ:
+ /* decode and display the zone specific effective cinr request */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_req_zone_spec_effective_cinr_request, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_req_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_req_zone_spec_effective_cinr_req_bit0_2, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_zone_spec_effective_cinr_req_bit3, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_zone_spec_effective_cinr_req_bit4, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_zone_spec_effective_cinr_req_bit5_6, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ /* proto_item_append_text(ti, " dB");*/
+ proto_tree_add_item(ti_tree, hf_rep_req_zone_spec_effective_cinr_req_bit7, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_zone_spec_effective_cinr_req_bit8_13, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_zone_spec_effective_cinr_req_bit14_15, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ break;
+ case REP_REQ_PREAMBLE_EFF_CINR_REQ:
+ /* decode and display the preamble effective cinr request */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_req_preamble_effective_cinr_request, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_req_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_req_preamble_effective_cinr_req_bit0_1, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_preamble_effective_cinr_req_bit2_7, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ break;
+ case REP_REQ_CHANNEL_SELECTIVITY_REPORT:
+ /* decode and display the channel selectivity report */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_req_channel_selectivity_report, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_req_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_req_channel_selectivity_rep_bit0, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_req_channel_selectivity_rep_bit1_7, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ break;
+ default:
+ /* display the unknown tlv in hex */
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_unknown_type, tvb, (offset + tlv_offset), ENC_NA);
+ break;
+ }
+ tlv_offset += length;
+ } /* end of TLV process for loop */
+ break;
+ default:
+ /* display the unknown tlv in hex */
+ add_tlv_subtree(&tlv_info, rep_tree, hf_rep_unknown_type, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ }
+ offset += tlv_len;
+ } /* end of TLV process while loop */
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Wimax Mac REP-RSP Message Dissector */
+static int dissect_mac_mgmt_msg_rep_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tvb_len, length, value;
+ gint tlv_type, tlv_len, tlv_value_offset, tlv_offset;
+ gint db_val;
+ proto_item *rep_item, *tlv_item, *ti, *ti_item;
+ proto_tree *rep_tree, *tlv_tree, *ti_tree;
+ tlv_info_t tlv_info;
+ gfloat current_power;
+
+ { /* we are being asked for details */
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC payload type REP-RSP */
+ rep_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_rep_decoder, tvb, offset, -1, "Report Response (REP-RSP)");
+ /* add MAC REP-RSP subtree */
+ rep_tree = proto_item_add_subtree(rep_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ /* Decode and display the Report Response message (REP-RSP) */
+
+ /* process the REP-RSP TLVs */
+ while(offset < tvb_len)
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "REP-RSP TLV error");
+ proto_tree_add_item(rep_tree, hf_rep_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(rep_tree, proto_mac_mgmt_msg_rep_decoder, tvb, offset, (tlv_len + tlv_value_offset), "REP-RSP Type: %u (%u bytes, offset=%u, tlv_len=%u, tvb_len=%u)", tlv_type, (tlv_len + tlv_value_offset), offset, tlv_len, tvb_len);
+#endif
+ /* update the offset for the TLV value */
+ offset += tlv_value_offset;
+ /* process REP-RSP TLV Encoded information (11.12) */
+ switch (tlv_type)
+ {
+ case REP_RSP_REPORT_TYPE:
+ /* decode and display the Report type */
+ tlv_item = add_tlv_subtree(&tlv_info, rep_tree, hf_rep_rsp_report_type, tvb, offset-tlv_value_offset, ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ for( tlv_offset = 0; tlv_offset < tlv_len; )
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, (offset + tlv_offset));
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ length = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "REP-RSP report subtype TLV error");
+ proto_tree_add_item(tlv_tree, hf_rep_invalid_tlv, tvb, offset, (tlv_len - offset - tlv_offset), ENC_NA);
+ break;
+ }
+ /* update the offset */
+ tlv_offset += get_tlv_value_offset(&tlv_info);
+ switch (tlv_type)
+ {
+ case REP_RSP_REPORT_CHANNEL_NUMBER:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_report_type_channel_number, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ case REP_RSP_REPORT_START_FRAME:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_report_type_frame_number, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ case REP_RSP_REPORT_DURATION:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_report_type_duration, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ case REP_RSP_REPORT_BASIC_REPORT:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_report_type_basic_report, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_report_type_basic_report_bit0, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_report_type_basic_report_bit1, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_report_type_basic_report_bit2, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_report_type_basic_report_bit3, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_report_type_basic_report_reserved, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ break;
+ case REP_RSP_REPORT_CINR_REPORT:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_report_type_cinr_report, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ db_val = tvb_get_guint8(tvb, offset + tlv_offset) - 20;
+ if (db_val > 37)
+ db_val = 37;
+ proto_item_append_text(ti_item, " (%d dBm)", db_val);
+ ti = proto_tree_add_item(ti_tree, hf_rep_rsp_report_type_cinr_report_deviation, tvb, (offset + tlv_offset +1), 1, ENC_BIG_ENDIAN);
+ db_val = tvb_get_guint8(tvb, offset + tlv_offset + 1) - 20;
+ if (db_val > 37)
+ db_val = 37;
+ proto_item_append_text(ti, " (%d dBm)", db_val);
+ break;
+ case REP_RSP_REPORT_RSSI_REPORT:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_report_type_rssi_report, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ ti = proto_tree_add_item(ti_tree, hf_rep_rsp_report_type_rssi_report_mean, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ db_val = tvb_get_guint8(tvb, offset + tlv_offset) - 123;
+ if (db_val > -40)
+ db_val = -40;
+ proto_item_append_text(ti, " (%d dBm)", db_val);
+ ti = proto_tree_add_item(ti_tree, hf_rep_rsp_report_type_rssi_report_deviation, tvb, (offset + tlv_offset +1), 1, ENC_BIG_ENDIAN);
+ db_val = tvb_get_guint8(tvb, offset + tlv_offset + 1) - 123;
+ if (db_val > -40)
+ db_val = -40;
+ proto_item_append_text(ti, " (%d dBm)", db_val);
+ break;
+ default:
+ /* display the unknown tlv in hex */
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_unknown_type, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ break;
+ }
+ tlv_offset += length;
+ }
+ break;
+ case REP_RSP_CHANNEL_TYPE:
+ /* decode and display the Channel Type */
+ tlv_item = add_tlv_subtree(&tlv_info, rep_tree, hf_rep_rsp_channel_type_report, tvb, offset-tlv_value_offset, ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ for( tlv_offset = 0; tlv_offset < tlv_len; )
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, (offset + tlv_offset));
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ length = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "REP-RSP channel subtype TLV error");
+ proto_tree_add_item(tlv_tree, hf_rep_invalid_tlv, tvb, offset, (tlv_len - offset - tlv_offset), ENC_NA);
+ break;
+ }
+
+ switch (tlv_type)
+ {
+ case REP_RSP_CHANNEL_TYPE_SUBCHANNEL:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_channel_type_subchannel, tvb, (offset + tlv_offset), ENC_BIG_ENDIAN);
+ break;
+ case REP_RSP_CHANNEL_TYPE_BAND_AMC:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_channel_type_band_amc, tvb, (offset + tlv_offset), ENC_BIG_ENDIAN);
+ break;
+ case REP_RSP_CHANNEL_TYPE_SAFETY_CHANNEL:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_channel_type_safety_channel, tvb, (offset + tlv_offset), ENC_NA);
+ break;
+ case REP_RSP_CHANNEL_TYPE_ENHANCED_BAND_AMC:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_channel_type_enhanced_band_amc, tvb, (offset + tlv_offset), ENC_NA);
+ break;
+ case REP_RSP_CHANNEL_TYPE_SOUNDING:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_channel_type_sounding, tvb, (offset + tlv_offset), ENC_BIG_ENDIAN);
+ break;
+ default:
+ /* display the unknown tlv in hex */
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_unknown_type, tvb, (offset + tlv_offset), ENC_NA);
+ break;
+ }
+ tlv_offset += (length + get_tlv_value_offset(&tlv_info));
+ }
+ break;
+ case REP_RSP_ZONE_SPECIFIC_PHY_CINR:
+ /* decode and display the zone-specific physical CINR report type */
+ tlv_item = add_tlv_subtree(&tlv_info, rep_tree, hf_rep_rsp_zone_spec_phy_cinr_report, tvb, offset-tlv_value_offset, ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ for( tlv_offset = 0; tlv_offset < tlv_len; )
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, (offset + tlv_offset));
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ length = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "REP-RSP zone-specific phy CINR report subtype TLV error");
+ proto_tree_add_item(tlv_tree, hf_rep_invalid_tlv, tvb, offset, (tlv_len - offset - tlv_offset), ENC_NA);
+ break;
+ }
+ /* update the offset */
+ tlv_offset += get_tlv_value_offset(&tlv_info);
+ switch (tlv_type)
+ {
+ case REP_RSP_ZONE_SPECIFIC_PHY_CINR_PUSC_SC0:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_pusc_sc0, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_mean, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_report_type, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_reserved1, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ if (length == 2)
+ {
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_deviation, tvb, (offset + tlv_offset + 1), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_reserved2, tvb, (offset + tlv_offset + 1), 1, ENC_BIG_ENDIAN);
+ }
+ break;
+ case REP_RSP_ZONE_SPECIFIC_PHY_CINR_PUSC_SC1:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_pusc_sc1, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_mean, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_report_type, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_reserved1, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ if (length == 2)
+ {
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_deviation, tvb, (offset + tlv_offset + 1), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_reserved2, tvb, (offset + tlv_offset + 1), 1, ENC_BIG_ENDIAN);
+ }
+ break;
+ case REP_RSP_ZONE_SPECIFIC_PHY_CINR_FUSC:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_fusc, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_mean, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_report_type, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_reserved1, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ if (length == 2)
+ {
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_deviation, tvb, (offset + tlv_offset + 1), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_reserved2, tvb, (offset + tlv_offset + 1), 1, ENC_BIG_ENDIAN);
+ }
+ break;
+ case REP_RSP_ZONE_SPECIFIC_PHY_CINR_OPTIONAL_FUSC:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_optional_fusc, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_mean, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_report_type, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_reserved1, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ if (length == 2)
+ {
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_deviation, tvb, (offset + tlv_offset + 1), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_reserved2, tvb, (offset + tlv_offset + 1), 1, ENC_BIG_ENDIAN);
+ }
+ break;
+ case REP_RSP_ZONE_SPECIFIC_PHY_CINR_SAFETY_CHANNEL:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_safety_channel, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ break;
+ case REP_RSP_ZONE_SPECIFIC_PHY_CINR_AMC:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_amc, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_mean, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_report_type, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_reserved1, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ if (length == 2)
+ {
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_deviation, tvb, (offset + tlv_offset + 1), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_reserved2, tvb, (offset + tlv_offset + 1), 1, ENC_BIG_ENDIAN);
+ }
+ break;
+ default:
+ /* display the unknown tlv in hex */
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_unknown_type, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ break;
+ }
+ tlv_offset += length;
+ }
+ break;
+ case REP_RSP_PREAMBLE_PHY_CINR:
+ /* decode and display the preamble physical CINR report type */
+ tlv_item = add_tlv_subtree(&tlv_info, rep_tree, hf_rep_rsp_preamble_phy_cinr_report, tvb, offset-tlv_value_offset, ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ for( tlv_offset = 0; tlv_offset < tlv_len; )
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, (offset + tlv_offset));
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ length = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "REP-RSP preamble physical CINR report subtype TLV error");
+ proto_tree_add_item(tlv_tree, hf_rep_invalid_tlv, tvb, offset, (tlv_len - offset - tlv_offset), ENC_NA);
+ break;
+ }
+
+ switch (tlv_type)
+ {
+ case REP_RSP_PREAMBLE_PHY_CINR_CONFIGURATION1:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_preamble_phy_cinr_rep_configuration_1, tvb, (offset + tlv_offset), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ if (length == 2)
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_deviation, tvb, (offset + tlv_offset + 1)+get_tlv_value_offset(&tlv_info), 1, ENC_BIG_ENDIAN);
+ break;
+ case REP_RSP_PREAMBLE_PHY_CINR_CONFIGURATION3:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_preamble_phy_cinr_rep_configuration_3, tvb, (offset + tlv_offset), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ if (length == 2)
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_phy_cinr_rep_deviation, tvb, (offset + tlv_offset + 1)+get_tlv_value_offset(&tlv_info), 1, ENC_BIG_ENDIAN);
+ break;
+ case REP_RSP_PREAMBLE_PHY_CINR_BAND_AMC:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_preamble_phy_cinr_rep_band_amc_zone, tvb, (offset + tlv_offset), ENC_NA);
+ break;
+ default:
+ /* display the unknown tlv in hex */
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_unknown_type, tvb, (offset + tlv_offset), ENC_NA);
+ break;
+ }
+ tlv_offset += (length+get_tlv_value_offset(&tlv_info));
+ }
+ break;
+ case REP_RSP_ZONE_SPECIFIC_EFFECTIVE_CINR:
+ /* decode and display the zone-specific effective CINR report type */
+ tlv_item = add_tlv_subtree(&tlv_info, rep_tree, hf_rep_rsp_zone_spec_effective_cinr_report, tvb, offset-tlv_value_offset, ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ for( tlv_offset = 0; tlv_offset < tlv_len; )
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, (offset + tlv_offset));
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ length = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "REP-RSP zone-specific effective CINR report subtype TLV error");
+ proto_tree_add_item(tlv_tree, hf_rep_invalid_tlv, tvb, offset, (tlv_len - offset - tlv_offset), ENC_NA);
+ break;
+ }
+ /* update the offset */
+ tlv_offset += get_tlv_value_offset(&tlv_info);
+ switch (tlv_type)
+ {
+ case REP_RSP_ZONE_SPECIFIC_EFFECTIVE_CINR_PUSC_SC0:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_pusc_sc0, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_effective_cinr, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_report_type, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_cqich_id, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ break;
+ case REP_RSP_ZONE_SPECIFIC_EFFECTIVE_CINR_PUSC_SC1:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_pusc_sc1, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_effective_cinr, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_report_type, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_cqich_id, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ break;
+ case REP_RSP_ZONE_SPECIFIC_EFFECTIVE_CINR_FUSC:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_fusc, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_effective_cinr, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_report_type, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_cqich_id, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ break;
+ case REP_RSP_ZONE_SPECIFIC_EFFECTIVE_CINR_OPTIONAL_FUSC:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_optional_fusc, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_effective_cinr, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_report_type, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_cqich_id, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ break;
+ case REP_RSP_ZONE_SPECIFIC_EFFECTIVE_CINR_AMC_AAS:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_amc_aas, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_effective_cinr, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_report_type, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_cqich_id, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ break;
+ default:
+ /* display the unknown tlv in hex */
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_unknown_type, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ break;
+ }
+ tlv_offset += length;
+ }
+ break;
+ case REP_RSP_PREAMBLE_EFFECTIVE_CINR:
+ /* decode and display the preamble effective CINR report type */
+ tlv_item = add_tlv_subtree(&tlv_info, rep_tree, hf_rep_rsp_preamble_effective_cinr_report, tvb, offset-tlv_value_offset, ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ for( tlv_offset = 0; tlv_offset < tlv_len; )
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, (offset + tlv_offset));
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ length = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "REP-RSP preamble effective CINR report subtype TLV error");
+ proto_tree_add_item(tlv_tree, hf_rep_invalid_tlv, tvb, offset, (tlv_len - offset - tlv_offset), ENC_NA);
+ break;
+ }
+ /* update the offset */
+ tlv_offset += get_tlv_value_offset(&tlv_info);
+ switch (tlv_type)
+ {
+ case REP_RSP_PREAMBLE_EFFECTIVE_CINR_CONFIGURATION1:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_preamble_effective_cinr_rep_configuration_1, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_effective_cinr, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_preamble_effective_cinr_rep_cqich_id, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ break;
+ case REP_RSP_PREAMBLE_EFFECTIVE_CINR_CONFIGURATION3:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_preamble_effective_cinr_rep_configuration_3, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_zone_spec_effective_cinr_rep_effective_cinr, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_preamble_effective_cinr_rep_cqich_id, tvb, (offset + tlv_offset), length, ENC_BIG_ENDIAN);
+ break;
+ case REP_RSP_CHANNEL_SELECTIVITY:
+ /* decode and display the channel selectivity report type */
+ ti_item = add_tlv_subtree(&tlv_info, rep_tree, hf_rep_rsp_channel_selectivity_report, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_channel_selectivity_rep_frequency_a, tvb, (offset + tlv_offset + 2), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_channel_selectivity_rep_frequency_b, tvb, (offset + tlv_offset + 1), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_rep_rsp_channel_selectivity_rep_frequency_c, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
+ break;
+ default:
+ /* display the unknown tlv in hex */
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_unknown_type, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
+ break;
+ }
+ tlv_offset += length;
+ }
+ break;
+ case CURRENT_TX_POWER:
+ tlv_item = add_tlv_subtree(&tlv_info, rep_tree, hf_rep_rsp_current_transmitted_power, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ value = tvb_get_guint8(tvb, offset);
+ current_power = ((gfloat)value - 128) / 2;
+ proto_item_append_text(tlv_item, " (%.1f dBm)", current_power);
+ break;
+ default:
+ /* display the unknown tlv in hex */
+ add_tlv_subtree(&tlv_info, rep_tree, hf_rep_unknown_type, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ }
+ offset += tlv_len;
+ } /* end of TLV process while loop */
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac REP-REQ Messages Dissectors */
+void proto_register_mac_mgmt_msg_rep(void)
+{
+ /* report display */
+ static hf_register_info hf_rep[] =
+ {
+ {
+ &hf_rep_invalid_tlv,
+ {
+ "Invalid TLV", "wmx.rep.invalid_tlv",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+ { /* type 1.2 */
+ &hf_rep_req_channel_number,
+ {
+ "Channel Number", "wmx.rep_req.channel_number",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* type 1.8 */
+ &hf_rep_req_channel_selectivity_report,
+ {
+ "Channel Selectivity Report", "wmx.rep_req.channel_selectivity_report",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_channel_selectivity_rep_bit0,
+ {
+ "Include Frequency Selectivity Report", "wmx.rep_req.channel_selectivity_report.bit0",
+ FT_BOOLEAN, 8, NULL, REP_REQ_CHANNEL_SELECTIVITY_REPORT_BIT0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_channel_selectivity_rep_bit1_7,
+ {
+ "Reserved", "wmx.rep_req.channel_selectivity_report.bit1_7",
+ FT_UINT8, BASE_HEX, NULL, REP_REQ_CHANNEL_SELECTIVITY_REPORT_BIT1_7, NULL, HFILL
+ }
+ },
+ { /* type 1.3 */
+ &hf_rep_req_channel_type,
+ {
+ "Channel Type", "wmx.rep_req.channel_type",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_channel_type_request,
+ {
+ "Channel Type Request", "wmx.rep_req.channel_type.request",
+ FT_UINT8, BASE_DEC, VALS(vals_channel_types), 0x03, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_channel_type_reserved,
+ {
+ "Reserved", "wmx.rep_req.channel_type.reserved",
+ FT_UINT8, BASE_HEX, NULL, 0xFC, NULL, HFILL
+ }
+ },
+ { /* type 1.7 */
+ &hf_rep_req_preamble_effective_cinr_request,
+ {
+ "Preamble Effective CINR Request", "wmx.rep_req.preamble_effective_cinr_request",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_preamble_effective_cinr_req_bit0_1,
+ {
+ "Type Of Preamble Physical CINR Measurement", "wmx.rep_req.preamble_effective_cinr_request.bit0_1",
+ FT_UINT8, BASE_DEC, VALS(vals_type_of_measurements), REP_REQ_PREAMBLE_EFFECTIVE_CINR_REQUEST_BIT0_1, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_preamble_effective_cinr_req_bit2_7,
+ {
+ "Reserved", "wmx.rep_req.preamble_effective_cinr_request.bit2_7",
+ FT_UINT8, BASE_HEX, NULL, REP_REQ_PREAMBLE_EFFECTIVE_CINR_REQUEST_BIT2_7, NULL, HFILL
+ }
+ },
+ { /* type 1.5 */
+ &hf_rep_req_preamble_phy_cinr_request,
+ {
+ "Preamble Physical CINR Request", "wmx.rep_req.preamble_phy_cinr_request",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_preamble_phy_cinr_req_bit0_1,
+ {
+ "Type Of Preamble Physical CINR Measurement", "wmx.rep_req.preamble_phy_cinr_request.bit0_1",
+ FT_UINT8, BASE_DEC, VALS(vals_type_of_measurements), REP_REQ_PREAMBLE_PHY_CINR_REQUEST_BIT0_1, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_preamble_phy_cinr_req_bit2_5,
+ {
+ "Alpha (ave) in multiples of 1/16", "wmx.rep_req.preamble_phy_cinr_request.bit2_5",
+ FT_UINT8, BASE_DEC, NULL, REP_REQ_PREAMBLE_PHY_CINR_REQUEST_BIT2_5, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_preamble_phy_cinr_req_bit6,
+ {
+ "CINR Report Type", "wmx.rep_req.preamble_phy_cinr_request.bit6",
+ FT_UINT8, BASE_DEC, VALS(vals_cinr_report_types), REP_REQ_PREAMBLE_PHY_CINR_REQUEST_BIT6, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_preamble_phy_cinr_req_bit7,
+ {
+ "Reserved", "wmx.rep_req.preamble_phy_cinr_request.bit7",
+ FT_UINT8, BASE_HEX, NULL, REP_REQ_PREAMBLE_PHY_CINR_REQUEST_BIT7, NULL, HFILL
+ }
+ },
+ { /* report request */
+ &hf_rep_req_report_request,
+ {
+ "Report Request", "wmx.rep_req.report_request",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* type 1.1 */
+ &hf_rep_req_report_type,
+ {
+ "Report Type", "wmx.rep_req.report_type",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_rep_type_bit0,
+ {
+ "Include DFS Basic Report", "wmx.rep_req.report_type.bit0",
+ FT_BOOLEAN, 8, NULL, REP_REQ_REPORT_TYPE_BIT0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_rep_type_bit1,
+ {
+ "Include CINR Report", "wmx.rep_req.report_type.bit1",
+ FT_BOOLEAN, 8, NULL, REP_REQ_REPORT_TYPE_BIT1, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_rep_type_bit2,
+ {
+ "Include RSSI Report", "wmx.rep_req.report_type.bit2",
+ FT_BOOLEAN, 8, NULL, REP_REQ_REPORT_TYPE_BIT2, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_rep_type_bit3_6,
+ {
+ "Alpha (ave) in multiples of 1/32", "wmx.rep_req.report_type.bit3_6",
+ FT_UINT8, BASE_DEC, NULL, REP_REQ_REPORT_TYPE_BIT3_6, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_rep_type_bit7,
+ {
+ "Include Current Transmit Power Report", "wmx.rep_req.report_type.bit7",
+ FT_BOOLEAN, 8, NULL, REP_REQ_REPORT_TYPE_BIT7, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_preamble_effective_cinr_rep_cqich_id,
+ {
+ "The 4 least significant bits of CQICH_ID", "wmx.rep_req.zone_spec_effective_cinr_report.cqich_id_4",
+ FT_UINT8, BASE_HEX, NULL, REP_RSP_ZONE_SPEC_EFFECTIVE_CINR_CQICH_ID_4_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_zone_spec_effective_cinr_rep_cqich_id,
+ {
+ "The 3 least significant bits of CQICH_ID", "wmx.rep_req.zone_spec_effective_cinr_report.cqich_id",
+ FT_UINT8, BASE_HEX, NULL, REP_RSP_ZONE_SPEC_EFFECTIVE_CINR_CQICH_ID_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_zone_spec_effective_cinr_rep_effective_cinr,
+ {
+ "Effective CINR", "wmx.rep_req.zone_spec_effective_cinr_report.effective_cinr",
+ FT_UINT8, BASE_DEC, NULL, REP_RSP_ZONE_SPEC_EFFECTIVE_CINR_EFFECTIVE_CINR_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_zone_spec_effective_cinr_rep_report_type,
+ {
+ "Effective CINR Report", "wmx.rep_req.zone_spec_effective_cinr_report.report_type",
+ FT_UINT8, BASE_DEC, VALS(vals_data_cinr_measurements), REP_RSP_ZONE_SPEC_EFFECTIVE_CINR_REPORT_TYPE_MASK, NULL, HFILL
+ }
+ },
+ { /* type 1.6 */
+ &hf_rep_req_zone_spec_effective_cinr_request,
+ {
+ "Zone-specific Effective CINR Request", "wmx.rep_req.zone_spec_effective_cinr_request",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_zone_spec_effective_cinr_req_bit0_2,
+ {
+ "Type Of Zone On Which CINR Is To Be Reported", "wmx.rep_req.zone_spec_effective_cinr_request.bit0_2",
+ FT_UINT16, BASE_HEX, VALS(vals_type_of_zones), REP_REQ_TYPE_OF_ZONE_REQUEST_16_BIT0_2, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_zone_spec_effective_cinr_req_bit3,
+ {
+ "STC Zone", "wmx.rep_req.zone_spec_effective_cinr_request.bit3",
+ FT_BOOLEAN, 16, NULL, REP_REQ_TYPE_OF_ZONE_REQUEST_16_BIT3, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_zone_spec_effective_cinr_req_bit4,
+ {
+ "AAS Zone", "wmx.rep_req.zone_spec_effective_cinr_request.bit4",
+ FT_BOOLEAN, 16, NULL, REP_REQ_TYPE_OF_ZONE_REQUEST_16_BIT4, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_zone_spec_effective_cinr_req_bit5_6,
+ {
+ "PRBS ID", "wmx.rep_req.zone_spec_effective_cinr_request.bit5_6",
+ FT_UINT16, BASE_HEX, NULL, REP_REQ_TYPE_OF_ZONE_REQUEST_16_BIT5_6, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_zone_spec_effective_cinr_req_bit7,
+ {
+ "CINR Measurement Report", "wmx.rep_req.zone_spec_effective_cinr_request.bit7",
+ FT_UINT16, BASE_HEX, VALS(vals_data_cinr_measurements), REP_REQ_TYPE_OF_ZONE_REQUEST_16_BIT7, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_zone_spec_effective_cinr_req_bit8_13,
+ {
+ "PUSC Major Group Map", "wmx.rep_req.zone_spec_effective_cinr_request.bit8_13",
+ FT_UINT16, BASE_HEX, NULL, REP_REQ_TYPE_OF_ZONE_REQUEST_16_BIT8_13, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_zone_spec_effective_cinr_req_bit14_15,
+ {
+ "Reserved", "wmx.rep_req.zone_spec_effective_cinr_request.bit14_15",
+ FT_UINT16, BASE_HEX, NULL, REP_REQ_TYPE_OF_ZONE_REQUEST_16_BIT14_15, NULL, HFILL
+ }
+ },
+ { /* second byte */
+ &hf_rep_rsp_zone_spec_phy_cinr_rep_deviation,
+ {
+ "Standard Deviation of CINR", "wmx.rep_req.zone_spec_phy_cinr_report.deviation",
+ FT_UINT8, BASE_DEC, NULL, REP_RSP_ZONE_SPEC_PHY_CINR_DEVIATION_MASK, NULL, HFILL
+ }
+ },
+ { /* first byte */
+ &hf_rep_rsp_zone_spec_phy_cinr_rep_mean,
+ {
+ "Mean of Physical CINR", "wmx.rep_req.zone_spec_phy_cinr_report.mean",
+ FT_UINT8, BASE_DEC, NULL, REP_RSP_ZONE_SPEC_PHY_CINR_MEAN_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_zone_spec_phy_cinr_rep_report_type,
+ {
+ "CINR Report Type", "wmx.rep_req.zone_spec_phy_cinr_report.report_type",
+ FT_UINT8, BASE_DEC, VALS(vals_data_cinr_measurements), REP_RSP_ZONE_SPEC_PHY_CINR_REP_TYPE_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_zone_spec_phy_cinr_rep_reserved1,
+ {
+ "Reserved", "wmx.rep_req.zone_spec_phy_cinr_report.reserved1",
+ FT_UINT8, BASE_HEX, NULL, REP_RSP_ZONE_SPEC_PHY_CINR_RSV1_MASK, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_zone_spec_phy_cinr_rep_reserved2,
+ {
+ "Reserved", "wmx.rep_req.zone_spec_phy_cinr_report.reserved2",
+ FT_UINT8, BASE_HEX, NULL, REP_RSP_ZONE_SPEC_PHY_CINR_RSV2_MASK, NULL, HFILL
+ }
+ },
+ { /* type 1.4 */
+ &hf_rep_req_zone_spec_phy_cinr_request,
+ {
+ "Zone-specific Physical CINR Request", "wmx.rep_req.zone_spec_phy_cinr_request",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_zone_spec_phy_cinr_req_bit0_2,
+ {
+ "Type Of Zone On Which CINR Is To Be Reported", "wmx.rep_req.zone_spec_phy_cinr_request.bit0_2",
+ FT_UINT24, BASE_HEX, VALS(vals_type_of_zones), REP_REQ_TYPE_OF_ZONE_REQUEST_BIT0_2, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_zone_spec_phy_cinr_req_bit3,
+ {
+ "STC Zone", "wmx.rep_req.zone_spec_phy_cinr_request.bit3",
+ FT_BOOLEAN, 24, NULL, REP_REQ_TYPE_OF_ZONE_REQUEST_BIT3, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_zone_spec_phy_cinr_req_bit4,
+ {
+ "AAS Zone", "wmx.rep_req.zone_spec_phy_cinr_request.bit4",
+ FT_BOOLEAN, 24, NULL, REP_REQ_TYPE_OF_ZONE_REQUEST_BIT4, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_zone_spec_phy_cinr_req_bit5_6,
+ {
+ "PRBS ID", "wmx.rep_req.zone_spec_phy_cinr_request.bit5_6",
+ FT_UINT24, BASE_HEX, NULL, REP_REQ_TYPE_OF_ZONE_REQUEST_BIT5_6, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_zone_spec_phy_cinr_req_bit7,
+ {
+ "CINR Measurement Report", "wmx.rep_req.zone_spec_phy_cinr_request.bit7",
+ FT_UINT24, BASE_HEX, VALS(vals_data_cinr_measurements), REP_REQ_TYPE_OF_ZONE_REQUEST_BIT7, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_zone_spec_phy_cinr_req_bit8_13,
+ {
+ "PUSC Major Group Map", "wmx.rep_req.zone_spec_phy_cinr_request.bit8_13",
+ FT_UINT24, BASE_HEX, NULL, REP_REQ_TYPE_OF_ZONE_REQUEST_BIT8_13, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_zone_spec_phy_cinr_req_bit14_17,
+ {
+ "Alpha (ave) in multiples of 1/16", "wmx.rep_req.zone_spec_phy_cinr_request.bit14_17",
+ FT_UINT24, BASE_DEC, NULL, REP_REQ_TYPE_OF_ZONE_REQUEST_BIT14_17, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_zone_spec_phy_cinr_req_bit18,
+ {
+ "CINR Report Type", "wmx.rep_req.zone_spec_phy_cinr_request.bit18",
+ FT_UINT24, BASE_HEX, VALS(vals_cinr_report_types), REP_REQ_TYPE_OF_ZONE_REQUEST_BIT18, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_req_zone_spec_phy_cinr_req_bit19_23,
+ {
+ "Reserved", "wmx.rep_req.zone_spec_phy_cinr_request.bit19_23",
+ FT_UINT24, BASE_HEX, NULL, REP_REQ_TYPE_OF_ZONE_REQUEST_BIT19_23, NULL, HFILL
+ }
+ },
+ { /* 6.3 */
+ &hf_rep_rsp_channel_selectivity_report,
+ {
+ "Channel Selectivity Report", "wmx.rep_rsp.channel_selectivity_report",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_channel_selectivity_rep_frequency_a,
+ {
+ "Frequency Selectivity Report a", "wmx.rep_rsp.channel_selectivity_report.frequency_a",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_channel_selectivity_rep_frequency_b,
+ {
+ "Frequency Selectivity Report b", "wmx.rep_rsp.channel_selectivity_report.frequency_b",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_channel_selectivity_rep_frequency_c,
+ {
+ "Frequency Selectivity Report c", "wmx.rep_rsp.channel_selectivity_report.frequency_c",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_channel_type_report,
+ {
+ "Channel Type Report", "wmx.rep_rsp.channel_type_report",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_channel_type_band_amc,
+ {
+ "Band AMC", "wmx.rep_rsp.channel_type_report.band_amc",
+ FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_channel_type_enhanced_band_amc,
+ {
+ "Enhanced Band AMC", "wmx.rep_rsp.channel_type_report.enhanced_band_amc",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_channel_type_safety_channel,
+ {
+ "Safety Channel", "wmx.rep_rsp.channel_type_report.safety_channel",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_channel_type_sounding,
+ {
+ "Sounding", "wmx.rep_rsp.channel_type_report.sounding",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_channel_type_subchannel,
+ {
+ "Normal Subchannel", "wmx.rep_rsp.channel_type_report.subchannel",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_preamble_effective_cinr_report,
+ {
+ "Preamble Effective CINR Report", "wmx.rep_rsp.preamble_effective_cinr_report",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 6.1 */
+ &hf_rep_rsp_preamble_effective_cinr_rep_configuration_1,
+ {
+ "The Estimation Of Effective CINR Measured From Preamble For Frequency Reuse Configuration=1", "wmx.rep_rsp.preamble_effective_cinr_report.configuration_1",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 6.2 */
+ &hf_rep_rsp_preamble_effective_cinr_rep_configuration_3,
+ {
+ "The Estimation Of Effective CINR Measured From Preamble For Frequency Reuse Configuration=3", "wmx.rep_rsp.preamble_effective_cinr_report.configuration_3",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_preamble_phy_cinr_report,
+ {
+ "Preamble Physical CINR Report", "wmx.rep_rsp.preamble_phy_cinr_report",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 4.3 */
+ &hf_rep_rsp_preamble_phy_cinr_rep_band_amc_zone,
+ {
+ "The Estimation Of Physical CINR Measured From Preamble For Band AMC Zone", "wmx.rep_rsp.preamble_phy_cinr_report.band_amc_zone",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 4.1 */
+ &hf_rep_rsp_preamble_phy_cinr_rep_configuration_1,
+ {
+ "The Estimation Of Physical CINR Measured From Preamble For Frequency Reuse Configuration=1", "wmx.rep_rsp.preamble_phy_cinr_report.configuration_1",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 4.2 */
+ &hf_rep_rsp_preamble_phy_cinr_rep_configuration_3,
+ {
+ "The Estimation Of Physical CINR Measured From Preamble For Frequency Reuse Configuration=3", "wmx.rep_rsp.preamble_phy_cinr_report.configuration_3",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ /* Report Response */
+ {
+ &hf_rep_rsp_report_type,
+ {
+ "Report Type", "wmx.rep_rsp.report_type",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_report_type_basic_report,
+ {
+ "Basic Report", "wmx.rep_rsp.report_type.basic_report",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_report_type_basic_report_bit0,
+ {
+ "Wireless HUMAN Detected", "wmx.rep_rsp.report_type.basic_report.bit0",
+ FT_BOOLEAN, 8, NULL, REP_RSP_REPORT_TYPE_BASIC_REPORT_BIT0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_report_type_basic_report_bit1,
+ {
+ "Unknown Transmission Detected", "wmx.rep_rsp.report_type.basic_report.bit1",
+ FT_BOOLEAN, 8, NULL, REP_RSP_REPORT_TYPE_BASIC_REPORT_BIT1, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_report_type_basic_report_bit2,
+ {
+ "Specific Spectrum User Detected", "wmx.rep_rsp.report_type.basic_report.bit2",
+ FT_BOOLEAN, 8, NULL, REP_RSP_REPORT_TYPE_BASIC_REPORT_BIT2, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_report_type_basic_report_bit3,
+ {
+ "Channel Not Measured", "wmx.rep_rsp.report_type.basic_report.bit3",
+ FT_BOOLEAN, 8, NULL, REP_RSP_REPORT_TYPE_BASIC_REPORT_BIT3, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_report_type_basic_report_reserved,
+ {
+ "Reserved", "wmx.rep_rsp.report_type.basic_report.reserved",
+ FT_UINT8, BASE_HEX, NULL, REP_RSP_REPORT_TYPE_BASIC_REPORT_RSV, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_report_type_channel_number,
+ {
+ "Channel Number", "wmx.rep_rsp.report_type.channel_number",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_report_type_cinr_report,
+ {
+ "CINR Report", "wmx.rep_rsp.report_type.cinr_report",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_report_type_cinr_report_deviation,
+ {
+ "CINR Standard Deviation", "wmx.rep_rsp.report_type.cinr_report_deviation",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_report_type_cinr_report_mean,
+ {
+ "CINR Mean", "wmx.rep_rsp.report_type.cinr_report_mean",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_report_type_duration,
+ {
+ "Duration", "wmx.rep_rsp.report_type.duration",
+ FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_report_type_frame_number,
+ {
+ "Start Frame", "wmx.rep_rsp.report_type.frame_number",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_report_type_rssi_report,
+ {
+ "RSSI Report", "wmx.rep_rsp.report_type.rssi_report",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_report_type_rssi_report_deviation,
+ {
+ "RSSI Standard Deviation", "wmx.rep_rsp.report_type.rssi_report_deviation",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_current_transmitted_power,
+ {
+ "Current Transmitted Power", "wmx.rep_rsp.current_transmitted_power",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_report_type_rssi_report_mean,
+ {
+ "RSSI Mean", "wmx.rep_rsp.report_type.rssi_report_mean",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_zone_spec_effective_cinr_report,
+ {
+ "Zone-specific Effective CINR Report", "wmx.rep_rsp.zone_spec_effective_cinr_report",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 5.5 */
+ &hf_rep_rsp_zone_spec_effective_cinr_rep_amc_aas,
+ {
+ "AMC AAS Zone", "wmx.rep_rsp.zone_spec_effective_cinr_report.amc_aas",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 5.3 */
+ &hf_rep_rsp_zone_spec_effective_cinr_rep_fusc,
+ {
+ "FUSC Zone", "wmx.rep_rsp.zone_spec_effective_cinr_report.fusc",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 5.4 */
+ &hf_rep_rsp_zone_spec_effective_cinr_rep_optional_fusc,
+ {
+ "Optional FUSC Zone", "wmx.rep_rsp.zone_spec_effective_cinr_report.optional_fusc",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 5.1 */
+ &hf_rep_rsp_zone_spec_effective_cinr_rep_pusc_sc0,
+ {
+ "PUSC Zone (use all SC=0)", "wmx.rep_rsp.zone_spec_effective_cinr_report.pusc_sc0",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 5.2 */
+ &hf_rep_rsp_zone_spec_effective_cinr_rep_pusc_sc1,
+ {
+ "PUSC Zone (use all SC=1)", "wmx.rep_rsp.zone_spec_effective_cinr_report.pusc_sc1",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_rsp_zone_spec_phy_cinr_report,
+ {
+ "Zone-specific Physical CINR Report", "wmx.rep_rsp.zone_spec_phy_cinr_report",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 3.6 */
+ &hf_rep_rsp_zone_spec_phy_cinr_rep_amc,
+ {
+ "AMC Zone", "wmx.rep_rsp.zone_spec_phy_cinr_report.amc",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 3.3 */
+ &hf_rep_rsp_zone_spec_phy_cinr_rep_fusc,
+ {
+ "FUSC Zone", "wmx.rep_rsp.zone_spec_phy_cinr_report.fusc",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 3.4 */
+ &hf_rep_rsp_zone_spec_phy_cinr_rep_optional_fusc,
+ {
+ "Optional FUSC Zone", "wmx.rep_rsp.zone_spec_phy_cinr_report.optional_fusc",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 3.1 */
+ &hf_rep_rsp_zone_spec_phy_cinr_rep_pusc_sc0,
+ {
+ "PUSC Zone (use all SC=0)", "wmx.rep_rsp.zone_spec_phy_cinr_report.pusc_sc0",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 3.2 */
+ &hf_rep_rsp_zone_spec_phy_cinr_rep_pusc_sc1,
+ {
+ "PUSC Zone (use all SC=1)", "wmx.rep_rsp.zone_spec_phy_cinr_report.pusc_sc1",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 3.5 */
+ &hf_rep_rsp_zone_spec_phy_cinr_rep_safety_channel,
+ {
+ "Safety Channel", "wmx.rep_rsp.zone_spec_phy_cinr_report.safety_channel",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rep_unknown_type,
+ {
+ "Unknown TLV type", "wmx.rep.unknown_tlv_type",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett_rep[] =
+ {
+ &ett_mac_mgmt_msg_rep_req_decoder,
+ &ett_mac_mgmt_msg_rep_rsp_decoder,
+ };
+
+ proto_mac_mgmt_msg_rep_decoder = proto_register_protocol (
+ "WiMax REP-REQ/RSP Messages", /* name */
+ "WiMax REP-REQ/RSP (rep)", /* short name */
+ "wmx.rep" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_rep_decoder, hf_rep, array_length(hf_rep));
+ proto_register_subtree_array(ett_rep, array_length(ett_rep));
+}
+
+void
+proto_reg_handoff_mac_mgmt_msg_rep(void)
+{
+ dissector_handle_t rep_handle;
+
+ rep_handle = create_dissector_handle(dissect_mac_mgmt_msg_rep_req_decoder, proto_mac_mgmt_msg_rep_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_REP_REQ, rep_handle);
+
+ rep_handle = create_dissector_handle(dissect_mac_mgmt_msg_rep_rsp_decoder, proto_mac_mgmt_msg_rep_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_REP_RSP, rep_handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_res_cmd.c b/plugins/epan/wimax/msg_res_cmd.c
new file mode 100644
index 0000000000..d02164f316
--- /dev/null
+++ b/plugins/epan/wimax/msg_res_cmd.c
@@ -0,0 +1,166 @@
+/* msg_res_cmd.c
+ * WiMax MAC Management RES-CMD Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#if 0
+#define DEBUG /* for debug only */
+#endif
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax_tlv.h"
+#include "wimax_mac.h"
+#include "wimax_utils.h"
+
+void proto_register_mac_mgmt_msg_res_cmd(void);
+void proto_reg_handoff_mac_mgmt_msg_res_cmd(void);
+
+static gint proto_mac_mgmt_msg_res_cmd_decoder = -1;
+static gint ett_mac_mgmt_msg_res_cmd_decoder = -1;
+
+/* fix fields */
+static gint hf_res_cmd_unknown_type = -1;
+static gint hf_res_cmd_invalid_tlv = -1;
+
+
+/* Wimax Mac RES-CMD Message Dissector */
+static int dissect_mac_mgmt_msg_res_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tvb_len;
+ gint tlv_type, tlv_len, tlv_value_offset;
+ proto_item *res_cmd_item;
+ proto_tree *res_cmd_tree;
+ proto_tree *tlv_tree = NULL;
+ tlv_info_t tlv_info;
+
+ { /* we are being asked for details */
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC payload type RES-CMD */
+ res_cmd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_res_cmd_decoder, tvb, offset, -1, "Reset Command (RES-CMD)");
+ /* add MAC RES-CMD subtree */
+ res_cmd_tree = proto_item_add_subtree(res_cmd_item, ett_mac_mgmt_msg_res_cmd_decoder);
+ /* Decode and display the Reset Command (RES-CMD) */
+ /* process the RES-CMD TLVs */
+ while(offset < tvb_len)
+ {
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "RES-CMD TLV error");
+ proto_tree_add_item(res_cmd_tree, hf_res_cmd_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(res_cmd_tree, proto_mac_mgmt_msg_res_cmd_decoder, tvb, offset, (tlv_len + tlv_value_offset), "RES-CMD Type: %u (%u bytes, offset=%u, tlv_len=%u, tvb_len=%u)", tlv_type, (tlv_len + tlv_value_offset), offset, tlv_len, tvb_len);
+#endif
+ /* process RES-CMD TLV Encoded information */
+ switch (tlv_type)
+ {
+ case HMAC_TUPLE: /* Table 348d */
+ /* decode and display the HMAC Tuple */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_res_cmd_decoder, res_cmd_tree, proto_mac_mgmt_msg_res_cmd_decoder, tvb, offset, tlv_len, "HMAC Tuple");
+ wimax_hmac_tuple_decoder(tlv_tree, tvb, offset+tlv_value_offset, tlv_len);
+ break;
+ case CMAC_TUPLE: /* Table 348b */
+ /* decode and display the CMAC Tuple */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_res_cmd_decoder, res_cmd_tree, proto_mac_mgmt_msg_res_cmd_decoder, tvb, offset, tlv_len, "CMAC Tuple");
+ wimax_cmac_tuple_decoder(tlv_tree, tvb, offset+tlv_value_offset, tlv_len);
+ break;
+ default:
+ /* display the unknown tlv in hex */
+ add_tlv_subtree(&tlv_info, res_cmd_tree, hf_res_cmd_unknown_type, tvb, offset, ENC_NA);
+ break;
+ }
+ offset += (tlv_len+tlv_value_offset);
+ } /* end of TLV process while loop */
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac RES-CMD Message Dissector */
+void proto_register_mac_mgmt_msg_res_cmd(void)
+{
+ /* DSx display */
+ static hf_register_info hf_res_cmd[] =
+ {
+ {
+ &hf_res_cmd_invalid_tlv,
+ {"Invalid TLV", "wmx.res_cmd.invalid_tlv", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL}
+ },
+ {
+ &hf_res_cmd_unknown_type,
+ {"Unknown TLV type", "wmx.res_cmd.unknown_tlv_type", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett_res_cmd[] =
+ {
+ &ett_mac_mgmt_msg_res_cmd_decoder,
+ };
+
+ proto_mac_mgmt_msg_res_cmd_decoder = proto_register_protocol (
+ "WiMax RES-CMD Message", /* name */
+ "WiMax RES-CMD (res)", /* short name */
+ "wmx.res" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_res_cmd_decoder, hf_res_cmd, array_length(hf_res_cmd));
+ proto_register_subtree_array(ett_res_cmd, array_length(ett_res_cmd));
+}
+
+void
+proto_reg_handoff_mac_mgmt_msg_res_cmd(void)
+{
+ dissector_handle_t handle;
+
+ handle = create_dissector_handle(dissect_mac_mgmt_msg_res_cmd_decoder, proto_mac_mgmt_msg_res_cmd_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_RES_CMD, handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_rng_req.c b/plugins/epan/wimax/msg_rng_req.c
new file mode 100644
index 0000000000..cad39d71db
--- /dev/null
+++ b/plugins/epan/wimax/msg_rng_req.c
@@ -0,0 +1,643 @@
+/* msg_rng_req.c
+ * WiMax MAC Management RNG-REQ Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: John R. Underwood <junderx@yahoo.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax_tlv.h"
+#include "wimax_mac.h"
+#include "wimax_utils.h"
+
+void proto_register_mac_mgmt_msg_rng_req(void);
+void proto_reg_handoff_mac_mgmt_msg_rng_req(void);
+
+extern gboolean include_cor2_changes;
+
+static gint proto_mac_mgmt_msg_rng_req_decoder = -1;
+static gint ett_mac_mgmt_msg_rng_req_decoder = -1;
+
+/* RNG-REQ fields */
+static gint hf_rng_req_reserved = -1;
+static gint hf_rng_req_dl_burst_profile_diuc = -1;
+static gint hf_rng_req_dl_burst_profile_lsb_ccc = -1;
+static gint hf_rng_req_ss_mac_address = -1;
+static gint hf_rng_req_ranging_anomalies_max_power = -1;
+static gint hf_rng_req_ranging_anomalies_min_power = -1;
+static gint hf_rng_req_ranging_anomalies_timing_adj = -1;
+static gint hf_rng_req_aas_broadcast = -1;
+static gint hf_rng_req_serving_bs_id = -1;
+static gint hf_rng_req_ranging_purpose_ho_indication = -1;
+static gint hf_rng_req_ranging_purpose_location_update_request = -1;
+static gint hf_rng_req_ranging_purpose_reserved = -1;
+static gint hf_rng_req_ho_id = -1;
+static gint hf_rng_req_power_down_indicator = -1;
+static gint hf_rng_req_repetition_coding_level = -1;
+static gint hf_rng_req_requested_downlink_repetition_coding_level_reserved = -1;
+static gint hf_rng_req_cmac_key_count = -1;
+static gint hf_rng_definition_of_power_saving_class_present = -1;
+static gint hf_rng_activation_of_power_saving_class = -1;
+static gint hf_rng_trf_ind_required = -1;
+static gint hf_rng_power_saving_class_reserved = -1;
+static gint hf_rng_power_saving_class_id = -1;
+static gint hf_rng_power_saving_class_type = -1;
+static gint hf_rng_power_saving_first_sleep_window_frame = -1;
+static gint hf_rng_power_saving_initial_sleep_window = -1;
+static gint hf_rng_power_saving_listening_window = -1;
+static gint hf_rng_power_saving_final_sleep_window_base = -1;
+static gint hf_rng_power_saving_final_sleep_window_exp = -1;
+static gint hf_rng_power_saving_slpid = -1;
+static gint hf_rng_power_saving_included_cid = -1;
+static gint hf_rng_power_saving_mgmt_connection_direction = -1;
+static gint hf_tlv_type = -1;
+static gint hf_rng_invalid_tlv = -1;
+static gint hf_rng_power_saving_class_flags = -1;
+static gint hf_rng_req_dl_burst_profile = -1;
+static gint hf_rng_req_ranging_anomalies = -1;
+static gint hf_rng_req_ranging_purpose_indication = -1;
+static gint hf_rng_req_requested_rep_coding_level = -1;
+
+/* STRING RESOURCES */
+
+static const true_false_string tfs_rng_req_aas_broadcast = {
+ "SS cannot receive broadcast messages",
+ "SS can receive broadcast messages"
+};
+
+static const value_string vals_rng_req_ranging_purpose_location_update_request[] = {
+ {1, "MS action of Idle Mode Location Update Process"},
+ {0, NULL}
+};
+
+static const value_string vals_rng_req_repetition_coding_level[] = {
+ {0, "No repetition"},
+ {1, "Repetition coding of 2"},
+ {2, "Repetition coding of 4"},
+ {3, "Repetition coding of 6"},
+ {0, NULL}
+};
+
+static const true_false_string tfs_rng_activate = {
+ "Activate",
+ "Deactivate"
+};
+
+static const true_false_string tfs_rng_max_power = {
+ "SS is already at maximum power",
+ "SS is not at maximum power"
+};
+
+static const true_false_string tfs_rng_min_power = {
+ "SS is already at minimum power",
+ "SS is not at minimum power"
+};
+
+static const true_false_string tfs_rng_timing_adj = {
+ "Sum of commanded timing adjustments is too large",
+ "Sum of commanded timing adjustments is within bounds"
+};
+
+/* Decode RNG Power Saving Class parameters (Sub TLV's). */
+void dissect_power_saving_class(proto_tree *rng_req_tree, gint tlv_type, tvbuff_t *tvb, guint compound_tlv_len, packet_info *pinfo, guint offset)
+{
+ proto_item *tlv_item;
+ proto_tree *tlv_tree;
+ proto_tree *power_saving_class_tree = NULL;
+ guint tlv_len;
+ guint tlv_offset;
+ tlv_info_t tlv_info;
+
+ /* Add a subtree for the power saving class parameters */
+ tlv_item = proto_tree_add_protocol_format(rng_req_tree, proto_mac_mgmt_msg_rng_req_decoder, tvb, offset, compound_tlv_len, "Power saving class parameters (%u bytes)", compound_tlv_len);
+ power_saving_class_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rng_req_decoder);
+
+ /* Update the compound_tlv_len to include the offset */
+ compound_tlv_len += offset;
+
+ while(offset < compound_tlv_len)
+ {
+ /* Get the TLV data. */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "RNG-REQ TLV error");
+ proto_tree_add_item(power_saving_class_tree, hf_rng_invalid_tlv, tvb, offset, (compound_tlv_len - offset), ENC_NA);
+ break;
+ }
+ /* get the offset to the TLV data */
+ tlv_offset = offset + get_tlv_value_offset(&tlv_info);
+
+ switch (tlv_type) {
+ case RNG_POWER_SAVING_CLASS_FLAGS:
+ /* display Power Saving Class Flags */
+ /* add subtree */
+ tlv_item = add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_class_flags, tvb, offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rng_req_decoder);
+ proto_tree_add_item(tlv_tree, hf_rng_definition_of_power_saving_class_present, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_rng_activation_of_power_saving_class, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_rng_trf_ind_required, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_rng_power_saving_class_reserved, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case RNG_POWER_SAVING_CLASS_ID:
+ add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_class_id, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_POWER_SAVING_CLASS_TYPE:
+ add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_class_type, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_START_FRAME_NUMBER:
+ add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_first_sleep_window_frame, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_INITIAL_SLEEP_WINDOW:
+ add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_initial_sleep_window, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_LISTENING_WINDOW:
+ add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_listening_window, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_FINAL_SLEEP_WINDOW_BASE:
+ add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_final_sleep_window_base, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_FINAL_SLEEP_WINDOW_EXPONENT:
+ add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_final_sleep_window_exp, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_SLPID:
+ add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_slpid, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_CID:
+ add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_included_cid, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_DIRECTION:
+ add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_rng_power_saving_mgmt_connection_direction, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ default:
+ add_tlv_subtree(&tlv_info, power_saving_class_tree, hf_tlv_type, tvb, offset, ENC_NA);
+ break;
+ }
+ /* update the offset */
+ offset = tlv_len + tlv_offset;
+ } /* end of TLV process while loop */
+}
+
+
+/* Decode RNG-REQ messages. */
+static int dissect_mac_mgmt_msg_rng_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tlv_offset;
+ guint tvb_len;
+ proto_item *rng_req_item, *tlv_item;
+ proto_tree *rng_req_tree, *tlv_tree;
+ tlv_info_t tlv_info;
+ gint tlv_type;
+ gint tlv_len;
+
+ { /* we are being asked for details */
+
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC payload type RNG-REQ */
+ rng_req_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_rng_req_decoder, tvb, offset, tvb_len, "MAC Management Message, RNG-REQ");
+ /* add MAC RNG-REQ subtree */
+ rng_req_tree = proto_item_add_subtree(rng_req_item, ett_mac_mgmt_msg_rng_req_decoder);
+ /* display the Message Type */
+ proto_tree_add_item(rng_req_tree, hf_rng_req_reserved, tvb, 0, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ while(offset < tvb_len)
+ {
+ /* Get the TLV data. */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "RNG-REQ TLV error");
+ proto_tree_add_item(rng_req_tree, hf_rng_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the offset to the TLV data */
+ tlv_offset = offset + get_tlv_value_offset(&tlv_info);
+
+ switch (tlv_type) {
+ case RNG_REQ_DL_BURST_PROFILE:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_dl_burst_profile, tvb, offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rng_req_decoder);
+ proto_tree_add_item(tlv_tree, hf_rng_req_dl_burst_profile_diuc, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_rng_req_dl_burst_profile_lsb_ccc, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case RNG_REQ_SS_MAC_ADDRESS:
+ add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_ss_mac_address, tvb, offset, ENC_NA);
+ break;
+ case RNG_REQ_RANGING_ANOMALIES:
+ tlv_item = add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_ranging_anomalies, tvb, offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rng_req_decoder);
+ proto_tree_add_item(tlv_tree, hf_rng_req_ranging_anomalies_max_power, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_rng_req_ranging_anomalies_min_power, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_rng_req_ranging_anomalies_timing_adj, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case RNG_REQ_AAS_BROADCAST:
+ add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_aas_broadcast, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_REQ_SERVING_BS_ID:
+ add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_serving_bs_id, tvb, offset, ENC_NA);
+ break;
+ case RNG_REQ_RANGING_PURPOSE_INDICATION:
+ /* display the Ranging Purpose Flags */
+ tlv_item = add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_ranging_purpose_indication, tvb, offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rng_req_decoder);
+ proto_tree_add_item(tlv_tree, hf_rng_req_ranging_purpose_ho_indication, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_rng_req_ranging_purpose_location_update_request, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_rng_req_ranging_purpose_reserved, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case RNG_REQ_HO_ID:
+ add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_ho_id, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_REQ_POWER_DOWN_INDICATOR:
+ add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_power_down_indicator, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_REQ_REQUESTED_DNLK_REP_CODING_LEVEL:
+ tlv_item = add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_requested_rep_coding_level, tvb, offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rng_req_decoder);
+ proto_tree_add_item(tlv_tree, hf_rng_req_repetition_coding_level, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_rng_req_requested_downlink_repetition_coding_level_reserved, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case RNG_REQ_CMAC_KEY_COUNT:
+ if (include_cor2_changes) {
+ add_tlv_subtree(&tlv_info, rng_req_tree, hf_rng_req_cmac_key_count, tvb, offset, ENC_BIG_ENDIAN);
+ } else {
+ /* Unknown TLV type */
+ add_tlv_subtree(&tlv_info, rng_req_tree, hf_tlv_type, tvb, offset, ENC_NA);
+ }
+ break;
+ case SHORT_HMAC_TUPLE:
+ case SHORT_HMAC_TUPLE_COR2:
+ if ((!include_cor2_changes && (tlv_type == SHORT_HMAC_TUPLE)) ||
+ (include_cor2_changes && (tlv_type == SHORT_HMAC_TUPLE_COR2))) {
+ /* decode and display the Short HMAC Tuple */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_rng_req_decoder, rng_req_tree, proto_mac_mgmt_msg_rng_req_decoder, tvb, offset, tlv_len, "Short HMAC Tuple");
+ wimax_short_hmac_tuple_decoder(tlv_tree, tvb, tlv_offset, tvb_len - offset);
+ } else {
+ /* Unknown TLV Type */
+ add_tlv_subtree(&tlv_info, rng_req_tree, hf_tlv_type, tvb, offset, ENC_NA);
+ }
+ break;
+ case MAC_VERSION_ENCODING:
+ offset += wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, rng_req_tree);
+ continue;
+ break;
+ case RNG_REQ_POWER_SAVING_CLASS_PARAMETERS:
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_rng_req_decoder, rng_req_tree, proto_mac_mgmt_msg_rng_req_decoder, tvb, offset, tlv_len, "Power Saving Class Parameters");
+ dissect_power_saving_class(tlv_tree, tlv_type, tvb, tlv_len, pinfo, tlv_offset);
+ break;
+ default:
+ add_tlv_subtree(&tlv_info, rng_req_tree, hf_tlv_type, tvb, offset, ENC_NA);
+ break;
+ }
+ /* update the offset */
+ offset = tlv_len + tlv_offset;
+ } /* end of TLV process while loop */
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_rng_req(void)
+{
+ /* RNG-REQ fields display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_rng_activation_of_power_saving_class,
+ {
+ "Activation of Power Saving Class (Types 1 and 2 only)", "wmx.rng.power_save.activate",
+ FT_BOOLEAN, 8, TFS(&tfs_rng_activate), 0x02, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_power_saving_class_id,
+ {
+ "Power Saving Class ID", "wmx.rng.power_save.class_id",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_power_saving_class_type,
+ {
+ "Power Saving Class Type", "wmx.rng.power_save.class_type",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_definition_of_power_saving_class_present,
+ {
+ "Definition of Power Saving Class present", "wmx.rng.power_save.definition_present",
+ FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_power_saving_final_sleep_window_base,
+ {
+ "Final-sleep window base (measured in frames)", "wmx.rng.power_save.final_sleep_window_base",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_power_saving_final_sleep_window_exp,
+ {
+ "Final-sleep window exponent (measured in frames)", "wmx.rng.power_save.final_sleep_window_exp",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_power_saving_first_sleep_window_frame,
+ {
+ "Start frame number for first sleep window", "wmx.rng.power_save.first_sleep_window_frame",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_power_saving_included_cid,
+ {
+ "CID of connection to be included into the Power Saving Class.", "wmx.rng.power_save.included_cid",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_power_saving_initial_sleep_window,
+ {
+ "Initial-sleep window", "wmx.rng.power_save.initial_sleep_window",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_power_saving_listening_window,
+ {
+ "Listening window duration (measured in frames)", "wmx.rng.power_save.listening_window",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_power_saving_mgmt_connection_direction,
+ {
+ "Direction for management connection added to Power Saving Class", "wmx.rng.power_save.mgmt_connection_direction",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_power_saving_class_reserved,
+ {
+ "Reserved", "wmx.rng.power_save.reserved",
+ FT_UINT8, BASE_DEC, NULL, 0xF8, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_power_saving_slpid,
+ {
+ "SLPID assigned by the BS whenever an MS is instructed to enter sleep mode", "wmx.rng.power_save.slpid",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_trf_ind_required,
+ {
+ "BS shall transmit at least one TRF-IND message during each listening window of the Power Saving Class", "wmx.rng.power_save.trf_ind_required",
+ FT_BOOLEAN, 8, TFS(&tfs_rng_activate), 0x04, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_aas_broadcast,
+ {
+ "AAS broadcast capability", "wmx.rng_req.aas_broadcast",
+ FT_BOOLEAN, BASE_NONE, TFS(&tfs_rng_req_aas_broadcast), 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_ranging_anomalies_max_power,
+ {
+ "Meaning", "wmx.rng_req.anomalies.max_power",
+ FT_BOOLEAN, 8, TFS(&tfs_rng_max_power), 0x04, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_ranging_anomalies_min_power,
+ {
+ "Meaning", "wmx.rng_req.anomalies.min_power",
+ FT_BOOLEAN, 8, TFS(&tfs_rng_min_power), 0x02, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_ranging_anomalies_timing_adj,
+ {
+ "Meaning", "wmx.rng_req.anomalies.timing_adj",
+ FT_BOOLEAN, 8, TFS(&tfs_rng_timing_adj), 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_cmac_key_count,
+ {
+ "CMAC Key Count", "wmx.rng_req.cmac_key_count",
+ FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_dl_burst_profile_lsb_ccc,
+ {
+ "LSB of CCC of DCD associated with DIUC", "wmx.rng_req.dl_burst_profile.ccc",
+ FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_dl_burst_profile_diuc,
+ {
+ "DIUC", "wmx.rng_req.dl_burst_profile.diuc",
+ FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL
+ }
+ },
+ {
+ &hf_tlv_type,
+ {
+ "Unknown TLV Type", "wmx.rng_req.unknown_tlv_type",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_invalid_tlv,
+ {
+ "Invalid TLV", "wmx.rng_req.invalid_tlv",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_ho_id,
+ {
+ "ID from the target BS for use in initial ranging during MS handover to it", "wmx.rng_req.ho_id",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_power_down_indicator,
+ {
+ "Power down Indicator", "wmx.rng_req.power_down_indicator",
+ FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_ranging_purpose_ho_indication,
+ {
+ "MS HO indication", "wmx.rng_req.ranging_purpose.ho_indication",
+ FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_ranging_purpose_reserved,
+ {
+ "Reserved", "wmx.rng_req.ranging_purpose.reserved",
+ FT_UINT8, BASE_DEC, NULL, 0xFC, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_ranging_purpose_location_update_request,
+ {
+ "Location Update Request", "wmx.rng_req.ranging_purpose.loc_update_req",
+ FT_UINT8, BASE_DEC, VALS(vals_rng_req_ranging_purpose_location_update_request), 0x02, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_repetition_coding_level,
+ {
+ "Repetition coding level", "wmx.rng_req.repetition_coding_level",
+ FT_UINT8, BASE_DEC, VALS(vals_rng_req_repetition_coding_level), 0x03, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_requested_downlink_repetition_coding_level_reserved,
+ {
+ "Reserved", "wmx.rng_req.reserved",
+ FT_UINT8, BASE_DEC, NULL, 0xFC, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_reserved,
+ {
+ "Reserved", "wmx.rng_req.reserved",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_serving_bs_id,
+ {
+ "Former serving BS ID", "wmx.rng_req.serving_bs_id",
+ FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_ss_mac_address,
+ {
+ "SS MAC Address", "wmx.rng_req.ss_mac_address",
+ FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_power_saving_class_flags,
+ {
+ "Power Saving Class", "wmx.rng.power_save.flags",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_dl_burst_profile,
+ {
+ "Requested Downlink Burst Profile", "wmx.rng_req.dl_burst_profile",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_ranging_anomalies,
+ {
+ "Ranging Anomalies", "wmx.rng_req.anomalies",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_ranging_purpose_indication,
+ {
+ "Ranging Purpose Flags", "wmx.rng_req.ranging_purpose.indication",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_requested_rep_coding_level,
+ {
+ "Requested downlink repetition coding level", "wmx.rng_req.requested_rep_coding_level",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_mgmt_msg_rng_req_decoder,
+ };
+
+ proto_mac_mgmt_msg_rng_req_decoder = proto_register_protocol (
+ "WiMax RNG-REQ Messages", /* name */
+ "WiMax RNG-REQ", /* short name */
+ "wmx.rng_req" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_rng_req_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+void proto_reg_handoff_mac_mgmt_msg_rng_req(void)
+{
+ dissector_handle_t rng_req_handle;
+
+ rng_req_handle = create_dissector_handle(dissect_mac_mgmt_msg_rng_req_decoder, proto_mac_mgmt_msg_rng_req_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_RNG_REQ, rng_req_handle);
+}
+
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_rng_rsp.c b/plugins/epan/wimax/msg_rng_rsp.c
new file mode 100644
index 0000000000..ea85a2b9cd
--- /dev/null
+++ b/plugins/epan/wimax/msg_rng_rsp.c
@@ -0,0 +1,975 @@
+/* msg_rng_rsp.c
+ * WiMax MAC Management RNG-RSP Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: John R. Underwood <junderx@yahoo.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax_tlv.h"
+#include "wimax_mac.h"
+#include "wimax_utils.h"
+
+void proto_register_mac_mgmt_msg_rng_rsp(void);
+void proto_reg_handoff_mac_mgmt_msg_rng_rsp(void);
+
+extern gboolean include_cor2_changes;
+
+static dissector_handle_t sbc_rsp_handle = NULL;
+static dissector_handle_t reg_rsp_handle = NULL;
+
+static gint proto_mac_mgmt_msg_rng_rsp_decoder = -1;
+static gint ett_mac_mgmt_msg_rng_rsp_decoder = -1;
+static gint ett_rng_rsp_message_tree = -1;
+
+/* RNG-RSP fields */
+static gint hf_rng_req_reserved = -1;
+/* static gint hf_rng_rsp_ul_channel_id = -1; */
+static gint hf_rng_rsp_timing_adjust = -1;
+static gint hf_rng_rsp_power_level_adjust = -1;
+static gint hf_rng_rsp_offset_freq_adjust = -1;
+static gint hf_rng_rsp_ranging_status = -1;
+static gint hf_rng_rsp_dl_freq_override = -1;
+static gint hf_rng_rsp_ul_chan_id_override = -1;
+static gint hf_rng_rsp_dl_operational_burst_profile = -1;
+static gint hf_rng_rsp_dl_operational_burst_profile_diuc = -1;
+static gint hf_rng_rsp_dl_operational_burst_profile_ccc = -1;
+static gint hf_rng_rsp_ss_mac_address = -1;
+static gint hf_rng_rsp_basic_cid = -1;
+static gint hf_rng_rsp_primary_mgmt_cid = -1;
+static gint hf_rng_rsp_broadcast = -1;
+static gint hf_rng_rsp_frame_number = -1;
+static gint hf_rng_rsp_opportunity_number = -1;
+static gint hf_rng_rsp_service_level_prediction = -1;
+static gint hf_rng_rsp_resource_retain_flag = -1;
+static gint hf_rng_rsp_ho_process_optimization = -1;
+static gint hf_rng_rsp_ho_process_optimization_0 = -1;
+static gint hf_rng_rsp_ho_process_optimization_1_2 = -1;
+static gint hf_rng_rsp_ho_process_optimization_3 = -1;
+static gint hf_rng_rsp_ho_process_optimization_4 = -1;
+static gint hf_rng_rsp_ho_process_optimization_5 = -1;
+static gint hf_rng_rsp_ho_process_optimization_6 = -1;
+static gint hf_rng_rsp_ho_process_optimization_7 = -1;
+static gint hf_rng_rsp_ho_process_optimization_8 = -1;
+static gint hf_rng_rsp_ho_process_optimization_9 = -1;
+static gint hf_rng_rsp_ho_process_optimization_10 = -1;
+static gint hf_rng_rsp_ho_process_optimization_11 = -1;
+static gint hf_rng_rsp_ho_process_optimization_12 = -1;
+static gint hf_rng_rsp_ho_process_optimization_13 = -1;
+static gint hf_rng_rsp_ho_process_optimization_14 = -1;
+static gint hf_rng_rsp_ho_process_optimization_15 = -1;
+/* Added the following to help implement RNG-RSP message encoding 33 (Table 367 in IEEE 802.16e-2007) */
+static gint hf_rng_rsp_dl_op_burst_profile_ofdma = -1;
+static gint hf_rng_rsp_least_robust_diuc = -1;
+static gint hf_rng_rsp_repetition_coding_indication = -1;
+static gint hf_rng_rsp_config_change_count_of_dcd = -1;
+/* Added the following to help implement RNG-RSP message encoding 22 (Table 367 in IEEE 802.16e-2007) */
+static gint hf_rng_rsp_ho_id = -1;
+static gint hf_rng_rsp_location_update_response = -1;
+/* Added the following to help implement RNG-RSP message encoding 24 (Table 367 in IEEE 802.16e-2007) */
+static gint hf_rng_rsp_paging_information = -1;
+static gint hf_rng_rsp_paging_cycle = -1;
+static gint hf_rng_rsp_paging_offset = -1;
+static gint hf_rng_rsp_paging_group_id = -1;
+static gint hf_rng_rsp_bs_random = -1;
+static gint hf_rng_rsp_akid = -1;
+static gint hf_rng_rsp_ranging_subchan = -1;
+static gint hf_rng_rsp_time_symbol_reference = -1;
+static gint hf_rng_rsp_subchannel_reference = -1;
+static gint hf_rng_rsp_ranging_code_index = -1;
+static gint hf_rng_rsp_frame_number2 = -1;
+static gint hf_tlv_type = -1;
+/* static gint hf_tlv_value = -1; */
+static gint hf_rng_invalid_tlv = -1;
+
+/* STRING RESOURCES */
+
+static const true_false_string tfs_rng_rsp_aas_broadcast = {
+ "SS shall not issue contention-based Bandwidth Request",
+ "SS may issue contention-based Bandwidth Request"
+};
+
+static const true_false_string tfs_rng_rsp_resource_retain_flag = {
+ "Retained by the BS",
+ "Deleted by the BS"
+};
+
+static const value_string vals_rng_rsp_ranging_status[] = {
+ {1, "continue"},
+ {2, "abort"},
+ {3, "success"},
+ {4, "rerange"},
+ {0, NULL}
+};
+
+static const value_string vals_rng_rsp_level_of_service[] = {
+ {0, "No service possible for this MS"},
+ {1, "Some service is available for one or"
+ " several service flows authorized for the MS"},
+ {2, "For each authorized service flow, a MAC"
+ " connection can be established with QoS"
+ " specified by the AuthorizedQoSParamSet"},
+ {3, "No service level prediction available"},
+ {0, NULL}
+};
+
+static const value_string vals_rng_rsp_ho_process_optimization_0[] = {
+ {0, "SBC-REQ management messages during current re-entry"
+ " processing required"},
+ {1, "Omit SBC-REQ management messages during current"
+ " re-entry processing"},
+ {0, NULL},
+};
+
+static const value_string vals_rng_rsp_ho_process_optimization_1_2[] = {
+ {0, "Perform re-authentication and SA-TEK 3-way handshake."
+ " BS should include SA-TEK-Update TLV in the"
+ " SA-TEK-Response message. In addition, the RNG-RSP"
+ " message does not include SA-TEK-Update TLV or SA"
+ " Challenge Tuple TLV."},
+ {1, "SA-TEK-Update TLV is included in the RNG-RSP message."
+ " In this case, SA-TEK 3-way handshake is avoided and"
+ " SA Challenge Tuple TLV shall not be included in the"
+ " RNG-RSP message."},
+ {2, "Reserved"},
+ {3, "Re-authentication and SA-TEK 3-way handshake is not"
+ " performed. The RNG-RSP message does not include"
+ " SA-TEK-Update TLV nor SA Challenge Tuple TLV. All the"
+ " TEKs received from the serving BS are reused"},
+ {0, NULL}
+};
+
+static const value_string vals_rng_rsp_ho_process_optimization_3[] = {
+ {0, "Network Address Acquisition management messages during"
+ " current reentry processing required"},
+ {1, "Omit Network Address Acquisition management messages"
+ " during current reentry processing"},
+ {0, NULL}
+};
+
+static const value_string vals_rng_rsp_ho_process_optimization_4[] = {
+ {0, "Time of Day Acquisition management messages during"
+ " current reentry processing required"},
+ {1, "Omit Time of Day Acquisition management messages"
+ " during current reentry processing"},
+ {0, NULL}
+};
+
+static const value_string vals_rng_rsp_ho_process_optimization_5[] = {
+ {0, "TFTP management messages during current re-entry"
+ " processing required"},
+ {1, "Omit TFTP management messages during current re-entry"
+ " processing"},
+ {0, NULL}
+};
+
+static const value_string vals_rng_rsp_ho_process_optimization_6[] = {
+ {0, "Full service and operational state transfer or sharing"
+ " between Serving BS and Target BS required"},
+ {1, "Omit Full service and operational state transfer or"
+ " sharing between Serving BS and Target BS"},
+ {0, NULL}
+};
+
+static const value_string vals_rng_rsp_ho_process_optimization_7[] = {
+ {0, "REG-REQ management message during current re-entry"
+ " processing required"},
+ {1, "Omit REG-REQ management message during current re-entry"
+ " processing"},
+ {0, NULL}
+};
+
+static const value_string vals_rng_rsp_ho_process_optimization_8[] = {
+ {0, "BS shall send not send an unsolicited SBC-RSP"
+ " management message"},
+ {1, "BS shall send an unsolicited SBC-RSP management message"},
+ {0, NULL}
+};
+
+static const value_string vals_rng_rsp_ho_process_optimization_9[] = {
+ {0, "No post-HO re-entry MS DL data pending at target BS"},
+ {1, "post-HO re-entry MS DL data pending at target BS"},
+ {0, NULL}
+};
+
+static const value_string vals_rng_rsp_ho_process_optimization_10[] = {
+ {0, "BS shall not send an unsolicited REG-RSP management"
+ " message"},
+ {1, "BS shall send an unsolicited REG-RSP management message"},
+ {0, NULL}
+};
+
+static const value_string vals_rng_rsp_ho_process_optimization_11[] = {
+ {0, "(Target) BS does not support virtual SDU SN"},
+ {1, "(Target} BS supports virtual SDU SN"},
+ {0, NULL}
+};
+
+static const value_string vals_rng_rsp_ho_process_optimization_12[] = {
+ {0, "MS shall not send a notification of MS's successful"
+ " re-entry registration"},
+ {1, "MS shall send a notification of MS's successful"
+ " re-entry registration"},
+ {0, NULL}
+};
+
+static const value_string vals_rng_rsp_ho_process_optimization_13[] = {
+ {0, "MS shall not trigger a higher layer protocol required"
+ " to refresh its traffic IP address"},
+ {1, "MS shall trigger a higher layer protocol required to"
+ " refresh its traffic IP address"},
+ {0, NULL}
+};
+
+static const value_string vals_rng_rsp_repetition_coding_indication[] = {
+ {0, "No repetition coding"},
+ {1, "Repetition coding of 2"},
+ {2, "Repetition coding of 4"},
+ {3, "Repetition coding of 6"},
+ {0, NULL}
+};
+
+static const value_string vals_rng_rsp_location_update_response[] = {
+ {0, "Success of Location Update"},
+ {1, "Failure of Location Update"},
+ {3, "Success of location update and DL traffic pending"},
+ {4, "Reserved"},
+ {0, NULL}
+};
+
+
+/* Decode RNG-RSP messages. */
+static int dissect_mac_mgmt_msg_rng_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ proto_item *ranging_status_item = NULL;
+ proto_item *dl_freq_override_item = NULL;
+ proto_item *ss_mac_address_item = NULL;
+ proto_item *frame_number_item = NULL;
+ proto_item *opportunity_number_item = NULL;
+
+ guint offset = 0;
+ guint tlv_offset;
+ guint tvb_len;
+ proto_item *rng_rsp_item, *sub_item;
+ proto_item *tlv_item = NULL;
+ proto_tree *rng_rsp_tree;
+ proto_tree *sub_tree = NULL;
+ tlv_info_t tlv_info;
+ gint tlv_type;
+ guint tlv_len;
+ guint this_offset = 0;
+ tlv_info_t sub_tlv_info;
+ gint sub_tlv_type;
+ gint sub_tlv_len;
+ guint sub_tlv_offset;
+ float timing_adjust;
+ float power_level_adjust;
+
+ { /* we are being asked for details */
+
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC payload type RNG-RSP */
+ rng_rsp_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_rng_rsp_decoder, tvb, offset, tvb_len, "MAC Management Message, RNG-RSP");
+ /* add MAC RNG-RSP subtree */
+ rng_rsp_tree = proto_item_add_subtree(rng_rsp_item, ett_mac_mgmt_msg_rng_rsp_decoder);
+
+ proto_tree_add_item(rng_rsp_tree, hf_rng_req_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ while(offset < tvb_len)
+ {
+ /* Get the TLV data. */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "RNG-RSP TLV error");
+ proto_tree_add_item(rng_rsp_tree, hf_rng_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the offset to the TLV data */
+ tlv_offset = offset + get_tlv_value_offset(&tlv_info);
+
+ switch (tlv_type) {
+ case RNG_RSP_TIMING_ADJUST: {
+ sub_tree = add_tlv_subtree_no_item(&tlv_info, rng_rsp_tree, hf_rng_rsp_timing_adjust, tvb, offset);
+ timing_adjust = (float)(tvb_get_ntohl(tvb, tlv_offset) / 4.0);
+ tlv_item = proto_tree_add_float_format_value(sub_tree, hf_rng_rsp_timing_adjust, tvb,
+ tlv_offset, 4, timing_adjust, " %.2f modulation symbols", timing_adjust);
+ if ((timing_adjust < -2) || (timing_adjust > 2))
+ proto_item_append_text(tlv_item, " (during periodic ranging shall not exceed +- 2)");
+ break;
+ }
+ case RNG_RSP_POWER_LEVEL_ADJUST: {
+ sub_tree = add_tlv_subtree_no_item(&tlv_info, rng_rsp_tree, hf_rng_rsp_power_level_adjust, tvb, offset);
+ power_level_adjust = (float)(tvb_get_guint8(tvb, tlv_offset) / 4.0);
+ proto_tree_add_float_format_value(sub_tree, hf_rng_rsp_power_level_adjust, tvb, tlv_offset, 1,
+ power_level_adjust, " %.2f dB", power_level_adjust);
+ break;
+ }
+ case RNG_RSP_OFFSET_FREQ_ADJUST: {
+ add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_offset_freq_adjust, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case RNG_RSP_RANGING_STATUS:
+ ranging_status_item = add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_ranging_status, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_RSP_DL_FREQ_OVERRIDE: {
+ dl_freq_override_item = add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_dl_freq_override, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case RNG_RSP_UL_CHANNEL_ID_OVERRIDE:
+ add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_ul_chan_id_override, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_RSP_DL_OPERATIONAL_BURST_PROFILE:
+ sub_item = add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_dl_operational_burst_profile, tvb, offset, ENC_BIG_ENDIAN);
+ sub_tree = proto_item_add_subtree(sub_item, ett_rng_rsp_message_tree);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_dl_operational_burst_profile_diuc, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_dl_operational_burst_profile_ccc, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ break;
+ case RNG_RSP_SS_MAC_ADDRESS:
+ if (tlv_len == 6)
+ {
+ ss_mac_address_item = add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_ss_mac_address, tvb, offset, ENC_NA);
+ } else {
+ add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_invalid_tlv, tvb, offset, ENC_NA);
+ }
+ break;
+ case RNG_RSP_BASIC_CID:
+ add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_basic_cid, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_RSP_PRIMARY_MGMT_CID:
+ add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_primary_mgmt_cid, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_RSP_AAS_BROADCAST_PERMISSION:
+ add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_broadcast, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_RSP_FRAME_NUMBER:
+ frame_number_item = add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_frame_number, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_RSP_OPPORTUNITY_NUMBER:
+ opportunity_number_item = add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_opportunity_number, tvb, offset, ENC_BIG_ENDIAN);
+ if (tvb_get_ntohl(tvb, tlv_offset) == 0)
+ proto_item_append_text(opportunity_number_item, " (may not be 0!)");
+ break;
+ case RNG_RSP_SERVICE_LEVEL_PREDICTION:
+ add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_service_level_prediction, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_RSP_RESOURCE_RETAIN_FLAG:
+ add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_resource_retain_flag, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_RSP_HO_PROCESS_OPTIMIZATION:
+ sub_item = add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_ho_process_optimization, tvb, offset, ENC_BIG_ENDIAN);
+ sub_tree = proto_item_add_subtree(sub_item, ett_rng_rsp_message_tree);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_ho_process_optimization_0, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_ho_process_optimization_1_2, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_ho_process_optimization_3, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_ho_process_optimization_4, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_ho_process_optimization_5, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_ho_process_optimization_6, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_ho_process_optimization_7, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_ho_process_optimization_8, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_ho_process_optimization_9, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_ho_process_optimization_10, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_ho_process_optimization_11, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_ho_process_optimization_12, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_ho_process_optimization_13, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_ho_process_optimization_14, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_ho_process_optimization_15, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ break;
+ case RNG_RSP_SBC_RSP_ENCODINGS:
+ sub_tree = add_protocol_subtree(&tlv_info, ett_rng_rsp_message_tree, rng_rsp_tree, proto_mac_mgmt_msg_rng_rsp_decoder, tvb, offset, tlv_len, "SBC-RSP Encodings");
+ call_dissector(sbc_rsp_handle, tvb_new_subset_length(tvb, tlv_offset, tlv_len), pinfo, sub_tree);
+ break;
+ case RNG_RSP_REG_RSP_ENCODINGS:
+ sub_tree = add_protocol_subtree(&tlv_info, ett_rng_rsp_message_tree, rng_rsp_tree, proto_mac_mgmt_msg_rng_rsp_decoder, tvb, offset, tlv_len, "REG-RSP Encodings");
+ call_dissector(reg_rsp_handle, tvb_new_subset_length(tvb, tlv_offset, tlv_len), pinfo, sub_tree);
+ break;
+ /* Implemented message encoding 33 (Table 367 in IEEE 802.16e-2007) */
+ case RNG_RSP_DL_OP_BURST_PROFILE_OFDMA:
+ sub_item = add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_dl_op_burst_profile_ofdma, tvb, offset, ENC_BIG_ENDIAN);
+ sub_tree = proto_item_add_subtree(sub_item, ett_rng_rsp_message_tree);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_least_robust_diuc, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_repetition_coding_indication, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_config_change_count_of_dcd, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ break;
+ case RNG_RSP_HO_ID:
+ add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_ho_id, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_RSP_LOCATION_UPDATE_RESPONSE:
+ add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_location_update_response, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case RNG_RSP_PAGING_INFORMATION:
+ sub_item = add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_paging_information, tvb, offset, ENC_NA);
+ sub_tree = proto_item_add_subtree(sub_item, ett_rng_rsp_message_tree);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_paging_cycle, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_paging_offset, tvb, tlv_offset+2, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_paging_group_id, tvb, tlv_offset+3, 2, ENC_BIG_ENDIAN);
+ break;
+ case RNG_RSP_POWER_SAVING_CLASS_PARAMETERS:
+ sub_tree = add_protocol_subtree(&tlv_info, ett_rng_rsp_message_tree, rng_rsp_tree, proto_mac_mgmt_msg_rng_rsp_decoder, tvb, offset, tlv_len, "Power Saving Class Parameters");
+ dissect_power_saving_class(sub_tree, tlv_type, tvb, tlv_len, pinfo, tlv_offset);
+ break;
+ case RNG_RSP_SA_CHALLENGE_TUPLE:
+ /* Display SA Challenge Tuple header */
+ sub_tree = add_protocol_subtree(&tlv_info, ett_rng_rsp_message_tree, rng_rsp_tree, proto_mac_mgmt_msg_rng_rsp_decoder, tvb, offset, tlv_len, "SA Challenge Tuple");
+ /* add subtree */
+ /* Use a local copy of tlv_offset */
+ this_offset = tlv_offset;
+ while(this_offset < tlv_len) {
+ /* Get the sub TLV data. */
+ init_tlv_info(&sub_tlv_info, tvb, this_offset);
+ /* get the sub TLV type */
+ sub_tlv_type = get_tlv_type(&sub_tlv_info);
+ /* get the TLV length */
+ sub_tlv_len = get_tlv_length(&sub_tlv_info);
+ if(tlv_type == -1 || sub_tlv_len > MAX_TLV_LEN || sub_tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "RNG-RSP TLV error");
+ proto_tree_add_item(rng_rsp_tree, hf_rng_invalid_tlv, tvb, tlv_offset, (tvb_len - tlv_offset), ENC_NA);
+ break;
+ }
+ /* get the offset to the sub TLV data */
+ sub_tlv_offset = this_offset + get_tlv_value_offset(&sub_tlv_info);
+ switch (sub_tlv_type) {
+ case RNG_RSP_SA_CHALLENGE_BS_RANDOM:
+ add_tlv_subtree(&sub_tlv_info, sub_tree, hf_rng_rsp_bs_random, tvb, this_offset, ENC_NA);
+ break;
+ case RNG_RSP_SA_CHALLENGE_AKID:
+ add_tlv_subtree(&sub_tlv_info, sub_tree, hf_rng_rsp_akid, tvb, this_offset, ENC_NA);
+ break;
+ default:
+ add_tlv_subtree(&sub_tlv_info, sub_tree, hf_tlv_type, tvb, this_offset, ENC_NA);
+ break;
+ }
+ this_offset = sub_tlv_len + sub_tlv_offset;
+ }
+ break;
+ case DSx_UPLINK_FLOW:
+ /* display Uplink Service Flow Encodings info */
+ /* add subtree */
+ sub_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_rng_rsp_decoder, rng_rsp_tree, proto_mac_mgmt_msg_rng_rsp_decoder, tvb, offset, tlv_len, "Uplink QOS Parameters");
+ /* decode and display the DL Service Flow Encodings */
+ wimax_service_flow_encodings_decoder(tvb_new_subset_length(tvb, tlv_offset, tlv_len), pinfo, sub_tree);
+ break;
+ case DSx_DOWNLINK_FLOW:
+ /* display Downlink Service Flow Encodings info */
+ /* add subtree */
+ sub_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_rng_rsp_decoder, rng_rsp_tree, proto_mac_mgmt_msg_rng_rsp_decoder, tvb, offset, tlv_len, "Downlink QOS Parameters");
+ /* decode and display the DL Service Flow Encodings */
+ wimax_service_flow_encodings_decoder(tvb_new_subset_length(tvb, tlv_offset, tlv_len), pinfo, sub_tree);
+ break;
+ case RNG_RSP_RANGING_CODE_ATTRIBUTES:
+ /* case SHORT_HMAC_TUPLE: */
+ sub_item = add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_rng_rsp_ranging_subchan, tvb, offset, ENC_BIG_ENDIAN);
+ sub_tree = proto_item_add_subtree(sub_item, ett_rng_rsp_message_tree);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_time_symbol_reference, tvb, tlv_offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_subchannel_reference, tvb, tlv_offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_ranging_code_index, tvb, tlv_offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_rng_rsp_frame_number2, tvb, tlv_offset, 4, ENC_BIG_ENDIAN);
+ break;
+ case SHORT_HMAC_TUPLE_COR2:
+ if (include_cor2_changes) {
+ sub_tree = add_protocol_subtree(&tlv_info, ett_rng_rsp_message_tree, rng_rsp_tree, proto_mac_mgmt_msg_rng_rsp_decoder, tvb, offset, tlv_len, "Short HMAC Tuple");
+ wimax_short_hmac_tuple_decoder(sub_tree, tvb, tlv_offset, tvb_len - offset);
+ } else {
+ /* Unknown TLV type */
+ add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_tlv_type, tvb, offset, ENC_NA);
+ }
+ break;
+
+ default:
+ add_tlv_subtree(&tlv_info, rng_rsp_tree, hf_tlv_type, tvb, offset, ENC_NA);
+ break;
+
+ }
+ offset = tlv_len + tlv_offset;
+ } /* end of TLV process while loop */
+ /*
+ * XXX - these should probably be expert info items.
+ */
+ if (ranging_status_item && dl_freq_override_item)
+ proto_item_append_text(ranging_status_item, " (shall be set to 2 because Downlink Frequency Override is present)");
+ if (ss_mac_address_item && frame_number_item) {
+ proto_item_append_text(frame_number_item, " (mutually exclusive with SS MAC Address!)");
+ proto_item_append_text(ss_mac_address_item, " (mutually exclusive with Frame Number!)");
+ }
+ if (ss_mac_address_item && opportunity_number_item) {
+ proto_item_append_text(opportunity_number_item, " (mutually exclusive with SS MAC Address!)");
+ proto_item_append_text(ss_mac_address_item, " (mutually exclusive with Initial Ranging Opportunity Number!)");
+ }
+ if (!ranging_status_item)
+ proto_item_append_text(rng_rsp_tree, " (Ranging status is missing!)");
+
+ }
+ return tvb_captured_length(tvb);
+}
+
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_rng_rsp(void)
+{
+ /* RNG-RSP fields display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_rng_rsp_broadcast,
+ {
+ "AAS broadcast permission", "wmx.rng_rsp.aas_broadcast",
+ FT_BOOLEAN, BASE_NONE, TFS(&tfs_rng_rsp_aas_broadcast), 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_akid,
+ {
+ "AKId", "wmx.rng_rsp.akid",
+ FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_basic_cid,
+ {
+ "Basic CID", "wmx.rng_rsp.basic_cid",
+ FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_bs_random,
+ {
+ "BS_Random", "wmx.rng_rsp.bs_random",
+ FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_config_change_count_of_dcd,
+ {
+ "Configuration Change Count value of DCD defining DIUC associated burst profile", "wmx.rng_rsp.config_change_count_of_dcd",
+ FT_UINT16, BASE_HEX, NULL, 0xFF00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_dl_freq_override,
+ {
+ "Downlink Frequency Override", "wmx.rng_rsp.dl_freq_override",
+ FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_hz, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_dl_operational_burst_profile_ccc,
+ {
+ "CCC value of DCD defining the burst profile associated with DIUC", "wmx.rng_rsp.dl_op_burst_prof.ccc",
+ FT_UINT16, BASE_DEC, NULL, 0x00FF, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_dl_operational_burst_profile_diuc,
+ {
+ "The least robust DIUC that may be used by the BS for transmissions to the SS", "wmx.rng_rsp.dl_op_burst_prof.diuc",
+ FT_UINT16, BASE_DEC, NULL, 0xFF00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_dl_operational_burst_profile,
+ {
+ "Downlink Operational Burst Profile", "wmx.rng_rsp.dl_op_burst_profile",
+ FT_UINT16, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ /* Added the following to help implement RNG-RSP message encoding 33 (Table 367 in IEEE 802.16e-2007) */
+ {
+ &hf_rng_rsp_dl_op_burst_profile_ofdma,
+ {
+ "Downlink Operational Burst Profile for OFDMA", "wmx.rng_rsp.dl_op_burst_profile_ofdma",
+ FT_UINT16, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_frame_number2,
+ {
+ "The 8 least significant bits of the frame number of the OFDMA frame where the SS sent the ranging code", "wmx.rng_rsp.eight_bit_frame_num",
+ FT_UINT32, BASE_DEC, NULL, 0x000000FF, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_frame_number,
+ {
+ "Frame number", "wmx.rng_rsp.frame_number",
+ FT_UINT24, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+ /* Added the following to help implement RNG-RSP message encoding 22 (IEEE 802.16e-2007) */
+ {
+ &hf_rng_rsp_ho_id,
+ {
+ "HO ID", "wmx.rng_rsp.ho_id",
+ FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ho_process_optimization,
+ {
+ "HO Process Optimization", "wmx.rng_rsp.ho_process_optimization",
+ FT_UINT16, BASE_HEX, NULL, 0x0000, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ho_process_optimization_0,
+ {
+ "Bit #0", "wmx.rng_rsp.ho_process_optimization.omit_sbc_req",
+ FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_0), 0x0001, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ho_process_optimization_1_2,
+ {
+ "Bits #1-2", "wmx.rng_rsp.ho_process_optimization.perform_reauthentication",
+ FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_1_2), 0x0006, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ho_process_optimization_3,
+ {
+ "Bit #3", "wmx.rng_rsp.ho_process_optimization.omit_network_address",
+ FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_3), 0x0008, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ho_process_optimization_4,
+ {
+ "Bit #4", "wmx.rng_rsp.ho_process_optimization.omit_time_of_day",
+ FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_4), 0x0010, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ho_process_optimization_5,
+ {
+ "Bit #5", "wmx.rng_rsp.ho_process_optimization.omit_tftp",
+ FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_5), 0x0020, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ho_process_optimization_6,
+ {
+ "Bit #6", "wmx.rng_rsp.ho_process_optimization.transfer_or_sharing",
+ FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_6), 0x0040, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ho_process_optimization_7,
+ {
+ "Bit #7", "wmx.rng_rsp.ho_process_optimization.omit_reg_req",
+ FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_7), 0x0080, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ho_process_optimization_8,
+ {
+ "Bit #8", "wmx.rng_rsp.ho_process_optimization.unsolicited_sbc_rsp",
+ FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_8), 0x0100, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ho_process_optimization_9,
+ {
+ "Bit #9", "wmx.rng_rsp.ho_process_optimization.post_ho_reentry",
+ FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_9), 0x0200, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ho_process_optimization_10,
+ {
+ "Bit #10", "wmx.rng_rsp.ho_process_optimization.unsolicited_reg_rsp",
+ FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_10), 0x0400, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ho_process_optimization_11,
+ {
+ "Bit #11", "wmx.rng_rsp.ho_process_optimization.virtual_sdu_sn",
+ FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_11), 0x0800, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ho_process_optimization_12,
+ {
+ "Bit #12", "wmx.rng_rsp.ho_process_optimization.send_notification",
+ FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_12), 0x1000, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ho_process_optimization_13,
+ {
+ "Bit #13", "wmx.rng_rsp.ho_process_optimization.trigger_higher_layer_protocol",
+ FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_ho_process_optimization_13), 0x2000, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ho_process_optimization_14,
+ {
+ "Bit #14: Reserved", "wmx.rng_rsp.ho_process_optimization.reserved",
+ FT_UINT16, BASE_HEX, NULL, 0x4000, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ho_process_optimization_15,
+ {
+ "Bit #15: Reserved", "wmx.rng_rsp.ho_process_optimization.reserved",
+ FT_UINT16, BASE_HEX, NULL, 0x8000, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_invalid_tlv,
+ {
+ "Invalid TLV", "wmx.rng_rsp.invalid_tlv",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_least_robust_diuc,
+ {
+ "Least Robust DIUC that may be used by the BS for transmissions to the MS", "wmx.rng_rsp.least_robust_diuc",
+ FT_UINT16, BASE_HEX, NULL, 0x000F, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_location_update_response,
+ {
+ "Location Update Response", "wmx.rng_rsp.location_update_response",
+ FT_UINT8, BASE_DEC, VALS(vals_rng_rsp_location_update_response), 0xFF, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_offset_freq_adjust,
+ {
+ "Offset Frequency Adjust", "wmx.rng_rsp.offset_freq_adjust",
+ FT_INT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_hz, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_opportunity_number,
+ {
+ "Initial ranging opportunity number", "wmx.rng_rsp.opportunity_number",
+ FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_paging_cycle,
+ {
+ "Paging Cycle", "wmx.rng_rsp.paging_cycle",
+ FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_paging_group_id,
+ {
+ "Paging Group ID", "wmx.rng_rsp.paging_group_id",
+ FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_paging_information,
+ {
+ "Paging Information", "wmx.rng_rsp.paging_information",
+ FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_paging_offset,
+ {
+ "Paging Offset", "wmx.rng_rsp.paging_offset",
+ FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_power_level_adjust,
+ {
+ "Power Level Adjust", "wmx.rng_rsp.power_level_adjust",
+ FT_FLOAT, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_primary_mgmt_cid,
+ {
+ "Primary Management CID", "wmx.rng_rsp.primary_mgmt_cid",
+ FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ranging_code_index,
+ {
+ "The ranging code index that was sent by the SS", "wmx.rng_rsp.ranging_code_index",
+ FT_UINT32, BASE_DEC, NULL, 0x0000FF00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ranging_status,
+ {
+ "Ranging status", "wmx.rng_rsp.ranging_status",
+ FT_UINT8, BASE_DEC, VALS(vals_rng_rsp_ranging_status), 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ranging_subchan,
+ {
+ "Ranging code attributes", "wmx.rng_rsp.ranging_subchannel",
+ FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_repetition_coding_indication,
+ {
+ "Repetition Coding Indication", "wmx.rng_rsp.repetition_coding_indication",
+ FT_UINT16, BASE_HEX, VALS(vals_rng_rsp_repetition_coding_indication), 0x00F0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_req_reserved,
+ {
+ "Reserved", "wmx.rng_rsp.reserved",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_resource_retain_flag,
+ {
+ "The connection information for the MS is", "wmx.rng_rsp.resource_retain_flag",
+ FT_BOOLEAN, BASE_NONE, TFS(&tfs_rng_rsp_resource_retain_flag), 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_service_level_prediction,
+ {
+ "Service Level Prediction", "wmx.rng_rsp.service_level_prediction",
+ FT_UINT8, BASE_DEC, VALS(vals_rng_rsp_level_of_service), 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_ss_mac_address,
+ {
+ "SS MAC Address", "wmx.rng_rsp.ss_mac_address",
+ FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_subchannel_reference,
+ {
+ "OFDMA subchannel reference used to transmit the ranging code", "wmx.rng_rsp.subchannel_reference",
+ FT_UINT32, BASE_DEC, NULL, 0x003f0000, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_time_symbol_reference,
+ {
+ "OFDM time symbol reference used to transmit the ranging code", "wmx.rng_rsp.time_symbol_reference",
+ FT_UINT32, BASE_DEC, NULL, 0xFFC00000, NULL, HFILL
+ }
+ },
+ {
+ &hf_rng_rsp_timing_adjust,
+ {
+ "Timing Adjust", "wmx.rng_rsp.timing_adjust",
+ FT_FLOAT, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_rng_rsp_ul_channel_id,
+ {
+ "Uplink Channel ID", "wmx.rng_rsp.ul_chan_id",
+ FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_rng_rsp_ul_chan_id_override,
+ {
+ "Uplink channel ID Override", "wmx.rng_rsp.ul_chan_id_override",
+ FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_tlv_type,
+ {
+ "Unknown TLV Type", "wmx.rng_rsp.unknown_tlv_type",
+ FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_tlv_value,
+ {
+ "Value", "wmx.rng_rsp.tlv_value",
+ FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL
+ }
+ }
+#endif
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_mgmt_msg_rng_rsp_decoder,
+ &ett_rng_rsp_message_tree
+ };
+
+ proto_mac_mgmt_msg_rng_rsp_decoder = proto_register_protocol (
+ "WiMax RNG-RSP Messages", /* name */
+ "WiMax RNG-RSP", /* short name */
+ "wmx.rng_rsp" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_rng_rsp_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+void proto_reg_handoff_mac_mgmt_msg_rng_rsp(void)
+{
+ dissector_handle_t rng_rsp_handle;
+
+ rng_rsp_handle = create_dissector_handle(dissect_mac_mgmt_msg_rng_rsp_decoder, proto_mac_mgmt_msg_rng_rsp_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_RNG_RSP, rng_rsp_handle);
+
+ sbc_rsp_handle = find_dissector("mac_mgmt_msg_sbc_rsp_handler");
+ reg_rsp_handle = find_dissector("mac_mgmt_msg_reg_rsp_handler");
+}
+
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_sbc.c b/plugins/epan/wimax/msg_sbc.c
new file mode 100644
index 0000000000..783aebe81a
--- /dev/null
+++ b/plugins/epan/wimax/msg_sbc.c
@@ -0,0 +1,2849 @@
+/* msg_sbc.c
+ * WiMax MAC Management SBC-REQ/RSP Messages decoders
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#if 0
+#define DEBUG /* for debug only */
+#endif
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax_tlv.h"
+#include "wimax_mac.h"
+#include "wimax_utils.h"
+
+
+void proto_register_mac_mgmt_msg_sbc(void);
+void proto_reg_handoff_mac_mgmt_msg_sbc(void);
+
+/* This is a global variable declared in mac_hd_generic_decoder.c, which determines whether
+ * or not cor2 changes are included */
+extern gboolean include_cor2_changes;
+
+static gint proto_mac_mgmt_msg_sbc_decoder = -1;
+static gint ett_mac_mgmt_msg_sbc_decoder = -1;
+static gint ett_sbc_req_tlv_subtree = -1;
+static gint ett_sbc_rsp_tlv_subtree = -1;
+
+/* fix fields */
+static gint hf_sbc_unknown_type = -1;
+
+static gint hf_sbc_bw_alloc_support = -1;
+static gint hf_sbc_bw_alloc_support_rsvd0 = -1;
+static gint hf_sbc_bw_alloc_support_duplex = -1;
+static gint hf_sbc_bw_alloc_support_rsvd1 = -1;
+static gint hf_sbc_curr_transmit_power = -1;
+static gint hf_sbc_transition_gaps = -1;
+static gint hf_sbc_ssttg = -1;
+static gint hf_sbc_ssrtg = -1;
+static gint hf_sbc_mac_pdu = -1;
+static gint hf_sbc_mac_pdu_piggybacked = -1;
+static gint hf_sbc_mac_pdu_fsn = -1;
+static gint hf_sbc_mac_pdu_rsvd = -1;
+static gint hf_sbc_max_transmit_power = -1;
+static gint hf_sbc_bpsk = -1;
+static gint hf_sbc_qpsk = -1;
+static gint hf_sbc_qam16 = -1;
+static gint hf_sbc_qam64 = -1;
+static gint hf_sbc_current_transmitted_power = -1;
+static gint hf_sbc_ss_fft_sizes = -1;
+static gint hf_sbc_ss_fft_256 = -1;
+static gint hf_sbc_ss_fft_2048 = -1;
+static gint hf_sbc_ss_fft_128 = -1;
+static gint hf_sbc_ss_fft_512 = -1;
+static gint hf_sbc_ss_fft_1024 = -1;
+static gint hf_sbc_ss_cinr_measure_capability = -1;
+static gint hf_sbc_ss_phy_cinr_measurement_preamble = -1;
+static gint hf_sbc_ss_phy_cinr_measurement_permutation_zone_from_pilot_subcarriers = -1;
+static gint hf_sbc_ss_phy_cinr_measurement_permutation_zone_from_data_subcarriers = -1;
+static gint hf_sbc_ss_effective_cinr_measurement_preamble = -1;
+static gint hf_sbc_ss_effective_cinr_measurement_permutation_zone_from_pilot_subcarriers = -1;
+static gint hf_sbc_ss_effective_cinr_measurement_permutation_zone_from_data_subcarriers = -1;
+static gint hf_sbc_ss_support_2_concurrent_cqi_channels = -1;
+static gint hf_sbc_ss_frequency_selectivity_characterization_report = -1;
+
+static gint hf_sbc_ss_fft_rsvd1 = -1;
+static gint hf_sbc_ss_fft_rsvd2 = -1;
+static gint hf_sbc_ss_demodulator = -1;
+static gint hf_sbc_ss_demodulator_64qam = -1;
+static gint hf_sbc_ss_demodulator_btc = -1;
+static gint hf_sbc_ss_demodulator_ctc = -1;
+static gint hf_sbc_ss_demodulator_stc = -1;
+static gint hf_sbc_ss_demodulator_cc_with_optional_interleaver = -1;
+static gint hf_sbc_ss_demodulator_harq_chase = -1;
+static gint hf_sbc_ss_demodulator_harq_ctc_ir = -1;
+static gint hf_sbc_ss_demodulator_reserved = -1;
+/* static gint hf_sbc_ss_demodulator_reserved1 = -1; */
+static gint hf_sbc_ss_demodulator_64qam_2 = -1;
+static gint hf_sbc_ss_demodulator_btc_2 = -1;
+static gint hf_sbc_ss_demodulator_ctc_2 = -1;
+static gint hf_sbc_ss_demodulator_stc_2 = -1;
+static gint hf_sbc_ss_demodulator_cc_with_optional_interleaver_2 = -1;
+static gint hf_sbc_ss_demodulator_harq_chase_2 = -1;
+static gint hf_sbc_ss_demodulator_harq_ctc_ir_2 = -1;
+static gint hf_sbc_ss_demodulator_reserved_2 = -1;
+static gint hf_sbc_ss_demodulator_harq_cc_ir_2 = -1;
+static gint hf_sbc_ss_demodulator_ldpc_2 = -1;
+static gint hf_sbc_ss_demodulator_dedicated_pilots_2 = -1;
+static gint hf_sbc_ss_demodulator_reserved1_2 = -1;
+
+static gint hf_sbc_ss_modulator = -1;
+static gint hf_sbc_ss_modulator_64qam = -1;
+static gint hf_sbc_ss_modulator_btc = -1;
+static gint hf_sbc_ss_modulator_ctc = -1;
+static gint hf_sbc_ss_modulator_stc = -1;
+static gint hf_sbc_ss_modulator_harq_chase = -1;
+static gint hf_sbc_ss_modulator_ctc_ir = -1;
+static gint hf_sbc_ss_modulator_cc_ir = -1;
+static gint hf_sbc_ss_modulator_ldpc = -1;
+
+static gint hf_sbc_number_ul_arq_ack_channel = -1;
+static gint hf_sbc_number_dl_arq_ack_channel = -1;
+static gint hf_sbc_ss_permutation_support = -1;
+static gint hf_sbc_ss_optimal_pusc = -1;
+static gint hf_sbc_ss_optimal_fusc = -1;
+static gint hf_sbc_ss_amc_1x6 = -1;
+static gint hf_sbc_ss_amc_2x3 = -1;
+static gint hf_sbc_ss_amc_3x2 = -1;
+static gint hf_sbc_ss_amc_with_harq_map = -1;
+static gint hf_sbc_ss_tusc1_support = -1;
+static gint hf_sbc_ss_tusc2_support = -1;
+static gint hf_sbc_ss_ofdma_aas_private = -1;
+static gint hf_sbc_ofdma_aas_harq_map_capability = -1;
+static gint hf_sbc_ofdma_aas_private_map_support = -1;
+static gint hf_sbc_ofdma_aas_reduced_private_map_support = -1;
+static gint hf_sbc_ofdma_aas_private_chain_enable = -1;
+static gint hf_sbc_ofdma_aas_private_map_dl_frame_offset = -1;
+static gint hf_sbc_ofdma_aas_private_ul_frame_offset = -1;
+static gint hf_sbc_ofdma_aas_private_map_concurrency = -1;
+static gint hf_sbc_ofdma_aas_capabilities = -1;
+static gint hf_sbc_ss_ofdma_aas_zone = -1;
+static gint hf_sbc_ss_ofdma_aas_diversity_map_scan = -1;
+static gint hf_sbc_ss_ofdma_aas_fbck_rsp_support = -1;
+static gint hf_sbc_ss_ofdma_downlink_aas_preamble = -1;
+static gint hf_sbc_ss_ofdma_uplink_aas_preamble = -1;
+static gint hf_sbc_ss_ofdma_aas_capabilities_rsvd = -1;
+
+static gint hf_sbc_tlv_t_167_association_type_support = -1;
+static gint hf_sbc_tlv_t_167_association_type_support_bit0 = -1;
+static gint hf_sbc_tlv_t_167_association_type_support_bit1 = -1;
+static gint hf_sbc_tlv_t_167_association_type_support_bit2 = -1;
+static gint hf_sbc_tlv_t_167_association_type_support_bit3 = -1;
+static gint hf_sbc_tlv_t_167_association_type_support_bit4 = -1;
+static gint hf_sbc_tlv_t_167_association_type_support_reserved = -1;
+static gint hf_sbc_ofdma_ss_uplink_power_control_support = -1;
+static gint hf_sbc_ofdma_ss_uplink_power_control_support_open_loop = -1;
+static gint hf_sbc_ofdma_ss_uplink_power_control_support_aas_preamble = -1;
+static gint hf_sbc_ofdma_ss_uplink_power_control_support_rsvd = -1;
+/* static gint hf_sbc_ofdm_ss_minimum_num_of_frames = -1; */
+static gint hf_sbc_tlv_t_27_extension_capability = -1;
+static gint hf_sbc_tlv_t_27_extension_capability_bit0 = -1;
+static gint hf_sbc_tlv_t_27_extension_capability_reserved = -1;
+static gint hf_sbc_tlv_t_28_ho_trigger_metric_support = -1;
+static gint hf_sbc_tlv_t_28_ho_trigger_metric_support_bit0 = -1;
+static gint hf_sbc_tlv_t_28_ho_trigger_metric_support_bit1 = -1;
+static gint hf_sbc_tlv_t_28_ho_trigger_metric_support_bit2 = -1;
+static gint hf_sbc_tlv_t_28_ho_trigger_metric_support_bit3 = -1;
+static gint hf_sbc_tlv_t_28_ho_trigger_metric_support_reserved = -1;
+static gint hf_sbc_tlv_t_171_minimum_num_of_frames = -1;
+static gint hf_sbc_tlv_t_172_harq_map_capability = -1;
+static gint hf_sbc_tlv_t_172_extended_harq_ie_capability = -1;
+static gint hf_sbc_tlv_t_172_sub_map_capability_first_zone = -1;
+static gint hf_sbc_tlv_t_172_sub_map_capability_other_zones = -1;
+static gint hf_sbc_tlv_t_172_dl_region_definition_support = -1;
+static gint hf_sbc_tlv_t_172_reserved = -1;
+static gint hf_sbc_tlv_t_172 = -1;
+static gint hf_sbc_tlv_t_173_ul_ctl_channel_support = -1;
+static gint hf_sbc_tlv_t_173_3_bit_mimo_fast_feedback = -1;
+static gint hf_sbc_tlv_t_173_enhanced_fast_feedback = -1;
+static gint hf_sbc_tlv_t_173_ul_ack = -1;
+static gint hf_sbc_tlv_t_173_reserved = -1;
+static gint hf_sbc_tlv_t_173_uep_fast_feedback = -1;
+static gint hf_sbc_tlv_t_173_measurement_report = -1;
+static gint hf_sbc_tlv_t_173_primary_secondary_fast_feedback = -1;
+static gint hf_sbc_tlv_t_173_diuc_cqi_fast_feedback = -1;
+static gint hf_sbc_tlv_t_174_ofdma_ms_csit_capability = -1;
+static gint hf_sbc_tlv_t_174_csit_compatibility_type_a = -1;
+static gint hf_sbc_tlv_t_174_csit_compatibility_type_b = -1;
+static gint hf_sbc_tlv_t_174_power_assignment_capability = -1;
+static gint hf_sbc_tlv_t_174_sounding_rsp_time_capability = -1;
+static gint hf_sbc_tlv_t_174_max_num_simultanous_sounding_instructions = -1;
+static gint hf_sbc_tlv_t_174_ss_csit_type_a_support = -1;
+static gint hf_sbc_tlv_t_204_ofdma_parameters_sets = -1;
+static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_phy_set_a = -1;
+static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_phy_set_b = -1;
+static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_harq_parameters_set = -1;
+static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_mac_set_a = -1;
+static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_mac_set_b = -1;
+static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_reserved = -1;
+static gint hf_sbc_tlv_t_174_ss_csit_reserved = -1;
+static gint hf_sbc_tlv_t_175_max_num_bst_per_frm_capability_harq = -1;
+static gint hf_sbc_tlv_t_175_max_num_ul_harq_bst = -1;
+static gint hf_sbc_tlv_t_175_max_num_ul_harq_per_frm_include_one_non_harq_bst = -1;
+static gint hf_sbc_tlv_t_175_max_num_dl_harq_bst_per_harq_per_frm = -1;
+static gint hf_sbc_tlv_t_176 = -1;
+static gint hf_sbc_tlv_t_176_bit0 = -1;
+static gint hf_sbc_tlv_t_176_bit1 = -1;
+static gint hf_sbc_tlv_t_176_bit2 = -1;
+/* static gint hf_sbc_tlv_t_176_bit2_cor2 = -1; */
+static gint hf_sbc_tlv_t_176_bit3 = -1;
+static gint hf_sbc_tlv_t_176_bit4 = -1;
+static gint hf_sbc_tlv_t_176_bit5 = -1;
+static gint hf_sbc_tlv_t_176_bit6 = -1;
+static gint hf_sbc_tlv_t_176_bit7 = -1;
+static gint hf_sbc_tlv_t_176_bit8 = -1;
+static gint hf_sbc_tlv_t_176_bit9 = -1;
+static gint hf_sbc_tlv_t_176_bit10 = -1;
+static gint hf_sbc_tlv_t_176_bit11 = -1;
+static gint hf_sbc_tlv_t_176_bit12 = -1;
+static gint hf_sbc_tlv_t_176_bit13 = -1;
+static gint hf_sbc_tlv_t_176_bit14 = -1;
+static gint hf_sbc_tlv_t_176_bit15 = -1;
+static gint hf_sbc_tlv_t_176_bit16 = -1;
+static gint hf_sbc_tlv_t_176_bit17 = -1;
+static gint hf_sbc_tlv_t_176_bit18 = -1;
+static gint hf_sbc_tlv_t_176_bit19 = -1;
+static gint hf_sbc_tlv_t_176_reserved = -1;
+static gint hf_sbc_tlv_t_177_ofdma_ss_modulator_for_mimo_support = -1;
+static gint hf_sbc_tlv_t_177_stc_matrix_a = -1;
+static gint hf_sbc_tlv_t_177_stc_matrix_b_vertical = -1;
+static gint hf_sbc_tlv_t_177_stc_matrix_b_horizontal = -1;
+static gint hf_sbc_tlv_t_177_two_transmit_antennas = -1;
+static gint hf_sbc_tlv_t_177_capable_of_transmit_diversity = -1;
+static gint hf_sbc_tlv_t_177_capable_of_spacial_multiplexing = -1;
+static gint hf_sbc_tlv_t_177_beamforming = -1;
+static gint hf_sbc_tlv_t_177_adaptive_rate_ctl = -1;
+static gint hf_sbc_tlv_t_177_single_antenna = -1;
+static gint hf_sbc_tlv_t_177_collaborative_sm_with_one_antenna = -1;
+static gint hf_sbc_tlv_t_177_collaborative_sm_with_two_antennas = -1;
+static gint hf_sbc_tlv_t_177_capable_of_two_antenna = -1;
+static gint hf_sbc_tlv_t_177_rsvd = -1;
+static gint hf_sbc_tlv_t_178_sdma_pilot_capability = -1;
+static gint hf_sbc_tlv_t_178_sdma_pilot_pattern_support_for_amc_zone = -1;
+static gint hf_sbc_tlv_t_178_reserved = -1;
+static gint hf_sbc_tlv_t_179_ofdma_multiple_dl_burst_profile_support = -1;
+static gint hf_sbc_tlv_t_179_dl_bst_profile_for_multiple_fec = -1;
+static gint hf_sbc_tlv_t_179_ul_bst_profile_for_multiple_fec = -1;
+static gint hf_sbc_tlv_t_179_reserved = -1;
+static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability = -1;
+static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_NEP = -1;
+static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_aggregation_flag_for_dl = -1;
+static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_aggregation_flag_for_ul = -1;
+static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_reserved1 = -1;
+static gint hf_sbc_tlv_t_162_ul_harq_incremental_redundancy_buffer_capability_NEP = -1;
+static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_reserved2 = -1;
+static gint hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability = -1;
+static gint hf_sbc_tlv_t_163_dl_harq_buffering_capability_for_chase_combining = -1;
+static gint hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_aggregation_flag_dl = -1;
+static gint hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_reserved1 = -1;
+static gint hf_sbc_tlv_t_163_ul_harq_buffering_capability_for_chase_combining = -1;
+static gint hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_aggregation_flag_ul = -1;
+static gint hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_reserved2 = -1;
+
+static gint hf_sbc_ss_demodulator_mimo_support = -1;
+static gint hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_a = -1;
+static gint hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_b_vertical = -1;
+static gint hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_b_horizontal = -1;
+static gint hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_a = -1;
+static gint hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_b_vertical = -1;
+static gint hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_b_horizontal = -1;
+static gint hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_c_vertical = -1;
+static gint hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_c_horizontal = -1;
+static gint hf_sbc_ss_demodulator_mimo_rsvd = -1;
+static gint hf_sbc_ss_mimo_uplink_support = -1;
+static gint hf_sbc_ss_mimo_uplink_support_2_ann_sttd = -1;
+static gint hf_sbc_ss_mimo_uplink_support_2_ann_sm_vertical = -1;
+static gint hf_sbc_ss_mimo_uplink_support_1_ann_coop_sm = -1;
+static gint hf_sbc_ss_mimo_uplink_support_rsvd = -1;
+
+static gint hf_sbc_power_save_class_types_capability = -1;
+static gint hf_sbc_power_save_class_types_capability_bit0 = -1;
+static gint hf_sbc_power_save_class_types_capability_bit1 = -1;
+static gint hf_sbc_power_save_class_types_capability_bit2 = -1;
+static gint hf_sbc_power_save_class_types_capability_bits34 = -1;
+static gint hf_sbc_power_save_class_types_capability_bits567 = -1;
+
+static gint hf_sbc_pkm_flow_control = -1;
+static gint hf_sbc_auth_policy = -1;
+static gint hf_sbc_privacy_802_16 = -1;
+static gint hf_sbc_privacy_rsvd = -1;
+static gint hf_sbc_max_security_associations = -1;
+
+static gint hf_sbc_invalid_tlv = -1;
+
+static const true_false_string tfs_sbc_bw_alloc_support_duplex =
+{
+ "Full-Duplex",
+ "Half-Duplex"
+};
+
+#if 0
+static const value_string vals_sbc_mac_pdu_fsn[] =
+{
+ {0, "Only 11-bit FSN values are supported"},
+ {1, "Only 3-bit FSN values are supported"},
+ {0, NULL}
+};
+#endif
+
+#if 0
+static const true_false_string tfs_sbc_mac_pdu_fsn =
+{
+ "Only 3-bit FSN values are supported",
+ "Only 11-bit FSN values are supported"
+};
+#endif
+
+#if 0
+/* DCD DIUC messages (table 143) */
+static const value_string diuc_msgs[] =
+{
+ { 0, "Downlink Burst Profile 1" },
+ { 1, "Downlink Burst Profile 2" },
+ { 2, "Downlink Burst Profile 3" },
+ { 3, "Downlink Burst Profile 4" },
+ { 4, "Downlink Burst Profile 5" },
+ { 5, "Downlink Burst Profile 6" },
+ { 6, "Downlink Burst Profile 7" },
+ { 7, "Downlink Burst Profile 8" },
+ { 8, "Downlink Burst Profile 9" },
+ { 9, "Downlink Burst Profile 10" },
+ { 10, "Downlink Burst Profile 11" },
+ { 11, "Downlink Burst Profile 12" },
+ { 12, "Downlink Burst Profile 13" },
+ { 13, "Reserved" },
+ { 14, "Gap" },
+ { 15, "End of DL-MAP" },
+ {0, NULL}
+};
+#endif
+
+#if 0
+static const value_string vals_sbc_type[] =
+{
+ {0, "CINR metric"},
+ {1, "RSSI metric"},
+ {2, "RTD metric"},
+ {3, "Reserved"},
+ {0, NULL}
+};
+#endif
+
+#if 0
+static const value_string vals_sbc_function[] =
+{
+ {0, "Reserved"},
+ {1, "Metric of neighbor BS is greater than absolute value"},
+ {2, "Metric of neighbor BS is less than absolute value"},
+ {3, "Metric of neighbor BS is greater than serving BS metric by relative value"},
+ {4, "Metric of neighbor BS is less than serving BS metric by relative value"},
+ {5, "Metric of serving BS greater than absolute value"},
+ {6, "Metric of serving BS less than absolute value"},
+ {7, "Reserved"},
+ {0, NULL}
+};
+#endif
+
+#if 0
+static const value_string vals_sbc_action[] =
+{
+ {0, "Reserved"},
+ {1, "Respond on trigger with MOB_SCN-REP after the end of each scanning interval"},
+ {2, "Respond on trigger with MOB_MSH-REQ"},
+ {3, "On trigger, MS starts neighbor BS scanning process by sending MOB_SCN-REQ"},
+ {4, "Reserved"},
+ {0, NULL}
+};
+#endif
+
+#if 0
+static const value_string vals_sbc_power_adjustmnt[] =
+{
+ {0, "Preserve Peak Power"},
+ {1, "Preserve Mean Power"},
+ {0, NULL}
+};
+#endif
+
+#if 0
+static const true_false_string tfs_sbc_power_adjustment =
+{
+ "Preserve Mean Power",
+ "Preserve Peak Power"
+};
+#endif
+
+#if 0
+static const value_string vals_reg_rsp_status[] =
+{
+ {0, "OK"},
+ {1, "Message authentication failure"},
+ {0, NULL}
+};
+#endif
+
+#if 0
+static const value_string vals_sbc_burst_tcs[] =
+{
+ {0, "TCS disabled"},
+ {1, "TCS enabled"},
+ {0, NULL}
+};
+#endif
+
+#if 0
+static const true_false_string tfs_sbc_burst_tcs =
+{
+ "TCS enabled",
+ "TCS disabled"
+};
+#endif
+
+#if 0
+static const value_string vals_sbc_frame_duration[] =
+{
+ {0, "2.5"},
+ {1, "4"},
+ {2, "5"},
+ {3, "8"},
+ {4, "10"},
+ {5, "12.5"},
+ {6, "20"},
+ {0, NULL}
+};
+#endif
+
+#if 0
+static const value_string vals_sbc_mac_version[] =
+{
+ {1, "Conformance with IEEE Std 802.16-2001"},
+ {2, "Conformance with IEEE Std 802.16c-2002 and its predecessors"},
+ {3, "Conformance with IEEE Std 802.16a-2003 and its predecessors"},
+ {4, "Conformance with IEEE Std 802.16-2004"},
+ {5, "Conformance with IEEE Std 802.16-2004 and IEEE Std 802.16e-2005"},
+ {6, "reserved"},
+ {0, NULL}
+};
+#endif
+
+#if 0
+static const value_string vals_sbc_burst_fec[] =
+{
+ { 0, "QPSK (CC) 1/2"},
+ { 1, "QPSK (CC) 3/4"},
+ { 2, "16-QAM (CC) 1/2"},
+ { 3, "16-QAM (CC) 3/4"},
+ { 4, "64-QAM (CC) 1/2"},
+ { 5, "64-QAM (CC) 2/3"},
+ { 6, "64-QAM (CC) 3/4"},
+ { 7, "QPSK (BTC) 1/2"},
+ { 8, "QPSK (BTC) 3/4 or 2/3"},
+ { 9, "16-QAM (BTC) 3/5"},
+ {10, "16-QAM (BTC) 4/5"},
+ {11, "64-QAM (BTC) 2/3 or 5/8"},
+ {12, "64-QAM (BTC) 5/6 or 4/5"},
+ {13, "QPSK (CTC) 1/2"},
+ {14, "Reserved"},
+ {15, "QPSK (CTC) 3/4"},
+ {16, "16-QAM (CTC) 1/2"},
+ {17, "16-QAM (CTC) 3/4"},
+ {18, "64-QAM (CTC) 1/2"},
+ {19, "64-QAM (CTC) 2/3"},
+ {20, "64-QAM (CTC) 3/4"},
+ {21, "64-QAM (CTC) 5/6"},
+ {22, "QPSK (ZT CC) 1/2"},
+ {23, "QPSK (ZT CC) 3/4"},
+ {24, "16-QAM (ZT CC) 1/2"},
+ {25, "16-QAM (ZT CC) 3/4"},
+ {26, "64-QAM (ZT CC) 1/2"},
+ {27, "64-QAM (ZT CC) 2/3"},
+ {28, "64-QAM (ZT CC) 3/4"},
+ {29, "QPSK (LDPC) 1/2"},
+ {30, "QPSK (LDPC) 2/3 A code"},
+ {31, "16-QAM (LDPC) 3/4 A code"},
+ {32, "16-QAM (LDPC) 1/2"},
+ {33, "16-QAM (LDPC) 2/3 A code"},
+ {34, "16-QAM (LDPC) 3/4 A code"},
+ {35, "64-QAM (LDPC) 1/2"},
+ {36, "64-QAM (LDPC) 2/3 A code"},
+ {37, "64-QAM (LDPC) 3/4 A code"},
+ {38, "QPSK (LDPC) 2/3 B code"},
+ {39, "QPSK (LDPC) 3/4 B code"},
+ {40, "16-QAM (LDPC) 2/3 B code"},
+ {41, "16-QAM (LDPC) 3/4 B code"},
+ {42, "64-QAM (LDPC) 2/3 B code"},
+ {43, "64-QAM (LDPC) 3/4 B code"},
+ {44, "QPSK (CC with optional interleaver) 1/2"},
+ {45, "QPSK (CC with optional interleaver) 3/4"},
+ {46, "16-QAM (CC with optional interleaver) 1/2"},
+ {47, "16-QAM (CC optional interleaver) 0%00"},
+ {48, "64-QAM (CC with optional interleaver) 2/3"},
+ {49, "64-QAM (CC with optional interleaver) 3/4"},
+ {50, "QPSK (LDPC) 5/6"},
+ {51, "16-QAM (LDPC) 5/6"},
+ {52, "64-QAM (LDPC) 5/6"},
+ {0, NULL}
+};
+#endif
+
+#if 0
+static const value_string vals_sbc_permutation_type[] =
+{
+ {0, "PUSC" },
+ {1, "FUSC" },
+ {2, "optional FUSC"},
+ {3, "AMC"},
+ {0, NULL}
+};
+#endif
+
+static const value_string vals_sbc_harq_parameters_set[] =
+{
+ {0, "HARQ set 1"},
+ {1, "HARQ set 2"},
+ {2, "HARQ set 3"},
+ {3, "HARQ set 4"},
+ {4, "HARQ set 5"},
+ {5, "Reserved"},
+ {0, NULL}
+};
+
+static const true_false_string tfs_supported =
+{
+ "supported",
+ "not supported"
+};
+
+static const true_false_string tfs_yes_no_sbc =
+{
+ "yes",
+ "no"
+};
+
+static const value_string vals_sounding_rsp_time_cap_codings[] =
+{
+ {0, "0.5ms" },
+ {1, "0.75ms" },
+ {2, "1ms"},
+ {3, "1.25ms"},
+ {4, "1.5ms"},
+ {5, "min(2, Next Frame)"},
+ {6, "min(5, Next Frame)"},
+ {7, "Next Frame"},
+ {0, NULL}
+};
+
+static const value_string vals_sbc_sdma_str[ ] =
+{
+ {0, "no support"},
+ {1, "support SDMA pilot patterns #A and #B"},
+ {2, "support all SDMA pilot patterns"},
+ {3, "reserved"},
+ {0, NULL}
+};
+
+
+static void sbc_tlv_decoder(tlv_info_t* tlv_info, int ett, proto_tree* sbc_tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint tlv_offset)
+{
+ proto_item *tlv_item, *ti;
+ proto_tree *tlv_tree;
+ gint tlv_type = get_tlv_type(tlv_info),
+ tlv_len = get_tlv_length(tlv_info),
+ value;
+ gfloat power_bpsk;
+ gfloat power_qpsk;
+ gfloat power_qam16;
+ gfloat power_qam64;
+ gfloat current_power;
+
+ /* process SBC TLV Encoded information */
+ switch (tlv_type)
+ {
+ case SBC_BW_ALLOC_SUPPORT:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_bw_alloc_support, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_bw_alloc_support_rsvd0, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_bw_alloc_support_duplex, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_bw_alloc_support_rsvd1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_TRANSITION_GAPS:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_transition_gaps, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ ti = proto_tree_add_item(tlv_tree, hf_sbc_ssttg, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_item_append_text(ti, " us (ranges: TDD 0-50; H-FDD 0-100)");
+ ti = proto_tree_add_item(tlv_tree, hf_sbc_ssrtg, tvb, (offset + 1), 1, ENC_BIG_ENDIAN);
+ proto_item_append_text(ti, " us (ranges: TDD 0-50; H-FDD 0-100)");
+ break;
+ case SBC_MAC_PDU:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_mac_pdu, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_mac_pdu_piggybacked, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_mac_pdu_fsn, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_mac_pdu_rsvd, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_REQ_MAX_TRANSMIT_POWER: /* TODO: This TLV comes up as INVALID in wireshark... why? */
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_max_transmit_power, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ power_bpsk = (gfloat)(tvb_get_guint8(tvb, offset) - 128) / 2;
+ power_qpsk = (gfloat)(tvb_get_guint8(tvb, (offset + 1)) - 128) / 2;
+ power_qam16 = (gfloat)(tvb_get_guint8(tvb, (offset + 2)) - 128) / 2;
+ power_qam64 = (gfloat)(tvb_get_guint8(tvb, (offset + 3)) - 128) / 2;
+ proto_tree_add_float_format_value(tlv_tree, hf_sbc_bpsk, tvb, offset, 1, power_bpsk, "%.2f dBm", (gdouble)power_bpsk);
+ proto_tree_add_float_format_value(tlv_tree, hf_sbc_qpsk, tvb, (offset + 1), 1, power_qpsk, "%.2f dBm", (gdouble)power_qpsk);
+ proto_tree_add_float_format_value(tlv_tree, hf_sbc_qam16, tvb, (offset + 2), 1, power_qam16, "%.2f dBm", (gdouble)power_qam16);
+ proto_tree_add_float_format_value(tlv_tree, hf_sbc_qam64, tvb, (offset + 3), 1, power_qam64, "%.2f dBm", (gdouble)power_qam64);
+ break;
+ case SBC_REQ_CURR_TRANSMITTED_POWER:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_curr_transmit_power, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ value = tvb_get_guint8(tvb, offset);
+ current_power = (gfloat)(value - 128) / 2;
+ proto_tree_add_float_format_value(tlv_tree, hf_sbc_current_transmitted_power, tvb, offset, 1, current_power, "%.2f dBm (Value: 0x%x)", (gdouble)current_power, value);
+ break;
+ case SBC_SS_FFT_SIZES:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_ss_fft_sizes, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ if (include_cor2_changes)
+ {
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_fft_rsvd1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ } else {
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_fft_256, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_fft_2048, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_fft_128, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_fft_512, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_fft_1024, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_fft_rsvd2, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_SS_DEMODULATOR:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_ss_demodulator, tvb, tlv_offset, ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ if (tlv_len == 1) /* && (num_dl_harq_chans < 8)) */
+ {
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_64qam, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_btc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_ctc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_stc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_cc_with_optional_interleaver, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_harq_chase, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_harq_ctc_ir, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_64qam_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_btc_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_ctc_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_stc_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_cc_with_optional_interleaver_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_harq_chase_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_harq_ctc_ir_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_reserved_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_harq_cc_ir_2, tvb, offset , 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_ldpc_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_dedicated_pilots_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_reserved1_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ }
+ break;
+ case SBC_SS_MODULATOR:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_ss_modulator, tvb, tlv_offset, ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_modulator_64qam, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_modulator_btc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_modulator_ctc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_modulator_stc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_modulator_harq_chase, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_modulator_ctc_ir, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_modulator_cc_ir, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_modulator_ldpc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_SS_NUM_UL_ARQ_ACK_CHANNEL:
+ /* add TLV subtree */
+ add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_number_ul_arq_ack_channel, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ break;
+ case SBC_SS_NUM_DL_ARQ_ACK_CHANNEL:
+ /* add TLV subtree */
+ add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_number_dl_arq_ack_channel, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ break;
+ case SBC_SS_PERMUTATION_SUPPORT:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_ss_permutation_support, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_optimal_pusc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_optimal_fusc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_amc_1x6, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_amc_2x3, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_amc_3x2, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_amc_with_harq_map, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_tusc1_support, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_tusc2_support, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_SS_DEMODULATOR_MIMO_SUPPORT:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_ss_demodulator_mimo_support, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_a, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_b_vertical, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_b_horizontal, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_a, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_b_vertical, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_b_horizontal, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_c_vertical, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_c_horizontal, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_demodulator_mimo_rsvd, tvb, offset, 2, ENC_BIG_ENDIAN);
+ break;
+ case SBC_SS_MIMO_UPLINK_SUPPORT:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_ss_mimo_uplink_support, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_mimo_uplink_support_2_ann_sttd, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_mimo_uplink_support_2_ann_sm_vertical, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_mimo_uplink_support_1_ann_coop_sm, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_mimo_uplink_support_rsvd, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_SS_OFDMA_AAS_PRIVATE_MAP_SUPPORT:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_ss_ofdma_aas_private, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_ofdma_aas_harq_map_capability, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ofdma_aas_private_map_support, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ofdma_aas_reduced_private_map_support, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ofdma_aas_private_chain_enable, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ofdma_aas_private_map_dl_frame_offset, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ofdma_aas_private_ul_frame_offset, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ofdma_aas_private_map_concurrency, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_SS_OFDMA_AAS_CAPABILITIES:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_ofdma_aas_capabilities, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_ofdma_aas_zone, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_ofdma_aas_diversity_map_scan, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_ofdma_aas_fbck_rsp_support, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_ofdma_downlink_aas_preamble, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_ofdma_uplink_aas_preamble, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_ofdma_aas_capabilities_rsvd, tvb, offset, 2, ENC_BIG_ENDIAN);
+ break;
+ case SBC_SS_CINR_MEASUREMENT_CAPABILITY:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_ss_cinr_measure_capability, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_phy_cinr_measurement_preamble, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_phy_cinr_measurement_permutation_zone_from_pilot_subcarriers, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_phy_cinr_measurement_permutation_zone_from_data_subcarriers, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_effective_cinr_measurement_preamble, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_effective_cinr_measurement_permutation_zone_from_pilot_subcarriers, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_effective_cinr_measurement_permutation_zone_from_data_subcarriers, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_support_2_concurrent_cqi_channels,tvb,offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ss_frequency_selectivity_characterization_report,tvb,offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_PKM_FLOW_CONTROL:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_pkm_flow_control, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ if(tvb_get_guint8(tvb, offset) == 0)
+ proto_item_append_text(tlv_item, " (default - no limit)");
+ break;
+ case SBC_AUTH_POLICY_SUPPORT:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_auth_policy, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_privacy_802_16, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_privacy_rsvd, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_MAX_SECURITY_ASSOCIATIONS:
+ add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_max_security_associations, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ break;
+ case SBC_TLV_T_27_EXTENSION_CAPABILITY:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_tlv_t_27_extension_capability, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_27_extension_capability_bit0, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_27_extension_capability_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_TLV_T_28_HO_TRIGGER_METRIC_SUPPORT:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_tlv_t_28_ho_trigger_metric_support, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_28_ho_trigger_metric_support_bit0, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_28_ho_trigger_metric_support_bit1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_28_ho_trigger_metric_support_bit2, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_28_ho_trigger_metric_support_bit3, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_28_ho_trigger_metric_support_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_TLV_T_167_ASSOCIATION_SUPPORT:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_tlv_t_167_association_type_support, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_167_association_type_support_bit0, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_167_association_type_support_bit1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_167_association_type_support_bit2, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_167_association_type_support_bit3, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_167_association_type_support_bit4, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_167_association_type_support_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_TLV_T_170_UPLINK_POWER_CONTROL_SUPPORT:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_ofdma_ss_uplink_power_control_support, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_ofdma_ss_uplink_power_control_support_open_loop, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ofdma_ss_uplink_power_control_support_aas_preamble, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_ofdma_ss_uplink_power_control_support_rsvd, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_TLV_T_171_MINIMUM_NUM_OF_FRAMES:
+ /* add TLV subtree */
+ add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_tlv_t_171_minimum_num_of_frames, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ break;
+ case SBC_TLV_T_172:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_tlv_t_172, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_172_harq_map_capability, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_172_extended_harq_ie_capability, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_172_sub_map_capability_first_zone, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_172_sub_map_capability_other_zones, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_172_dl_region_definition_support, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_172_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_TLV_T_173_UL_CONTROL_CHANNEL_SUPPORT:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_tlv_t_173_ul_ctl_channel_support, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_173_3_bit_mimo_fast_feedback, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_173_enhanced_fast_feedback, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_173_ul_ack, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_173_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_173_uep_fast_feedback, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_173_measurement_report, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_173_primary_secondary_fast_feedback, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_173_diuc_cqi_fast_feedback, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_TLV_T_174_OFDMA_MS_CSIT_CAPABILITY:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_tlv_t_174_ofdma_ms_csit_capability, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_174_csit_compatibility_type_a, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_174_csit_compatibility_type_b, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_174_power_assignment_capability, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_174_sounding_rsp_time_capability, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_174_max_num_simultanous_sounding_instructions, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_174_ss_csit_type_a_support, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_174_ss_csit_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
+ break;
+ case SBC_TLV_T_175_MAX_NUM_BST_PER_FRM_CAPABILITY_HARQ:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_tlv_t_175_max_num_bst_per_frm_capability_harq, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_175_max_num_ul_harq_bst, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_175_max_num_ul_harq_per_frm_include_one_non_harq_bst, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_175_max_num_dl_harq_bst_per_harq_per_frm, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_TLV_T_176: /* TODO: Get an invalid TLV whenever this TLV is used. Could it be
+ that lengths above 2 cause this problem? */
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_tlv_t_176, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit0, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit1, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit2, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit3, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit4, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit5, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit6, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit7, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit8, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit9, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit10, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit11, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit12, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit13, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit14, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit15, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit16, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit17, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit18, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_bit19, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_176_reserved, tvb, offset, 3, ENC_BIG_ENDIAN);
+ break;
+ case SBC_TLV_T_177_OFDMA_SS_MODULATOR_FOR_MIMO_SUPPORT:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_tlv_t_177_ofdma_ss_modulator_for_mimo_support, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ if (include_cor2_changes)
+ {
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_177_stc_matrix_a, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_177_stc_matrix_b_vertical, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_177_stc_matrix_b_horizontal, tvb, offset, 1, ENC_BIG_ENDIAN);
+ } else {
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_177_two_transmit_antennas, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_177_capable_of_transmit_diversity, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_177_capable_of_spacial_multiplexing, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_177_beamforming, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_177_adaptive_rate_ctl, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_177_single_antenna, tvb, offset, 1, ENC_BIG_ENDIAN);
+ if (include_cor2_changes)
+ {
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_177_collaborative_sm_with_one_antenna, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_177_collaborative_sm_with_two_antennas, tvb, offset, 1, ENC_BIG_ENDIAN);
+ } else {
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_177_capable_of_two_antenna, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_177_rsvd, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ break;
+ case SBC_TLV_T_178_SDMA_PILOT_CAPABILITY:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_tlv_t_178_sdma_pilot_capability, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_178_sdma_pilot_pattern_support_for_amc_zone, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_178_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_TLV_T_179_OFDMA_MULTIPLE_DL_BURST_PROFILE_CAPABILITY:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_tlv_t_179_ofdma_multiple_dl_burst_profile_support, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_179_dl_bst_profile_for_multiple_fec, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_179_ul_bst_profile_for_multiple_fec, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_179_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SBC_TLV_T_204_OFDMA_PARAMETERS_SETS:
+ if (include_cor2_changes)
+ {
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_tlv_t_204_ofdma_parameters_sets, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_204_ofdma_parameters_sets_phy_set_a, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_204_ofdma_parameters_sets_phy_set_b, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_204_ofdma_parameters_sets_harq_parameters_set, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_204_ofdma_parameters_sets_mac_set_a, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_204_ofdma_parameters_sets_mac_set_b, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_204_ofdma_parameters_sets_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ break;
+ case SBC_TLV_T_162_HARQ_INCREMENTAL_REDUNDANCY_BUFFER_CAPABILITY:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_NEP, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_aggregation_flag_for_dl, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_reserved1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_162_ul_harq_incremental_redundancy_buffer_capability_NEP, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_aggregation_flag_for_ul, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_reserved2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ break;
+ case SBC_TLV_T_163_HARQ_CHASE_COMBINING_AND_CC_IR_BUFFER_CAPABILITY:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_163_dl_harq_buffering_capability_for_chase_combining, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_aggregation_flag_dl, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_reserved1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_163_ul_harq_buffering_capability_for_chase_combining, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_aggregation_flag_ul, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_reserved2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_SECURITY_NEGOTIATION_PARAMETERS:
+ /* display Security Negotiation Parameters Title */
+ /* add Security Negotiation Parameters subtree */
+ tlv_tree = add_protocol_subtree(tlv_info, ett, sbc_tree, proto_mac_mgmt_msg_sbc_decoder, tvb, tlv_offset, tlv_len, "Security Negotiation Parameters");
+ /* call the Security Negotiation Parameters decoder */
+ wimax_security_negotiation_parameters_decoder(tvb_new_subset_length(tvb, offset, tlv_len), pinfo, tlv_tree);
+ break;
+ case SBC_TLV_T_26_POWER_SAVE_CLASS_TYPES_CAPABILITY:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_power_save_class_types_capability, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett);
+ /* display the detail meanings of the TLV value */
+ proto_tree_add_item(tlv_tree, hf_sbc_power_save_class_types_capability_bit0, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_power_save_class_types_capability_bit1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_power_save_class_types_capability_bit2, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_power_save_class_types_capability_bits34, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sbc_power_save_class_types_capability_bits567, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ default:
+ /* add TLV subtree */
+ add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_unknown_type, tvb, tlv_offset, ENC_NA);
+ break;
+ }
+}
+
+/* Wimax Mac SBC-REQ Message Dissector */
+static int dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tvb_len;
+ gint tlv_type, tlv_len, tlv_value_offset;
+ proto_item *sbc_item;
+ proto_tree *sbc_tree;
+ tlv_info_t tlv_info;
+
+ { /* we are being asked for details */
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC payload type SBC-REQ */
+ sbc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_sbc_decoder, tvb, offset, -1, "SS Basic Capability Request (SBC-REQ)");
+ /* add MAC SBC subtree */
+ sbc_tree = proto_item_add_subtree(sbc_item, ett_mac_mgmt_msg_sbc_decoder);
+ /* Decode and display the SS Basic Capability Request (SBC-REQ) */
+ /* process the SBC TLVs */
+ while(offset < tvb_len)
+ {
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if (tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "SBC-REQ TLV error");
+ proto_tree_add_item(sbc_tree, hf_sbc_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ if (tlv_type == 0)
+ { /* invalid tlv type */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Invalid SBC TLV type");
+ proto_tree_add_item(sbc_tree, hf_sbc_unknown_type, tvb, offset, 1, ENC_NA);
+ offset++;
+ continue;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(sbc_tree, proto_mac_mgmt_msg_sbc_decoder, tvb, offset, (tlv_len + tlv_value_offset), "SBC-REQ Type: %u (%u bytes, offset=%u, tlv_len=%u, tvb_len=%u)", tlv_type, (tlv_len + tlv_value_offset), offset, tlv_len, tvb_len);
+#endif
+ /* process SBC TLV Encoded information */
+ sbc_tlv_decoder(&tlv_info, ett_sbc_req_tlv_subtree, sbc_tree, pinfo, tvb, offset+tlv_value_offset, offset);
+
+ offset += (tlv_len+tlv_value_offset);
+ } /* end of TLV process while loop */
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Wimax Mac SBC-RSP Message Dissector */
+static int dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tvb_len;
+ gint tlv_type, tlv_len, tlv_value_offset;
+ proto_item *sbc_item;
+ proto_tree *sbc_tree;
+ tlv_info_t tlv_info;
+
+ { /* we are being asked for details */
+ /* Get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC payload type SBC-RSP */
+ sbc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_sbc_decoder, tvb, offset, -1, "SS Basic Capability Response (SBC-RSP)");
+ /* add MAC SBC subtree */
+ sbc_tree = proto_item_add_subtree(sbc_item, ett_mac_mgmt_msg_sbc_decoder);
+ /* Decode and display the SS Basic Capability Response (SBC-RSP) */
+ /* process the SBC TLVs */
+ while(offset < tvb_len)
+ {
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if (tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "SBC-RSP TLV error");
+ proto_tree_add_item(sbc_tree, hf_sbc_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ if (tlv_type == 0)
+ { /* invalid tlv type */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Invalid SBC TLV type");
+ proto_tree_add_item(sbc_tree, hf_sbc_unknown_type, tvb, offset, 1, ENC_NA);
+ offset++;
+ continue;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(sbc_tree, proto_mac_mgmt_msg_sbc_decoder, tvb, offset, (tlv_len + tlv_value_offset), "SBC-RSP Type: %u (%u bytes, offset=%u, tlv_len=%u, tvb_len=%u)", tlv_type, (tlv_len + tlv_value_offset), offset, tlv_len, tvb_len);
+#endif
+
+ /* process SBC TLV Encoded information */
+ sbc_tlv_decoder(&tlv_info, ett_sbc_rsp_tlv_subtree, sbc_tree, pinfo, tvb, offset+tlv_value_offset, offset);
+
+ offset += (tlv_len+tlv_value_offset);
+ } /* end of TLV process while loop */
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac SBC-REQ/RSP Messages Dissectors */
+void proto_register_mac_mgmt_msg_sbc(void)
+{
+ /* SBC display */
+ static hf_register_info hf_sbc[] =
+ {
+ { /* 11.8.8 */
+ &hf_sbc_tlv_t_167_association_type_support,
+ {
+ "Association Type Support", "wmx.sbc.association_type_support",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_167_association_type_support_bit0,
+ {
+ "Scanning Without Association: association not supported", "wmx.sbc.association_type_support.bit0",
+ FT_BOOLEAN, 8, TFS(&tfs_yes_no_sbc), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_167_association_type_support_bit1,
+ {
+ "Association Level 0: scanning or association without coordination", "wmx.sbc.association_type_support.bit1",
+ FT_BOOLEAN, 8, TFS(&tfs_yes_no_sbc), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_167_association_type_support_bit2,
+ {
+ "Association Level 1: association with coordination", "wmx.sbc.association_type_support.bit2",
+ FT_BOOLEAN, 8, TFS(&tfs_yes_no_sbc), 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_167_association_type_support_bit3,
+ {
+ "Association Level 2: network assisted association", "wmx.sbc.association_type_support.bit3",
+ FT_BOOLEAN, 8, TFS(&tfs_yes_no_sbc), 0x8, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_167_association_type_support_bit4,
+ {
+ "Desired Association Support", "wmx.sbc.association_type_support.bit4",
+ FT_BOOLEAN, 8, TFS(&tfs_yes_no_sbc), 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_167_association_type_support_reserved,
+ {
+ "Reserved", "wmx.sbc.association_type_support.reserved",
+ FT_UINT8, BASE_HEX, NULL, 0xE0, NULL, HFILL
+ }
+ },
+ { /* 11.7.8.7 */
+ &hf_sbc_auth_policy,
+ {
+ "Authorization Policy Support", "wmx.sbc.auth_policy",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_privacy_802_16,
+ {
+ "IEEE 802.16 Privacy", "wmx.sbc.auth_policy.802_16",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_privacy_rsvd,
+ {
+ "Reserved", "wmx.sbc.auth_policy.rsvd",
+ FT_UINT8, BASE_HEX, NULL, 0xFE, NULL, HFILL
+ }
+ },
+ { /* 11.8.1 */
+ &hf_sbc_bw_alloc_support,
+ {
+ "Bandwidth Allocation Support", "wmx.sbc.bw_alloc_support",
+ FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_bw_alloc_support_duplex,
+ {
+ "Duplex", "wmx.sbc.bw_alloc_support.duplex",
+ FT_BOOLEAN, 8, TFS(&tfs_sbc_bw_alloc_support_duplex), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_bw_alloc_support_rsvd0,
+ {
+ "Reserved", "wmx.sbc.bw_alloc_support.rsvd0",
+ FT_UINT8, BASE_HEX, NULL, 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_bw_alloc_support_rsvd1,
+ {
+ "Reserved", "wmx.sbc.bw_alloc_support.rsvd1",
+ FT_UINT8, BASE_HEX, NULL, 0xFC, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_curr_transmit_power,
+ {
+ "Current transmitted power", "wmx.sbc.curr_transmit_power",
+ FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_effective_cinr_measurement_preamble,
+ {
+ "Effective CINR Measurement For A Permutation Zone From Preamble", "wmx.sbc.effective_cinr_measure_permutation_zone_preamble",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x8, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_effective_cinr_measurement_permutation_zone_from_pilot_subcarriers,
+ {
+ "Effective CINR Measurement For A Permutation Zone From Pilot Subcarriers", "wmx.sbc.effective_cinr_measure_permutation_zone.pilot_subcarriers",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_effective_cinr_measurement_permutation_zone_from_data_subcarriers,
+ {
+ "Effective CINR Measurement For A Permutation Zone From Data Subcarriers", "wmx.sbc.effective_cinr_measure_permutation_zone.data_subcarriers",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x20, NULL, HFILL
+ }
+ },
+ { /* 11.8.6 */
+ &hf_sbc_tlv_t_27_extension_capability,
+ {
+ "Extension Capability", "wmx.sbc.extension_capability",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_27_extension_capability_bit0,
+ {
+ "Supported Extended Subheader Format", "wmx.sbc.extension_capability.bit0",
+ FT_BOOLEAN, 8, TFS(&tfs_yes_no_sbc), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_27_extension_capability_reserved,
+ {
+ "Reserved", "wmx.sbc.extension_capability.reserved",
+ FT_UINT8, BASE_HEX, NULL, 0xFE, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_frequency_selectivity_characterization_report,
+ {
+ "Frequency Selectivity Characterization Report", "wmx.sbc.frequency_selectivity_characterization_report",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x80, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.19.2 */
+ &hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability,
+ {
+ "HARQ Chase Combining And CC-IR Buffer Capability", "wmx.sbc.harq_chase_combining_and_cc_ir_buffer_capability",
+ FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_aggregation_flag_dl,
+ {
+ "Aggregation Flag For DL", "wmx.sbc.harq_chase_combining_and_cc_ir_buffer_capability.aggregation_flag_dl",
+ FT_UINT16, BASE_HEX, NULL, 0x40, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_aggregation_flag_ul,
+ {
+ "Aggregation Flag for UL", "wmx.sbc.harq_chase_combining_and_cc_ir_buffer_capability.aggregation_flag_ul",
+ FT_UINT16, BASE_HEX, NULL, 0x4000, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_163_dl_harq_buffering_capability_for_chase_combining,
+ {
+ "Downlink HARQ Buffering Capability For Chase Combining (K)", "wmx.sbc.harq_chase_combining_and_cc_ir_buffer_capability.dl_harq_buffering_capability_for_chase_combining",
+ FT_UINT16, BASE_HEX, NULL, 0x3F, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_reserved1,
+ {
+ "Reserved", "wmx.sbc.harq_chase_combining_and_cc_ir_buffer_capability.reserved1",
+ FT_UINT16, BASE_HEX, NULL, 0x80, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_reserved2,
+ {
+ "Reserved", "wmx.sbc.harq_chase_combining_and_cc_ir_buffer_capability.reserved2",
+ FT_UINT16, BASE_HEX, NULL, 0x8000, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_163_ul_harq_buffering_capability_for_chase_combining,
+ {
+ "Uplink HARQ buffering capability for chase combining (K)", "wmx.sbc.harq_chase_combining_and_cc_ir_buffer_capability.ul_harq_buffering_capability_for_chase_combining",
+ FT_UINT16, BASE_HEX, NULL, 0x3F00, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.19.1 */
+ &hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability,
+ {
+ "HARQ Incremental Buffer Capability", "wmx.sbc.harq_incremental_redundancy_buffer_capability",
+ FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_aggregation_flag_for_dl,
+ {
+ "Aggregation Flag for DL", "wmx.sbc.harq_incremental_redundancy_buffer_capability.aggregation_flag_for_dl",
+ FT_UINT16, BASE_HEX, NULL, 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_aggregation_flag_for_ul,
+ {
+ "Aggregation Flag For UL", "wmx.sbc.harq_incremental_redundancy_buffer_capability.aggregation_flag_for_ul",
+ FT_UINT16, BASE_HEX, NULL, 0x1000, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_NEP,
+ {
+ "NEP Value Indicating Downlink HARQ Buffering Capability For Incremental Redundancy CTC", "wmx.sbc.harq_incremental_redundancy_buffer_capability.dl_incremental_redundancy_ctc",
+ FT_UINT16, BASE_HEX, NULL, 0xF, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_reserved1,
+ {
+ "Reserved", "wmx.sbc.harq_incremental_redundancy_buffer_capability.reserved",
+ FT_UINT16, BASE_HEX, NULL, 0xE0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_reserved2,
+ {
+ "Reserved", "wmx.sbc.harq_incremental_redundancy_buffer_capability.reserved2",
+ FT_UINT16, BASE_HEX, NULL, 0xE000, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_162_ul_harq_incremental_redundancy_buffer_capability_NEP,
+ {
+ "NEP Value Indicating Uplink HARQ Buffering Capability For Incremental Redundancy CTC", "wmx.sbc.harq_incremental_redundancy_buffer_capability.ul_incremental_redundancy_ctc",
+ FT_UINT16,BASE_HEX, NULL, 0xF00, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ofdma_aas_harq_map_capability,
+ {
+ "H-ARQ MAP Capability", "wmx.sbc.harq_map_capability",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ { /* 11.8.7 */
+ &hf_sbc_tlv_t_28_ho_trigger_metric_support,
+ {
+ "HO Trigger Metric Support", "wmx.sbc.ho_trigger_metric_support",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_28_ho_trigger_metric_support_bit0,
+ {
+ "BS CINR Mean", "wmx.sbc.ho_trigger_metric_support.bit0",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_28_ho_trigger_metric_support_bit1,
+ {
+ "BS RSSI Mean", "wmx.sbc.ho_trigger_metric_support.bit1",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_28_ho_trigger_metric_support_bit2,
+ {
+ "BS Relative Delay", "wmx.sbc.ho_trigger_metric_support.bit2",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_28_ho_trigger_metric_support_bit3,
+ {
+ "BS RTD", "wmx.sbc.ho_trigger_metric_support.bit3",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x8, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_28_ho_trigger_metric_support_reserved,
+ {
+ "Reserved", "wmx.sbc.ho_trigger_metric_support.reserved",
+ FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_invalid_tlv,
+ {
+ "Invalid TLV", "wmx.sbc.invalid_tlv",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 11.8.2 */
+ &hf_sbc_mac_pdu,
+ {
+ "Capabilities For Construction And Transmission Of MAC PDUs", "wmx.sbc.mac_pdu",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_mac_pdu_piggybacked,
+ {
+ "Ability To Receive Requests Piggybacked With Data", "wmx.sbc.mac_pdu.bit0",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_mac_pdu_fsn,
+ {
+ "Ability To Use 3-bit FSN Values Used When Forming MAC PDUs On Non-ARQ Connections", "wmx.sbc.mac_pdu.bit1",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.15 */
+ &hf_sbc_tlv_t_175_max_num_bst_per_frm_capability_harq,
+ {
+ "Maximum Number Of Burst Per Frame Capability In HARQ", "wmx.sbc.max_num_bst_per_frm_capability_harq",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_175_max_num_dl_harq_bst_per_harq_per_frm,
+ {
+ "Maximum Numbers Of DL HARQ Bursts Per HARQ Enabled Of MS Per Frame (default(0)=1)", "wmx.sbc.max_num_bst_per_frm_capability_harq.max_num_dl_harq_bst_per_harq_per_frm",
+ FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_175_max_num_ul_harq_bst,
+ {
+ "Maximum Number Of UL HARQ Burst Per HARQ Enabled MS Per Frame (default(0)=1)", "wmx.sbc.max_num_bst_per_frm_capability_harq.max_num_ul_harq_bst",
+ FT_UINT8, BASE_DEC, NULL, 0x7, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_175_max_num_ul_harq_per_frm_include_one_non_harq_bst,
+ {
+ "Whether The Maximum Number Of UL HARQ Bursts Per Frame (i.e. Bits# 2-0) Includes The One Non-HARQ Burst", "wmx.sbc.max_num_bst_per_frm_capability_harq.max_num_ul_harq_per_frm_include_one_non_harq_bst",
+ FT_BOOLEAN, 8, TFS(&tfs_yes_no_sbc), 0x8, NULL, HFILL
+ }
+ },
+ { /* 11.7.8.8 */
+ &hf_sbc_max_security_associations,
+ {
+ "Maximum Number Of Security Association Supported By The SS", "wmx.sbc.max_security_associations",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.2 - type 161 */
+ &hf_sbc_number_dl_arq_ack_channel,
+ {
+ "The Number Of DL HARQ ACK Channel", "wmx.sbc.number_dl_arq_ack_channel",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.3 - type 153 */
+ &hf_sbc_number_ul_arq_ack_channel,
+ {
+ "The Number Of UL HARQ ACK Channel", "wmx.sbc.number_ul_arq_ack_channel",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.8 */
+ &hf_sbc_ofdma_aas_capabilities,
+ {
+ "OFDMA AAS Capability", "wmx.sbc.ofdma_aas_capability",
+ FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_ofdma_aas_capabilities_rsvd,
+ {
+ "Reserved", "wmx.sbc.ofdma_aas_capabilities.rsvd",
+ FT_UINT16, BASE_HEX, NULL, 0xFFE0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_ofdma_aas_diversity_map_scan,
+ {
+ "AAS Diversity Map Scan (AAS DLFP)", "wmx.sbc.ofdma_aas_diversity_map_scan",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_ofdma_aas_fbck_rsp_support,
+ {
+ "AAS-FBCK-RSP Support", "wmx.sbc.ofdma_aas_fbck_rsp_support",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_ofdma_aas_zone,
+ {
+ "AAS Zone", "wmx.sbc.ofdma_aas_zone",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_ofdma_downlink_aas_preamble,
+ {
+ "Downlink AAS Preamble", "wmx.sbc.ofdma_downlink_aas_preamble",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x8, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.5 - 3 bytes */
+ &hf_sbc_tlv_t_176,
+ {
+ "OFDMA MS Demodulator For MIMO Support In DL", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl",
+ FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported), 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit0,
+ {
+ "2-antenna STC Matrix A", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit0",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit1,
+ {
+ "2-antenna STC Matrix B, vertical coding", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit1",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit2,
+ {
+ "Four Receive Antennas", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit2",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_sbc_tlv_t_176_bit2_cor2,
+ {
+ "2-antenna STC matrix B, horizontal coding", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit2",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_sbc_tlv_t_176_bit3,
+ {
+ "4-antenna STC Matrix A", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit3",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x8, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit4,
+ {
+ "4-antenna STC Matrix B, vertical coding", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit4",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit5,
+ {
+ "4-antenna STC Matrix B, horizontal coding", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit5",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x20, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit6,
+ {
+ "4-antenna STC Matrix C, vertical coding", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit6",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x40, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit7,
+ {
+ "4-antenna STC Matrix C, horizontal coding", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit7",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x80, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit8,
+ {
+ "3-antenna STC Matrix A", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit8",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x100, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit9,
+ {
+ "3-antenna STC Matrix B", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit9",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x200, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit10,
+ {
+ "3-antenna STC Matrix C, vertical coding", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit10",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x400, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit11,
+ {
+ "3-antenna STC Matrix C, horizontal coding", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit11",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x800, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit12,
+ {
+ "Capable Of Calculating Precoding Weight", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit12",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x1000, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit13,
+ {
+ "Capable Of Adaptive Rate Control", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit13",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x2000, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit14,
+ {
+ "Capable Of Calculating Channel Matrix", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit14",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x4000, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit15,
+ {
+ "Capable Of Antenna Grouping", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit15",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x8000, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit16,
+ {
+ "Capable Of Antenna Selection", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit16",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x10000, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit17,
+ {
+ "Capable Of Codebook Based Precoding", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit17",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x20000, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit18,
+ {
+ "Capable Of Long-term Precoding", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit18",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x40000, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_bit19,
+ {
+ "Capable Of MIMO Midamble", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.bit19",
+ FT_BOOLEAN, 24, TFS(&tfs_supported), 0x80000, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_176_reserved,
+ {
+ "Reserved", "wmx.sbc.ofdma_ms_demodulator_for_mimo_support_in_dl.reserved",
+ FT_UINT24, BASE_HEX, NULL, 0xF00000, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.18 */
+ &hf_sbc_tlv_t_179_ofdma_multiple_dl_burst_profile_support,
+ {
+ "OFDMA Multiple Downlink Burst Profile Capability", "wmx.sbc.ofdma_multiple_dl_burst_profile_support",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_179_dl_bst_profile_for_multiple_fec,
+ {
+ "Downlink burst profile for multiple FEC types", "wmx.sbc.ofdma_multiple_dl_burst_profile_support.dl_bst_profile_for_multiple_fec",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_179_reserved,
+ {
+ "Reserved", "wmx.sbc.ofdma_multiple_dl_burst_profile_support.reserved",
+ FT_UINT8, BASE_HEX, NULL, 0xFC, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_179_ul_bst_profile_for_multiple_fec,
+ {
+ "Uplink burst profile for multiple FEC types", "wmx.sbc.ofdma_multiple_dl_burst_profile_support.ul_burst_profile_for_multiple_fec_types",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.9 */
+ &hf_sbc_ss_cinr_measure_capability,
+ {
+ "OFDMA SS CINR Measurement Capability", "wmx.sbc.ofdma_ss_cinr_measure_capability",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.6 */
+ &hf_sbc_ss_mimo_uplink_support,
+ {
+ "OFDMA SS MIMO uplink support", "wmx.sbc.ofdma_ss_mimo_uplink_support",
+ FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_mimo_uplink_support_2_ann_sttd,
+ {
+ "2-antenna STTD", "wmx.sbc.ofdma_ss_mimo_uplink_support.2_antenna_sttd",
+ FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_mimo_uplink_support_2_ann_sm_vertical,
+ {
+ "2-antenna SM with vertical coding", "wmx.sbc.ofdma_ss_mimo_uplink_support.2_antenna_sm_with_vertical_coding",
+ FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_mimo_uplink_support_1_ann_coop_sm,
+ {
+ "Single-antenna cooperative SM", "wmx.sbc.ofdma_ss_mimo_uplink_support.single_antenna_coop_sm",
+ FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_ofdma_uplink_aas_preamble,
+ {
+ "Uplink AAS Preamble", "wmx.sbc.ofdma_uplink_aas_preamble",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_phy_cinr_measurement_preamble,
+ {
+ "Physical CINR Measurement From The Preamble", "wmx.sbc.phy_cinr_measure_preamble",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_phy_cinr_measurement_permutation_zone_from_pilot_subcarriers,
+ {
+ "Physical CINR Measurement For A Permutation Zone From Pilot Subcarriers", "wmx.sbc.phy_cinr_measure_permutation_zone.pilot_subcarriers",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_phy_cinr_measurement_permutation_zone_from_data_subcarriers,
+ {
+ "Physical CINR Measurement For A Permutation Zone From Data Subcarriers", "wmx.sbc.phy_cinr_measure_permutation_zone.data_subcarriers",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+ { /* 11.7.8.6 */
+ &hf_sbc_pkm_flow_control,
+ {
+ "PKM Flow Control", "wmx.sbc.pkm_flow_control",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 11.8.5 */
+ &hf_sbc_power_save_class_types_capability,
+ {
+ "Power Save Class Types Capability", "wmx.sbc.power_save_class_types_capability",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_power_save_class_types_capability_bit0,
+ {
+ "Power Save Class Type I", "wmx.sbc.power_save_class_types_capability.bit0",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_power_save_class_types_capability_bit1,
+ {
+ "Power Save Class Type II", "wmx.sbc.power_save_class_types_capability.bit1",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_power_save_class_types_capability_bit2,
+ {
+ "Power Save Class Type III", "wmx.sbc.power_save_class_types_capability.bit2",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_power_save_class_types_capability_bits34,
+ {
+ "Number Of Power Save Class Type Instances Supported From Class Type I and II", "wmx.sbc.power_save_class_types_capability.bits34",
+ FT_UINT8, BASE_DEC, NULL, 0x18, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_power_save_class_types_capability_bits567,
+ {
+ "Number Of Power Save Class Type Instances Supported From Class Type III", "wmx.sbc.power_save_class_types_capability.bits567",
+ FT_UINT8, BASE_DEC, NULL, 0xE0, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.7 */
+ &hf_sbc_ofdma_aas_private_chain_enable,
+ {
+ "Private Map Chain Enable", "wmx.sbc.private_chain_enable",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x8, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ofdma_aas_private_map_concurrency,
+ {
+ "Private Map Chain Concurrency", "wmx.sbc.private_map_concurrency",
+ FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ofdma_aas_private_map_dl_frame_offset,
+ {
+ "Private Map DL Frame Offset", "wmx.sbc.private_map_dl_frame_offset",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ofdma_aas_private_map_support,
+ {
+ "Private Map Support", "wmx.sbc.private_map_support",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_ofdma_aas_private,
+ {
+ "OFDMA AAS Private Map Support", "wmx.sbc.private_map_support.ofdma_aas",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ofdma_aas_reduced_private_map_support,
+ {
+ "Reduced Private Map Support", "wmx.sbc.private_map_support.reduced",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ofdma_aas_private_ul_frame_offset,
+ {
+ "Private Map UL Frame Offset", "wmx.sbc.private_ul_frame_offset",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x20, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_mac_pdu_rsvd,
+ {
+ "Reserved", "wmx.sbc.mac_pdu.rsvd",
+ FT_UINT8, BASE_HEX, NULL, 0xFC, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.2 */
+ &hf_sbc_max_transmit_power,
+ {
+ "Maximum Transmit Power", "wmx.sbc.max_transmit_power",
+ FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_bpsk,
+ {
+ "BPSK", "wmx.sbc.bpsk",
+ FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_qpsk,
+ {
+ "QPSK", "wmx.sbc.qpsk",
+ FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_qam16,
+ {
+ "QAM16", "wmx.sbc.qam16",
+ FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_qam64,
+ {
+ "QAM64", "wmx.sbc.qam64",
+ FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_current_transmitted_power,
+ {
+ "Current Transmitted Power", "wmx.sbc.current_transmitted_power",
+ FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.5 - 2 bytes */
+ &hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_a,
+ {
+ "2-antenna STC Matrix A", "wmx.sbc.ss_demodulator.mimo.2.antenna.stc.matrix.a",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_b_horizontal,
+ {
+ "2-antenna STC Matrix B, horizontal coding", "wmx.sbc.ss_demodulator.mimo.2.antenna.stc.matrix.b.horizontal",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_b_vertical,
+ {
+ "2-antenna STC Matrix B, vertical coding", "wmx.sbc.ss_demodulator.mimo.2.antenna.stc.matrix.b.vertical",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_a,
+ {
+ "4-antenna STC Matrix A", "wmx.sbc.ss_demodulator.mimo.4.antenna.stc.matrix.a",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x8, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_b_horizontal,
+ {
+ "4-antenna STC Matrix B, horizontal coding", "wmx.sbc.ss_demodulator.mimo.4.antenna.stc.matrix.b.horizontal",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x20, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_b_vertical,
+ {
+ "4-antenna STC Matrix B, vertical coding", "wmx.sbc.ss_demodulator.mimo.4.antenna.stc.matrix.b.vertical",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_c_horizontal,
+ {
+ "4-antenna STC Matrix C, horizontal coding", "wmx.sbc.ss_demodulator.mimo.4.antenna.stc.matrix.c.horizontal",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x80, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_c_vertical,
+ {
+ "4-antenna STC Matrix C, vertical coding", "wmx.sbc.ss_demodulator.mimo.4.antenna.stc.matrix.c.vertical",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x40, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_mimo_rsvd,
+ {
+ "Reserved", "wmx.sbc.ss_demodulator.mimo.reserved",
+ FT_UINT16, BASE_HEX, NULL, 0xFF00, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_mimo_support,
+ {
+ "OFDMA SS Demodulator For MIMO Support", "wmx.sbc.ss_demodulator.mimo.support",
+ FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ /*11.8.3.7.11 ??? */
+ { /* 11.8.3.7.12 - 170 */
+ &hf_sbc_ofdma_ss_uplink_power_control_support,
+ {
+ "OFDMA SS uplink power control support", "wmx.sbc.ofdma_ss_uplink_power_control_support",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ofdma_ss_uplink_power_control_support_open_loop,
+ {
+ "Open loop", "wmx.sbc.ofdma_ss_uplink_power_control_support.open_loop",
+ FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ofdma_ss_uplink_power_control_support_aas_preamble,
+ {
+ "AAS preamble", "wmx.sbc.ofdma_ss_uplink_power_control_support.aas_preamble",
+ FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ofdma_ss_uplink_power_control_support_rsvd,
+ {
+ "Reserved", "wmx.sbc.ofdma_ss_uplink_power_control_support.rsvd",
+ FT_UINT8, BASE_HEX, NULL, 0xFC, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_172_dl_region_definition_support,
+ {
+ "DL Region Definition Support", "wmx.sbc.ofdma_map_capability.dl_region_definition_support",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x10, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.12 - 172 */
+ &hf_sbc_tlv_t_172,
+ {
+ "Support For Extended HARQ", "wmx.sbc.ofdma_map_capability.extended_harq",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_172_extended_harq_ie_capability,
+ {
+ "Extended HARQ IE Capability", "wmx.sbc.ofdma_map_capability.extended_harq_ie_capability",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_172_harq_map_capability,
+ {
+ "HARQ MAP Capability", "wmx.sbc.ofdma_map_capability.harq_map_capability",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.12 - 171 */
+ &hf_sbc_tlv_t_171_minimum_num_of_frames,
+ {
+ "The Minimum Number Of Frames That SS Takes To Switch From The Open Loop Power Control Scheme To The Closed Loop Power Control Scheme Or Vice Versa", "wmx.sbc.ofdma_ss_uplink_power_control_support.minimum_num_of_frames",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_172_reserved,
+ {
+ "Reserved", "wmx.sbc.ofdma_map_capability.reserved",
+ FT_UINT8, BASE_HEX, NULL, 0xE0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_172_sub_map_capability_first_zone,
+ {
+ "Sub MAP Capability For First Zone", "wmx.sbc.ofdma_map_capability.sub_map_capability_first_zone",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_172_sub_map_capability_other_zones,
+ {
+ "Sub MAP Capability For Other Zones", "wmx.sbc.ofdma_map_capability.sub_map_capability_other_zones",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x8, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.14 */
+ &hf_sbc_tlv_t_174_ofdma_ms_csit_capability,
+ {
+ "OFDMA MS CSIT Capability", "wmx.sbc.ofdma_ms_csit_capability",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_174_csit_compatibility_type_a,
+ {
+ "CSIT Compatibility Type A", "wmx.sbc.ofdma_ms_csit_capability.csit_compatibility_type_a",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_174_csit_compatibility_type_b,
+ {
+ "CSIT Compatibility Type B", "wmx.sbc.ofdma_ms_csit_capability.csit_compatibility_type_b",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_174_max_num_simultanous_sounding_instructions,
+ {
+ "Max Number Of Simultaneous Sounding Instructions", "wmx.sbc.ofdma_ms_csit_capability.max_num_simultaneous_sounding_instructions",
+ FT_UINT16, BASE_DEC, NULL, 0x03C0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_174_power_assignment_capability,
+ {
+ "Power Assignment Capability", "wmx.sbc.ofdma_ms_csit_capability.power_assignment_capability",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_174_ss_csit_reserved,
+ {
+ "Reserved", "wmx.sbc.ofdma_ms_csit_capability.reserved",
+ FT_UINT16, BASE_HEX, NULL, 0xF800, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_174_sounding_rsp_time_capability,
+ {
+ "Sounding Response Time Capability", "wmx.sbc.ofdma_ms_csit_capability.sounding_response_time_capability",
+ FT_UINT16, BASE_HEX, VALS(vals_sounding_rsp_time_cap_codings), 0x0038, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_174_ss_csit_type_a_support,
+ {
+ "SS Does Not Support P Values Of 9 And 18 When Supporting CSIT Type A", "wmx.sbc.ofdma_ms_csit_capability.type_a_support",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x0400, NULL, HFILL
+ }
+ },
+ {
+ /* 11.8.3.7.20 */
+ &hf_sbc_tlv_t_204_ofdma_parameters_sets,
+ {
+ "OFDMA parameters sets", "wmx.sbc.ofdma_parameters_sets",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_204_ofdma_parameters_sets_phy_set_a,
+ {
+ "Support OFDMA PHY parameter set A", "wmx.sbc.ofdma_parameters_sets.phy_set_a",
+ FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_204_ofdma_parameters_sets_phy_set_b,
+ {
+ "Support OFDMA PHY parameter set B", "wmx.sbc.ofdma_parameters_sets.phy_set_b",
+ FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_204_ofdma_parameters_sets_harq_parameters_set,
+ {
+ "HARQ parameters set", "wmx.sbc.ofdma_parameters_sets.harq_parameters_set",
+ FT_UINT8, BASE_HEX, VALS(vals_sbc_harq_parameters_set), 0x1C, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_204_ofdma_parameters_sets_mac_set_a,
+ {
+ "Support OFDMA MAC parameters set A", "wmx.sbc.ofdma_parameters_sets.mac_set_a",
+ FT_UINT8, BASE_HEX, NULL, 0x20, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_204_ofdma_parameters_sets_mac_set_b,
+ {
+ "Support OFDMA MAC parameters set B", "wmx.sbc.ofdma_parameters_sets.mac_set_b",
+ FT_UINT8, BASE_HEX, NULL, 0x40, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_204_ofdma_parameters_sets_reserved,
+ {
+ "Reserved", "wmx.sbc.ofdma_parameters_sets.reserved",
+ FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.16 */
+ &hf_sbc_tlv_t_177_ofdma_ss_modulator_for_mimo_support,
+ {
+ "OFDMA SS Modulator For MIMO Support", "wmx.sbc.ofdma_ss_modulator_for_mimo_support",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_177_adaptive_rate_ctl,
+ {
+ "Capable Of Adaptive Rate Control", "wmx.sbc.ofdma_ss_modulator_for_mimo_support.capable_adaptive_rate_control",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_177_beamforming,
+ {
+ "Capable Of Beamforming", "wmx.sbc.ofdma_ss_modulator_for_mimo_support.capable_beamforming",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x8, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_177_single_antenna,
+ {
+ "Capable of single antenna transmission", "wmx.sbc.ofdma_ss_modulator_for_mimo_support.capable_single_antenna",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x20, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_177_stc_matrix_b_horizontal,
+ {
+ "Capable of 2-antenna STC Matrix B, Horizontal coding", "wmx.sbc.ofdma_ss_modulator_for_mimo_support.stc_matrix_b_horizontal",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_177_two_transmit_antennas,
+ {
+ "Two transmit antennas", "wmx.sbc.ofdma_ss_modulator_for_mimo_support.two_transmit_antennas",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_177_capable_of_transmit_diversity,
+ {
+ "Capable of transmit diversity", "wmx.sbc.ofdma_ss_modulator_for_mimo_support.capable_of_transmit_diversity",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_177_capable_of_spacial_multiplexing,
+ {
+ "Capable of spatial multiplexing", "wmx.sbc.ofdma_ss_modulator_for_mimo_support.capable_of_spatial_multiplexing",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_177_stc_matrix_b_vertical,
+ {
+ "Capable of 2-antenna STC Matrix B, Vertical coding", "wmx.sbc.ofdma_ss_modulator_for_mimo_support.stc_matrix_b_vertical",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_177_collaborative_sm_with_one_antenna,
+ {
+ "Capable of collaborative SM with one antenna", "wmx.sbc.ofdma_ss_modulator_for_mimo_support.collaborative_sm_with_one_antenna",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x40, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_177_collaborative_sm_with_two_antennas,
+ {
+ "Collaborative SM with two antennas", "wmx.sbc.ofdma_ss_modulator_for_mimo_support.collaborative_sm_with_two_antennas",
+ FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_177_capable_of_two_antenna,
+ {
+ "Capable of two antenna", "wmx.sbc.ofdma_ss_modulator_for_mimo_support.capable_of_two_antenna",
+ FT_UINT8, BASE_HEX, NULL, 0x40, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_177_rsvd,
+ {
+ "Reserved", "wmx.sbc.ofdma_ss_modulator_for_mimo_support.rsvd",
+ FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_177_stc_matrix_a,
+ {
+ "Capable of 2-antenna STC Matrix A", "wmx.sbc.ofdma_ss_modulator_for_mimo_support.stc_matrix_a",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.17 */
+ &hf_sbc_tlv_t_178_sdma_pilot_capability,
+ {
+ "SDMA Pilot Capability", "wmx.sbc.sdma_pilot_capability",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_178_reserved,
+ {
+ "Reserved", "wmx.sbc.sdma_pilot_capability.reserved",
+ FT_UINT8, BASE_HEX, NULL, 0xFC, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_178_sdma_pilot_pattern_support_for_amc_zone,
+ {
+ "SDMA Pilot Patterns Support For AMC Zone", "wmx.sbc.sdma_pilot_capability.sdma_pilot_pattern_support_for_amc_zone",
+ FT_UINT8, BASE_HEX, VALS(vals_sbc_sdma_str), 0x03, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.2 - type 151 */
+ &hf_sbc_ss_demodulator,
+ {
+ "OFDMA SS Demodulator", "wmx.sbc.ss_demodulator",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ /* tlv length = 1 byte */
+ {
+ &hf_sbc_ss_demodulator_64qam,
+ {
+ "64-QAM", "wmx.sbc.ss_demodulator.64qam",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_btc,
+ {
+ "BTC", "wmx.sbc.ss_demodulator.btc",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_cc_with_optional_interleaver,
+ {
+ "CC with Optional Interleaver", "wmx.sbc.ss_demodulator.cc_with_optional_interleaver",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_ctc,
+ {
+ "CTC", "wmx.sbc.ss_demodulator.ctc",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+ /* tlv length = 2 bytes */
+ {
+ &hf_sbc_ss_demodulator_64qam_2,
+ {
+ "64-QAM", "wmx.sbc.ss_demodulator.64qam",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_btc_2,
+ {
+ "BTC", "wmx.sbc.ss_demodulator.btc",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_cc_with_optional_interleaver_2,
+ {
+ "CC with Optional Interleaver", "wmx.sbc.ss_demodulator.cc_with_optional_interleaver",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_ctc_2,
+ {
+ "CTC", "wmx.sbc.ss_demodulator.ctc",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_dedicated_pilots_2,
+ {
+ "Dedicated Pilots", "wmx.sbc.ss_demodulator.dedicated_pilots",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x400, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_harq_cc_ir_2,
+ {
+ "HARQ CC_IR", "wmx.sbc.ss_demodulator.harq.cc.ir",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x100, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_harq_chase,
+ {
+ "HARQ Chase", "wmx.sbc.ss_demodulator.harq.chase",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x20, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_harq_chase_2,
+ {
+ "HARQ Chase", "wmx.sbc.ss_demodulator.harq.chase",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x20, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_harq_ctc_ir,
+ {
+ "HARQ CTC_IR", "wmx.sbc.ss_demodulator.harq.ctc.ir",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x40, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_harq_ctc_ir_2,
+ {
+ "HARQ CTC_IR", "wmx.sbc.ss_demodulator.harq.ctc.ir",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x40, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_ldpc_2,
+ {
+ "LDPC", "wmx.sbc.ss_demodulator.ldpc",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x200, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_reserved,
+ {
+ "Reserved", "wmx.sbc.ss_demodulator.reserved1",
+ FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_reserved_2,
+ {
+ "Reserved", "wmx.sbc.ss_demodulator.reserved2",
+ FT_UINT16, BASE_HEX, NULL, 0x80, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_reserved1_2,
+ {
+ "Reserved", "wmx.sbc.ss_demodulator.reserved2",
+ FT_UINT16, BASE_HEX, NULL, 0x800, NULL, HFILL
+ }
+ },
+#if 0
+ { /* if the number of DL H-ARQ channels > 7 but tlv length = 1 */
+ &hf_sbc_ss_demodulator_reserved1,
+ {
+ "Reserved", "wmx.sbc.ss_demodulator.reserved1",
+ FT_UINT16, BASE_HEX, NULL, 0xFFFF, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_sbc_ss_demodulator_stc,
+ {
+ "STC", "wmx.sbc.ss_demodulator.stc",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x8, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_demodulator_stc_2,
+ {
+ "STC", "wmx.sbc.ss_demodulator.stc",
+ FT_BOOLEAN, 16, TFS(&tfs_supported), 0x8, NULL, HFILL
+ }
+ },
+ /* 11.8.3.4 - 11.8.3.6 are not supported for now */
+ { /* 11.8.3.7.1 */
+ &hf_sbc_ss_fft_sizes,
+ {
+ "OFDMA SS FFT Sizes", "wmx.sbc.ss_fft_sizes",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_fft_128,
+ {
+ "FFT-128", "wmx.sbc.ss_fft_sizes.128",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_fft_256,
+ {
+ "FFT-256", "wmx.sbc.ss_fft_sizes.256",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_fft_512,
+ {
+ "FFT-512", "wmx.sbc.ss_fft_sizes.512",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x8, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_fft_1024,
+ {
+ "FFT-1024", "wmx.sbc.ss_fft_sizes.1024",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_fft_2048,
+ {
+ "FFT-2048", "wmx.sbc.ss_fft_sizes.2048",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_fft_rsvd1,
+ {
+ "Reserved", "wmx.sbc_ss_fft_sizes_rsvd1",
+ FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_fft_rsvd2,
+ {
+ "Reserved", "wmx.sbc.ss_fft_sizes.rsvd2",
+ FT_UINT8, BASE_HEX, NULL, 0xE0, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_sbc_ofdm_ss_minimum_num_of_frames,
+ {
+ "SS minimum number of frames", "wmx.sbc.ss_minimum_num_of_frames",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_sbc_ss_mimo_uplink_support_rsvd,
+ {
+ "Reserved", "wmx.sbc.ss_mimo_ul_support.rsvd",
+ FT_UINT8, BASE_HEX, NULL, 0xF8, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.3 - type 152 */
+ &hf_sbc_ss_modulator,
+ {
+ "OFDMA SS Modulator", "wmx.sbc.ss_modulator",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_modulator_64qam,
+ {
+ "64-QAM", "wmx.sbc.ss_modulator.64qam",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_modulator_btc,
+ {
+ "BTC", "wmx.sbc.ss_modulator.btc",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_modulator_cc_ir,
+ {
+ "CC_IR", "wmx.sbc.ss_modulator.cc_ir",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x40, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_modulator_ctc,
+ {
+ "CTC", "wmx.sbc.ss_modulator.ctc",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_modulator_ctc_ir,
+ {
+ "CTC_IR", "wmx.sbc.ss_modulator.ctc_ir",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x20, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_modulator_harq_chase,
+ {
+ "HARQ Chase", "wmx.sbc.ss_modulator.harq_chase",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_modulator_ldpc,
+ {
+ "LDPC", "wmx.sbc.ss_modulator.ldpc",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x80, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_modulator_stc,
+ {
+ "STC", "wmx.sbc.ss_modulator.stc",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x8, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.4 */
+ &hf_sbc_ss_permutation_support,
+ {
+ "OFMDA SS Permutation Support", "wmx.sbc.ss_permutation_support",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_amc_1x6,
+ {
+ "AMC 1x6", "wmx.sbc.ss_permutation_support.amc_1x6",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_amc_2x3,
+ {
+ "AMC 2x3", "wmx.sbc.ss_permutation_support.amc_2x3",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x8, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_amc_3x2,
+ {
+ "AMC 3x2", "wmx.sbc.ss_permutation_support.amc_3x2",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_amc_with_harq_map,
+ {
+ "AMC Support With H-ARQ Map", "wmx.sbc.ss_permutation_support.amc_support_harq_map",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x20, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_optimal_fusc,
+ {
+ "Optional FUSC", "wmx.sbc.ss_permutation_support.optimal_fusc",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_optimal_pusc,
+ {
+ "Optional PUSC", "wmx.sbc.ss_permutation_support.optimal_pusc",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_tusc1_support,
+ {
+ "TUSC1", "wmx.sbc.ss_permutation_support.tusc1_support",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x40, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_tusc2_support,
+ {
+ "TUSC2", "wmx.sbc.ss_permutation_support.tusc2_support",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x80, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ssrtg,
+ {
+ "SSRTG", "wmx.sbc.ssrtg",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ssttg,
+ {
+ "SSTTG", "wmx.sbc.ssttg",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_ss_support_2_concurrent_cqi_channels,
+ {
+ "Support for 2 Concurrent CQI Channels", "wmx.sbc.support_2_concurrent_cqi_channels",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x40, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.1 */
+ &hf_sbc_transition_gaps,
+ {
+ "Subscriber Transition Gaps", "wmx.sbc.transition_gaps",
+ FT_UINT16, BASE_HEX, NULL, 0x00, NULL, HFILL
+ }
+ },
+ { /* 11.8.3.7.13 */
+ &hf_sbc_tlv_t_173_ul_ctl_channel_support,
+ {
+ "Uplink Control Channel Support", "wmx.sbc.ul_ctl_channel_support",
+ FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_173_3_bit_mimo_fast_feedback,
+ {
+ "3-bit MIMO Fast-feedback", "wmx.sbc.ul_ctl_channel_support.3bit_mimo_fast_feedback",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x1, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_173_diuc_cqi_fast_feedback,
+ {
+ "DIUC-CQI Fast-feedback", "wmx.sbc.ul_ctl_channel_support.diuc_cqi_fast_feedback",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x80, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_173_enhanced_fast_feedback,
+ {
+ "Enhanced Fast_feedback", "wmx.sbc.ul_ctl_channel_support.enhanced_fast_feedback",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x2, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_173_measurement_report,
+ {
+ "A Measurement Report Shall Be Performed On The Last DL Burst", "wmx.sbc.ul_ctl_channel_support.measurement_report",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x20, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_173_primary_secondary_fast_feedback,
+ {
+ "Primary/Secondary FAST_FEEDBACK", "wmx.sbc.ul_ctl_channel_support.primary_secondary_fast_feedback",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x40, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_173_reserved,
+ {
+ "Reserved", "wmx.sbc.ul_ctl_channel_support.reserved",
+ FT_UINT8, BASE_HEX, NULL, 0x8, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_173_uep_fast_feedback,
+ {
+ "UEP Fast-feedback", "wmx.sbc.ul_ctl_channel_support.uep_fast_feedback",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x10, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_tlv_t_173_ul_ack,
+ {
+ "UL ACK", "wmx.sbc.ul_ctl_channel_support.ul_ack",
+ FT_BOOLEAN, 8, TFS(&tfs_supported), 0x4, NULL, HFILL
+ }
+ },
+ {
+ &hf_sbc_unknown_type,
+ {
+ "Unknown SBC type", "wmx.sbc.unknown_tlv_type",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett_sbc[] =
+ {
+ &ett_mac_mgmt_msg_sbc_decoder,
+ &ett_sbc_req_tlv_subtree,
+ &ett_sbc_rsp_tlv_subtree,
+ };
+
+ proto_mac_mgmt_msg_sbc_decoder = proto_register_protocol (
+ "WiMax SBC-REQ/RSP Messages", /* name */
+ "WiMax SBC-REQ/RSP (sbc)", /* short name */
+ "wmx.sbc" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_sbc_decoder, hf_sbc, array_length(hf_sbc));
+ proto_register_subtree_array(ett_sbc, array_length(ett_sbc));
+
+ register_dissector("mac_mgmt_msg_sbc_rsp_handler", dissect_mac_mgmt_msg_sbc_rsp_decoder, -1);
+}
+
+void
+proto_reg_handoff_mac_mgmt_msg_sbc(void)
+{
+ dissector_handle_t sbc_handle;
+
+ sbc_handle = create_dissector_handle(dissect_mac_mgmt_msg_sbc_req_decoder, proto_mac_mgmt_msg_sbc_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_SBC_REQ, sbc_handle);
+
+ sbc_handle = create_dissector_handle(dissect_mac_mgmt_msg_sbc_rsp_decoder, proto_mac_mgmt_msg_sbc_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_SBC_RSP, sbc_handle);
+}
+
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_ucd.c b/plugins/epan/wimax/msg_ucd.c
new file mode 100644
index 0000000000..985450e90e
--- /dev/null
+++ b/plugins/epan/wimax/msg_ucd.c
@@ -0,0 +1,1255 @@
+/* msg_ucd.c
+ * WiMax MAC Management UCD Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+/*
+#define DEBUG
+*/
+
+#include <epan/packet.h>
+#include "wimax_tlv.h"
+#include "wimax_mac.h"
+#include "wimax_utils.h"
+
+void proto_register_mac_mgmt_msg_ucd(void);
+void proto_reg_handoff_mac_mgmt_msg_ucd(void);
+
+extern gboolean include_cor2_changes;
+
+guint cqich_id_size; /* Set for CQICH_Alloc_IE */
+
+static gint proto_mac_mgmt_msg_ucd_decoder = -1;
+static gint ett_mac_mgmt_msg_ucd_decoder = -1;
+
+/* fix fields */
+static gint hf_ucd_res_timeout = -1;
+static gint hf_ucd_bw_req_size = -1;
+static gint hf_ucd_ranging_req_size = -1;
+static gint hf_ucd_freq = -1;
+/* static gint hf_ucd_subchan_params_num_chan = -1; */
+static gint hf_ucd_ul_allocated_subchannles_bitmap = -1;
+/* static gint hf_ucd_subchan_params_num_sym = -1; */
+/* static gint hf_ucd_subchan_codes = -1; */
+
+static gint hf_ucd_ul_burst_reserved = -1;
+static gint hf_ucd_ul_burst_uiuc = -1;
+static gint hf_ucd_burst_fec = -1;
+static gint hf_ucd_burst_ranging_data_ratio = -1;
+/*static gint hf_ucd_burst_power_boost = -1;
+*static gint hf_ucd_burst_tcs_enable = -1;
+*/
+
+static gint hf_ucd_tlv_t_159_band_amc_allocation_threshold = -1;
+static gint hf_ucd_tlv_t_158_optional_permutation_ul_allocated_subchannels_bitmap = -1;
+static gint hf_ucd_tlv_t_160_band_amc_release_threshold = -1;
+static gint hf_ucd_tlv_t_161_band_amc_allocation_timer = -1;
+static gint hf_ucd_tlv_t_162_band_amc_release_timer = -1;
+static gint hf_ucd_tlv_t_163_band_status_report_max_period = -1;
+static gint hf_ucd_tlv_t_164_band_amc_retry_timer = -1;
+static gint hf_ucd_tlv_t_171_harq_ack_delay_dl_burst = -1;
+static gint hf_ucd_tlv_t_170_safety_channel_retry_timer = -1;
+static gint hf_ucd_tlv_t_172_cqich_band_amc_transition_delay = -1;
+static gint hf_ucd_tlv_t_174_maximum_retransmission = -1;
+static gint hf_ucd_tlv_t_177_normalized_cn_override2 = -1;
+static gint hf_ucd_tlv_t_177_normalized_cn_override2_first_line = -1;
+static gint hf_ucd_tlv_t_177_normalized_cn_override2_list = -1;
+static gint hf_ucd_tlv_t_176_size_of_cqich_id_field = -1;
+static gint hf_ucd_tlv_t_186_upper_bound_aas_preamble = -1;
+static gint hf_ucd_tlv_t_187_lower_bound_aas_preamble = -1;
+static gint hf_ucd_tlv_t_188_allow_aas_beam_select_message = -1;
+static gint hf_ucd_tlv_t_189_use_cqich_indication_flag = -1;
+static gint hf_ucd_tlv_t_190_ms_specific_up_power_addjustment_step = -1;
+static gint hf_ucd_tlv_t_191_ms_specific_down_power_addjustment_step = -1;
+static gint hf_ucd_tlv_t_192_min_level_power_offset_adjustment = -1;
+static gint hf_ucd_tlv_t_193_max_level_power_offset_adjustment = -1;
+static gint hf_ucd_tlv_t_194_handover_ranging_codes = -1;
+static gint hf_ucd_tlv_t_195_initial_ranging_interval = -1;
+static gint hf_ucd_tlv_t_196_tx_power_report = -1;
+static gint hf_ucd_tlv_t_196_tx_power_report_threshold = -1;
+static gint hf_ucd_tlv_t_196_tx_power_report_interval = -1;
+static gint hf_ucd_tlv_t_196_tx_power_report_a_p_avg = -1;
+static gint hf_ucd_tlv_t_196_tx_power_report_threshold_icqch = -1;
+static gint hf_ucd_tlv_t_196_tx_power_report_interval_icqch = -1;
+static gint hf_ucd_tlv_t_196_tx_power_report_a_p_avg_icqch = -1;
+/* static gint hf_ucd_tlv_t_197_normalized_cn_channel_sounding = -1; */
+static gint hf_ucd_tlv_t_202_uplink_burst_profile_for_multiple_fec_types = -1;
+static gint hf_ucd_tlv_t_203_ul_pusc_subchannel_rotation = -1;
+static gint hf_ucd_tlv_t_205_relative_power_offset_ul_harq_burst = -1;
+static gint hf_ucd_tlv_t_206_relative_power_offset_ul_burst_containing_mac_mgmt_msg = -1;
+static gint hf_ucd_tlv_t_207_ul_initial_transmit_timing = -1;
+static gint hf_ucd_tlv_t_210_fast_feedback_region = -1;
+static gint hf_ucd_tlv_t_211_harq_ack_region = -1;
+static gint hf_ucd_tlv_t_212_ranging_region = -1;
+static gint hf_ucd_tlv_t_213_sounding_region = -1;
+static gint hf_ucd_tlv_t_150_initial_ranging_codes = -1;
+static gint hf_ucd_tlv_t_151_periodic_ranging_codes = -1;
+static gint hf_ucd_tlv_t_152_bandwidth_request_codes = -1;
+static gint hf_ucd_tlv_t_155_start_of_ranging_codes_group = -1;
+static gint hf_ucd_tlv_t_156_permutation_base = -1;
+static gint hf_ucd_ho_ranging_start = -1;
+static gint hf_ucd_ho_ranging_end = -1;
+static gint hf_ucd_initial_range_backoff_start = -1;
+static gint hf_ucd_initial_range_backoff_end = -1;
+static gint hf_ucd_bandwidth_backoff_start = -1;
+static gint hf_ucd_bandwidth_backoff_end = -1;
+static gint hf_ucd_periodic_ranging_backoff_start = -1;
+static gint hf_ucd_periodic_ranging_backoff_end = -1;
+static gint hf_ucd_config_change_count = -1;
+static gint hf_ucd_ranging_backoff_start = -1;
+static gint hf_ucd_ranging_backoff_end = -1;
+static gint hf_ucd_request_backoff_start = -1;
+static gint hf_ucd_request_backoff_end = -1;
+
+/* static gint hf_ucd_unknown_type = -1; */
+static gint hf_ucd_invalid_tlv = -1;
+
+#if 0
+static const value_string vals_dcd_burst_tcs[] =
+{
+ {0, "TCS disabled"},
+ {1, "TCS enabled"},
+ {0, NULL}
+};
+#endif
+
+static const value_string vals_dcd_burst_fec[] =
+{
+ { 0, "QPSK (CC) 1/2"},
+ { 1, "QPSK (CC) 3/4"},
+ { 2, "16-QAM (CC) 1/2"},
+ { 3, "16-QAM (CC) 3/4"},
+ { 4, "64-QAM (CC) 1/2"},
+ { 5, "64-QAM (CC) 2/3"},
+ { 6, "64-QAM (CC) 3/4"},
+ { 7, "QPSK (BTC) 1/2"},
+ { 8, "QPSK (BTC) 3/4 or 2/3"},
+ { 9, "16-QAM (BTC) 3/5"},
+ {10, "16-QAM (BTC) 4/5"},
+ {11, "64-QAM (BTC) 2/3 or 5/8"},
+ {12, "64-QAM (BTC) 5/6 or 4/5"},
+ {13, "QPSK (CTC) 1/2"},
+ {14, "Reserved"},
+ {15, "QPSK (CTC) 3/4"},
+ {16, "16-QAM (CTC) 1/2"},
+ {17, "16-QAM (CTC) 3/4"},
+ {18, "64-QAM (CTC) 1/2"},
+ {19, "64-QAM (CTC) 2/3"},
+ {20, "64-QAM (CTC) 3/4"},
+ {21, "64-QAM (CTC) 5/6"},
+ {22, "QPSK (ZT CC) 1/2"},
+ {23, "QPSK (ZT CC) 3/4"},
+ {24, "16-QAM (ZT CC) 1/2"},
+ {25, "16-QAM (ZT CC) 3/4"},
+ {26, "64-QAM (ZT CC) 1/2"},
+ {27, "64-QAM (ZT CC) 2/3"},
+ {28, "64-QAM (ZT CC) 3/4"},
+ {29, "QPSK (LDPC) 1/2"},
+ {30, "QPSK (LDPC) 2/3 A code"},
+ {31, "16-QAM (LDPC) 3/4 A code"},
+ {32, "16-QAM (LDPC) 1/2"},
+ {33, "16-QAM (LDPC) 2/3 A code"},
+ {34, "16-QAM (LDPC) 3/4 A code"},
+ {35, "64-QAM (LDPC) 1/2"},
+ {36, "64-QAM (LDPC) 2/3 A code"},
+ {37, "64-QAM (LDPC) 3/4 A code"},
+ {38, "QPSK (LDPC) 2/3 B code"},
+ {39, "QPSK (LDPC) 3/4 B code"},
+ {40, "16-QAM (LDPC) 2/3 B code"},
+ {41, "16-QAM (LDPC) 3/4 B code"},
+ {42, "64-QAM (LDPC) 2/3 B code"},
+ {43, "64-QAM (LDPC) 3/4 B code"},
+ {44, "QPSK (CC with optional interleaver) 1/2"},
+ {45, "QPSK (CC with optional interleaver) 3/4"},
+ {46, "16-QAM (CC with optional interleaver) 1/2"},
+ {47, "16-QAM (CC optional interleaver) 0%00"},
+ {48, "64-QAM (CC with optional interleaver) 2/3"},
+ {49, "64-QAM (CC with optional interleaver) 3/4"},
+ {50, "QPSK (LDPC) 5/6"},
+ {51, "16-QAM (LDPC) 5/6"},
+ {52, "64-QAM (LDPC) 5/6"},
+ {0, NULL}
+};
+
+static const value_string vals_ucd_cqich_size[] =
+{
+ {0, "0 bits"},
+ {1, "3 bits"},
+ {2, "4 bits"},
+ {3, "5 bits"},
+ {4, "6 bits"},
+ {5, "7 bits"},
+ {6, "8 bits"},
+ {7, "9 bits"},
+ {0, NULL}
+};
+
+static const value_string vals_yes_no_str[] =
+{
+ {0, "No"},
+ {1, "Yes"},
+ {0, NULL}
+};
+
+
+/* UCD dissector */
+static int dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tvb_len, length;
+ gint tlv_type, tlv_len, tlv_offset, tlv_value_offset;
+ tlv_info_t tlv_info;
+ gchar* proto_str;
+
+ { /* we are being asked for details */
+ proto_item *ucd_item;
+ proto_tree *ucd_tree;
+ guint ucd_ranging_backoff_start;
+ guint ucd_ranging_backoff_end;
+ guint ucd_request_backoff_start;
+ guint ucd_request_backoff_end;
+
+ tvb_len = tvb_reported_length(tvb);
+ /* display MAC payload type UCD */
+ ucd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_ucd_decoder, tvb, offset, -1, "Uplink Channel Descriptor (UCD)");
+ ucd_tree = proto_item_add_subtree(ucd_item, ett_mac_mgmt_msg_ucd_decoder);
+
+ /* Decode and display the Uplink Channel Descriptor (UCD) */
+ /* display the Configuration Change Count */
+ proto_tree_add_item(ucd_tree, hf_ucd_config_change_count, tvb, offset, 1, ENC_NA);
+ offset++;
+
+ /* get the ranging backoff start */
+ ucd_ranging_backoff_start = tvb_get_guint8(tvb, offset);
+ proto_tree_add_uint_format_value(ucd_tree, hf_ucd_ranging_backoff_start, tvb, offset, 1, (1 << ucd_ranging_backoff_start), "2^%u = %u", ucd_ranging_backoff_start, (1 << ucd_ranging_backoff_start));
+ offset++;
+
+ /* get the ranging backoff end */
+ ucd_ranging_backoff_end = tvb_get_guint8(tvb, offset);
+ proto_tree_add_uint_format_value(ucd_tree, hf_ucd_ranging_backoff_end, tvb, offset, 1, (1 << ucd_ranging_backoff_end), "2^%u = %u", ucd_ranging_backoff_end, (1 << ucd_ranging_backoff_end));
+ offset++;
+
+ /* get the request backoff start */
+ ucd_request_backoff_start = tvb_get_guint8(tvb, offset);
+ proto_tree_add_uint_format_value(ucd_tree, hf_ucd_request_backoff_start, tvb, offset, 1, (1 << ucd_request_backoff_start), "2^%u = %u", ucd_request_backoff_start, (1 << ucd_request_backoff_start));
+ offset++;
+
+ /* get the request backoff end */
+ ucd_request_backoff_end = tvb_get_guint8(tvb, offset);
+ proto_tree_add_uint_format_value(ucd_tree, hf_ucd_request_backoff_end, tvb, offset, 1, (1 << ucd_request_backoff_end), "2^%u = %u", ucd_request_backoff_end, (1 << ucd_request_backoff_end));
+ offset++;
+
+ while(offset < tvb_len)
+ {
+ proto_tree *tlv_tree;
+ proto_item *tlv_item1;
+ guint ul_burst_uiuc;
+ guint utemp;
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "UCD TLV error");
+ proto_tree_add_item(ucd_tree,hf_ucd_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(ucd_tree, proto_mac_mgmt_msg_ucd_decoder, tvb, offset, (tlv_len + tlv_value_offset), "UCD Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, tlv_len, offset, tvb_len);
+#endif
+ /* update the offset */
+ offset += tlv_value_offset;
+ /* process UCD TLV Encoded information */
+ if (include_cor2_changes)
+ {
+ switch (tlv_type)
+ {
+ case UCD_TLV_T_203_UL_PUSC_SUBCHANNEL_ROTATION:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_203_ul_pusc_subchannel_rotation, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_205_RELATIVE_POWER_OFFSET_UL_HARQ_BURST:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_205_relative_power_offset_ul_harq_burst, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_206_RELATIVE_POWER_OFFSET_UL_BURST_CONTAINING_MAC_MGMT_MSG:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_206_relative_power_offset_ul_burst_containing_mac_mgmt_msg, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_207_UL_INITIAL_TRANSMIT_TIMING:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_207_ul_initial_transmit_timing, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_210_FAST_FEEDBACK_REGION:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_210_fast_feedback_region, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ }
+ case UCD_TLV_T_211_HARQ_ACK_REGION:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_211_harq_ack_region, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ }
+ case UCD_TLV_T_212_RANGING_REGION:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_212_ranging_region, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ }
+ case UCD_TLV_T_213_SOUNDING_REGION:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_213_sounding_region, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ }
+ }
+ }
+ switch (tlv_type)
+ {
+ case UCD_UPLINK_BURST_PROFILE:
+ {
+ /* get the UIUC */
+ ul_burst_uiuc = tvb_get_guint8(tvb, offset) & 0x0F;
+ /* add TLV subtree */
+ proto_str = wmem_strdup_printf(wmem_packet_scope(), "Uplink Burst Profile (UIUC = %u)", ul_burst_uiuc);
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_ucd_decoder, ucd_tree, proto_mac_mgmt_msg_ucd_decoder, tvb, offset-tlv_value_offset, tlv_len, proto_str);
+ proto_tree_add_item(tlv_tree, hf_ucd_ul_burst_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_ucd_ul_burst_uiuc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ for (tlv_offset = 1; tlv_offset < tlv_len;)
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, (offset+tlv_offset));
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ if(tlv_type == -1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "UL Burst Profile error");
+ proto_tree_add_item(tlv_tree, hf_ucd_invalid_tlv, tvb, offset, (tlv_len - offset - tlv_offset), ENC_NA);
+ break;
+ }
+ /* get the TLV length */
+ length = get_tlv_length(&tlv_info);
+
+ switch (tlv_type)
+ {
+ case UCD_BURST_FEC:
+ {
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_ucd_burst_fec, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_BURST_RANGING_DATA_RATIO:
+ {
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_ucd_burst_ranging_data_ratio, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
+ break;
+ }
+#if 0 /* for OFDM */
+ case UCD_BURST_POWER_BOOST:
+ {
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_ucd_burst_power_boost, tvb, (offset+tlv_offset), ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_BURST_TCS_ENABLE:
+ {
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_ucd_burst_tcs_enable, tvb, (offset+tlv_offset), 1, ENC_BIG_ENDIAN);
+ break;
+ }
+#endif
+ default:
+ /* ??? */
+ break;
+ }
+ tlv_offset += (length+get_tlv_value_offset(&tlv_info));
+ }
+ break;
+ }
+ case UCD_RESERVATION_TIMEOUT:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_res_timeout, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_BW_REQ_SIZE:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_bw_req_size, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_RANGING_REQ_SIZE:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_ranging_req_size, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_FREQUENCY:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_freq, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_7_HO_RANGING_START:
+ {
+ tlv_tree = add_tlv_subtree_no_item(&tlv_info, ucd_tree, hf_ucd_ho_ranging_start, tvb, offset-tlv_value_offset);
+ utemp = tvb_get_guint8(tvb, offset);
+ proto_tree_add_uint_format_value(tlv_tree, hf_ucd_ho_ranging_start, tvb, offset, tvb_len, utemp, "2^%u = %u", utemp, (1 << utemp));
+ break;
+ }
+ case UCD_TLV_T_8_RANGING_HO_END:
+ {
+ tlv_tree = add_tlv_subtree_no_item(&tlv_info, ucd_tree, hf_ucd_ho_ranging_end, tvb, offset-tlv_value_offset);
+ utemp = tvb_get_guint8(tvb, offset);
+ proto_tree_add_uint_format_value(tlv_tree, hf_ucd_ho_ranging_end, tvb, offset, tvb_len, utemp, "2^%u = %u", utemp, (1 << utemp));
+ break;
+ }
+ case UCD_TLV_T_158_OPTIONAL_PERMUTATION_UL_ALLOCATED_SUBCHANNELS_BITMAP:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_158_optional_permutation_ul_allocated_subchannels_bitmap, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ }
+ case UCD_TLV_T_159_BAND_AMC_ALLOCATION_THRESHHOLD:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_159_band_amc_allocation_threshold, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_160_BAND_AMC_RELEASE_THRESHOLD:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_160_band_amc_release_threshold, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_161_BAND_AMC_ALLOCATION_TIMER:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_161_band_amc_allocation_timer, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_162_BAND_AMC_RELEASE_TIMER:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_162_band_amc_release_timer, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_163_BAND_STATUS_REPORT_MAX_PERIOD:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_163_band_status_report_max_period, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_164_BAND_AMC_RETRY_TIMER:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_164_band_amc_retry_timer, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_170_SAFETY_CHANNEL_RETRY_TIMER:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_170_safety_channel_retry_timer, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_171_HARQ_ACK_DELAY_FOR_DL_BURST:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_171_harq_ack_delay_dl_burst, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_172_CQICH_BAND_AMC_TRANSITION_DELAY:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_172_cqich_band_amc_transition_delay, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_174_MAXIMUM_RETRANSMISSION:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_174_maximum_retransmission, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_176_SIZE_OF_CQICH_ID_FIELD:
+ {
+ utemp = tvb_get_guint8(tvb, offset);
+ cqich_id_size = 0; /* Default is 0 */
+ if (utemp && utemp < 8) {
+ /* Set for CQICH_Alloc_IE */
+ cqich_id_size = utemp + 2;
+ }
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_176_size_of_cqich_id_field, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_177_NORMALIZED_CN_OVERRIDE_2:
+ {
+ /* add TLV subtree */
+ tlv_item1 = add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_177_normalized_cn_override2, tvb, offset-tlv_value_offset, ENC_NA|ENC_ASCII);
+ tlv_tree = proto_item_add_subtree(tlv_item1, ett_mac_mgmt_msg_ucd_decoder);
+ proto_tree_add_item(tlv_tree, hf_ucd_tlv_t_177_normalized_cn_override2_first_line, tvb, offset + 2, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_ucd_tlv_t_177_normalized_cn_override2_list, tvb, offset + 3, 7, ENC_ASCII|ENC_NA);
+ break;
+ }
+ case UCD_TLV_T_186_UPPER_BOUND__AAS_PREAMBLE:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_186_upper_bound_aas_preamble, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_187_LOWER_BOUND_AAS_PREAMBLE:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_187_lower_bound_aas_preamble, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_188_ALLOW_AAS_BEAM_SELECT_MESSAGE:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_188_allow_aas_beam_select_message, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_189_USE_CQICH_INDICATION_FLAG:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_189_use_cqich_indication_flag, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_190_MS_SPECIFIC_UP_POWER_OFFSET_ADJUSTMENT_STEP:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_190_ms_specific_up_power_addjustment_step, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_191_MS_SPECIFIC_DOWN_POWER_OFSET_ADJUSTMENT_STEP:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_191_ms_specific_down_power_addjustment_step, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_192_MIN_LEVEL_POWER_OFFSET_ADJUSTMENT:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_192_min_level_power_offset_adjustment, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_193_MAX_LEVEL_POWER_OFFSETR_ADJUSTMENT:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_193_max_level_power_offset_adjustment, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_194_HANDOVER_RANGING_CODES:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_194_handover_ranging_codes, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_195_INITIAL_RANGING_INTERVAL:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_195_initial_ranging_interval, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_196_TX_POWER_REPORT:
+ {
+ tlv_item1 = add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_196_tx_power_report, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item1, ett_mac_mgmt_msg_ucd_decoder);
+ proto_tree_add_item(tlv_tree, hf_ucd_tlv_t_196_tx_power_report_threshold, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_ucd_tlv_t_196_tx_power_report_interval, tvb , offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_ucd_tlv_t_196_tx_power_report_a_p_avg, tvb, (offset + 1), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_ucd_tlv_t_196_tx_power_report_threshold_icqch, tvb, (offset + 1), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_ucd_tlv_t_196_tx_power_report_interval_icqch, tvb, (offset + 2), 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_ucd_tlv_t_196_tx_power_report_a_p_avg_icqch, tvb, (offset + 2), 1, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_197_NORMALIZED_CN_FOR_CHANNEL_SOUNDING:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_195_initial_ranging_interval, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_TLV_T_198_INTIAL_RANGING_BACKOFF_START:
+ {
+ tlv_tree = add_tlv_subtree_no_item(&tlv_info, ucd_tree, hf_ucd_initial_range_backoff_start, tvb, offset-tlv_value_offset);
+ utemp = tvb_get_guint8(tvb, offset);
+ proto_tree_add_uint_format_value(tlv_tree, hf_ucd_initial_range_backoff_start, tvb, offset, tvb_len, utemp, "2^%u = %u", utemp, (1 << utemp));
+ break;
+ }
+ case UCD_TLV_T_199_INITIAL_RANGING_BACKOFF_END:
+ {
+ tlv_tree = add_tlv_subtree_no_item(&tlv_info, ucd_tree, hf_ucd_initial_range_backoff_end, tvb, offset-tlv_value_offset);
+ utemp = tvb_get_guint8(tvb, offset);
+ proto_tree_add_uint_format_value(tlv_tree, hf_ucd_initial_range_backoff_end, tvb, offset, tvb_len, utemp, "2^%u = %u", utemp, (1 << utemp));
+ break;
+ }
+ case UCD_TLV_T_200_BANDWIDTH_REQUESET_BACKOFF_START:
+ {
+ tlv_tree = add_tlv_subtree_no_item(&tlv_info, ucd_tree, hf_ucd_bandwidth_backoff_start, tvb, offset-tlv_value_offset);
+ utemp = tvb_get_guint8(tvb, offset);
+ proto_tree_add_uint_format_value(tlv_tree, hf_ucd_bandwidth_backoff_start, tvb, offset, tvb_len, utemp, "2^%u = %u", utemp, (1 << utemp));
+ break;
+ }
+ case UCD_TLV_T_201_BANDWIDTH_REQUEST_BACKOFF_END:
+ {
+ tlv_tree = add_tlv_subtree_no_item(&tlv_info, ucd_tree, hf_ucd_bandwidth_backoff_end, tvb, offset-tlv_value_offset);
+ utemp = tvb_get_guint8(tvb, offset);
+ proto_tree_add_uint_format_value(tlv_tree, hf_ucd_bandwidth_backoff_end, tvb, offset, tvb_len, utemp, "2^%u = %u", utemp, (1 << utemp));
+ break;
+ }
+ case UCD_TLV_T_202_UPLINK_BURST_PROFILE_FOR_MULTIPLE_FEC_TYPES:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_202_uplink_burst_profile_for_multiple_fec_types, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_INITIAL_RANGING_CODES:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_150_initial_ranging_codes, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_PERIODIC_RANGING_CODES:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_151_periodic_ranging_codes, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_BANDWIDTH_REQUEST_CODES:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_152_bandwidth_request_codes, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_PERIODIC_RANGING_BACKOFF_START:
+ {
+ tlv_tree = add_tlv_subtree_no_item(&tlv_info, ucd_tree, hf_ucd_periodic_ranging_backoff_start, tvb, offset-tlv_value_offset);
+ utemp = tvb_get_guint8(tvb, offset);
+ proto_tree_add_uint_format_value(tlv_tree, hf_ucd_periodic_ranging_backoff_start, tvb, offset, tvb_len, utemp, "2^%u = %u", utemp, (1 << utemp));
+ break;
+
+ }
+ case UCD_PERIODIC_RANGING_BACKOFF_END:
+ {
+ tlv_tree = add_tlv_subtree_no_item(&tlv_info, ucd_tree, hf_ucd_periodic_ranging_backoff_end, tvb, offset-tlv_value_offset);
+ utemp = tvb_get_guint8(tvb, offset);
+ proto_tree_add_uint_format_value(tlv_tree, hf_ucd_periodic_ranging_backoff_end, tvb, offset, tvb_len, utemp, "2^%u = %u", utemp, (1 << utemp));
+ break;
+ }
+ case UCD_START_OF_RANGING_CODES_GROUP:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_155_start_of_ranging_codes_group, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+
+ }
+ case UCD_PERMUTATION_BASE:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_tlv_t_156_permutation_base, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ }
+ case UCD_UL_ALLOCATED_SUBCHANNELS_BITMAP:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_ul_allocated_subchannles_bitmap, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ }
+ case UCD_TLV_T_203_UL_PUSC_SUBCHANNEL_ROTATION:
+ case UCD_TLV_T_205_RELATIVE_POWER_OFFSET_UL_HARQ_BURST:
+ case UCD_TLV_T_206_RELATIVE_POWER_OFFSET_UL_BURST_CONTAINING_MAC_MGMT_MSG:
+ case UCD_TLV_T_207_UL_INITIAL_TRANSMIT_TIMING:
+ case UCD_TLV_T_210_FAST_FEEDBACK_REGION:
+ case UCD_TLV_T_211_HARQ_ACK_REGION:
+ case UCD_TLV_T_212_RANGING_REGION:
+ case UCD_TLV_T_213_SOUNDING_REGION:
+ {
+ /* Unknown TLV type if cor2 not enabled. */
+ if (!include_cor2_changes)
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_invalid_tlv, tvb, offset-tlv_value_offset, ENC_NA);
+ }
+ break;
+ }
+ default:
+ {
+ add_tlv_subtree(&tlv_info, ucd_tree, hf_ucd_invalid_tlv, tvb, offset-tlv_value_offset, ENC_NA);
+ }
+ } /* end of switch(tlv_type) */
+ offset += tlv_len;
+ } /* end of TLV process while loop */
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax Mac Payload Protocol and Dissector */
+void proto_register_mac_mgmt_msg_ucd(void)
+{
+ /* UCD display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_ucd_tlv_t_188_allow_aas_beam_select_message,
+ {
+ "Allow AAS Beam Select Message", "wmx.ucd.allow_aas_beam_select_message",
+ FT_INT8, BASE_DEC, VALS(vals_yes_no_str), 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_159_band_amc_allocation_threshold,
+ {
+ "Band AMC Allocation Threshold", "wmx.ucd.band_amc.allocation_threshold",
+ FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_db, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_161_band_amc_allocation_timer,
+ {
+ "Band AMC Allocation Timer", "wmx.ucd.band_amc.allocation_timer",
+ FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_frame_frames, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_160_band_amc_release_threshold,
+ {
+ "Band AMC Release Threshold", "wmx.ucd.band_amc.release_threshold",
+ FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_db, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_162_band_amc_release_timer,
+ {
+ "Band AMC Release Timer", "wmx.ucd.band_amc.release_timer",
+ FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_frame_frames, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_164_band_amc_retry_timer,
+ {
+ "Band AMC Retry Timer", "wmx.ucd.band_amc.retry_timer",
+ FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_frame_frames, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_163_band_status_report_max_period,
+ {
+ "Band Status Report MAC Period", "wmx.ucd.band_status.report_max_period",
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_frames, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_152_bandwidth_request_codes,
+ {
+ "Bandwidth Request Codes", "wmx.ucd.bandwidth_request",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_burst_fec,
+ {
+ "FEC Code Type", "wmx.ucd.burst.fec",
+ FT_UINT8, BASE_HEX, VALS(vals_dcd_burst_fec), 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_burst_ranging_data_ratio,
+ {
+ "Ranging Data Ratio", "wmx.ucd.burst.ranging_data_ratio",
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_db, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_ul_burst_reserved,
+ {
+ "Reserved", "wmx.ucd.burst.reserved",
+ FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_ul_burst_uiuc,
+ {
+ "UIUC", "wmx.ucd.burst.uiuc",
+ FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_ucd_burst_power_boost,
+ {"Focused Contention Power Boost", "wmx.ucd.burst.power_boost", FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_db, 0, NULL, HFILL}
+ },
+ {
+ &hf_ucd_burst_tcs_enable,
+ {"TCS", "wmx.ucd.burst.tcs", FT_UINT8, BASE_DEC, VALS(vals_dcd_burst_tcs), 0, NULL, HFILL}
+ },
+#endif
+ {
+ &hf_ucd_bw_req_size,
+ {
+ "Bandwidth Request Opportunity Size", "wmx.ucd.bw_req_size",
+ FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_ps, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_172_cqich_band_amc_transition_delay,
+ {
+ "CQICH Band AMC-Transition Delay", "wmx.ucd.cqich_band_amc_transition_delay",
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_frames, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_freq,
+ {
+ "Frequency", "wmx.ucd.frequency",
+ FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_khz, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_194_handover_ranging_codes,
+ {
+ "Handover Ranging Codes", "wmx.ucd.handover_ranging_codes",
+ FT_INT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_171_harq_ack_delay_dl_burst,
+ {
+ "HARQ ACK Delay for DL Burst", "wmx.ucd.harq_ack_delay_dl_burst",
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_offset, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_150_initial_ranging_codes,
+ {
+ "Initial Ranging Codes", "wmx.ucd.initial_ranging_codes",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_195_initial_ranging_interval,
+ {
+ "Number of Frames Between Initial Ranging Interval Allocation", "wmx.ucd.initial_ranging_interval",
+ FT_INT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_invalid_tlv,
+ {
+ "Invalid TLV", "wmx.ucd.invalid_tlv",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_187_lower_bound_aas_preamble,
+ {
+ "Lower Bound AAS Preamble (in units of 0.25 dB)", "wmx.ucd.lower_bound_aas_preamble",
+ FT_INT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_192_min_level_power_offset_adjustment,
+ {
+ "Minimum Level of Power Offset Adjustment (in units of 0.1 dB)", "wmx.ucd.min_level_power_offset_adjustment",
+ FT_INT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_193_max_level_power_offset_adjustment,
+ {
+ "Maximum Level of Power Offset Adjustment (in units of 0.1 dB)", "wmx.ucd.max_level_power_offset_adjustment",
+ FT_INT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_174_maximum_retransmission,
+ {
+ "Maximum Number of Retransmission in UL-HARQ", "wmx.ucd.max_number_of_retransmission_in_ul_harq",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_191_ms_specific_down_power_addjustment_step,
+ {
+ "MS-specific Down Power Offset Adjustment Step (in units of 0.01 dB)", "wmx.ucd.ms_specific_down_power_offset_adjustment_step",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_190_ms_specific_up_power_addjustment_step,
+ {
+ "MS-specific Up Power Offset Adjustment Step (in units of 0.01 dB)", "wmx.ucd.ms_specific_up_power_offset_adjustment_step",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_ucd_tlv_t_197_normalized_cn_channel_sounding,
+ {
+ "Normalized C/N for Channel Sounding", "wmx.ucd.normalized_cn.channel_sounding",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_ucd_tlv_t_177_normalized_cn_override2,
+ {
+ "Normalized C/N Override 2", "wmx.ucd.normalized_cn.override_2",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_177_normalized_cn_override2_first_line,
+ {
+ "Normalized C/N Value", "wmx.ucd.normalized_cn.override_first_line",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_177_normalized_cn_override2_list,
+ {
+ "Normalized C/N Value List", "wmx.ucd.normalized_cn.override_list",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_158_optional_permutation_ul_allocated_subchannels_bitmap,
+ {
+ "Optional permutation UL allocated subchannels bitmap", "wmx.ucd.optional_permutation_ul_allocated_subchannels_bitmap",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_151_periodic_ranging_codes,
+ {
+ "Periodic Ranging Codes", "wmx.ucd.periodic_ranging_codes",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_156_permutation_base,
+ {
+ "Permutation Base", "wmx.ucd.permutation_base",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_ranging_req_size,
+ {
+ "Ranging Request Opportunity Size", "wmx.ucd.ranging_req_size",
+ FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_db, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_res_timeout,
+ {
+ "Contention-based Reservation Timeout", "wmx.ucd.res_timeout",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_170_safety_channel_retry_timer,
+ {
+ "Safety Channel Release Timer", "wmx.ucd.safety_channel_release_timer",
+ FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_frame_frames, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_176_size_of_cqich_id_field,
+ {
+ "Size of CQICH_ID Field", "wmx.ucd.size_of_cqich_id_field",
+ FT_UINT8, BASE_DEC, VALS(vals_ucd_cqich_size), 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_155_start_of_ranging_codes_group,
+ {
+ "Start of Ranging Codes Group", "wmx.ucd.start_of_ranging_codes_group",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_ul_allocated_subchannles_bitmap,
+ {
+ "UL Allocated Subchannels Bitmap", "wmx.ucd.subchan.bitmap",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_ucd_subchan_codes,
+ {
+ "Periodic Ranging Codes", "wmx.ucd.subchan.codes",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_subchan_params_num_chan,
+ {
+ "Number of Subchannels", "wmx.ucd.subchan.num_chan",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_subchan_params_num_sym,
+ {
+ "Number of OFDMA Symbols", "wmx.ucd.subchan.num_sym",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_ucd_tlv_t_196_tx_power_report,
+ {
+ "Tx Power Report", "wmx.ucd.tx_power_report",
+ FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_196_tx_power_report_a_p_avg,
+ {
+ "A p_avg (in multiples of 1/16)", "wmx.ucd.tx_power_report.a_p_avg",
+ FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_196_tx_power_report_a_p_avg_icqch,
+ {
+ "A p_avg (in multiples of 1/16) when ICQCH is allocated", "wmx.ucd.tx_power_report.a_p_avg_icqch",
+ FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_196_tx_power_report_interval,
+ {
+ "Interval (expressed as power of 2)", "wmx.ucd.tx_power_report.interval",
+ FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_196_tx_power_report_interval_icqch,
+ {
+ "Interval When ICQCH is Allocated (expressed as power of 2)", "wmx.ucd.tx_power_report.interval_icqch",
+ FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_196_tx_power_report_threshold,
+ {
+ "Threshold", "wmx.ucd.tx_power_report.threshold",
+ FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_196_tx_power_report_threshold_icqch,
+ {
+ "Threshold When ICQCH is Allocated to SS (in dB)", "wmx.ucd.tx_power_report.threshold_icqch",
+ FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_ucd_unknown_type,
+ {
+ "Unknown UCD Type", "wmx.ucd.unknown_tlv_type",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_ucd_tlv_t_202_uplink_burst_profile_for_multiple_fec_types,
+ {
+ "Uplink Burst Profile for Multiple FEC Types", "wmx.ucd.uplink_burst_profile.multiple_fec_types",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_203_ul_pusc_subchannel_rotation,
+ {
+ "Uplink PUSC Subchannel Rotation", "wmx.ucd.uplink_burst_profile.ul_pusc_subchannel_rotation",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_205_relative_power_offset_ul_harq_burst,
+ {
+ "Relative Power Offset UL HARQ Burst", "wmx.ucd.uplink_burst_profile.relative_power_offset_ul_harq_burst",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_206_relative_power_offset_ul_burst_containing_mac_mgmt_msg,
+ {
+ "Relative Power Offset UL Burst Containing MAC Mgmt Msg", "wmx.ucd.uplink_burst_profile.relative_power_offset_ul_burst_mac_mgmt_msg",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_207_ul_initial_transmit_timing,
+ {
+ "UL Initial Transmit Timing", "wmx.ucd.uplink_burst_profile.ul_initial_transmit_timing",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_210_fast_feedback_region,
+ {
+ "Fast Feedback Region", "wmx.ucd.uplink_burst_profile.fast_feedback_region",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_211_harq_ack_region,
+ {
+ "HARQ ACK Region", "wmx.ucd.uplink_burst_profile.harq_ack_region",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_212_ranging_region,
+ {
+ "Ranging Region", "wmx.ucd.uplink_burst_profile.ranging_region",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_213_sounding_region,
+ {
+ "Sounding Region", "wmx.ucd.uplink_burst_profile.sounding_region",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_186_upper_bound_aas_preamble,
+ {
+ "Upper Bound AAS Preamble (in units of 0.25 dB)", "wmx.ucd.upper_bound_aas_preamble",
+ FT_INT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_tlv_t_189_use_cqich_indication_flag,
+ {
+ "Use CQICH Indication Flag", "wmx.ucd.use_cqich_indication_flag",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_ho_ranging_start,
+ {
+ "Initial Backoff Window Size for MS Performing Initial During Handover Process", "wmx.ucd.ho_ranging_start",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_ho_ranging_end,
+ {
+ "Final Backoff Window Size for MS Performing Initial During Handover Process", "wmx.ucd.ho_ranging_end",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_initial_range_backoff_start,
+ {
+ "Initial Ranging Backoff Start", "wmx.ucd.initial_range_backoff_start",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_initial_range_backoff_end,
+ {
+ "Initial Ranging Backoff End", "wmx.ucd.initial_range_backoff_end",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_bandwidth_backoff_start,
+ {
+ "Bandwidth Request Backoff Start", "wmx.ucd.bandwidth_backoff_start",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_bandwidth_backoff_end,
+ {
+ "Bandwidth Request Backoff End", "wmx.ucd.bandwidth_backoff_end",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_periodic_ranging_backoff_start,
+ {
+ "Periodic Ranging Backoff Start", "wmx.ucd.periodic_ranging_backoff_start",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_periodic_ranging_backoff_end,
+ {
+ "Periodic Ranging Backoff End", "wmx.ucd.periodic_ranging_backoff_end",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_config_change_count,
+ {
+ "Configuration Change Count", "wmx.ucd.config_change_count",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_ranging_backoff_start,
+ {
+ "Ranging Backoff Start", "wmx.ucd.ranging_backoff_start",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_ranging_backoff_end,
+ {
+ "Ranging Backoff End", "wmx.ucd.ranging_backoff_end",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_request_backoff_start,
+ {
+ "Request Backoff Start", "wmx.ucd.request_backoff_start",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ucd_request_backoff_end,
+ {
+ "Request Backoff End", "wmx.ucd.request_backoff_end",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ }
+ },
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_mac_mgmt_msg_ucd_decoder,
+ };
+
+ proto_mac_mgmt_msg_ucd_decoder = proto_register_protocol (
+ "WiMax UCD Messages", /* name */
+ "WiMax UCD", /* short name */
+ "wmx.ucd" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_ucd_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+void proto_reg_handoff_mac_mgmt_msg_ucd(void)
+{
+ dissector_handle_t ucd_handle;
+
+ ucd_handle = create_dissector_handle(dissect_mac_mgmt_msg_ucd_decoder, proto_mac_mgmt_msg_ucd_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_UCD, ucd_handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/msg_ulmap.c b/plugins/epan/wimax/msg_ulmap.c
new file mode 100644
index 0000000000..28e63fd68a
--- /dev/null
+++ b/plugins/epan/wimax/msg_ulmap.c
@@ -0,0 +1,2954 @@
+/* msg_ulmap.c
+ * WiMax MAC Management UL-MAP Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Mike Harvey <michael.harvey@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include <epan/expert.h>
+#include "wimax_mac.h"
+#include "wimax_bits.h"
+#include "wimax_utils.h"
+
+extern gboolean include_cor2_changes;
+
+void proto_register_mac_mgmt_msg_ulmap(void);
+void proto_reg_handoff_mac_mgmt_msg_ulmap(void);
+
+#define MAC_MGMT_MSG_ULMAP 3
+
+#define XBIT_HF(bits, hf) \
+ proto_tree_add_bits_item(tree, hf, tvb, bit, bits, ENC_BIG_ENDIAN); bit += bits;
+
+#define XBIT_HF_VALUE(var, bits, hf) \
+ do { \
+ var = TVB_BIT_BITS(bit, tvb, bits); \
+ proto_tree_add_bits_item(tree, hf, tvb, bit, bits, ENC_BIG_ENDIAN); \
+ bit += bits; \
+ } while(0)
+
+#define VNIB(var, nibs, hf) \
+ do { \
+ var = TVB_NIB_NIBS(nib, tvb, nibs); \
+ proto_tree_add_uint(tree, hf, tvb, NIBHI(nib, nibs), var); \
+ nib += nibs; \
+ } while(0)
+
+/* from msg_ucd.c */
+extern guint cqich_id_size; /* Set for CQICH_Alloc_IE */
+
+/* from msg_dlmap.c */
+extern gint harq;
+extern gint ir_type;
+extern gint N_layer;
+extern gint RCID_Type;
+
+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_287_1 = -1;
+static gint ett_287_2 = -1;
+static gint ett_289 = -1;
+static gint ett_290 = -1;
+static gint ett_290b = -1;
+static gint ett_291 = -1;
+static gint ett_292 = -1;
+static gint ett_293 = -1;
+static gint ett_294 = -1;
+static gint ett_295 = -1;
+static gint ett_299 = -1;
+static gint ett_300 = -1;
+static gint ett_302 = -1;
+static gint ett_302a = -1;
+static gint ett_302b = -1;
+static gint ett_302c = -1;
+static gint ett_302d = -1;
+static gint ett_302e = -1;
+static gint ett_302f = -1;
+static gint ett_302g = -1;
+static gint ett_302h = -1;
+static gint ett_302i = -1;
+static gint ett_302j = -1;
+static gint ett_302k = -1;
+static gint ett_302l = -1;
+static gint ett_302m = -1;
+static gint ett_302n = -1;
+static gint ett_302o = -1;
+static gint ett_302p = -1;
+static gint ett_302q = -1;
+static gint ett_302r = -1;
+static gint ett_302s = -1;
+static gint ett_302t = -1;
+static gint ett_302u = -1;
+static gint ett_302v = -1;
+static gint ett_306 = -1;
+static gint ett_306_ul = -1;
+static gint ett_308b = -1;
+static gint ett_315d = -1;
+
+#define DCD_DOWNLINK_BURST_PROFILE 1
+#define DCD_BS_EIRP 2
+#define DCD_FRAME_DURATION 3
+#define DCD_PHY_TYPE 4
+#define DCD_POWER_ADJUSTMENT 5
+#define DCD_CHANNEL_NR 6
+#define DCD_TTG 7
+#define DCD_RTG 8
+#define DCD_RSS 9
+#define DCD_CHANNEL_SWITCH_FRAME_NR 10
+#define DCD_FREQUENCY 12
+#define DCD_BS_ID 13
+#define DCD_FRAME_DURATION_CODE 14
+#define DCD_FRAME_NR 15
+#define DCD_SIZE_CQICH_ID 16
+#define DCD_H_ARQ_ACK_DELAY 17
+#define DCD_MAC_VERSION 148
+#define DCD_RESTART_COUNT 154
+
+#define DCD_BURST_FREQUENCY 1
+#define DCD_BURST_FEC_CODE_TYPE 150
+#define DCD_BURST_DIUC_EXIT_THRESHOLD 151
+#define DCD_BURST_DIUC_ENTRY_THRESHOLD 152
+#define DCD_BURST_TCS_ENABLE 153
+
+#define DCD_TLV_T_541_TYPE_FUNCTION_ACTION 1
+#define DCD_TLV_T542_TRIGGER_VALUE 2
+#define DCD_TLV_T_543_TRIGGER_AVERAGING_DURATION 3
+#define DCD_TLV_T_19_PERMUTATION_TYPE_FOR_BROADCAST_REGION_IN_HARQ_ZONE 19
+#define DCD_TLV_T_20_MAXIMUM_RETRANSMISSION 20
+#define DCD_TLV_T_21_DEFAULT_RSSI_AND_CINR_AVERAGING_PARAMETER 21
+#define DCD_TLV_T_22_DL_AMC_ALLOCATED_PHYSICAL_BANDS_BITMAP 22
+#define DCD_TLV_T_31_H_ADD_THRESHOLD 31
+#define DCD_TLV_T_32_H_DELETE_THRESHOLD 32
+#define DCD_TLV_T_33_ASR 33
+#define DCD_TLV_T_34_DL_REGION_DEFINITION 34
+#define DCD_TLV_T_35_PAGING_GROUP_ID 35
+#define DCD_TLV_T_36_TUSC1_PERMUTATION_ACTIVE_SUBCHANNELS_BITMAP 36
+#define DCD_TLV_T_37_TUSC2_PERMUTATION_ACTIVE_SUBCHANNELS_BITMAP 37
+#define DCD_TLV_T_45_PAGING_INTERVAL_LENGTH 45
+#define DCD_TLV_T_50_HO_TYPE_SUPPORT 50
+#define DCD_TLV_T_51_HYSTERSIS_MARGIN 51
+#define DCD_TLV_T_52_TIME_TO_TRIGGER_DURATION 52
+#define DCD_TLV_T_54_TRIGGER 54
+#define DCD_TLV_T_153_DOWNLINK_BURST_PROFILE_FOR_MULTIPLE_FEC_TYPES 153
+
+#define UL_MAP_NCT_PMP 0
+#define UL_MAP_NCT_DM 1
+#define UL_MAP_NCT_PTP 2
+
+#if 0
+/* NCT messages */
+static const value_string nct_msgs[] =
+{
+ { UL_MAP_NCT_PMP, "PMP" },
+ { UL_MAP_NCT_PMP, "DM" },
+ { UL_MAP_NCT_PMP, "PTP" },
+ { 0, NULL }
+};
+#endif
+
+#if 0
+/* Repetition Coding Indications */
+static const value_string rep_msgs[] =
+{
+ { 0, "No Repetition Coding" },
+ { 1, "Repetition Coding of 2 Used" },
+ { 2, "Repetition Coding of 4 Used" },
+ { 3, "Repetition Coding of 6 Used" },
+ { 0, NULL }
+};
+#endif
+
+#if 0
+/* DL Frame Prefix Coding Indications */
+static const value_string boost_msgs[] =
+{
+ { 0, "Normal (not boosted)" },
+ { 1, "+6dB" },
+ { 2, "-6dB" },
+ { 3, "+9dB" },
+ { 4, "+3dB" },
+ { 5, "-3dB" },
+ { 6, "-9dB" },
+ { 7, "-12dB" },
+ { 0, NULL }
+};
+#endif
+
+/* ul-map fields */
+static gint hf_ulmap_reserved = -1;
+static gint hf_ulmap_ucd_count = -1;
+static gint hf_ulmap_alloc_start_time = -1;
+static gint hf_ulmap_ofdma_sym = -1;
+static gint hf_ulmap_ie_diuc_ext = -1;
+static gint hf_ulmap_ie_diuc_ext2 = -1;
+static gint hf_ulmap_ie_length = -1;
+static gint hf_ulmap_ie_reserved_extended2_duic = -1;
+static gint hf_ulmap_ie_reserved_extended_duic = -1;
+/* static gint hf_ulmap_fch_expected = -1; */
+
+/* static gint hf_ulmap_ie = -1; */
+
+static gint hf_ulmap_ie_cid = -1;
+static gint hf_ulmap_ie_uiuc = -1;
+static gint hf_ulmap_uiuc12_symofs = -1;
+static gint hf_ulmap_uiuc12_subofs = -1;
+static gint hf_ulmap_uiuc12_numsym = -1;
+static gint hf_ulmap_uiuc12_numsub = -1;
+static gint hf_ulmap_uiuc12_method = -1;
+static gint hf_ulmap_uiuc12_dri = -1;
+static gint hf_ulmap_uiuc10_dur = -1;
+static gint hf_ulmap_uiuc10_rep = -1;
+static gint hf_ulmap_uiuc10_slot_offset = -1;
+
+static gint hf_ulmap_uiuc14_dur = -1;
+static gint hf_ulmap_uiuc14_uiuc = -1;
+static gint hf_ulmap_uiuc14_rep = -1;
+static gint hf_ulmap_uiuc14_idx = -1;
+static gint hf_ulmap_uiuc14_code = -1;
+static gint hf_ulmap_uiuc14_sym = -1;
+static gint hf_ulmap_uiuc14_sub = -1;
+static gint hf_ulmap_uiuc14_bwr = -1;
+
+/* static gint hf_ulmap_uiuc11_ext = -1; */
+/* static gint hf_ulmap_uiuc11_len = -1; */
+/* static gint hf_ulmap_uiuc11_data = -1; */
+/* static gint hf_ulmap_uiuc15_ext = -1; */
+/* static gint hf_ulmap_uiuc15_len = -1; */
+/* static gint hf_ulmap_uiuc15_data = -1; */
+
+static gint hf_ulmap_uiuc0_symofs = -1;
+static gint hf_ulmap_uiuc0_subofs = -1;
+static gint hf_ulmap_uiuc0_numsym = -1;
+static gint hf_ulmap_uiuc0_numsub = -1;
+static gint hf_ulmap_uiuc0_rsv = -1;
+
+static gint hf_ulmap_uiuc13_symofs = -1;
+static gint hf_ulmap_uiuc13_subofs = -1;
+static gint hf_ulmap_uiuc13_numsym = -1;
+static gint hf_ulmap_uiuc13_numsub = -1;
+static gint hf_ulmap_uiuc13_papr = -1;
+static gint hf_ulmap_uiuc13_zone = -1;
+static gint hf_ulmap_uiuc13_rsv = -1;
+/* static gint hf_ulmap_crc16 = -1; */
+/* static gint hf_ulmap_crc16_status = -1; */
+static gint hf_ulmap_padding = -1;
+
+/* Generated via "one time" script to help create filterable fields */
+static int hf_ulmap_dedicated_ul_control_length = -1;
+static int hf_ulmap_dedicated_ul_control_control_header = -1;
+static int hf_ulmap_dedicated_ul_control_num_sdma_layers = -1;
+static int hf_ulmap_dedicated_ul_control_pilot_pattern = -1;
+static int hf_ulmap_dedicated_mimo_ul_control_matrix = -1;
+static int hf_ulmap_dedicated_mimo_ul_control_n_layer = -1;
+static int hf_ulmap_harq_chase_dedicated_ul_control_indicator = -1;
+static int hf_ulmap_harq_chase_uiuc = -1;
+static int hf_ulmap_harq_chase_repetition_coding_indication = -1;
+static int hf_ulmap_harq_chase_duration = -1;
+static int hf_ulmap_harq_chase_acid = -1;
+static int hf_ulmap_harq_chase_ai_sn = -1;
+static int hf_ulmap_harq_chase_ack_disable = -1;
+static int hf_ulmap_reserved_uint = -1;
+static int hf_ulmap_harq_ir_ctc_dedicated_ul_control_indicator = -1;
+static int hf_ulmap_harq_ir_ctc_nep = -1;
+static int hf_ulmap_harq_ir_ctc_nsch = -1;
+static int hf_ulmap_harq_ir_ctc_spid = -1;
+static int hf_ulmap_harq_ir_ctc_acin = -1;
+static int hf_ulmap_harq_ir_ctc_ai_sn = -1;
+static int hf_ulmap_harq_ir_ctc_ack_disable = -1;
+static int hf_ulmap_harq_ir_cc_dedicated_ul_control_indicator = -1;
+static int hf_ulmap_harq_ir_cc_uiuc = -1;
+static int hf_ulmap_harq_ir_cc_repetition_coding_indication = -1;
+static int hf_ulmap_harq_ir_cc_duration = -1;
+static int hf_ulmap_harq_ir_cc_spid = -1;
+static int hf_ulmap_harq_ir_cc_acid = -1;
+static int hf_ulmap_harq_ir_cc_ai_sn = -1;
+static int hf_ulmap_harq_ir_cc_ack_disable = -1;
+static int hf_ulmap_mimo_ul_chase_harq_mu_indicator = -1;
+static int hf_ulmap_mimo_ul_chase_harq_dedicated_mimo_ulcontrol_indicator = -1;
+static int hf_ulmap_mimo_ul_chase_harq_ack_disable = -1;
+static int hf_ulmap_mimo_ul_chase_harq_matrix = -1;
+static int hf_ulmap_mimo_ul_chase_harq_duration = -1;
+static int hf_ulmap_mimo_ul_chase_harq_uiuc = -1;
+static int hf_ulmap_mimo_ul_chase_harq_repetition_coding_indication = -1;
+static int hf_ulmap_mimo_ul_chase_harq_acid = -1;
+static int hf_ulmap_mimo_ul_chase_harq_ai_sn = -1;
+static int hf_ulmap_mimo_ul_ir_harq_mu_indicator = -1;
+static int hf_ulmap_mimo_ul_ir_harq_dedicated_mimo_ul_control_indicator = -1;
+static int hf_ulmap_mimo_ul_ir_harq_ack_disable = -1;
+static int hf_ulmap_mimo_ul_ir_harq_matrix = -1;
+static int hf_ulmap_mimo_ul_ir_harq_nsch = -1;
+static int hf_ulmap_mimo_ul_ir_harq_nep = -1;
+static int hf_ulmap_mimo_ul_ir_harq_spid = -1;
+static int hf_ulmap_mimo_ul_ir_harq_acid = -1;
+static int hf_ulmap_mimo_ul_ir_harq_ai_sn = -1;
+static int hf_ulmap_mimo_ul_ir_harq_cc_mu_indicator = -1;
+static int hf_ulmap_mimo_ul_ir_harq_cc_dedicated_mimo_ul_control_indicator = -1;
+static int hf_ulmap_mimo_ul_ir_harq_cc_ack_disable = -1;
+static int hf_ulmap_mimo_ul_ir_harq_cc_matrix = -1;
+static int hf_ulmap_mimo_ul_ir_harq_cc_duration = -1;
+static int hf_ulmap_mimo_ul_ir_harq_cc_uiuc = -1;
+static int hf_ulmap_mimo_ul_ir_harq_cc_repetition_coding_indication = -1;
+static int hf_ulmap_mimo_ul_ir_harq_cc_acid = -1;
+static int hf_ulmap_mimo_ul_ir_harq_cc_ai_sn = -1;
+static int hf_ulmap_mimo_ul_ir_harq_cc_spid = -1;
+static int hf_ulmap_mimo_ul_stc_harq_tx_count = -1;
+static int hf_ulmap_mimo_ul_stc_harq_duration = -1;
+static int hf_ulmap_mimo_ul_stc_harq_sub_burst_offset_indication = -1;
+static int hf_ulmap_mimo_ul_stc_harq_sub_burst_offset = -1;
+static int hf_ulmap_mimo_ul_stc_harq_ack_disable = -1;
+static int hf_ulmap_mimo_ul_stc_harq_uiuc = -1;
+static int hf_ulmap_mimo_ul_stc_harq_repetition_coding_indication = -1;
+static int hf_ulmap_mimo_ul_stc_harq_acid = -1;
+static int hf_ulmap_power_control = -1;
+static int hf_ulmap_power_measurement_frame = -1;
+static int hf_ulmap_mini_subcha_alloc_extended_2_uiuc = -1;
+static int hf_ulmap_mini_subcha_alloc_length = -1;
+static int hf_ulmap_mini_subcha_alloc_ctype = -1;
+static int hf_ulmap_mini_subcha_alloc_duration = -1;
+static int hf_ulmap_mini_subcha_alloc_cid = -1;
+static int hf_ulmap_mini_subcha_alloc_uiuc = -1;
+static int hf_ulmap_mini_subcha_alloc_repetition = -1;
+static int hf_ulmap_mini_subcha_alloc_padding = -1;
+static int hf_ulmap_aas_ul_extended_uiuc = -1;
+static int hf_ulmap_aas_ul_length = -1;
+static int hf_ulmap_aas_ul_permutation = -1;
+static int hf_ulmap_aas_ul_ul_permbase = -1;
+static int hf_ulmap_aas_ul_ofdma_symbol_offset = -1;
+static int hf_ulmap_aas_ul_aas_zone_length = -1;
+static int hf_ulmap_aas_ul_uplink_preamble_config = -1;
+static int hf_ulmap_aas_ul_preamble_type = -1;
+static int hf_ulmap_cqich_alloc_extended_uiuc = -1;
+static int hf_ulmap_cqich_alloc_length = -1;
+static int hf_ulmap_cqich_alloc_cqich_id = -1;
+static int hf_ulmap_cqich_alloc_allocation_offset = -1;
+static int hf_ulmap_cqich_alloc_period = -1;
+static int hf_ulmap_cqich_alloc_frame_offset = -1;
+static int hf_ulmap_cqich_alloc_duration = -1;
+static int hf_ulmap_cqich_alloc_report_configuration_included = -1;
+static int hf_ulmap_cqich_alloc_feedback_type = -1;
+static int hf_ulmap_cqich_alloc_report_type = -1;
+static int hf_ulmap_cqich_alloc_cinr_preamble_report_type = -1;
+static int hf_ulmap_cqich_alloc_zone_permutation = -1;
+static int hf_ulmap_cqich_alloc_zone_type = -1;
+static int hf_ulmap_cqich_alloc_zone_prbs_id = -1;
+static int hf_ulmap_cqich_alloc_major_group_indication = -1;
+static int hf_ulmap_cqich_alloc_pusc_major_group_bitmap = -1;
+static int hf_ulmap_cqich_alloc_cinr_zone_measurement_type = -1;
+static int hf_ulmap_cqich_alloc_averaging_parameter_included = -1;
+static int hf_ulmap_cqich_alloc_averaging_parameter = -1;
+static int hf_ulmap_cqich_alloc_mimo_permutation_feedback_cycle = -1;
+static int hf_ulmap_zone_extended_uiuc = -1;
+static int hf_ulmap_zone_length = -1;
+static int hf_ulmap_zone_ofdma_symbol_offset = -1;
+static int hf_ulmap_zone_permutation = -1;
+static int hf_ulmap_zone_ul_permbase = -1;
+static int hf_ulmap_zone_amc_type = -1;
+static int hf_ulmap_zone_use_all_sc_indicator = -1;
+static int hf_ulmap_zone_disable_subchannel_rotation = -1;
+static int hf_ulmap_phymod_ul_extended_uiuc = -1;
+static int hf_ulmap_phymod_ul_length = -1;
+static int hf_ulmap_phymod_ul_preamble_modifier_type = -1;
+static int hf_ulmap_phymod_ul_preamble_frequency_shift_index = -1;
+static int hf_ulmap_phymod_ul_preamble_time_shift_index = -1;
+static int hf_ulmap_phymod_ul_pilot_pattern_modifier = -1;
+static int hf_ulmap_phymod_ul_pilot_pattern_index = -1;
+static int hf_ulmap_fast_tracking_extended_uiuc = -1;
+static int hf_ulmap_fast_tracking_length = -1;
+static int hf_ulmap_fast_tracking_map_index = -1;
+static int hf_ulmap_fast_tracking_power_correction = -1;
+static int hf_ulmap_fast_tracking_frequency_correction = -1;
+static int hf_ulmap_fast_tracking_time_correction = -1;
+static int hf_ulmap_pusc_burst_allocation_extended_uiuc = -1;
+static int hf_ulmap_pusc_burst_allocation_length = -1;
+static int hf_ulmap_pusc_burst_allocation_uiuc = -1;
+static int hf_ulmap_pusc_burst_allocation_segment = -1;
+static int hf_ulmap_pusc_burst_allocation_ul_permbase = -1;
+static int hf_ulmap_pusc_burst_allocation_ofdma_symbol_offset = -1;
+static int hf_ulmap_pusc_burst_allocation_subchannel_offset = -1;
+static int hf_ulmap_pusc_burst_allocation_duration = -1;
+static int hf_ulmap_pusc_burst_allocation_repetition_coding_indication = -1;
+static int hf_ulmap_fast_ranging_extended_uiuc = -1;
+static int hf_ulmap_fast_ranging_length = -1;
+static int hf_ulmap_fast_ranging_ho_id_indicator = -1;
+static int hf_ulmap_fast_ranging_ho_id = -1;
+static int hf_ulmap_fast_ranging_mac_address = -1;
+static int hf_ulmap_fast_ranging_uiuc = -1;
+static int hf_ulmap_fast_ranging_duration = -1;
+static int hf_ulmap_fast_ranging_repetition_coding_indication = -1;
+static int hf_ulmap_allocation_start_extended_uiuc = -1;
+static int hf_ulmap_allocation_start_length = -1;
+static int hf_ulmap_allocation_start_ofdma_symbol_offset = -1;
+static int hf_ulmap_allocation_start_subchannel_offset = -1;
+static int hf_ulmap_cqich_enhanced_alloc_extended_2_uiuc = -1;
+static int hf_ulmap_cqich_enhanced_alloc_length = -1;
+static int hf_ulmap_cqich_enhanced_alloc_cqich_id = -1;
+static int hf_ulmap_cqich_enhanced_alloc_period = -1;
+static int hf_ulmap_cqich_enhanced_alloc_frame_offset = -1;
+static int hf_ulmap_cqich_enhanced_alloc_duration = -1;
+static int hf_ulmap_cqich_enhanced_alloc_cqich_num = -1;
+static int hf_ulmap_cqich_enhanced_alloc_feedback_type = -1;
+static int hf_ulmap_cqich_enhanced_alloc_allocation_index = -1;
+static int hf_ulmap_cqich_enhanced_alloc_cqich_type = -1;
+static int hf_ulmap_cqich_enhanced_alloc_sttd_indication = -1;
+static int hf_ulmap_cqich_enhanced_alloc_band_amc_precoding_mode = -1;
+static int hf_ulmap_cqich_enhanced_alloc_nr_precoders_feedback = -1;
+static int hf_ulmap_anchor_bs_switch_extended_2_uiuc = -1;
+static int hf_ulmap_anchor_bs_switch_length = -1;
+static int hf_ulmap_anchor_bs_switch_n_anchor_bs_switch = -1;
+static int hf_ulmap_anchor_bs_switch_reduced_cid = -1;
+static int hf_ulmap_anchor_bs_switch_action_code = -1;
+static int hf_ulmap_anchor_bs_switch_action_time = -1;
+static int hf_ulmap_anchor_bs_switch_temp_bs_id = -1;
+static int hf_ulmap_anchor_bs_switch_ak_change_indicator = -1;
+static int hf_ulmap_anchor_bs_switch_cqich_allocation_indicator = -1;
+static int hf_ulmap_anchor_bs_switch_cqich_id = -1;
+static int hf_ulmap_anchor_bs_switch_feedback_channel_offset = -1;
+static int hf_ulmap_anchor_bs_switch_period = -1;
+static int hf_ulmap_anchor_bs_switch_frame_offset = -1;
+static int hf_ulmap_anchor_bs_switch_duration = -1;
+static int hf_ulmap_anchor_bs_switch_mimo_permutation_feedback_code = -1;
+static int hf_ulmap_sounding_command_extended_2_uiuc = -1;
+static int hf_ulmap_sounding_command_length = -1;
+static int hf_ulmap_sounding_command_type = -1;
+static int hf_ulmap_sounding_command_send_sounding_report_flag = -1;
+static int hf_ulmap_sounding_command_relevance_flag = -1;
+static int hf_ulmap_sounding_command_relevance = -1;
+static int hf_ulmap_sounding_command_include_additional_feedback = -1;
+static int hf_ulmap_sounding_command_num_sounding_symbols = -1;
+static int hf_ulmap_sounding_command_separability_type = -1;
+static int hf_ulmap_sounding_command_max_cyclic_shift_index_p = -1;
+static int hf_ulmap_sounding_command_decimation_value = -1;
+static int hf_ulmap_sounding_command_decimation_offset_randomization = -1;
+static int hf_ulmap_sounding_command_symbol_index = -1;
+static int hf_ulmap_sounding_command_number_of_cids = -1;
+static int hf_ulmap_sounding_command_shorted_basic_cid = -1;
+static int hf_ulmap_sounding_command_power_assignment_method = -1;
+static int hf_ulmap_sounding_command_power_boost = -1;
+static int hf_ulmap_sounding_command_multi_antenna_flag = -1;
+static int hf_ulmap_sounding_command_allocation_mode = -1;
+static int hf_ulmap_sounding_command_band_bit_map = -1;
+static int hf_ulmap_sounding_command_starting_frequency_band = -1;
+static int hf_ulmap_sounding_command_number_of_frequency_bands = -1;
+static int hf_ulmap_sounding_command_cyclic_time_shift_index = -1;
+static int hf_ulmap_sounding_command_decimation_offset = -1;
+static int hf_ulmap_sounding_command_use_same_symbol_for_additional_feedback = -1;
+static int hf_ulmap_sounding_command_periodicity = -1;
+static int hf_ulmap_sounding_command_permutation = -1;
+static int hf_ulmap_sounding_command_dl_permbase = -1;
+static int hf_ulmap_sounding_command_shortened_basic_cid = -1;
+static int hf_ulmap_sounding_command_subchannel_offset = -1;
+static int hf_ulmap_sounding_command_number_of_subchannels = -1;
+static int hf_ulmap_harq_ulmap_extended_2_uiuc = -1;
+static int hf_ulmap_harq_ulmap_length = -1;
+static int hf_ulmap_harq_ulmap_rcid_type = -1;
+static int hf_ulmap_harq_ulmap_mode = -1;
+static int hf_ulmap_harq_ulmap_allocation_start_indication = -1;
+static int hf_ulmap_harq_ulmap_ofdma_symbol_offset = -1;
+static int hf_ulmap_harq_ulmap_subchannel_offset = -1;
+static int hf_ulmap_harq_ulmap_n_sub_burst = -1;
+static int hf_ulmap_harq_ackch_region_alloc_extended_2_uiuc = -1;
+static int hf_ulmap_harq_ackch_region_alloc_length = -1;
+static int hf_ulmap_harq_ackch_region_alloc_ofdma_symbol_offset = -1;
+static int hf_ulmap_harq_ackch_region_alloc_subchannel_offset = -1;
+static int hf_ulmap_harq_ackch_region_alloc_num_ofdma_symbols = -1;
+static int hf_ulmap_harq_ackch_region_alloc_num_subchannels = -1;
+static int hf_ulmap_aas_sdma_extended_2_uiuc = -1;
+static int hf_ulmap_aas_sdma_length = -1;
+static int hf_ulmap_aas_sdma_rcid_type = -1;
+static int hf_ulmap_aas_sdma_num_burst_region = -1;
+static int hf_ulmap_aas_sdma_slot_offset = -1;
+static int hf_ulmap_aas_sdma_slot_duration = -1;
+static int hf_ulmap_aas_sdma_number_of_users = -1;
+static int hf_ulmap_aas_sdma_encoding_mode = -1;
+static int hf_ulmap_aas_sdma_power_adjust = -1;
+static int hf_ulmap_aas_sdma_pilot_pattern_modifier = -1;
+static int hf_ulmap_aas_sdma_preamble_modifier_index = -1;
+static int hf_ulmap_aas_sdma_pilot_pattern = -1;
+static int hf_ulmap_aas_sdma_diuc = -1;
+static int hf_ulmap_aas_sdma_repetition_coding_indication = -1;
+static int hf_ulmap_aas_sdma_acid = -1;
+static int hf_ulmap_aas_sdma_ai_sn = -1;
+static int hf_ulmap_aas_sdma_nep = -1;
+static int hf_ulmap_aas_sdma_nsch = -1;
+static int hf_ulmap_aas_sdma_spid = -1;
+static int hf_ulmap_aas_sdma_power_adjustment = -1;
+static int hf_ulmap_feedback_polling_extended_2_uiuc = -1;
+static int hf_ulmap_feedback_polling_length = -1;
+static int hf_ulmap_feedback_polling_num_allocation = -1;
+static int hf_ulmap_feedback_polling_dedicated_ul_allocation_included = -1;
+static int hf_ulmap_feedback_polling_basic_cid = -1;
+static int hf_ulmap_feedback_polling_allocation_duration = -1;
+static int hf_ulmap_feedback_polling_type = -1;
+static int hf_ulmap_feedback_polling_frame_offset = -1;
+static int hf_ulmap_feedback_polling_period = -1;
+static int hf_ulmap_feedback_polling_uiuc = -1;
+static int hf_ulmap_feedback_polling_ofdma_symbol_offset = -1;
+static int hf_ulmap_feedback_polling_subchannel_offset = -1;
+static int hf_ulmap_feedback_polling_duration = -1;
+static int hf_ulmap_feedback_polling_repetition_coding_indication = -1;
+static int hf_ulmap_reduced_aas_aas_zone_configuration_included = -1;
+static int hf_ulmap_reduced_aas_aas_zone_position_included = -1;
+static int hf_ulmap_reduced_aas_ul_map_information_included = -1;
+static int hf_ulmap_reduced_aas_phy_modification_included = -1;
+static int hf_ulmap_reduced_aas_power_control_included = -1;
+static int hf_ulmap_reduced_aas_include_feedback_header = -1;
+static int hf_ulmap_reduced_aas_encoding_mode = -1;
+static int hf_ulmap_reduced_aas_permutation = -1;
+static int hf_ulmap_reduced_aas_ul_permbase = -1;
+static int hf_ulmap_reduced_aas_preamble_indication = -1;
+static int hf_ulmap_reduced_aas_padding = -1;
+static int hf_ulmap_reduced_aas_zone_symbol_offset = -1;
+static int hf_ulmap_reduced_aas_zone_length = -1;
+static int hf_ulmap_reduced_aas_ucd_count = -1;
+static int hf_ulmap_reduced_aas_private_map_alloc_start_time = -1;
+static int hf_ulmap_reduced_aas_pilot_pattern_index = -1;
+static int hf_ulmap_reduced_aas_preamble_select = -1;
+static int hf_ulmap_reduced_aas_preamble_shift_index = -1;
+static int hf_ulmap_reduced_aas_pilot_pattern_modifier = -1;
+static int hf_ulmap_reduced_aas_power_control = -1;
+static int hf_ulmap_reduced_aas_ul_frame_offset = -1;
+static int hf_ulmap_reduced_aas_slot_offset = -1;
+static int hf_ulmap_reduced_aas_slot_duration = -1;
+static int hf_ulmap_reduced_aas_uiuc_nep = -1;
+static int hf_ulmap_reduced_aas_acid = -1;
+static int hf_ulmap_reduced_aas_ai_sn = -1;
+static int hf_ulmap_reduced_aas_nsch = -1;
+static int hf_ulmap_reduced_aas_spid = -1;
+static int hf_ulmap_reduced_aas_repetition_coding_indication = -1;
+
+static expert_field ei_ulmap_not_implemented = EI_INIT;
+
+/* This gets called each time a capture file is loaded. */
+void init_wimax_globals(void)
+{
+ cqich_id_size = 0;
+ harq = 0;
+ ir_type = 0;
+ N_layer = 0;
+ RCID_Type = 0;
+}
+
+/********************************************************************
+ * UL-MAP HARQ Sub-Burst IEs
+ * 8.4.5.4.24 table 302j
+ * these functions take offset/length in bits
+ *******************************************************************/
+
+static gint Dedicated_UL_Control_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* 8.4.5.4.24.1 Dedicated_UL_Control_IE -- table 302r */
+ /* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
+ gint bit;
+ proto_item *tree;
+ gint sdma;
+
+ bit = offset;
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302r, NULL, "Dedicated_UL_Control_IE");
+
+ XBIT_HF(4, hf_ulmap_dedicated_ul_control_length);
+ XBIT_HF_VALUE(sdma, 4, hf_ulmap_dedicated_ul_control_control_header);
+ if ((sdma & 1) == 1) {
+ XBIT_HF(2, hf_ulmap_dedicated_ul_control_num_sdma_layers);
+ XBIT_HF(2, hf_ulmap_dedicated_ul_control_pilot_pattern);
+ }
+ return (bit - offset); /* length in bits */
+}
+
+static gint Dedicated_MIMO_UL_Control_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* 8.4.5.4.24.2 Dedicated_MIMO_UL_Control_IE -- table 302s */
+ /* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
+ gint bit;
+ proto_item *tree;
+
+ bit = offset;
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302s, NULL, "Dedicated_MIMO_UL_Control_IE");
+
+ XBIT_HF(2, hf_ulmap_dedicated_mimo_ul_control_matrix);
+ XBIT_HF_VALUE(N_layer, 2, hf_ulmap_dedicated_mimo_ul_control_n_layer);
+
+ return (bit - offset); /* length in bits */
+}
+
+/* begin Sub-Burst IEs */
+
+static gint UL_HARQ_Chase_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* 8.4.5.4.24 UL_HARQ_Chase_sub_burst_IE -- table 302k */
+ /* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
+ gint bit;
+ proto_item *tree;
+ /*proto_item *generic_item = NULL;*/
+ gint duci;
+ /*guint16 calculated_crc;*/
+
+ bit = offset;
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, BITHI(offset,length), ett_302k, NULL, "UL_HARQ_Chase_Sub_Burst_IE");
+
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ XBIT_HF_VALUE(duci, 1, hf_ulmap_harq_chase_dedicated_ul_control_indicator);
+ if (duci == 1) {
+ bit += Dedicated_UL_Control_IE(tree, bit, length, tvb);
+ }
+ XBIT_HF(4, hf_ulmap_harq_chase_uiuc);
+ XBIT_HF(2, hf_ulmap_harq_chase_repetition_coding_indication);
+ XBIT_HF(10, hf_ulmap_harq_chase_duration);
+ XBIT_HF(4, hf_ulmap_harq_chase_acid);
+ XBIT_HF(1, hf_ulmap_harq_chase_ai_sn);
+ XBIT_HF(1, hf_ulmap_harq_chase_ack_disable);
+ XBIT_HF(1, hf_ulmap_reserved_uint);
+
+#if 0
+ if (include_cor2_changes)
+ {
+ calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ proto_tree_add_checksum(tree, tvb, BITHI(bit,16), hf_ulmap_crc16, hf_ulmap_crc16_status, &ei_ulmap_crc16, pinfo, calculated_crc,
+ ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+ bit += 16;
+ }
+#endif
+
+ return (bit - offset); /* length in bits */
+}
+
+static gint UL_HARQ_IR_CTC_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* 8.4.5.4.24 UL_HARQ_IR_CTC_sub_burst_IE -- table 302l */
+ /* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
+ gint bit;
+ proto_item *tree;
+ /*proto_item *generic_item = NULL;*/
+ gint duci;
+ /*guint16 calculated_crc;*/
+
+ bit = offset;
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302l, NULL, "UL_HARQ_IR_CTC_Sub_Burst_IE");
+
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ XBIT_HF_VALUE(duci, 1, hf_ulmap_harq_ir_ctc_dedicated_ul_control_indicator);
+ if (duci == 1) {
+ bit += Dedicated_UL_Control_IE(tree, bit, length, tvb);
+ }
+ XBIT_HF(4, hf_ulmap_harq_ir_ctc_nep);
+ XBIT_HF(4, hf_ulmap_harq_ir_ctc_nsch);
+ XBIT_HF(2, hf_ulmap_harq_ir_ctc_spid);
+ XBIT_HF(4, hf_ulmap_harq_ir_ctc_acin);
+ XBIT_HF(1, hf_ulmap_harq_ir_ctc_ai_sn);
+ XBIT_HF(1, hf_ulmap_harq_ir_ctc_ack_disable);
+ XBIT_HF(3, hf_ulmap_reserved_uint);
+
+#if 0
+ if (include_cor2_changes)
+ {
+ /* CRC-16 is always appended */
+ calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ proto_tree_add_checksum(tree, tvb, BITHI(bit,16), hf_ulmap_crc16, hf_ulmap_crc16_status, &ei_ulmap_crc16, pinfo, calculated_crc,
+ ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+ bit += 16;
+ }
+#endif
+
+ return (bit - offset); /* length in bits */
+}
+
+static gint UL_HARQ_IR_CC_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* 8.4.5.4.24 UL_HARQ_IR_CC_sub_burst_IE -- table 302m */
+ /* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
+ gint bit;
+ proto_item *tree;
+ /*proto_item *generic_item = NULL;*/
+ gint duci;
+ /*guint16 calculated_crc;*/
+
+ bit = offset;
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302m, NULL, "UL_HARQ_IR_CC_Sub_Burst_IE");
+
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ XBIT_HF_VALUE(duci, 1, hf_ulmap_harq_ir_cc_dedicated_ul_control_indicator);
+ if (duci == 1) {
+ bit += Dedicated_UL_Control_IE(tree, bit, length, tvb);
+ }
+ XBIT_HF(4, hf_ulmap_harq_ir_cc_uiuc);
+ XBIT_HF(2, hf_ulmap_harq_ir_cc_repetition_coding_indication);
+ XBIT_HF(10, hf_ulmap_harq_ir_cc_duration);
+ XBIT_HF(2, hf_ulmap_harq_ir_cc_spid);
+ XBIT_HF(4, hf_ulmap_harq_ir_cc_acid);
+ XBIT_HF(1, hf_ulmap_harq_ir_cc_ai_sn);
+ XBIT_HF(1, hf_ulmap_harq_ir_cc_ack_disable);
+ XBIT_HF(3, hf_ulmap_reserved_uint);
+
+#if 0
+ if (include_cor2_changes)
+ {
+ /* CRC-16 is always appended */
+ calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ proto_tree_add_checksum(tree, tvb, BITHI(bit,16), hf_ulmap_crc16, hf_ulmap_crc16_status, &ei_ulmap_crc16, pinfo, calculated_crc,
+ ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+
+ bit += 16;
+ }
+#endif
+
+ return (bit - offset); /* length in bits */
+}
+
+static gint MIMO_UL_Chase_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* 8.4.5.4.24 MIMO_UL_Chase_HARQ_Sub_Burst_IE -- table 302n */
+ /* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
+ gint bit;
+ proto_item *tree;
+ /*proto_item *generic_item = NULL;*/
+ gint muin,dmci,ackd,i;
+ /*guint16 calculated_crc;*/
+
+ bit = offset;
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302n, NULL, "MIMO_UL_Chase_HARQ_Sub_Burst_IE");
+
+ XBIT_HF_VALUE(muin, 1, hf_ulmap_mimo_ul_chase_harq_mu_indicator);
+ XBIT_HF_VALUE(dmci, 1, hf_ulmap_mimo_ul_chase_harq_dedicated_mimo_ulcontrol_indicator);
+ XBIT_HF_VALUE(ackd, 1, hf_ulmap_mimo_ul_chase_harq_ack_disable);
+ if (muin == 0) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ if (dmci) {
+ bit += Dedicated_MIMO_UL_Control_IE(tree, bit, length, tvb);
+ }
+ } else {
+ XBIT_HF(1, hf_ulmap_mimo_ul_chase_harq_matrix);
+ }
+ XBIT_HF(10, hf_ulmap_mimo_ul_chase_harq_duration);
+ for (i = 0; i < N_layer; i++) {
+ if (muin == 1) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ }
+ XBIT_HF(4, hf_ulmap_mimo_ul_chase_harq_uiuc);
+ XBIT_HF(2, hf_ulmap_mimo_ul_chase_harq_repetition_coding_indication);
+ if (ackd == 0) {
+ XBIT_HF(4, hf_ulmap_mimo_ul_chase_harq_acid);
+ XBIT_HF(1, hf_ulmap_mimo_ul_chase_harq_ai_sn);
+ }
+ }
+
+#if 0
+ if (include_cor2_changes)
+ {
+ /* CRC-16 is always appended */
+ calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ proto_tree_add_checksum(tree, tvb, BITHI(bit,16), hf_ulmap_crc16, hf_ulmap_crc16_status, &ei_ulmap_crc16, pinfo, calculated_crc,
+ ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+
+ bit += 16;
+ }
+#endif
+
+ return (bit - offset); /* length in bits */
+}
+
+static gint MIMO_UL_IR_HARQ__Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* 8.4.5.4.24 MIMO_UL_IR_HARQ__Sub_Burst_IE -- table 302o */
+ /* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
+ gint bit;
+ proto_item *tree;
+ /*proto_item *generic_item = NULL;*/
+ gint muin,dmci,ackd,i;
+ /*guint16 calculated_crc;*/
+
+ bit = offset;
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302o, NULL, "MIMO_UL_IR_HARQ__Sub_Burst_IE");
+
+ XBIT_HF_VALUE(muin, 1, hf_ulmap_mimo_ul_ir_harq_mu_indicator);
+ XBIT_HF_VALUE(dmci, 1, hf_ulmap_mimo_ul_ir_harq_dedicated_mimo_ul_control_indicator);
+ XBIT_HF_VALUE(ackd, 1, hf_ulmap_mimo_ul_ir_harq_ack_disable);
+ if (muin == 0) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ if (dmci) {
+ bit += Dedicated_MIMO_UL_Control_IE(tree, bit, length, tvb);
+ }
+ } else {
+ XBIT_HF(1, hf_ulmap_mimo_ul_ir_harq_matrix);
+ }
+ XBIT_HF(4, hf_ulmap_mimo_ul_ir_harq_nsch);
+ for (i = 0; i < N_layer; i++) {
+ if (muin == 1) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ }
+ XBIT_HF(4, hf_ulmap_mimo_ul_ir_harq_nep);
+ if (ackd == 0) {
+ XBIT_HF(2, hf_ulmap_mimo_ul_ir_harq_spid);
+ XBIT_HF(4, hf_ulmap_mimo_ul_ir_harq_acid);
+ XBIT_HF(1, hf_ulmap_mimo_ul_ir_harq_ai_sn);
+ }
+ }
+
+#if 0
+ if (include_cor2_changes)
+ {
+ /* CRC-16 is always appended */
+ calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ proto_tree_add_checksum(tree, tvb, BITHI(bit,16), hf_ulmap_crc16, hf_ulmap_crc16_status, &ei_ulmap_crc16, pinfo, calculated_crc,
+ ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+
+ bit += 16;
+ }
+#endif
+
+ return (bit - offset); /* length in bits */
+}
+
+static gint MIMO_UL_IR_HARQ_for_CC_Sub_Burst_UIE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* 8.4.5.4.24 MIMO_UL_IR_HARQ_for_CC_Sub_Burst_UIE -- table 302p */
+ /* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
+ gint bit;
+ proto_item *tree;
+ /*proto_item *generic_item = NULL;*/
+ gint muin,dmci,ackd,i;
+ /*guint16 calculated_crc;*/
+
+ bit = offset;
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302p, NULL, "MIMO_UL_IR_HARQ_for_CC_Sub_Burst_UIE");
+
+ XBIT_HF_VALUE(muin, 1, hf_ulmap_mimo_ul_ir_harq_cc_mu_indicator);
+ XBIT_HF_VALUE(dmci, 1, hf_ulmap_mimo_ul_ir_harq_cc_dedicated_mimo_ul_control_indicator);
+ XBIT_HF_VALUE(ackd, 1, hf_ulmap_mimo_ul_ir_harq_cc_ack_disable);
+ if (muin == 0) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ if (dmci) {
+ bit += Dedicated_MIMO_UL_Control_IE(tree, bit, length, tvb);
+ }
+ } else {
+ XBIT_HF(1, hf_ulmap_mimo_ul_ir_harq_cc_matrix);
+ }
+ XBIT_HF(10, hf_ulmap_mimo_ul_ir_harq_cc_duration);
+ for (i = 0; i < N_layer; i++) {
+ if (muin == 1) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ }
+ XBIT_HF(4, hf_ulmap_mimo_ul_ir_harq_cc_uiuc);
+ XBIT_HF(2, hf_ulmap_mimo_ul_ir_harq_cc_repetition_coding_indication);
+ if (ackd == 0) {
+ XBIT_HF(4, hf_ulmap_mimo_ul_ir_harq_cc_acid);
+ XBIT_HF(1, hf_ulmap_mimo_ul_ir_harq_cc_ai_sn);
+ XBIT_HF(2, hf_ulmap_mimo_ul_ir_harq_cc_spid);
+ }
+ }
+
+#if 0
+ if (include_cor2_changes)
+ {
+ /* CRC-16 is always appended */
+ calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ proto_tree_add_checksum(tree, tvb, BITHI(bit,16), hf_ulmap_crc16, hf_ulmap_crc16_status, &ei_ulmap_crc16, pinfo, calculated_crc,
+ ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+
+ bit += 16;
+ }
+#endif
+
+ return (bit - offset); /* length in bits */
+}
+
+static gint MIMO_UL_STC_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* 8.4.5.4.24 MIMO_UL_STC_HARQ_Sub_Burst_IE -- table 302q */
+ /* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
+ gint bit;
+ proto_item *tree;
+ /*proto_item *generic_item = NULL;*/
+ gint ackd,txct,sboi;
+ /*guint16 calculated_crc;*/
+
+ bit = offset;
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302q, NULL, "MIMO_UL_STC_HARQ_Sub_Burst_IE");
+
+ XBIT_HF_VALUE(txct, 2, hf_ulmap_mimo_ul_stc_harq_tx_count);
+ XBIT_HF(10, hf_ulmap_mimo_ul_stc_harq_duration);
+ XBIT_HF_VALUE(sboi, 1, hf_ulmap_mimo_ul_stc_harq_sub_burst_offset_indication);
+ /*XBIT_HF_VALUE(muin, 1, hf_ulmap_reserved_uint);*/
+ if (sboi == 1) {
+ XBIT_HF(8, hf_ulmap_mimo_ul_stc_harq_sub_burst_offset);
+ }
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ XBIT_HF_VALUE(ackd, 1, hf_ulmap_mimo_ul_stc_harq_ack_disable);
+ if (txct == 0) {
+ XBIT_HF(4, hf_ulmap_mimo_ul_stc_harq_uiuc);
+ XBIT_HF(2, hf_ulmap_mimo_ul_stc_harq_repetition_coding_indication);
+ }
+ if (ackd == 0) {
+ XBIT_HF(4, hf_ulmap_mimo_ul_stc_harq_acid);
+ }
+
+#if 0
+ if (include_cor2_changes)
+ {
+ /* CRC-16 is always appended */
+ calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ proto_tree_add_checksum(tree, tvb, BITHI(bit,16), hf_ulmap_crc16, hf_ulmap_crc16_status, &ei_ulmap_crc16, pinfo, calculated_crc,
+ ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+
+ bit += 16;
+ }
+#endif
+
+ return (bit - offset); /* length in bits */
+}
+
+/********************************************************************
+ * UL-MAP Extended IEs
+ * table 290a
+ *******************************************************************/
+
+static gint Power_Control_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended IE = 0 */
+ /* 8.4.5.4.5 Power_Control_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint nib;
+ gint data;
+ proto_item *tree;
+
+ nib = offset;
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_292, NULL, "Power_Control_IE");
+
+ VNIB(data, 1, hf_ulmap_ie_diuc_ext);
+ VNIB(data, 1, hf_ulmap_ie_length);
+
+ VNIB(data, 2, hf_ulmap_power_control);
+ VNIB(data, 2, hf_ulmap_power_measurement_frame);
+ return nib;
+}
+
+static gint Mini_Subchannel_allocation_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended IE = 1 */
+ /* 8.4.5.4.8 [2] Mini-Subchannel_allocation_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ gint data;
+ guint idx;
+ proto_item *tree;
+ gint j, M;
+ const gint m_table[4] = { 2, 2, 3, 6 };
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_295, NULL, "Mini_subchannel_allocation_IE");
+
+ XBIT_HF(4, hf_ulmap_mini_subcha_alloc_extended_2_uiuc);
+ XBIT_HF(8, hf_ulmap_mini_subcha_alloc_length);
+
+ XBIT_HF_VALUE(idx, 2, hf_ulmap_mini_subcha_alloc_ctype);
+ M = m_table[idx];
+ XBIT_HF(6, hf_ulmap_mini_subcha_alloc_duration);
+
+ for (j = 0; j < M; j++) {
+ data = TVB_BIT_BITS(bit, tvb, 16);
+ proto_tree_add_uint_format(tree, hf_ulmap_mini_subcha_alloc_cid, tvb, BITHI(bit, 16), data, "CID(%d): %d", j, data);
+ bit += 16;
+ data = TVB_BIT_BITS(bit, tvb, 4);
+ proto_tree_add_uint_format(tree, hf_ulmap_mini_subcha_alloc_uiuc, tvb, BITHI(bit, 4), data, "UIUC(%d): %d", j, data);
+ bit += 4;
+ data = TVB_BIT_BITS(bit, tvb, 2);
+ proto_tree_add_uint_format(tree, hf_ulmap_mini_subcha_alloc_repetition, tvb, BITHI(bit, 2), data, "Repetition(%d): %d", j, data);
+ bit += 2;
+ }
+ if (M == 3) {
+ XBIT_HF(4, hf_ulmap_mini_subcha_alloc_padding);
+ }
+ return BIT_TO_NIB(bit);
+}
+
+static gint AAS_UL_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended IE = 2 */
+ /* 8.4.5.4.6 [2] AAS_UL_IE*/
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ proto_item *tree;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_293, NULL, "AAS_UL_IE");
+
+ XBIT_HF(4, hf_ulmap_aas_ul_extended_uiuc);
+ XBIT_HF(4, hf_ulmap_aas_ul_length);
+
+ XBIT_HF(2, hf_ulmap_aas_ul_permutation);
+ XBIT_HF(7, hf_ulmap_aas_ul_ul_permbase);
+ XBIT_HF(8, hf_ulmap_aas_ul_ofdma_symbol_offset);
+ XBIT_HF(8, hf_ulmap_aas_ul_aas_zone_length);
+ XBIT_HF(2, hf_ulmap_aas_ul_uplink_preamble_config);
+ XBIT_HF(1, hf_ulmap_aas_ul_preamble_type);
+ XBIT_HF(4, hf_ulmap_reserved_uint);
+ return BIT_TO_NIB(bit);
+}
+
+static gint CQICH_Alloc_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended IE = 3 */
+ /* 8.4.5.4.12 [2] CQICH_Alloc_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ gint data;
+ gint target;
+ proto_item *tree;
+ gint rci, rtype, ftype, zperm, mgi, api, pad;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_300, NULL, "CQICH_Alloc_IE");
+
+ XBIT_HF(4, hf_ulmap_cqich_alloc_extended_uiuc);
+ XBIT_HF_VALUE(data, 4, hf_ulmap_cqich_alloc_length);
+ target = bit + BYTE_TO_BIT(data);
+
+ if (cqich_id_size == 0) {
+ proto_tree_add_uint_format_value(tree, hf_ulmap_cqich_alloc_cqich_id, tvb, BITHI(bit, 1), cqich_id_size, "n/a (size == 0 bits)");
+ } else {
+ /* variable from 0-9 bits */
+ data = TVB_BIT_BITS16(bit, tvb, cqich_id_size);
+ proto_tree_add_uint_format_value(tree, hf_ulmap_cqich_alloc_cqich_id, tvb, BITHI(bit, cqich_id_size), data, "%d (%d bits)", data, cqich_id_size);
+ bit += cqich_id_size;
+ }
+
+ XBIT_HF(6, hf_ulmap_cqich_alloc_allocation_offset);
+ XBIT_HF(2, hf_ulmap_cqich_alloc_period);
+ XBIT_HF(3, hf_ulmap_cqich_alloc_frame_offset);
+ XBIT_HF(3, hf_ulmap_cqich_alloc_duration);
+ XBIT_HF_VALUE(rci, 1, hf_ulmap_cqich_alloc_report_configuration_included);
+ if (rci)
+ {
+ XBIT_HF_VALUE(ftype, 2, hf_ulmap_cqich_alloc_feedback_type);
+ XBIT_HF_VALUE(rtype, 1, hf_ulmap_cqich_alloc_report_type);
+ if (rtype == 0) {
+ XBIT_HF(1, hf_ulmap_cqich_alloc_cinr_preamble_report_type);
+ }
+ else {
+ XBIT_HF_VALUE(zperm, 3, hf_ulmap_cqich_alloc_zone_permutation);
+ XBIT_HF(2, hf_ulmap_cqich_alloc_zone_type);
+ XBIT_HF(2, hf_ulmap_cqich_alloc_zone_prbs_id);
+ if (zperm == 0 || zperm == 1) {
+ XBIT_HF_VALUE(mgi, 1, hf_ulmap_cqich_alloc_major_group_indication);
+ if (mgi == 1) {
+ /* PUSC major group bitmap*/
+ XBIT_HF(6, hf_ulmap_cqich_alloc_pusc_major_group_bitmap);
+ }
+ }
+ XBIT_HF(1, hf_ulmap_cqich_alloc_cinr_zone_measurement_type);
+ }
+ if (ftype == 0) {
+ XBIT_HF_VALUE(api, 1, hf_ulmap_cqich_alloc_averaging_parameter_included);
+ if (api == 1) {
+ XBIT_HF(4, hf_ulmap_cqich_alloc_averaging_parameter);
+ }
+ }
+ }
+ XBIT_HF(2, hf_ulmap_cqich_alloc_mimo_permutation_feedback_cycle);
+
+ pad = target - bit;
+ if (pad) {
+ proto_tree_add_bytes_format_value(tree, hf_ulmap_padding, tvb, BITHI(bit, pad), NULL, "%d bits", pad);
+ bit += pad;
+ }
+ return BIT_TO_NIB(bit); /* Return position in nibbles. */
+}
+
+static gint UL_Zone_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended IE = 4 */
+ /* 8.4.5.4.7 [2] UL_Zone_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ proto_item *tree;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_294, NULL, "UL_Zone_IE");
+
+ XBIT_HF(4, hf_ulmap_zone_extended_uiuc);
+ XBIT_HF(4, hf_ulmap_zone_length);
+
+ XBIT_HF(7, hf_ulmap_zone_ofdma_symbol_offset);
+ XBIT_HF(2, hf_ulmap_zone_permutation);
+ XBIT_HF(7, hf_ulmap_zone_ul_permbase);
+ XBIT_HF(2, hf_ulmap_zone_amc_type);
+ XBIT_HF(1, hf_ulmap_zone_use_all_sc_indicator);
+ XBIT_HF(1, hf_ulmap_zone_disable_subchannel_rotation);
+ XBIT_HF(4, hf_ulmap_reserved_uint);
+ return BIT_TO_NIB(bit);
+}
+
+static gint PHYMOD_UL_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended IE = 5 */
+ /* 8.4.5.4.14 [2] PHYMOD_UL_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ proto_item *tree;
+ gint pmt;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302, NULL, "PHYMOD_UL_IE");
+
+ XBIT_HF(4, hf_ulmap_phymod_ul_extended_uiuc);
+ XBIT_HF(4, hf_ulmap_phymod_ul_length);
+
+ XBIT_HF_VALUE(pmt, 1, hf_ulmap_phymod_ul_preamble_modifier_type);
+ if (pmt == 0) {
+ XBIT_HF(4, hf_ulmap_phymod_ul_preamble_frequency_shift_index);
+ } else {
+ XBIT_HF(4, hf_ulmap_phymod_ul_preamble_time_shift_index);
+ }
+ XBIT_HF(1, hf_ulmap_phymod_ul_pilot_pattern_modifier);
+ XBIT_HF(2, hf_ulmap_phymod_ul_pilot_pattern_index);
+ return BIT_TO_NIB(bit);
+}
+
+static gint MIMO_UL_IE(proto_tree *uiuc_tree, packet_info* pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended IE = 6 */
+ /* 8.4.5.4.11 MIMO_UL_Basic_IE (not implemented) */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint nib;
+ gint data;
+ proto_item *tree;
+
+ nib = offset;
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_299, NULL, "MIMO_UL_Basic_IE");
+
+ VNIB(data, 1, hf_ulmap_ie_diuc_ext);
+ VNIB(data, 1, hf_ulmap_ie_length);
+ proto_tree_add_expert(tree, pinfo, &ei_ulmap_not_implemented, tvb, NIBHI(nib,length-2));
+ return nib;
+}
+
+static gint ULMAP_Fast_Tracking_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended IE = 7 */
+ /* 8.4.5.4.22 [2] ULMAP_Fast_Tracking_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ proto_item *tree;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302h, NULL, "Fast_Tracking_IE");
+
+ length = NIB_TO_BIT(length);
+
+ XBIT_HF(4, hf_ulmap_fast_tracking_extended_uiuc);
+ XBIT_HF(4, hf_ulmap_fast_tracking_length);
+
+ XBIT_HF(2, hf_ulmap_fast_tracking_map_index);
+ XBIT_HF(6, hf_ulmap_reserved_uint);
+ while (bit < (length-7)) {
+ XBIT_HF(3, hf_ulmap_fast_tracking_power_correction);
+ XBIT_HF(3, hf_ulmap_fast_tracking_frequency_correction);
+ XBIT_HF(2, hf_ulmap_fast_tracking_time_correction);
+ }
+ return BIT_TO_NIB(bit);
+}
+
+static gint UL_PUSC_Burst_Allocation_in_other_segment_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended IE = 8 */
+ /* 8.4.5.4.17 [2] UL_PUSC_Burst_Allocation_in_other_segment_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ proto_item *tree;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302c, NULL, "UL_PUSC_Burst_Allocation_in_Other_Segment_IE");
+
+ XBIT_HF(4, hf_ulmap_pusc_burst_allocation_extended_uiuc);
+ XBIT_HF(4, hf_ulmap_pusc_burst_allocation_length);
+
+ XBIT_HF(4, hf_ulmap_pusc_burst_allocation_uiuc);
+ XBIT_HF(2, hf_ulmap_pusc_burst_allocation_segment);
+ XBIT_HF(7, hf_ulmap_pusc_burst_allocation_ul_permbase);
+ XBIT_HF(8, hf_ulmap_pusc_burst_allocation_ofdma_symbol_offset);
+ XBIT_HF(6, hf_ulmap_pusc_burst_allocation_subchannel_offset);
+ XBIT_HF(10, hf_ulmap_pusc_burst_allocation_duration);
+ XBIT_HF(2, hf_ulmap_pusc_burst_allocation_repetition_coding_indication);
+ XBIT_HF(1, hf_ulmap_reserved_uint);
+ return BIT_TO_NIB(bit);
+}
+
+static gint Fast_Ranging_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended IE = 9 */
+ /* 8.4.5.4.21 [2] Fast_Ranging_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ proto_item *tree;
+ gint hidi;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302g, NULL, "Fast_Ranging_IE");
+
+ XBIT_HF(4, hf_ulmap_fast_ranging_extended_uiuc);
+ XBIT_HF(4, hf_ulmap_fast_ranging_length);
+
+ XBIT_HF_VALUE(hidi, 1, hf_ulmap_fast_ranging_ho_id_indicator);
+ XBIT_HF(7, hf_ulmap_reserved_uint);
+ if (hidi == 1) {
+ XBIT_HF(8, hf_ulmap_fast_ranging_ho_id);
+ /* XBIT_HF(40, hf_ulmap_reserved_uint); TODO */
+ } else {
+ proto_tree_add_item(tree, hf_ulmap_fast_ranging_mac_address, tvb, BITHI(bit, 48), ENC_NA);
+ bit += 48;
+ }
+ XBIT_HF(4, hf_ulmap_fast_ranging_uiuc);
+ XBIT_HF(10, hf_ulmap_fast_ranging_duration);
+ XBIT_HF(2, hf_ulmap_fast_ranging_repetition_coding_indication);
+ return BIT_TO_NIB(bit);
+}
+
+static gint UL_Allocation_Start_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended IE = 0xA */
+ /* 8.4.5.4.15 [2] UL_Allocation_Start_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ proto_item *tree;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302a, NULL, "UL_Allocation_start_IE");
+
+ XBIT_HF(4, hf_ulmap_allocation_start_extended_uiuc);
+ XBIT_HF(4, hf_ulmap_allocation_start_length);
+
+ XBIT_HF(8, hf_ulmap_allocation_start_ofdma_symbol_offset);
+ XBIT_HF(7, hf_ulmap_allocation_start_subchannel_offset);
+ XBIT_HF(1, hf_ulmap_reserved_uint);
+ return BIT_TO_NIB(bit);
+}
+
+
+/********************************************************************
+ * UL-MAP Extended-2 IEs
+ * table 290c
+ *******************************************************************/
+
+static gint CQICH_Enhanced_Allocation_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended-2 IE = 0 */
+ /* 8.4.5.4.16 [2] CQICH_Enhanced_Allocation_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ gint data;
+ proto_item *tree;
+ gint i, cnum, bapm;
+ guint pad;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302b, NULL, "CQICH_Enhanced_Alloc_IE");
+
+ XBIT_HF(4, hf_ulmap_cqich_enhanced_alloc_extended_2_uiuc);
+ XBIT_HF(8, hf_ulmap_cqich_enhanced_alloc_length);
+
+ if (cqich_id_size == 0) {
+ proto_tree_add_uint_format_value(tree, hf_ulmap_cqich_enhanced_alloc_cqich_id, tvb, BITHI(bit, 1), cqich_id_size, "n/a (size == 0 bits)");
+ } else {
+ /* variable from 0-9 bits */
+ data = TVB_BIT_BITS16(bit, tvb, cqich_id_size);
+ proto_tree_add_uint_format_value(tree, hf_ulmap_cqich_enhanced_alloc_cqich_id, tvb, BITHI(bit, cqich_id_size), data, "%d (%d bits)", data, cqich_id_size);
+ bit += cqich_id_size;
+ }
+
+ XBIT_HF(3, hf_ulmap_cqich_enhanced_alloc_period);
+ XBIT_HF(3, hf_ulmap_cqich_enhanced_alloc_frame_offset);
+ XBIT_HF(3, hf_ulmap_cqich_enhanced_alloc_duration);
+ XBIT_HF_VALUE(cnum, 4, hf_ulmap_cqich_enhanced_alloc_cqich_num);
+ cnum += 1;
+ for (i = 0; i < cnum; i++) {
+ XBIT_HF(3, hf_ulmap_cqich_enhanced_alloc_feedback_type);
+ XBIT_HF(6, hf_ulmap_cqich_enhanced_alloc_allocation_index);
+ XBIT_HF(3, hf_ulmap_cqich_enhanced_alloc_cqich_type);
+ XBIT_HF(1, hf_ulmap_cqich_enhanced_alloc_sttd_indication);
+ }
+ XBIT_HF_VALUE(bapm, 1, hf_ulmap_cqich_enhanced_alloc_band_amc_precoding_mode);
+ if (bapm == 1) {
+ XBIT_HF(3, hf_ulmap_cqich_enhanced_alloc_nr_precoders_feedback);
+ }
+
+ pad = BIT_PADDING(bit,8);
+ if (pad) {
+ proto_tree_add_bytes_format_value(tree, hf_ulmap_padding, tvb, BITHI(bit, pad), NULL, "%d bits", pad);
+ bit += pad;
+ }
+ return BIT_TO_NIB(bit);
+}
+
+static gint HO_Anchor_Active_UL_MAP_IE(proto_tree *uiuc_tree, packet_info* pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended-2 IE = 1 */
+ /* 8.4.5.4.18 [2] HO_Anchor_Active_UL_MAP_IE (not implemented) */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint nib;
+ gint data;
+ proto_item *tree;
+
+ nib = offset;
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302d, NULL, "HO_Anchor_Active_UL_MAP_IE");
+
+ VNIB(data, 1, hf_ulmap_ie_diuc_ext2);
+ VNIB(data, 2, hf_ulmap_ie_length);
+ proto_tree_add_expert(tree, pinfo, &ei_ulmap_not_implemented, tvb, NIBHI(nib,length-3));
+ return nib;
+}
+
+static gint HO_Active_Anchor_UL_MAP_IE(proto_tree *uiuc_tree, packet_info* pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended-2 IE = 2 */
+ /* 8.4.5.4.19 [2] HO_Active_Anchor_UL_MAP_IE (not implemented) */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint nib;
+ gint data;
+ proto_item *tree;
+
+ nib = offset;
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302e, NULL, "HO_Active_Anchor_UL_MAP_IE");
+
+ VNIB(data, 1, hf_ulmap_ie_diuc_ext2);
+ VNIB(data, 2, hf_ulmap_ie_length);
+ proto_tree_add_expert(tree, pinfo, &ei_ulmap_not_implemented, tvb, NIBHI(nib,length-3));
+ return nib;
+}
+
+static gint Anchor_BS_switch_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended-2 IE = 3 */
+ /* 8.4.5.4.23 [2] Anchor_BS_switch_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ gint data;
+ proto_item *tree;
+ gint nbss, acod, cqai, pad;
+ gint i;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302i, NULL, "Anchor_BS_switch_IE");
+
+ XBIT_HF(4, hf_ulmap_anchor_bs_switch_extended_2_uiuc);
+ XBIT_HF(8, hf_ulmap_anchor_bs_switch_length);
+
+ XBIT_HF_VALUE(nbss, 4, hf_ulmap_anchor_bs_switch_n_anchor_bs_switch);
+ for (i = 0; i < nbss; i++) {
+ XBIT_HF(12, hf_ulmap_anchor_bs_switch_reduced_cid);
+ XBIT_HF_VALUE(acod, 2, hf_ulmap_anchor_bs_switch_action_code);
+ if (acod == 1) {
+ XBIT_HF(3, hf_ulmap_anchor_bs_switch_action_time);
+ XBIT_HF(3, hf_ulmap_anchor_bs_switch_temp_bs_id);
+ XBIT_HF(2, hf_ulmap_reserved_uint);
+ }
+ if (acod == 0 || acod == 1) {
+ XBIT_HF(1, hf_ulmap_anchor_bs_switch_ak_change_indicator);
+ XBIT_HF_VALUE(cqai, 1, hf_ulmap_anchor_bs_switch_cqich_allocation_indicator);
+ if (cqai == 1) {
+ /* variable bits from 0-9 */
+ if (cqich_id_size == 0) {
+ proto_tree_add_uint_format_value(tree, hf_ulmap_anchor_bs_switch_cqich_id, tvb, BITHI(bit, 1), cqich_id_size, "n/a (size == 0 bits)");
+ } else {
+ data = TVB_BIT_BITS16(bit, tvb, cqich_id_size);
+ proto_tree_add_uint_format_value(tree, hf_ulmap_anchor_bs_switch_cqich_id, tvb, BITHI(bit, cqich_id_size),
+ data, "%d (%d bits)", data, cqich_id_size);
+ bit += cqich_id_size;
+ }
+ XBIT_HF(6, hf_ulmap_anchor_bs_switch_feedback_channel_offset);
+ XBIT_HF(2, hf_ulmap_anchor_bs_switch_period);
+ XBIT_HF(3, hf_ulmap_anchor_bs_switch_frame_offset);
+ XBIT_HF(3, hf_ulmap_anchor_bs_switch_duration);
+ XBIT_HF(2, hf_ulmap_anchor_bs_switch_mimo_permutation_feedback_code);
+ pad = BIT_PADDING(bit,8);
+ if (pad) {
+ proto_tree_add_uint_format_value(tree, hf_ulmap_reserved, tvb, BITHI(bit,pad), 0, "%d bits", pad);
+ }
+ }
+ } else {
+ XBIT_HF(2, hf_ulmap_reserved_uint);
+ }
+ }
+ XBIT_HF(4, hf_ulmap_reserved_uint);
+ return BIT_TO_NIB(bit);
+}
+
+static gint UL_sounding_command_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended-2 IE = 4 */
+ /* 8.4.5.4.26 [2] UL_sounding_command_IE */
+ /* see 8.4.6.2.7.1 */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ proto_item *tree;
+ gint stype, srlf, iafb, pad, sept, nssym, ncid, amod;
+ gint i, j;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_315d, NULL, "UL_Sounding_Command_IE");
+
+ XBIT_HF(4, hf_ulmap_sounding_command_extended_2_uiuc);
+ XBIT_HF(8, hf_ulmap_sounding_command_length);
+
+ XBIT_HF_VALUE(stype, 1, hf_ulmap_sounding_command_type);
+ XBIT_HF(1, hf_ulmap_sounding_command_send_sounding_report_flag);
+ XBIT_HF_VALUE(srlf, 1, hf_ulmap_sounding_command_relevance_flag);
+ if (srlf == 0) {
+ XBIT_HF(1, hf_ulmap_sounding_command_relevance);
+ XBIT_HF(2, hf_ulmap_reserved_uint);
+ } else {
+ XBIT_HF(3, hf_ulmap_reserved_uint);
+ }
+ XBIT_HF_VALUE(iafb, 2, hf_ulmap_sounding_command_include_additional_feedback);
+ if (stype == 0) {
+ XBIT_HF_VALUE(nssym, 3, hf_ulmap_sounding_command_num_sounding_symbols);
+ XBIT_HF(1, hf_ulmap_reserved_uint);
+ for (i = 0; i < nssym; i++) {
+ XBIT_HF_VALUE(sept, 1, hf_ulmap_sounding_command_separability_type);
+ if (sept == 0) {
+ XBIT_HF(3, hf_ulmap_sounding_command_max_cyclic_shift_index_p);
+ XBIT_HF(1, hf_ulmap_reserved_uint);
+ } else {
+ XBIT_HF(3, hf_ulmap_sounding_command_decimation_value);
+ XBIT_HF(1, hf_ulmap_sounding_command_decimation_offset_randomization);
+ }
+ XBIT_HF(3, hf_ulmap_sounding_command_symbol_index);
+ XBIT_HF_VALUE(ncid, 7, hf_ulmap_sounding_command_number_of_cids);
+ XBIT_HF(1, hf_ulmap_reserved_uint);
+ for (j = 0; j < ncid; j++) {
+ XBIT_HF(12, hf_ulmap_sounding_command_shorted_basic_cid);
+ XBIT_HF(2, hf_ulmap_sounding_command_power_assignment_method);
+ XBIT_HF(1, hf_ulmap_sounding_command_power_boost);
+ XBIT_HF(1, hf_ulmap_sounding_command_multi_antenna_flag);
+ XBIT_HF_VALUE(amod, 1, hf_ulmap_sounding_command_allocation_mode);
+ if (amod == 1) {
+ XBIT_HF(12, hf_ulmap_sounding_command_band_bit_map);
+ XBIT_HF(2, hf_ulmap_reserved_uint);
+ } else {
+ XBIT_HF(7, hf_ulmap_sounding_command_starting_frequency_band);
+ XBIT_HF(7, hf_ulmap_sounding_command_number_of_frequency_bands);
+ }
+ if (srlf == 1) {
+ XBIT_HF(1, hf_ulmap_sounding_command_relevance);
+ } else {
+ XBIT_HF(1, hf_ulmap_reserved_uint);
+ }
+ if (sept == 0) {
+ XBIT_HF(5, hf_ulmap_sounding_command_cyclic_time_shift_index);
+ } else {
+ XBIT_HF(6, hf_ulmap_sounding_command_decimation_offset);
+ if (iafb == 1) {
+ XBIT_HF(1, hf_ulmap_sounding_command_use_same_symbol_for_additional_feedback);
+ XBIT_HF(2, hf_ulmap_reserved_uint);
+ } else {
+ XBIT_HF(3, hf_ulmap_reserved_uint);
+ }
+ }
+ XBIT_HF(3, hf_ulmap_sounding_command_periodicity);
+ }
+ }
+ } else {
+ XBIT_HF(3, hf_ulmap_sounding_command_permutation);
+ XBIT_HF(6, hf_ulmap_sounding_command_dl_permbase);
+ XBIT_HF_VALUE(nssym, 3, hf_ulmap_sounding_command_num_sounding_symbols);
+ for (i = 0; i < nssym; i++) {
+ XBIT_HF_VALUE(ncid, 7, hf_ulmap_sounding_command_number_of_cids);
+ XBIT_HF(1, hf_ulmap_reserved_uint);
+ for (j = 0; j < ncid; j++) {
+ XBIT_HF(12, hf_ulmap_sounding_command_shortened_basic_cid);
+ if (srlf) {
+ XBIT_HF(1, hf_ulmap_sounding_command_relevance);
+ XBIT_HF(3, hf_ulmap_reserved_uint);
+ }
+ XBIT_HF(7, hf_ulmap_sounding_command_subchannel_offset);
+ XBIT_HF(1, hf_ulmap_sounding_command_power_boost);
+ XBIT_HF(3, hf_ulmap_sounding_command_number_of_subchannels);
+ XBIT_HF(3, hf_ulmap_sounding_command_periodicity);
+ XBIT_HF(2, hf_ulmap_sounding_command_power_assignment_method);
+ }
+ }
+ }
+ pad = BIT_PADDING(bit,8);
+ if (pad) {
+ proto_tree_add_bytes_format_value(tree, hf_ulmap_padding, tvb, BITHI(bit, pad), NULL, "%d bits", pad);
+ bit += pad;
+ }
+ return BIT_TO_NIB(bit);
+}
+
+static gint MIMO_UL_Enhanced_IE(proto_tree *uiuc_tree, packet_info* pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended-2 IE = 6 */
+ /* 8.4.5.4.20 [2] MIMO_UL_Enhanced_IE (not implemented) */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint nib;
+ gint data;
+ proto_item *tree;
+
+ nib = offset;
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302f, NULL, "MIMO_UL_Enhanced_IE");
+
+ VNIB(data, 1, hf_ulmap_ie_diuc_ext2);
+ VNIB(data, 2, hf_ulmap_ie_length);
+ proto_tree_add_expert(tree, pinfo, &ei_ulmap_not_implemented, tvb, NIBHI(nib,length-3));
+ return nib;
+}
+
+static gint HARQ_ULMAP_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended-2 IE = 7 */
+ /* 8.4.5.4.24 HARQ_ULMAP_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ proto_item *tree;
+ gint bitlength;
+ gint lastbit;
+ gint pad, mode, alsi, nsub;
+ gint i;
+
+ bit = NIB_TO_BIT(offset);
+ bitlength = NIB_TO_BIT(length);
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302j, NULL, "HARQ_ULMAP_IE");
+
+ XBIT_HF(4, hf_ulmap_harq_ulmap_extended_2_uiuc);
+ XBIT_HF(8, hf_ulmap_harq_ulmap_length);
+
+ XBIT_HF_VALUE(RCID_Type, 2, hf_ulmap_harq_ulmap_rcid_type);
+ XBIT_HF(2, hf_ulmap_reserved_uint);
+ lastbit = bit + bitlength -16 - 4;
+ while (bit < lastbit) {
+ XBIT_HF_VALUE(mode, 3, hf_ulmap_harq_ulmap_mode);
+ XBIT_HF_VALUE(alsi, 1, hf_ulmap_harq_ulmap_allocation_start_indication);
+ if (alsi == 1) {
+ XBIT_HF(8, hf_ulmap_harq_ulmap_ofdma_symbol_offset);
+ XBIT_HF(7, hf_ulmap_harq_ulmap_subchannel_offset);
+ XBIT_HF(1, hf_ulmap_reserved_uint);
+ }
+ XBIT_HF_VALUE(nsub, 4, hf_ulmap_harq_ulmap_n_sub_burst);
+ nsub++;
+ for (i = 0; i < nsub; i++) {
+ if (mode == 0) {
+ bit += UL_HARQ_Chase_Sub_Burst_IE(tree, bit, bitlength, tvb);
+ } else if (mode == 1) {
+ bit += UL_HARQ_IR_CTC_Sub_Burst_IE(tree, bit, bitlength, tvb);
+ } else if (mode == 2) {
+ bit += UL_HARQ_IR_CC_Sub_Burst_IE(tree, bit, bitlength, tvb);
+ } else if (mode == 3) {
+ bit += MIMO_UL_Chase_HARQ_Sub_Burst_IE(tree, bit, bitlength, tvb);
+ } else if (mode == 4) {
+ bit += MIMO_UL_IR_HARQ__Sub_Burst_IE(tree, bit, bitlength, tvb);
+ } else if (mode == 5) {
+ bit += MIMO_UL_IR_HARQ_for_CC_Sub_Burst_UIE(tree, bit, bitlength, tvb);
+ } else if (mode == 6) {
+ bit += MIMO_UL_STC_HARQ_Sub_Burst_IE(tree, bit, bitlength, tvb);
+ }
+ }
+ }
+
+ pad = NIB_TO_BIT(offset) + bitlength - bit;
+ if (pad) {
+ proto_tree_add_bytes_format_value(tree, hf_ulmap_padding, tvb, BITHI(bit, pad), NULL, "%d bits", pad);
+ bit += pad;
+ }
+ return BIT_TO_NIB(bit);
+}
+
+static gint HARQ_ACKCH_Region_Allocation_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended-2 IE = 8 */
+ /* 8.4.5.4.25 [2] HARQ_ACKCH_Region_Allocation_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ proto_item *tree;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302t, NULL, "HARQ_ACKCH_Region_IE");
+
+ XBIT_HF(4, hf_ulmap_harq_ackch_region_alloc_extended_2_uiuc);
+ XBIT_HF(8, hf_ulmap_harq_ackch_region_alloc_length);
+
+ XBIT_HF(8, hf_ulmap_harq_ackch_region_alloc_ofdma_symbol_offset);
+ XBIT_HF(7, hf_ulmap_harq_ackch_region_alloc_subchannel_offset);
+ XBIT_HF(5, hf_ulmap_harq_ackch_region_alloc_num_ofdma_symbols);
+ XBIT_HF(4, hf_ulmap_harq_ackch_region_alloc_num_subchannels);
+ return BIT_TO_NIB(bit);
+}
+
+static gint AAS_SDMA_UL_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended-2 IE = 0xE */
+ /* 8.4.5.4.27 [2] AAS_SDMA_UL_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ proto_item *tree;
+ gint nreg, pad, user, encm, ppmd, padj;
+ gint aasp = 0; /* TODO AAS UL preamble used */
+ gint ii, jj;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302u, NULL, "AAS_SDMA_UL_IE");
+
+ XBIT_HF(4, hf_ulmap_aas_sdma_extended_2_uiuc);
+ XBIT_HF(8, hf_ulmap_aas_sdma_length);
+
+ XBIT_HF_VALUE(RCID_Type, 2, hf_ulmap_aas_sdma_rcid_type);
+ XBIT_HF_VALUE(nreg, 4, hf_ulmap_aas_sdma_num_burst_region);
+ XBIT_HF(2, hf_ulmap_reserved_uint);
+ for (ii = 0; ii < nreg; ii++) {
+ XBIT_HF(12, hf_ulmap_aas_sdma_slot_offset);
+ XBIT_HF(10, hf_ulmap_aas_sdma_slot_duration);
+ XBIT_HF_VALUE(user, 3, hf_ulmap_aas_sdma_number_of_users);
+ XBIT_HF(3, hf_ulmap_reserved_uint);
+ for (jj = 0; jj < user; jj++) {
+ bit += RCID_IE(tree, bit, length, tvb, RCID_Type);
+ XBIT_HF_VALUE(encm, 2, hf_ulmap_aas_sdma_encoding_mode);
+ XBIT_HF_VALUE(padj, 1, hf_ulmap_aas_sdma_power_adjust);
+ XBIT_HF_VALUE(ppmd, 1, hf_ulmap_aas_sdma_pilot_pattern_modifier);
+ if (aasp) {
+ XBIT_HF(4, hf_ulmap_aas_sdma_preamble_modifier_index);
+ }
+ if (ppmd) {
+ XBIT_HF(2, hf_ulmap_aas_sdma_pilot_pattern);
+ XBIT_HF(2, hf_ulmap_reserved_uint);
+ }
+ if (encm == 0) {
+ XBIT_HF(4, hf_ulmap_aas_sdma_diuc);
+ XBIT_HF(2, hf_ulmap_aas_sdma_repetition_coding_indication);
+ XBIT_HF(2, hf_ulmap_reserved_uint);
+ }
+ if (encm == 1) {
+ XBIT_HF(4, hf_ulmap_aas_sdma_diuc);
+ XBIT_HF(2, hf_ulmap_aas_sdma_repetition_coding_indication);
+ XBIT_HF(4, hf_ulmap_aas_sdma_acid);
+ XBIT_HF(1, hf_ulmap_aas_sdma_ai_sn);
+ XBIT_HF(1, hf_ulmap_reserved_uint);
+ }
+ if (encm == 2) {
+ XBIT_HF(4, hf_ulmap_aas_sdma_nep);
+ XBIT_HF(4, hf_ulmap_aas_sdma_nsch);
+ XBIT_HF(2, hf_ulmap_aas_sdma_spid);
+ XBIT_HF(4, hf_ulmap_aas_sdma_acid);
+ XBIT_HF(1, hf_ulmap_aas_sdma_ai_sn);
+ XBIT_HF(1, hf_ulmap_reserved_uint);
+ }
+ if (encm == 3) {
+ XBIT_HF(4, hf_ulmap_aas_sdma_diuc);
+ XBIT_HF(2, hf_ulmap_aas_sdma_repetition_coding_indication);
+ XBIT_HF(2, hf_ulmap_aas_sdma_spid);
+ XBIT_HF(4, hf_ulmap_aas_sdma_acid);
+ XBIT_HF(1, hf_ulmap_aas_sdma_ai_sn);
+ XBIT_HF(3, hf_ulmap_reserved_uint);
+ }
+ if (padj) {
+ XBIT_HF(8, hf_ulmap_aas_sdma_power_adjustment);
+
+ }
+ }
+ }
+
+ pad = BIT_PADDING(bit,8);
+ if (pad) {
+ proto_tree_add_bytes_format_value(tree, hf_ulmap_padding, tvb, BITHI(bit, pad), NULL, "%d bits", pad);
+ bit += pad;
+ }
+ return BIT_TO_NIB(bit);
+}
+
+static gint Feedback_Polling_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* UL-MAP Extended-2 IE = 0xF */
+ /* 8.4.5.4.28 [2] Feedback_Polling_IE */
+ /* offset of TLV in nibbles, length of TLV in nibbles */
+ gint bit;
+ proto_item *tree;
+ gint nalloc, dula, pad, adur;
+ gint i;
+
+ bit = NIB_TO_BIT(offset);
+
+ tree = proto_tree_add_subtree(uiuc_tree, tvb, NIBHI(offset, length), ett_302v, NULL, "Feedback_Polling_IE");
+
+ XBIT_HF(4, hf_ulmap_feedback_polling_extended_2_uiuc);
+ XBIT_HF(8, hf_ulmap_feedback_polling_length);
+
+ XBIT_HF_VALUE(nalloc, 4, hf_ulmap_feedback_polling_num_allocation);
+ XBIT_HF_VALUE(dula, 1, hf_ulmap_feedback_polling_dedicated_ul_allocation_included);
+ XBIT_HF(3, hf_ulmap_reserved_uint);
+ for (i = 0; i < nalloc; i++) {
+ XBIT_HF(16, hf_ulmap_feedback_polling_basic_cid);
+ XBIT_HF_VALUE(adur, 3, hf_ulmap_feedback_polling_allocation_duration);
+ if (adur != 0) {
+ XBIT_HF(4, hf_ulmap_feedback_polling_type);
+ XBIT_HF(3, hf_ulmap_feedback_polling_frame_offset);
+ XBIT_HF(2, hf_ulmap_feedback_polling_period);
+ if (dula == 1) {
+ XBIT_HF(4, hf_ulmap_feedback_polling_uiuc);
+ XBIT_HF(8, hf_ulmap_feedback_polling_ofdma_symbol_offset);
+ XBIT_HF(7, hf_ulmap_feedback_polling_subchannel_offset);
+ XBIT_HF(3, hf_ulmap_feedback_polling_duration);
+ XBIT_HF(2, hf_ulmap_feedback_polling_repetition_coding_indication);
+ }
+ }
+ }
+ pad = BIT_PADDING(bit,8);
+ if (pad) {
+ proto_tree_add_bytes_format_value(tree, hf_ulmap_padding, tvb, BITHI(bit, pad), NULL, "%d bits", pad);
+ bit += pad;
+ }
+ return BIT_TO_NIB(bit);
+}
+
+
+/********************************************************************
+ * UL-MAP Miscellany
+ *******************************************************************/
+
+gint dissect_ulmap_ie( proto_tree *ie_tree, packet_info* pinfo, gint offset, gint length _U_, tvbuff_t *tvb)
+{
+ /* decode a single UL-MAP IE and return the
+ * length of the IE in nibbles
+ * offset = start of IE (nibbles)
+ * length = total length of tvb (nibbles) */
+ proto_item *ti;
+ proto_tree *tree;
+ gint nibble;
+ gint uiuc, ext_uiuc, ext2_uiuc, len, aas_or_amc;
+ guint cid;
+ guint data;
+ guint32 data32;
+
+ nibble = offset;
+
+ /* 8.4.5.4 UL-MAP IE format - table 287 */
+ cid = TVB_NIB_WORD(nibble, tvb);
+ uiuc = TVB_NIB_NIBBLE(nibble + 4, tvb);
+
+ if (uiuc == 0)
+ {
+ /* 8.4.5.4.9 FAST-FEEDBACK channel */
+ tree = proto_tree_add_subtree(ie_tree, tvb, NIBHI(nibble, 5+8), ett_ulmap_ffb, NULL, "FAST FEEDBACK Allocation IE");
+
+ proto_tree_add_uint(tree, hf_ulmap_ie_cid, tvb, NIBHI(nibble, 4), cid);
+ nibble += 4;
+ proto_tree_add_uint(tree, hf_ulmap_ie_uiuc, tvb, NIBHI(nibble, 1), uiuc);
+ nibble += 1;
+
+ data = TVB_NIB_LONG(nibble, tvb);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc0_symofs, tvb, NIBHI(nibble, 8), data);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc0_subofs, tvb, NIBHI(nibble, 8), data);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc0_numsym, tvb, NIBHI(nibble, 8), data);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc0_numsub, tvb, NIBHI(nibble, 8), data);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc0_rsv, tvb, NIBHI(nibble, 8), data);
+ nibble += 8;
+ }
+ else if (uiuc == 11)
+ {
+ /* 8.4.5.4.4.2 [2] extended-2 UIUC IE table 290b */
+ ext2_uiuc = TVB_NIB_NIBBLE(5+nibble, tvb);
+ len = TVB_NIB_BYTE(5+nibble+1, tvb);
+
+ tree = proto_tree_add_subtree_format(ie_tree, tvb, NIBHI(nibble, 5+3+len*2), ett_290b, NULL, "UIUC: %d (Extended-2 IE)", uiuc);
+
+ proto_tree_add_uint(tree, hf_ulmap_ie_cid, tvb, NIBHI(nibble, 4), cid);
+ nibble += 4;
+ proto_tree_add_uint(tree, hf_ulmap_ie_uiuc, tvb, NIBHI(nibble, 1), uiuc);
+ nibble += 1;
+
+#if 0
+ proto_tree_add_uint(tree, hf_ulmap_uiuc11_ext, tvb, NIBHI(nibble, 1), ext2_uiuc);
+ nibble += 1;
+ proto_tree_add_uint(tree, hf_ulmap_uiuc11_len, tvb, NIBHI(nibble, 2), len);
+ nibble += 2;
+#endif
+
+ len = 3 + BYTE_TO_NIB(len); /* length in nibbles */
+
+ /* data table 290c 8.4.5.4.4.2 */
+ switch (ext2_uiuc) {
+ case 0x00:
+ /* 8.4.5.4.16 CQICH_Enhanced_Allocation_IE */
+ nibble = CQICH_Enhanced_Allocation_IE(tree, nibble, len, tvb);
+ break;
+ case 0x01:
+ /* 8.4.5.4.18 HO_Anchor_Active_UL_MAP_IE */
+ nibble = HO_Anchor_Active_UL_MAP_IE(tree, pinfo, nibble, len, tvb);
+ break;
+ case 0x02:
+ /* 8.4.5.4.19 HO_Active_Anchor_UL_MAP_IE */
+ nibble = HO_Active_Anchor_UL_MAP_IE(tree, pinfo, nibble, len, tvb);
+ break;
+ case 0x03:
+ /* 8.4.5.4.23 Anchor_BS_switch_IE */
+ nibble = Anchor_BS_switch_IE(tree, nibble, len, tvb);
+ break;
+ case 0x04:
+ /* 8.4.5.4.26 UL_sounding_command_IE */
+ nibble = UL_sounding_command_IE(tree, nibble, len, tvb);
+ break;
+ case 0x06:
+ /* 8.4.5.4.20 MIMO_UL_Enhanced_IE */
+ nibble = MIMO_UL_Enhanced_IE(tree, pinfo, nibble, len, tvb);
+ break;
+ case 0x07:
+ /* 8.4.5.4.24 HARQ_ULMAP_IE */
+ nibble = HARQ_ULMAP_IE(tree, nibble, len, tvb);
+ break;
+ case 0x08:
+ /* 8.4.5.4.25 HARQ_ACKCH_Region_Allocation_IE */
+ nibble = HARQ_ACKCH_Region_Allocation_IE(tree, nibble, len, tvb);
+ break;
+ case 0x0e:
+ /* 8.4.5.4.27 AAS_SDMA_UL_IE */
+ nibble = AAS_SDMA_UL_IE(tree, nibble, len, tvb);
+ break;
+ case 0x0f:
+ /* 8.4.5.4.28 Feedback_Polling_IE */
+ nibble = Feedback_Polling_IE(tree, nibble, len, tvb);
+ break;
+
+ default:
+ proto_tree_add_bytes_format(tree, hf_ulmap_ie_reserved_extended2_duic, tvb, NIBHI(nibble, len), NULL, "(reserved Extended-2 UIUC: %d)", ext2_uiuc);
+ nibble += len;
+ break;
+
+ }
+ }
+ else if (uiuc == 12)
+ {
+ /* 8.4.5.4 [2] CDMA bandwidth request, CDMA ranging */
+ tree = proto_tree_add_subtree(ie_tree, tvb, NIBHI(nibble, 5+8), ett_287_1, NULL, "CDMA Bandwidth/Ranging Request IE");
+
+ proto_tree_add_uint(tree, hf_ulmap_ie_cid, tvb, NIBHI(nibble, 4), cid);
+ nibble += 4;
+ proto_tree_add_uint(tree, hf_ulmap_ie_uiuc, tvb, NIBHI(nibble, 1), uiuc);
+ nibble += 1;
+
+ data32 = TVB_NIB_LONG(nibble, tvb);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc12_symofs, tvb, NIBHI(nibble,8), data32);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc12_subofs, tvb, NIBHI(nibble,8), data32);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc12_numsym, tvb, NIBHI(nibble,8), data32);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc12_numsub, tvb, NIBHI(nibble,8), data32);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc12_method, tvb, NIBHI(nibble,8), data32);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc12_dri, tvb, NIBHI(nibble,8), data32);
+ nibble += 8;
+ }
+ else if (uiuc == 13)
+ {
+ /* 8.4.5.4.2 [2] PAPR reduction allocation, safety zone - table 289 */
+ tree = proto_tree_add_subtree(ie_tree, tvb, NIBHI(nibble,5+8), ett_289, NULL, "PAPR/Safety/Sounding Zone IE");
+
+
+ proto_tree_add_uint(tree, hf_ulmap_ie_cid, tvb, NIBHI(nibble, 4), cid);
+ nibble += 4;
+ proto_tree_add_uint(tree, hf_ulmap_ie_uiuc, tvb, NIBHI(nibble, 1), uiuc);
+ nibble += 1;
+
+ data = TVB_NIB_LONG(nibble, tvb);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc13_symofs, tvb, NIBHI(nibble,8), data);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc13_subofs, tvb, NIBHI(nibble,8), data);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc13_numsym, tvb, NIBHI(nibble,8), data);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc13_numsub, tvb, NIBHI(nibble,8), data);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc13_papr, tvb, NIBHI(nibble,8), data);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc13_zone, tvb, NIBHI(nibble,8), data);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc13_rsv, tvb, NIBHI(nibble,8), data);
+ nibble += 8;
+ }
+ else if (uiuc == 14)
+ {
+ /* 8.4.5.4.3 [2] CDMA allocation IE */
+ tree = proto_tree_add_subtree(ie_tree, tvb, NIBHI(nibble,5+10), ett_290, &ti, "CDMA allocation IE");
+
+ proto_tree_add_uint(tree, hf_ulmap_ie_cid, tvb, NIBHI(nibble, 4), cid);
+ nibble += 4;
+ proto_tree_add_uint(tree, hf_ulmap_ie_uiuc, tvb, NIBHI(nibble, 1), uiuc);
+ nibble += 1;
+
+ data = TVB_NIB_WORD(nibble, tvb);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc14_dur, tvb, NIBHI(nibble,2), data);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc14_uiuc, tvb, NIBHI(nibble+1,2), data);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc14_rep, tvb, NIBHI(nibble+2,1), data);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc14_idx, tvb, NIBHI(nibble+3,1), data);
+ nibble += 4;
+
+ data = TVB_NIB_BYTE(nibble, tvb);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc14_code, tvb, NIBHI(nibble,2), data);
+ proto_item_append_text(ti, " (0x%02x)", data);
+ nibble += 2;
+
+ data = TVB_NIB_BYTE(nibble, tvb);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc14_sym, tvb, NIBHI(nibble,2), data);
+ proto_item_append_text(ti, " (0x%02x)", data);
+ nibble += 2;
+
+ data = TVB_NIB_BYTE(nibble, tvb);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc14_sub, tvb, NIBHI(nibble,2), data);
+ proto_item_append_text(ti, " (0x%02x)", data >> 1);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc14_bwr, tvb, NIBHI(nibble+1,1), data);
+ nibble += 2;
+ }
+ else if (uiuc == 15)
+ {
+ /* 8.4.5.4.4 [1] Extended UIUC dependent IE table 291 */
+ ext_uiuc = TVB_NIB_NIBBLE(5+nibble, tvb);
+ len = TVB_NIB_NIBBLE(5+nibble+1, tvb);
+
+ tree = proto_tree_add_subtree_format(ie_tree, tvb, NIBHI(nibble, 5+2+len*2), ett_291, NULL, "UIUC: %d (Extended IE)", uiuc);
+
+ proto_tree_add_uint(tree, hf_ulmap_ie_cid, tvb, NIBHI(nibble,4), cid);
+ nibble += 4;
+ proto_tree_add_uint(tree, hf_ulmap_ie_uiuc, tvb, NIBHI(nibble,1), uiuc);
+ nibble += 1;
+
+#if 0
+ ti = proto_tree_add_uint(tree, hf_ulmap_uiuc11_ext, tvb, NIBHI(nibble,1), ext_uiuc);
+ nibble += 1;
+ proto_tree_add_uint(tree, hf_ulmap_uiuc11_len, tvb, NIBHI(nibble,1), len);
+ nibble += 1;
+#endif
+
+ len = 2 + BYTE_TO_NIB(len); /* length in nibbles */
+
+ /* data table 290a 8.4.5.4.4.1 */
+ switch (ext_uiuc) {
+ case 0x00:
+ /* 8.4.5.4.5 Power_Control_IE */
+ nibble = Power_Control_IE(tree, nibble, len, tvb);
+ break;
+ case 0x01:
+ /* 8.4.5.4.8 Mini-Subchannel_allocation_IE*/
+ nibble = Mini_Subchannel_allocation_IE(tree, nibble, len, tvb);
+ break;
+ case 0x02:
+ /* 8.4.5.4.6 AAS_UL_IE*/
+ nibble = AAS_UL_IE(tree, nibble, len, tvb);
+ break;
+ case 0x03:
+ /* 8.4.5.4.12 CQICH_Alloc_IE */
+ nibble = CQICH_Alloc_IE(tree, nibble, len, tvb);
+ break;
+ case 0x04:
+ /* 8.4.5.4.7 UL_Zone_IE */
+ nibble = UL_Zone_IE(tree, nibble, len, tvb);
+ break;
+ case 0x05:
+ /* 8.4.5.4.14 PHYMOD_UL_IE */
+ nibble = PHYMOD_UL_IE(tree, nibble, len, tvb);
+ break;
+ case 0x06:
+ /* 8.4.5.4.11 MIMO_UL_IE */
+ nibble = MIMO_UL_IE(tree, pinfo, nibble, len, tvb);
+ break;
+ case 0x07:
+ /* 8.4.5.4.22 ULMAP_Fast_Tracking_IE */
+ nibble = ULMAP_Fast_Tracking_IE(tree, nibble, len, tvb);
+ break;
+ case 0x08:
+ /* 8.4.5.4.17 UL_PUSC_Burst_Allocation_in_other_segment_IE */
+ nibble = UL_PUSC_Burst_Allocation_in_other_segment_IE(tree, nibble, len, tvb);
+ break;
+ case 0x09:
+ /* 8.4.5.4.21 Fast_Ranging_IE */
+ nibble = Fast_Ranging_IE(tree, nibble, len, tvb);
+ break;
+ case 0x0a:
+ /* 8.4.5.4.15 UL_Allocation_Start_IE */
+ nibble = UL_Allocation_Start_IE(tree, nibble, len, tvb);
+ break;
+ default:
+ proto_tree_add_bytes_format_value(tree, hf_ulmap_ie_reserved_extended_duic, tvb, NIBHI(nibble,len), NULL, "(reserved Extended UIUC: %d)", ext_uiuc);
+ nibble += len;
+ break;
+ }
+ }
+ else
+ {
+ /* 8.4.5.4 [2] regular IE 1-10, data grant burst type */
+ aas_or_amc = 0; /* TODO */
+ len = 3;
+
+ if (aas_or_amc) len += 3;
+
+ tree = proto_tree_add_subtree(ie_tree, tvb, NIBHI(nibble, 5+len), ett_287_2, NULL, "Data Grant Burst Profile");
+
+ proto_tree_add_uint(tree, hf_ulmap_ie_cid, tvb, NIBHI(nibble, 4), cid);
+ nibble += 4;
+ proto_tree_add_uint(tree, hf_ulmap_ie_uiuc, tvb, NIBHI(nibble, 1), uiuc);
+ nibble += 1;
+
+ data = TVB_NIB_WORD(nibble, tvb);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc10_dur, tvb, NIBHI(nibble,3), data);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc10_rep, tvb, NIBHI(nibble+2,1), data);
+ nibble += 3;
+
+ if (aas_or_amc) {
+ data = TVB_NIB_BITS12(nibble, tvb);
+ proto_tree_add_uint(tree, hf_ulmap_uiuc10_slot_offset, tvb, NIBHI(nibble,3), data);
+ nibble += 3;
+ }
+ }
+
+ /* length in nibbles */
+ return (nibble - offset);
+}
+
+static int dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+{
+ /* 6.3.2.3.4 [2] UL-MAP table 18 */
+ guint offset = 0;
+ guint length;
+ guint nib, pad;
+ proto_item *ti = NULL;
+ proto_tree *ulmap_tree = NULL;
+ proto_tree *ie_tree = NULL;
+ guint tvb_len;
+
+ tvb_len = tvb_reported_length(tvb);
+
+ /* display MAC UL-MAP */
+ ti = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_ulmap_decoder, tvb, offset, -1, "UL-MAP");
+ ulmap_tree = proto_item_add_subtree(ti, ett_ulmap);
+
+ 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, ENC_BIG_ENDIAN);
+ offset++;
+ 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, ENC_BIG_ENDIAN);
+ offset++;
+
+ /* UL-MAP IEs */
+ length = tvb_len - offset; /* remaining length in bytes */
+ ie_tree = proto_tree_add_subtree_format(ulmap_tree, tvb, offset, length, ett_ulmap_ie, NULL, "UL-MAP IEs (%u bytes)", length);
+
+ /* length = BYTE_TO_NIB(length); */ /* convert length to nibbles */
+ nib = BYTE_TO_NIB(offset);
+ while (nib < ((tvb_len*2)-1)) {
+ nib += dissect_ulmap_ie(ie_tree, pinfo, nib, tvb_len*2, tvb);
+ }
+ pad = NIB_PADDING(nib);
+ if (pad) {
+ proto_tree_add_bytes_format(ulmap_tree, hf_ulmap_padding, tvb, NIBHI(nib,1), NULL, "Padding nibble");
+ nib++;
+ }
+ return tvb_captured_length(tvb);
+}
+
+/*gint wimax_decode_ulmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)*/
+gint wimax_decode_ulmapc(proto_tree *base_tree, packet_info* pinfo, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* 8.4.5.6.2 [2] Compressed UL-MAP */
+ /* returns length in nibbles */
+ gint nib;
+ guint data;
+ proto_item *ti = NULL;
+ proto_tree *tree = NULL;
+ proto_tree *ie_tree = NULL;
+
+ nib = offset;
+
+ /* display MAC 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 */
+ data = TVB_NIB_BYTE(nib, tvb);
+ proto_tree_add_uint(tree, hf_ulmap_ucd_count, tvb, NIBHI(nib,2), data);
+ nib += 2;
+ data = TVB_NIB_LONG(nib, tvb);
+ proto_tree_add_uint(tree, hf_ulmap_alloc_start_time, tvb, NIBHI(nib,8), data);
+ nib += 8;
+ data = TVB_NIB_BYTE(nib, tvb);
+ proto_tree_add_uint(tree, hf_ulmap_ofdma_sym, tvb, NIBHI(nib,2), data); /* added 2005 */
+ nib += 2;
+
+ ie_tree = proto_tree_add_subtree_format(tree, tvb, NIBHI(nib,length-nib), ett_306_ul, NULL, "UL-MAP IEs (%u bytes)", NIB_ADDR(length-nib));
+ while (nib < length-1) {
+ nib += dissect_ulmap_ie(ie_tree, pinfo, nib, length-nib, tvb);
+ }
+
+ /* padding */
+ if (nib & 1) {
+ proto_tree_add_bytes_format(tree, hf_ulmap_padding, tvb, NIBHI(nib,1), NULL, "Padding nibble");
+ nib++;
+ }
+
+
+ return length;
+}
+
+
+gint wimax_decode_ulmap_reduced_aas(proto_tree *base_tree, gint offset, gint length, tvbuff_t *tvb)
+{
+ /* 8.4.5.8.2 Reduced AAS private UL-MAP */
+ /* offset and length are in bits since this is called from within
+ * the Reduced AAS private DL-MAP
+ * return length in bits */
+ gint bit;
+ guint data;
+ proto_tree *tree;
+ gint azci, azpi, umii, phmi, powi;
+
+ bit = offset;
+
+ tree = proto_tree_add_subtree(base_tree, tvb, BITHI(bit,length), ett_308b, NULL, "Reduced_AAS_Private_UL_MAP");
+
+ /* Decode and display the Reduced AAS private UL-MAP */
+ XBIT_HF_VALUE(azci, 1, hf_ulmap_reduced_aas_aas_zone_configuration_included);
+ XBIT_HF_VALUE(azpi, 1, hf_ulmap_reduced_aas_aas_zone_position_included);
+ XBIT_HF_VALUE(umii, 1, hf_ulmap_reduced_aas_ul_map_information_included);
+ XBIT_HF_VALUE(phmi, 1, hf_ulmap_reduced_aas_phy_modification_included);
+ XBIT_HF_VALUE(powi, 1, hf_ulmap_reduced_aas_power_control_included);
+ XBIT_HF(2, hf_ulmap_reduced_aas_include_feedback_header);
+ XBIT_HF(2, hf_ulmap_reduced_aas_encoding_mode);
+
+ if (azci) {
+ XBIT_HF(2, hf_ulmap_reduced_aas_permutation);
+ XBIT_HF(7, hf_ulmap_reduced_aas_ul_permbase);
+ XBIT_HF(2, hf_ulmap_reduced_aas_preamble_indication);
+ XBIT_HF(5, hf_ulmap_reduced_aas_padding);
+ }
+ if (azpi) {
+ XBIT_HF(8, hf_ulmap_reduced_aas_zone_symbol_offset);
+ XBIT_HF(8, hf_ulmap_reduced_aas_zone_length);
+ }
+ if (umii) {
+ XBIT_HF(8, hf_ulmap_reduced_aas_ucd_count);
+ data = TVB_BIT_BITS64(bit,tvb,32);
+ proto_tree_add_uint64(tree, hf_ulmap_reduced_aas_private_map_alloc_start_time, tvb, BITHI(bit,32), data);
+ bit += 32;
+ }
+ if (phmi) {
+ XBIT_HF(1, hf_ulmap_reduced_aas_preamble_select);
+ XBIT_HF(4, hf_ulmap_reduced_aas_preamble_shift_index);
+ XBIT_HF(1, hf_ulmap_reduced_aas_pilot_pattern_modifier);
+ data = TVB_BIT_BITS32(bit,tvb,22);
+ proto_tree_add_uint64(tree, hf_ulmap_reduced_aas_pilot_pattern_index, tvb, BITHI(bit,22), data);
+ bit += 22;
+ }
+ if (powi) {
+ XBIT_HF(8, hf_ulmap_reduced_aas_power_control);
+ }
+ XBIT_HF(3, hf_ulmap_reduced_aas_ul_frame_offset);
+ XBIT_HF(12, hf_ulmap_reduced_aas_slot_offset);
+ XBIT_HF(10, hf_ulmap_reduced_aas_slot_duration);
+ XBIT_HF(4, hf_ulmap_reduced_aas_uiuc_nep);
+ if (harq) {
+ XBIT_HF(4, hf_ulmap_reduced_aas_acid);
+ XBIT_HF(1, hf_ulmap_reduced_aas_ai_sn);
+ XBIT_HF(3, hf_ulmap_reserved_uint);
+ if (ir_type) {
+ XBIT_HF(4, hf_ulmap_reduced_aas_nsch);
+ XBIT_HF(2, hf_ulmap_reduced_aas_spid);
+ XBIT_HF(2, hf_ulmap_reserved_uint);
+ }
+ }
+ XBIT_HF(2, hf_ulmap_reduced_aas_repetition_coding_indication);
+
+ 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[] =
+ {
+#if 0
+ {
+ &hf_ulmap_fch_expected,
+ {
+ "FCH Expected", "wmx.ulmap.fch.expected",
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+#endif
+#if 0
+ {
+ &hf_ulmap_ie,
+ {
+ "UL-MAP IE", "wmx.ulmap.ie",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &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_ie_diuc_ext,
+ {
+ "Extended DIUC", "wmx.ulmap.ie.ext_diuc",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ulmap_ie_diuc_ext2,
+ {
+ "Extended-2 DIUC", "wmx.ulmap.ie.ext2_diuc",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ulmap_ie_length,
+ {
+ "Length", "wmx.ilmap.ie.length",
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ulmap_ie_reserved_extended2_duic,
+ {
+ "Reserved Extended-2 DIUC", "wmx.ulmap.ie.ext2_diuc_reserved",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ulmap_ie_reserved_extended_duic,
+ {
+ "Reserved Extended DIUC", "wmx.ulmap.ie.ext_diuc_reserved",
+ FT_BYTES, BASE_NONE, 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
+ }
+ },
+#if 0
+ {
+ &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
+ }
+ },
+#endif
+ {
+ &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.uiuc10.rep",
+ FT_UINT16, BASE_DEC, NULL, 0x0030, NULL, HFILL
+ }
+ },
+ {
+ &hf_ulmap_uiuc10_slot_offset,
+ {
+ "Slot offset", "wmx.ulmap.uiuc10.slot_offset",
+ FT_UINT32, BASE_DEC, NULL, 0x0, 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
+ }
+ },
+#if 0
+ {
+ &hf_ulmap_crc16,
+ {
+ "CRC-16", "wmx.ulmap.crc16",
+ FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL
+ }
+ },
+ {
+ &hf_ulmap_crc16_status,
+ {
+ "CRC-16 Status", "wmx.ulmap.crc16.status",
+ FT_UINT8, BASE_NONE, VALS(plugin_proto_checksum_vals), 0x0, NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_ulmap_padding,
+ {
+ "Padding", "wmx.ulmap.padding",
+ FT_BYTES, BASE_NONE, NULL, 0x0, 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
+ }
+ },
+#if 0
+ {
+ &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
+ }
+ },
+#endif
+ /* Generated via "one time" script to help create filterable fields */
+ { &hf_ulmap_dedicated_ul_control_length, { "Length", "wmx.ulmap.dedicated_ul_control.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_dedicated_ul_control_control_header, { "Control Header", "wmx.ulmap.dedicated_ul_control.control_header", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_dedicated_ul_control_num_sdma_layers, { "Num SDMA layers", "wmx.ulmap.dedicated_ul_control.num_sdma_layers", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_dedicated_ul_control_pilot_pattern, { "Pilot Pattern", "wmx.ulmap.dedicated_ul_control.pilot_pattern", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_dedicated_mimo_ul_control_matrix, { "Matrix", "wmx.ulmap.dedicated_mimo_ul_control.matrix", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_dedicated_mimo_ul_control_n_layer, { "N_layer", "wmx.ulmap.dedicated_mimo_ul_control.n_layer", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_chase_dedicated_ul_control_indicator, { "Dedicated UL Control Indicator", "wmx.ulmap.harq_chase.dedicated_ul_control_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_chase_uiuc, { "UIUC", "wmx.ulmap.harq_chase.uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_chase_repetition_coding_indication, { "Repetition Coding Indication", "wmx.ulmap.harq_chase.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_chase_duration, { "Duration", "wmx.ulmap.harq_chase.duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_chase_acid, { "ACID", "wmx.ulmap.harq_chase.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_chase_ai_sn, { "AI_SN", "wmx.ulmap.harq_chase.ai_sn", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_chase_ack_disable, { "ACK_disable", "wmx.ulmap.harq_chase.ack_disable", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reserved_uint, { "Reserved", "wmx.ulmap.reserved.uint", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ir_ctc_dedicated_ul_control_indicator, { "Dedicated UL Control Indicator", "wmx.ulmap.harq_ir_ctc.dedicated_ul_control_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ir_ctc_nep, { "N(EP)", "wmx.ulmap.harq_ir_ctc.nep", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ir_ctc_nsch, { "N(SCH)", "wmx.ulmap.harq_ir_ctc.nsch", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ir_ctc_spid, { "SPID", "wmx.ulmap.harq_ir_ctc.spid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ir_ctc_acin, { "ACIN", "wmx.ulmap.harq_ir_ctc.acin", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ir_ctc_ai_sn, { "AI_SN", "wmx.ulmap.harq_ir_ctc.ai_sn", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ir_ctc_ack_disable, { "ACK_disable", "wmx.ulmap.harq_ir_ctc.ack_disable", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ir_cc_dedicated_ul_control_indicator, { "Dedicated UL Control Indicator", "wmx.ulmap.harq_ir_cc.dedicated_ul_control_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ir_cc_uiuc, { "UIUC", "wmx.ulmap.harq_ir_cc.uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ir_cc_repetition_coding_indication, { "Repetition Coding Indication", "wmx.ulmap.harq_ir_cc.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ir_cc_duration, { "Duration", "wmx.ulmap.harq_ir_cc.duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ir_cc_spid, { "SPID", "wmx.ulmap.harq_ir_cc.spid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ir_cc_acid, { "ACID", "wmx.ulmap.harq_ir_cc.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ir_cc_ai_sn, { "AI_SN", "wmx.ulmap.harq_ir_cc.ai_sn", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ir_cc_ack_disable, { "ACK_disable", "wmx.ulmap.harq_ir_cc.ack_disable", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_chase_harq_mu_indicator, { "MU indicator", "wmx.ulmap.mimo_ul_chase_harq.mu_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_chase_harq_dedicated_mimo_ulcontrol_indicator, { "Dedicated MIMO ULControl Indicator", "wmx.ulmap.mimo_ul_chase_harq.dedicated_mimo_ulcontrol_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_chase_harq_ack_disable, { "ACK Disable", "wmx.ulmap.mimo_ul_chase_harq.ack_disable", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_chase_harq_matrix, { "Matrix", "wmx.ulmap.mimo_ul_chase_harq.matrix", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_chase_harq_duration, { "Duration", "wmx.ulmap.mimo_ul_chase_harq.duration", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_chase_harq_uiuc, { "UIUC", "wmx.ulmap.mimo_ul_chase_harq.uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_chase_harq_repetition_coding_indication, { "Repetition Coding Indication", "wmx.ulmap.mimo_ul_chase_harq.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_chase_harq_acid, { "ACID", "wmx.ulmap.mimo_ul_chase_harq.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_chase_harq_ai_sn, { "AI_SN", "wmx.ulmap.mimo_ul_chase_harq.ai_sn", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_mu_indicator, { "MU indicator", "wmx.ulmap.mimo_ul_ir_harq.mu_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_dedicated_mimo_ul_control_indicator, { "Dedicated MIMO UL Control Indicator", "wmx.ulmap.mimo_ul_ir_harq.dedicated_mimo_ul_control_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_ack_disable, { "ACK Disable", "wmx.ulmap.mimo_ul_ir_harq.ack_disable", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_matrix, { "Matrix", "wmx.ulmap.mimo_ul_ir_harq.matrix", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_nsch, { "N(SCH)", "wmx.ulmap.mimo_ul_ir_harq.nsch", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_nep, { "N(EP)", "wmx.ulmap.mimo_ul_ir_harq.nep", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_spid, { "SPID", "wmx.ulmap.mimo_ul_ir_harq.spid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_acid, { "ACID", "wmx.ulmap.mimo_ul_ir_harq.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_ai_sn, { "AI_SN", "wmx.ulmap.mimo_ul_ir_harq.ai_sn", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_cc_mu_indicator, { "MU indicator", "wmx.ulmap.mimo_ul_ir_harq_cc.mu_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_cc_dedicated_mimo_ul_control_indicator, { "Dedicated MIMO UL Control Indicator", "wmx.ulmap.mimo_ul_ir_harq_cc.dedicated_mimo_ul_control_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_cc_ack_disable, { "ACK Disable", "wmx.ulmap.mimo_ul_ir_harq_cc.ack_disable", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_cc_matrix, { "Matrix", "wmx.ulmap.mimo_ul_ir_harq_cc.matrix", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_cc_duration, { "Duration", "wmx.ulmap.mimo_ul_ir_harq_cc.duration", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_cc_uiuc, { "UIUC", "wmx.ulmap.mimo_ul_ir_harq_cc.uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_cc_repetition_coding_indication, { "Repetition Coding Indication", "wmx.ulmap.mimo_ul_ir_harq_cc.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_cc_acid, { "ACID", "wmx.ulmap.mimo_ul_ir_harq_cc.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_cc_ai_sn, { "AI_SN", "wmx.ulmap.mimo_ul_ir_harq_cc.ai_sn", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_ir_harq_cc_spid, { "SPID", "wmx.ulmap.mimo_ul_ir_harq_cc.spid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_stc_harq_tx_count, { "Tx count", "wmx.ulmap.mimo_ul_stc_harq.tx_count", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_stc_harq_duration, { "Duration", "wmx.ulmap.mimo_ul_stc_harq.duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_stc_harq_sub_burst_offset_indication, { "Sub-burst offset indication", "wmx.ulmap.mimo_ul_stc_harq.sub_burst_offset_indication", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_stc_harq_sub_burst_offset, { "Sub-burst offset", "wmx.ulmap.mimo_ul_stc_harq.sub_burst_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_stc_harq_ack_disable, { "ACK Disable", "wmx.ulmap.mimo_ul_stc_harq.ack_disable", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_stc_harq_uiuc, { "UIUC", "wmx.ulmap.mimo_ul_stc_harq.uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_stc_harq_repetition_coding_indication, { "Repetition Coding Indication", "wmx.ulmap.mimo_ul_stc_harq.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mimo_ul_stc_harq_acid, { "ACID", "wmx.ulmap.mimo_ul_stc_harq.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_power_control, { "Power Control", "wmx.ulmap.power_control", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_power_measurement_frame, { "Power measurement frame", "wmx.ulmap.power_measurement_frame", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mini_subcha_alloc_extended_2_uiuc, { "Extended-2 UIUC", "wmx.ulmap.mini_subcha_alloc.extended_2_uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mini_subcha_alloc_length, { "Length", "wmx.ulmap.mini_subcha_alloc.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mini_subcha_alloc_ctype, { "Ctype", "wmx.ulmap.mini_subcha_alloc.ctype", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mini_subcha_alloc_duration, { "Duration", "wmx.ulmap.mini_subcha_alloc.duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mini_subcha_alloc_cid, { "CID", "wmx.ulmap.mini_subcha_alloc.cid", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mini_subcha_alloc_uiuc, { "UIUC", "wmx.ulmap.mini_subcha_alloc.uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mini_subcha_alloc_repetition, { "Repetition", "wmx.ulmap.mini_subcha_alloc.repetition", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_mini_subcha_alloc_padding, { "Padding", "wmx.ulmap.mini_subcha_alloc.padding", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_ul_extended_uiuc, { "Extended UIUC", "wmx.ulmap.aas_ul.extended_uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_ul_length, { "Length", "wmx.ulmap.aas_ul.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_ul_permutation, { "Permutation", "wmx.ulmap.aas_ul.permutation", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_ul_ul_permbase, { "UL_PermBase", "wmx.ulmap.aas_ul.ul_permbase", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_ul_ofdma_symbol_offset, { "OFDMA symbol offset", "wmx.ulmap.aas_ul.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_ul_aas_zone_length, { "AAS zone length", "wmx.ulmap.aas_ul.aas_zone_length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_ul_uplink_preamble_config, { "Uplink preamble config", "wmx.ulmap.aas_ul.uplink_preamble_config", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_ul_preamble_type, { "Preamble type", "wmx.ulmap.aas_ul.preamble_type", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_extended_uiuc, { "Extended UIUC", "wmx.ulmap.cqich_alloc.extended_uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_length, { "Length", "wmx.ulmap.cqich_alloc.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_cqich_id, { "CQICH_ID", "wmx.ulmap.cqich_alloc.cqich_id", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_allocation_offset, { "Allocation offset", "wmx.ulmap.cqich_alloc.allocation_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_period, { "Period (p)", "wmx.ulmap.cqich_alloc.period", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_frame_offset, { "Frame offset", "wmx.ulmap.cqich_alloc.frame_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_duration, { "Duration (d)", "wmx.ulmap.cqich_alloc.duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_report_configuration_included, { "Report configuration included", "wmx.ulmap.cqich_alloc.report_configuration_included", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_feedback_type, { "Feedback Type", "wmx.ulmap.cqich_alloc.feedback_type", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_report_type, { "Report type", "wmx.ulmap.cqich_alloc.report_type", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_cinr_preamble_report_type, { "CINR preamble report type", "wmx.ulmap.cqich_alloc.cinr_preamble_report_type", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_zone_permutation, { "Zone permutation", "wmx.ulmap.cqich_alloc.zone_permutation", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_zone_type, { "Zone type", "wmx.ulmap.cqich_alloc.zone_type", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_zone_prbs_id, { "Zone PRBS_ID", "wmx.ulmap.cqich_alloc.zone_prbs_id", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_major_group_indication, { "Major group indication", "wmx.ulmap.cqich_alloc.major_group_indication", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_pusc_major_group_bitmap, { "PUSC Major group bitmap", "wmx.ulmap.cqich_alloc.pusc_major_group_bitmap", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_cinr_zone_measurement_type, { "CINR zone measurement type", "wmx.ulmap.cqich_alloc.cinr_zone_measurement_type", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_averaging_parameter_included, { "Averaging parameter included", "wmx.ulmap.cqich_alloc.averaging_parameter_included", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_averaging_parameter, { "Averaging parameter", "wmx.ulmap.cqich_alloc.averaging_parameter", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_alloc_mimo_permutation_feedback_cycle, { "MIMO_permutation_feedback_cycle", "wmx.ulmap.cqich_alloc.mimo_permutation_feedback_cycle", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_zone_extended_uiuc, { "Extended UIUC", "wmx.ulmap.zone.extended_uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_zone_length, { "Length", "wmx.ulmap.zone.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_zone_ofdma_symbol_offset, { "OFDMA symbol offset", "wmx.ulmap.zone.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_zone_permutation, { "Permutation", "wmx.ulmap.zone.permutation", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_zone_ul_permbase, { "UL_PermBase", "wmx.ulmap.zone.ul_permbase", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_zone_amc_type, { "AMC type", "wmx.ulmap.zone.amc_type", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_zone_use_all_sc_indicator, { "Use All SC indicator", "wmx.ulmap.zone.use_all_sc_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_zone_disable_subchannel_rotation, { "Disable subchannel rotation", "wmx.ulmap.zone.disable_subchannel_rotation", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_phymod_ul_extended_uiuc, { "Extended UIUC", "wmx.ulmap.phymod_ul.extended_uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_phymod_ul_length, { "Length", "wmx.ulmap.phymod_ul.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_phymod_ul_preamble_modifier_type, { "Preamble Modifier Type", "wmx.ulmap.phymod_ul.preamble_modifier_type", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_phymod_ul_preamble_frequency_shift_index, { "Preamble frequency shift index", "wmx.ulmap.phymod_ul.preamble_frequency_shift_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_phymod_ul_preamble_time_shift_index, { "Preamble Time Shift index", "wmx.ulmap.phymod_ul.preamble_time_shift_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_phymod_ul_pilot_pattern_modifier, { "Pilot Pattern Modifier", "wmx.ulmap.phymod_ul.pilot_pattern_modifier", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_phymod_ul_pilot_pattern_index, { "Pilot Pattern Index", "wmx.ulmap.phymod_ul.pilot_pattern_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_fast_tracking_extended_uiuc, { "Extended UIUC", "wmx.ulmap.fast_tracking.extended_uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_fast_tracking_length, { "Length", "wmx.ulmap.fast_tracking.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_fast_tracking_map_index, { "Map Index", "wmx.ulmap.fast_tracking.map_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_fast_tracking_power_correction, { "Power correction", "wmx.ulmap.fast_tracking.power_correction", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_fast_tracking_frequency_correction, { "Frequency correction", "wmx.ulmap.fast_tracking.frequency_correction", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_fast_tracking_time_correction, { "Time correction", "wmx.ulmap.fast_tracking.time_correction", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_pusc_burst_allocation_extended_uiuc, { "Extended UIUC", "wmx.ulmap.pusc_burst_allocation.extended_uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_pusc_burst_allocation_length, { "Length", "wmx.ulmap.pusc_burst_allocation.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_pusc_burst_allocation_uiuc, { "UIUC", "wmx.ulmap.pusc_burst_allocation.uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_pusc_burst_allocation_segment, { "Segment", "wmx.ulmap.pusc_burst_allocation.segment", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_pusc_burst_allocation_ul_permbase, { "UL_PermBase", "wmx.ulmap.pusc_burst_allocation.ul_permbase", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_pusc_burst_allocation_ofdma_symbol_offset, { "OFDMA symbol offset", "wmx.ulmap.pusc_burst_allocation.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_pusc_burst_allocation_subchannel_offset, { "Subchannel offset", "wmx.ulmap.pusc_burst_allocation.subchannel_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_pusc_burst_allocation_duration, { "Duration", "wmx.ulmap.pusc_burst_allocation.duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_pusc_burst_allocation_repetition_coding_indication, { "Repetition coding indication", "wmx.ulmap.pusc_burst_allocation.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_fast_ranging_extended_uiuc, { "Extended UIUC", "wmx.ulmap.fast_ranging.extended_uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_fast_ranging_length, { "Length", "wmx.ulmap.fast_ranging.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_fast_ranging_ho_id_indicator, { "HO_ID indicator", "wmx.ulmap.fast_ranging.ho_id_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_fast_ranging_ho_id, { "HO_ID", "wmx.ulmap.fast_ranging.ho_id", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_fast_ranging_mac_address, { "MAC address", "wmx.ulmap.fast_ranging.mac_address", FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_fast_ranging_uiuc, { "UIUC", "wmx.ulmap.fast_ranging.uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_fast_ranging_duration, { "Duration", "wmx.ulmap.fast_ranging.duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_fast_ranging_repetition_coding_indication, { "Repetition coding indication", "wmx.ulmap.fast_ranging.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_allocation_start_extended_uiuc, { "Extended UIUC", "wmx.ulmap.allocation_start.extended_uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_allocation_start_length, { "Length", "wmx.ulmap.allocation_start.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_allocation_start_ofdma_symbol_offset, { "OFDMA symbol offset", "wmx.ulmap.allocation_start.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_allocation_start_subchannel_offset, { "Subchannel offset", "wmx.ulmap.allocation_start.subchannel_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_enhanced_alloc_extended_2_uiuc, { "Extended-2 UIUC", "wmx.ulmap.cqich_enhanced_alloc.extended_2_uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_enhanced_alloc_length, { "Length", "wmx.ulmap.cqich_enhanced_alloc.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_enhanced_alloc_cqich_id, { "CQICH_ID", "wmx.ulmap.cqich_enhanced_alloc.cqich_id", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_enhanced_alloc_period, { "Period (p)", "wmx.ulmap.cqich_enhanced_alloc.period", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_enhanced_alloc_frame_offset, { "Frame offset", "wmx.ulmap.cqich_enhanced_alloc.frame_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_enhanced_alloc_duration, { "Duration (d)", "wmx.ulmap.cqich_enhanced_alloc.duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_enhanced_alloc_cqich_num, { "CQICH_Num", "wmx.ulmap.cqich_enhanced_alloc.cqich_num", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_enhanced_alloc_feedback_type, { "Feedback Type", "wmx.ulmap.cqich_enhanced_alloc.feedback_type", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_enhanced_alloc_allocation_index, { "Allocation Index", "wmx.ulmap.cqich_enhanced_alloc.allocation_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_enhanced_alloc_cqich_type, { "CQICH Type", "wmx.ulmap.cqich_enhanced_alloc.cqich_type", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_enhanced_alloc_sttd_indication, { "STTD indication", "wmx.ulmap.cqich_enhanced_alloc.sttd_indication", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_enhanced_alloc_band_amc_precoding_mode, { "Band_AMC_Precoding_Mode", "wmx.ulmap.cqich_enhanced_alloc.band_amc_precoding_mode", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_cqich_enhanced_alloc_nr_precoders_feedback, { "Nr_Precoders_Feedback (=N)", "wmx.ulmap.cqich_enhanced_alloc.nr_precoders_feedback", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_anchor_bs_switch_extended_2_uiuc, { "Extended-2 UIUC", "wmx.ulmap.anchor_bs_switch.extended_2_uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_anchor_bs_switch_length, { "Length", "wmx.ulmap.anchor_bs_switch.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_anchor_bs_switch_n_anchor_bs_switch, { "N_Anchor_BS_switch", "wmx.ulmap.anchor_bs_switch.n_anchor_bs_switch", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_anchor_bs_switch_reduced_cid, { "Reduced CID", "wmx.ulmap.anchor_bs_switch.reduced_cid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_anchor_bs_switch_action_code, { "Action Code", "wmx.ulmap.anchor_bs_switch.action_code", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_anchor_bs_switch_action_time, { "Action Time (A)", "wmx.ulmap.anchor_bs_switch.action_time", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_anchor_bs_switch_temp_bs_id, { "TEMP_BS_ID", "wmx.ulmap.anchor_bs_switch.temp_bs_id", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_anchor_bs_switch_ak_change_indicator, { "AK Change Indicator", "wmx.ulmap.anchor_bs_switch.ak_change_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_anchor_bs_switch_cqich_allocation_indicator, { "CQICH Allocation Indicator", "wmx.ulmap.anchor_bs_switch.cqich_allocation_indicator", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_anchor_bs_switch_feedback_channel_offset, { "Feedback channel offset", "wmx.ulmap.anchor_bs_switch.feedback_channel_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_anchor_bs_switch_cqich_id, { "CQICH_ID", "wmx.ulmap.anchor_bs_switch.cqich_id", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_anchor_bs_switch_period, { "Period (=p)", "wmx.ulmap.anchor_bs_switch.period", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_anchor_bs_switch_frame_offset, { "Frame offset", "wmx.ulmap.anchor_bs_switch.frame_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_anchor_bs_switch_duration, { "Duration (=d)", "wmx.ulmap.anchor_bs_switch.duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_anchor_bs_switch_mimo_permutation_feedback_code, { "MIMO_permutation_feedback_code", "wmx.ulmap.anchor_bs_switch.mimo_permutation_feedback_code", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_extended_2_uiuc, { "Extended-2 UIUC", "wmx.ulmap.sounding_command.extended_2_uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_length, { "Length", "wmx.ulmap.sounding_command.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_type, { "Sounding_Type", "wmx.ulmap.sounding_command.sounding_command.type", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_send_sounding_report_flag, { "Send Sounding Report Flag", "wmx.ulmap.sounding_command.send_sounding_report_flag", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_relevance_flag, { "Sounding Relevance Flag", "wmx.ulmap.sounding_command.relevance_flag", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_relevance, { "Sounding_Relevance", "wmx.ulmap.sounding_command.sounding_relevance", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_include_additional_feedback, { "Include additional feedback", "wmx.ulmap.sounding_command.include_additional_feedback", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_num_sounding_symbols, { "Num_Sounding_Symbols", "wmx.ulmap.sounding_command.num_sounding_symbols", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_separability_type, { "Separability Type", "wmx.ulmap.sounding_command.separability_type", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_max_cyclic_shift_index_p, { "Max Cyclic Shift Index P", "wmx.ulmap.sounding_command.max_cyclic_shift_index_p", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_decimation_value, { "Decimation Value D", "wmx.ulmap.sounding_command.decimation_value", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_decimation_offset_randomization, { "Decimation offset randomization", "wmx.ulmap.sounding_command.decimation_offset_randomization", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_symbol_index, { "Sounding symbol index", "wmx.ulmap.sounding_command.sounding_command.symbol_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_number_of_cids, { "Number of CIDs", "wmx.ulmap.sounding_command.number_of_cids", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_shorted_basic_cid, { "Shorted Basic CID", "wmx.ulmap.sounding_command.shorted_basic_cid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_power_assignment_method, { "Power Assignment Method", "wmx.ulmap.sounding_command.power_assignment_method", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_power_boost, { "Power boost", "wmx.ulmap.sounding_command.power_boost", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_multi_antenna_flag, { "Multi-Antenna Flag", "wmx.ulmap.sounding_command.multi_antenna_flag", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_allocation_mode, { "Allocation Mode", "wmx.ulmap.sounding_command.allocation_mode", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_band_bit_map, { "Band bit map", "wmx.ulmap.sounding_command.band_bit_map", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_starting_frequency_band, { "Starting frequency band", "wmx.ulmap.sounding_command.starting_frequency_band", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_number_of_frequency_bands, { "Number of frequency bands", "wmx.ulmap.sounding_command.number_of_frequency_bands", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_cyclic_time_shift_index, { "Cyclic time shift index m", "wmx.ulmap.sounding_command.cyclic_time_shift_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_decimation_offset, { "Decimation offset d", "wmx.ulmap.sounding_command.decimation_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_use_same_symbol_for_additional_feedback, { "Use same symbol for additional feedback", "wmx.ulmap.sounding_command.use_same_symbol_for_additional_feedback", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_periodicity, { "Periodicity", "wmx.ulmap.sounding_command.periodicity", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_permutation, { "Permutation", "wmx.ulmap.sounding_command.permutation", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_dl_permbase, { "DL_PermBase", "wmx.ulmap.sounding_command.dl_permbase", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_shortened_basic_cid, { "Shortened basic CID", "wmx.ulmap.sounding_command.shortened_basic_cid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_subchannel_offset, { "Subchannel offset", "wmx.ulmap.sounding_command.subchannel_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_sounding_command_number_of_subchannels, { "Number of subchannels", "wmx.ulmap.sounding_command.number_of_subchannels", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ulmap_extended_2_uiuc, { "Extended-2 UIUC", "wmx.ulmap.harq_ulmap.extended_2_uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ulmap_length, { "Length", "wmx.ulmap.harq_ulmap.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ulmap_rcid_type, { "RCID_Type", "wmx.ulmap.harq_ulmap.rcid_type", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ulmap_mode, { "Mode", "wmx.ulmap.harq_ulmap.mode", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ulmap_allocation_start_indication, { "Allocation Start Indication", "wmx.ulmap.harq_ulmap.allocation_start_indication", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ulmap_ofdma_symbol_offset, { "OFDMA Symbol offset", "wmx.ulmap.harq_ulmap.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ulmap_subchannel_offset, { "Subchannel offset", "wmx.ulmap.harq_ulmap.subchannel_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ulmap_n_sub_burst, { "N sub Burst", "wmx.ulmap.harq_ulmap.n_sub_burst", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ackch_region_alloc_extended_2_uiuc, { "Extended-2 UIUC", "wmx.ulmap.harq_ackch_region_alloc.extended_2_uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ackch_region_alloc_length, { "Length", "wmx.ulmap.harq_ackch_region_alloc.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ackch_region_alloc_ofdma_symbol_offset, { "OFDMA Symbol Offset", "wmx.ulmap.harq_ackch_region_alloc.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ackch_region_alloc_subchannel_offset, { "Subchannel Offset", "wmx.ulmap.harq_ackch_region_alloc.subchannel_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ackch_region_alloc_num_ofdma_symbols, { "No. OFDMA Symbols", "wmx.ulmap.harq_ackch_region_alloc.num_ofdma_symbols", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_harq_ackch_region_alloc_num_subchannels, { "No. Subchannels", "wmx.ulmap.harq_ackch_region_alloc.num_subchannels", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_extended_2_uiuc, { "Extended-2 UIUC", "wmx.ulmap.aas_sdma.extended_2_uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_length, { "Length", "wmx.ulmap.aas_sdma.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_rcid_type, { "RCID_Type", "wmx.ulmap.aas_sdma.rcid_type", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_num_burst_region, { "Num Burst Region", "wmx.ulmap.aas_sdma.num_burst_region", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_slot_offset, { "Slot offset", "wmx.ulmap.aas_sdma.slot_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_slot_duration, { "Slot duration", "wmx.ulmap.aas_sdma.slot_duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_number_of_users, { "Number of users", "wmx.ulmap.aas_sdma.number_of_users", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_encoding_mode, { "Encoding Mode", "wmx.ulmap.aas_sdma.encoding_mode", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_power_adjust, { "Power Adjust", "wmx.ulmap.aas_sdma.power_adjust", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_pilot_pattern_modifier, { "Pilot Pattern Modifier", "wmx.ulmap.aas_sdma.pilot_pattern_modifier", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_preamble_modifier_index, { "Preamble Modifier Index", "wmx.ulmap.aas_sdma.preamble_modifier_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_pilot_pattern, { "Pilot Pattern", "wmx.ulmap.aas_sdma.pilot_pattern", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_diuc, { "DIUC", "wmx.ulmap.aas_sdma.diuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_repetition_coding_indication, { "Repetition Coding Indication", "wmx.ulmap.aas_sdma.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_acid, { "ACID", "wmx.ulmap.aas_sdma.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_ai_sn, { "AI_SN", "wmx.ulmap.aas_sdma.ai_sn", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_nep, { "N(EP)", "wmx.ulmap.aas_sdma.nep", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_nsch, { "N(SCH)", "wmx.ulmap.aas_sdma.nsch", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_spid, { "SPID", "wmx.ulmap.aas_sdma.spid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_aas_sdma_power_adjustment, { "Power Adjustment", "wmx.ulmap.aas_sdma.power_adjustment", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_feedback_polling_extended_2_uiuc, { "Extended-2 UIUC", "wmx.ulmap.feedback_polling.extended_2_uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_feedback_polling_length, { "Length", "wmx.ulmap.feedback_polling.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_feedback_polling_num_allocation, { "Num_Allocation", "wmx.ulmap.feedback_polling.num_allocation", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_feedback_polling_dedicated_ul_allocation_included, { "Dedicated UL Allocation included", "wmx.ulmap.feedback_polling.dedicated_ul_allocation_included", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_feedback_polling_basic_cid, { "Basic CID", "wmx.ulmap.feedback_polling.basic_cid", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_feedback_polling_allocation_duration, { "Allocation Duration (d)", "wmx.ulmap.feedback_polling.allocation_duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_feedback_polling_type, { "Feedback type", "wmx.ulmap.feedback_polling.feedback_polling.type", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_feedback_polling_frame_offset, { "Frame Offset", "wmx.ulmap.feedback_polling.frame_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_feedback_polling_period, { "Period (p)", "wmx.ulmap.feedback_polling.perio", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_feedback_polling_uiuc, { "UIUC", "wmx.ulmap.feedback_polling.uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_feedback_polling_ofdma_symbol_offset, { "OFDMA Symbol Offset", "wmx.ulmap.feedback_polling.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_feedback_polling_subchannel_offset, { "Subchannel offset", "wmx.ulmap.feedback_polling.subchannel_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_feedback_polling_duration, { "Duration", "wmx.ulmap.feedback_polling.duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_feedback_polling_repetition_coding_indication, { "Repetition coding indication", "wmx.ulmap.feedback_polling.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_aas_zone_configuration_included, { "AAS zone configuration included", "wmx.ulmap.reduced_aas.aas_zone_configuration_included", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_aas_zone_position_included, { "AAS zone position included", "wmx.ulmap.reduced_aas.aas_zone_position_included", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_ul_map_information_included, { "UL-MAP information included", "wmx.ulmap.reduced_aas.ul_map_information_included", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_phy_modification_included, { "PHY modification included", "wmx.ulmap.reduced_aas.phy_modification_included", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_power_control_included, { "Power Control included", "wmx.ulmap.reduced_aas.power_control_included", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_include_feedback_header, { "Include Feedback Header", "wmx.ulmap.reduced_aas.include_feedback_header", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_encoding_mode, { "Encoding Mode", "wmx.ulmap.reduced_aas.encoding_mode", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_permutation, { "Permutation", "wmx.ulmap.reduced_aas.permutation", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_ul_permbase, { "UL_PermBase", "wmx.ulmap.reduced_aas.ul_permbase", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_preamble_indication, { "Preamble Indication", "wmx.ulmap.reduced_aas.preamble_indication", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_padding, { "Padding", "wmx.ulmap.reduced_aas.padding", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_zone_symbol_offset, { "Zone Symbol Offset", "wmx.ulmap.reduced_aas.zone_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_zone_length, { "Zone Length", "wmx.ulmap.reduced_aas.zone_length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_ucd_count, { "UCD Count", "wmx.ulmap.reduced_aas.ucd_count", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_private_map_alloc_start_time, { "Private Map Allocation Start Time", "wmx.ulmap.reduced_aas.private_map_alloc_start_time", FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_pilot_pattern_index, { "Pilot Pattern Index", "wmx.ulmap.reduced_aas.pilot_pattern_index", FT_UINT64, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_preamble_select, { "Preamble Select", "wmx.ulmap.reduced_aas.preamble_select", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_preamble_shift_index, { "Preamble Shift Index", "wmx.ulmap.reduced_aas.preamble_shift_index", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_pilot_pattern_modifier, { "Pilot Pattern Modifier", "wmx.ulmap.reduced_aas.pilot_pattern_modifier", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_power_control, { "Power Control", "wmx.ulmap.reduced_aas.power_control", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_ul_frame_offset, { "UL Frame Offset", "wmx.ulmap.reduced_aas.ul_frame_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_slot_offset, { "Slot Offset", "wmx.ulmap.reduced_aas.slot_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_slot_duration, { "Slot Duration", "wmx.ulmap.reduced_aas.slot_duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_uiuc_nep, { "UIUC / N(EP)", "wmx.ulmap.reduced_aas.uiuc_nep", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_acid, { "ACID", "wmx.ulmap.reduced_aas.acid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_ai_sn, { "AI_SN", "wmx.ulmap.reduced_aas.ai_sn", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_nsch, { "N(SCH)", "wmx.ulmap.reduced_aas.nsch", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_spid, { "SPID", "wmx.ulmap.reduced_aas.spid", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_reduced_aas_repetition_coding_indication, { "Repetition Coding Indication", "wmx.ulmap.reduced_aas.repetition_coding_indication", FT_UINT16, BASE_DEC, NULL, 0x00, 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,
+ };
+
+ static ei_register_info ei[] = {
+ { &ei_ulmap_not_implemented, { "wmx.ulmap.not_implemented", PI_UNDECODED, PI_WARN, "Not implemented", EXPFILL }},
+ };
+
+ expert_module_t* expert_mac_mgmt_msg_ulmap;
+
+ proto_mac_mgmt_msg_ulmap_decoder = proto_register_protocol (
+ "WiMax ULMAP Messages", /* name */
+ "WiMax ULMAP", /* short name */
+ "wmx.ulmap" /* abbrev */
+ );
+
+ proto_register_field_array(proto_mac_mgmt_msg_ulmap_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+ expert_mac_mgmt_msg_ulmap = expert_register_protocol(proto_mac_mgmt_msg_ulmap_decoder);
+ expert_register_field_array(expert_mac_mgmt_msg_ulmap, ei, array_length(ei));
+}
+
+void proto_reg_handoff_mac_mgmt_msg_ulmap(void)
+{
+ dissector_handle_t ulmap_handle;
+
+ ulmap_handle = create_dissector_handle(dissect_mac_mgmt_msg_ulmap_decoder, proto_mac_mgmt_msg_ulmap_decoder);
+ dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_UL_MAP, ulmap_handle);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/packet-m2m.c b/plugins/epan/wimax/packet-m2m.c
new file mode 100644
index 0000000000..0fa36e1ccf
--- /dev/null
+++ b/plugins/epan/wimax/packet-m2m.c
@@ -0,0 +1,821 @@
+/* packet-m2m.c
+ * Routines for WiMax MAC to MAC TLV packet disassembly
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include <epan/reassemble.h>
+#include <epan/etypes.h>
+#include <epan/expert.h>
+#include "wimax_tlv.h"
+
+/* forward reference */
+void proto_reg_handoff_m2m(void);
+void proto_register_m2m(void);
+static void fch_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo);
+static void cdma_code_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo);
+static void pdu_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo, gint burst_number, gint frag_type, gint frag_number);
+static void fast_feedback_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo);
+static void harq_ack_bursts_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo);
+static void physical_attributes_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo);
+static void extended_tlv_decoder(packet_info *pinfo);
+void proto_tree_add_tlv(tlv_info_t *self, tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tree, gint hf, guint encoding);
+
+/* Global variables */
+static dissector_handle_t wimax_cdma_code_burst_handle;
+static dissector_handle_t wimax_ffb_burst_handle;
+static dissector_handle_t wimax_fch_burst_handle;
+static dissector_handle_t wimax_hack_burst_handle;
+static dissector_handle_t wimax_pdu_burst_handle;
+static dissector_handle_t wimax_phy_attributes_burst_handle;
+
+static reassembly_table pdu_reassembly_table;
+
+static gint proto_m2m = -1;
+
+static gint ett_m2m = -1;
+static gint ett_m2m_tlv = -1;
+static gint ett_m2m_fch = -1;
+static gint ett_m2m_cdma = -1;
+static gint ett_m2m_ffb = -1;
+
+/* TLV types (rev:0.2) */
+#define TLV_PROTO_VER 1
+#define TLV_FRAME_NUM 2
+#define TLV_BURST_NUM 3
+#define TLV_FRAG_TYPE 4
+#define TLV_FRAG_NUM 5
+#define TLV_CDMA_CODE 7
+#define TLV_FCH_BURST 8
+#define TLV_PDU_BURST 9
+#define TLV_FAST_FB 10
+#define TLV_CRC16_STATUS 11
+#define TLV_BURST_POWER 12
+#define TLV_BURST_CINR 13
+#define TLV_PREAMBLE 14
+#define TLV_HARQ_ACK_BURST 15
+#define TLV_PHY_ATTRIBUTES 16
+#define TLV_EXTENDED_TLV 255
+
+/* TLV names */
+static const value_string tlv_name[] =
+{
+ { TLV_PROTO_VER, "Protocol Version" },
+ { TLV_FRAME_NUM, "Frame Number" },
+ { TLV_BURST_NUM, "Burst Number" },
+ { TLV_FRAG_TYPE, "Fragment Type" },
+ { TLV_FRAG_NUM, "Fragment Number" },
+ { TLV_CDMA_CODE, "CDMA Attribute" },
+ { TLV_FCH_BURST, "FCH Burst" },
+ { TLV_PDU_BURST, "PDU Burst" },
+ { TLV_FAST_FB, "Fast Feedback Burst" },
+ { TLV_CRC16_STATUS, "CRC16 Status" },
+ { TLV_BURST_POWER, " Burst Power" },
+ { TLV_BURST_CINR, "Burst CINR" },
+ { TLV_PREAMBLE, "Preamble" },
+ { TLV_HARQ_ACK_BURST, "HARQ ACK Bursts" },
+ { TLV_PHY_ATTRIBUTES, "PDU Burst Physical Attributes" },
+ { TLV_EXTENDED_TLV, "Extended TLV" },
+ { 0, NULL }
+};
+
+/* TLV Fragment types */
+#define TLV_NO_FRAG 0
+#define TLV_FIRST_FRAG 1
+#define TLV_MIDDLE_FRAG 2
+#define TLV_LAST_FRAG 3
+
+/* TLV Fragment Type names */
+static const value_string tlv_frag_type_name[] =
+{
+ { TLV_NO_FRAG, "No TLV Fragment" },
+ { TLV_FIRST_FRAG, "First TLV Fragment" },
+ { TLV_MIDDLE_FRAG, "Middle TLV Fragment" },
+ { TLV_LAST_FRAG, "Last TLV Fragment" },
+ { 0, NULL }
+};
+
+/* TLV CRC16 Status */
+static const value_string tlv_crc16_status[] =
+{
+ { 0, "No CRC-16 in burst" },
+ { 1, "Good CRC-16 in burst" },
+ { 2, "Bad CRC-16 in burst" },
+ { 0, NULL }
+};
+
+static gint hf_m2m_sequence_number = -1;
+static gint hf_m2m_frame_number = -1;
+static gint hf_m2m_tlv_count = -1;
+
+static gint hf_m2m_type = -1;
+static gint hf_m2m_len = -1;
+static gint hf_m2m_len_size = -1;
+/* static gint hf_m2m_value_bytes = -1; */
+static gint hf_wimax_invalid_tlv = -1;
+static gint hf_m2m_value_protocol_vers_uint8 = -1;
+static gint hf_m2m_value_burst_num_uint8 = -1;
+static gint hf_m2m_value_frag_type_uint8 = -1;
+static gint hf_m2m_value_frag_num_uint8 = -1;
+static gint hf_m2m_value_pdu_burst = -1;
+static gint hf_m2m_value_fast_fb = -1;
+static gint hf_m2m_value_fch_burst_uint24 = -1;
+static gint hf_m2m_value_cdma_code_uint24 = -1;
+static gint hf_m2m_value_crc16_status_uint8 = -1;
+static gint hf_m2m_value_burst_power_uint16 = -1;
+static gint hf_m2m_value_burst_cinr_uint16 = -1;
+static gint hf_m2m_value_preamble_uint16 = -1;
+static gint hf_m2m_value_harq_ack_burst_bytes = -1;
+static gint hf_m2m_phy_attributes = -1;
+
+static expert_field ei_m2m_unexpected_length = EI_INIT;
+
+
+/* WiMax MAC to MAC protocol dissector */
+static int dissect_m2m(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ proto_item *ti = NULL;
+ proto_item *m2m_item = NULL;
+ proto_tree *m2m_tree = NULL;
+ proto_tree *tlv_tree = NULL;
+ gint burst_number = 0;
+ gint length, offset = 0;
+ gint tlv_count;
+ gint tlv_type, tlv_len, tlv_offset, tlv_value;
+ gint tlv_frag_type = 0;
+ gint tlv_frag_number = 0;
+ tlv_info_t m2m_tlv_info;
+ gint hf;
+ guint encoding;
+ guint frame_number;
+ int expected_len;
+
+ /* display the M2M protocol name */
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "WiMax");
+
+ /* Clear out stuff in the info column */
+ col_clear(pinfo->cinfo, COL_INFO);
+
+
+ { /* we are being asked for details */
+ m2m_item = proto_tree_add_item(tree, proto_m2m, tvb, 0, -1, ENC_NA);
+ m2m_tree = proto_item_add_subtree(m2m_item, ett_m2m);
+ /* get the tvb reported length */
+ length = tvb_reported_length(tvb);
+ /* add the size info */
+ /*
+ proto_item_append_text(m2m_item, " (%u bytes) - Packet Sequence Number,Number of TLVs", length);
+ */
+ proto_item_append_text(m2m_item, " (%u bytes)", length);
+ /* display the sequence number */
+ proto_tree_add_item(m2m_tree, hf_m2m_sequence_number, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ /* display the TLV count */
+ proto_tree_add_item(m2m_tree, hf_m2m_tlv_count, tvb, offset, 2, ENC_BIG_ENDIAN);
+ tlv_count = tvb_get_ntohs(tvb, offset);
+ offset += 2;
+ /* parses the TLVs within current packet */
+ while ( tlv_count > 0)
+ { /* init MAC to MAC TLV information */
+ init_tlv_info(&m2m_tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&m2m_tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&m2m_tlv_info);
+ if(tlv_type == -1 || tlv_len > 64000 || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", "M2M TLV error");
+ /* display the invalid TLV in HEX */
+ proto_tree_add_item(m2m_tree, hf_wimax_invalid_tlv, tvb, offset, (length - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_offset = get_tlv_value_offset(&m2m_tlv_info);
+ /* display TLV type */
+ ti = proto_tree_add_protocol_format(m2m_tree, proto_m2m, tvb, offset, (tlv_len + tlv_offset), "%s", val_to_str(tlv_type, tlv_name, "Unknown TLV"));
+ /* add TLV subtree */
+ tlv_tree = proto_item_add_subtree(ti, ett_m2m_tlv);
+ /* update the offset */
+ offset += tlv_offset;
+ /* add the size info */
+ /* decode TLV content (TLV value) */
+ expected_len = 0;
+ hf = 0;
+ encoding = ENC_NA;
+ switch (tlv_type)
+ {
+ case TLV_PROTO_VER:
+ /* get the protocol version */
+ tlv_value = tvb_get_guint8( tvb, offset );
+ /* add the description */
+ proto_item_append_text(ti, ": %d", tlv_value);
+ hf = hf_m2m_value_protocol_vers_uint8;
+ encoding = ENC_BIG_ENDIAN;
+ expected_len = 1;
+ break;
+
+ case TLV_BURST_NUM:
+ /* get the burst number */
+ burst_number = tvb_get_guint8( tvb, offset );
+ /* add the description */
+ proto_item_append_text(ti, ": %d", burst_number);
+ hf = hf_m2m_value_burst_num_uint8;
+ encoding = ENC_BIG_ENDIAN;
+ expected_len = 1;
+ break;
+
+ case TLV_FRAG_TYPE:
+ /* add the description */
+ tlv_frag_type = tvb_get_guint8( tvb, offset );
+ proto_item_append_text(ti, ": %s", val_to_str(tlv_frag_type, tlv_frag_type_name, "Unknown"));
+ hf = hf_m2m_value_frag_type_uint8;
+ encoding = ENC_BIG_ENDIAN;
+ expected_len = 1;
+ break;
+
+ case TLV_FRAG_NUM:
+ /* get the fragment number */
+ tlv_frag_number = tvb_get_guint8( tvb, offset );
+ /* add the description */
+ proto_item_append_text(ti, ": %d", tlv_frag_number);
+ hf = hf_m2m_value_frag_num_uint8;
+ encoding = ENC_BIG_ENDIAN;
+ expected_len = 1;
+ break;
+
+ case TLV_PDU_BURST:
+ /* display PDU Burst length info */
+ proto_item_append_text(ti, " (%u bytes)", tlv_len);
+ /* decode and display the PDU Burst */
+ pdu_burst_decoder(tree, tvb, offset, tlv_len, pinfo, burst_number, tlv_frag_type, tlv_frag_number);
+ hf = hf_m2m_value_pdu_burst;
+ encoding = ENC_NA;
+ break;
+
+ case TLV_FAST_FB:
+ /* display the Fast Feedback Burst length info */
+ proto_item_append_text(ti, " (%u bytes)", tlv_len);
+ /* decode and display the Fast Feedback Burst */
+ fast_feedback_burst_decoder(tree, tvb, offset, tlv_len, pinfo);
+ hf = hf_m2m_value_fast_fb;
+ encoding = ENC_NA;
+ break;
+
+ case TLV_FRAME_NUM:
+ /* get the frame number */
+ frame_number = tvb_get_ntoh24( tvb, offset );
+ /* add the description */
+ proto_tree_add_item(tlv_tree, hf_m2m_frame_number, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_item_append_text(ti, ": %d", frame_number);
+ break;
+
+ case TLV_FCH_BURST:
+ /* add the description */
+ tlv_value = tvb_get_ntoh24( tvb, offset );
+ proto_item_append_text(ti, ": 0x%X", tlv_value);
+ /* decode and display the TLV FCH burst */
+ fch_burst_decoder(tree, tvb, offset, tlv_len, pinfo);
+ hf = hf_m2m_value_fch_burst_uint24;
+ encoding = ENC_BIG_ENDIAN;
+ expected_len = 3;
+ break;
+
+ case TLV_CDMA_CODE:
+ /* add the description */
+ tlv_value = tvb_get_ntoh24( tvb, offset );
+ proto_item_append_text(ti, ": 0x%X", tlv_value);
+ /* decode and display the CDMA Code */
+ cdma_code_decoder(tree, tvb, offset, tlv_len, pinfo);
+ hf = hf_m2m_value_cdma_code_uint24;
+ encoding = ENC_BIG_ENDIAN;
+ expected_len = 3;
+ break;
+
+ case TLV_CRC16_STATUS:
+ /* add the description */
+ tlv_value = tvb_get_guint8( tvb, offset );
+ proto_item_append_text(ti, ": %s", val_to_str(tlv_value, tlv_crc16_status, "Unknown"));
+ hf = hf_m2m_value_crc16_status_uint8;
+ encoding = ENC_BIG_ENDIAN;
+ expected_len = 1;
+ break;
+
+ case TLV_BURST_POWER:
+ /* add the description */
+ tlv_value = tvb_get_ntohs( tvb, offset );
+ proto_item_append_text(ti, ": %d", tlv_value);
+ hf = hf_m2m_value_burst_power_uint16;
+ encoding = ENC_BIG_ENDIAN;
+ expected_len = 2;
+ break;
+
+ case TLV_BURST_CINR:
+ /* add the description */
+ tlv_value = tvb_get_ntohs( tvb, offset );
+ proto_item_append_text(ti, ": 0x%X", tlv_value);
+ hf = hf_m2m_value_burst_cinr_uint16;
+ encoding = ENC_BIG_ENDIAN;
+ expected_len = 2;
+ break;
+
+ case TLV_PREAMBLE:
+ /* add the description */
+ tlv_value = tvb_get_ntohs( tvb, offset );
+ proto_item_append_text(ti, ": 0x%X", tlv_value);
+ hf = hf_m2m_value_preamble_uint16;
+ encoding = ENC_BIG_ENDIAN;
+ expected_len = 2;
+ break;
+
+ case TLV_HARQ_ACK_BURST:
+ /* display the Burst length info */
+ proto_item_append_text(ti, " (%u bytes)", tlv_len);
+ /* decode and display the HARQ ACK Bursts */
+ harq_ack_bursts_decoder(tree, tvb, offset, tlv_len, pinfo);
+ hf = hf_m2m_value_harq_ack_burst_bytes;
+ encoding = ENC_NA;
+ break;
+
+ case TLV_PHY_ATTRIBUTES:
+ /* display the Burst length info */
+ proto_item_append_text(ti, " (%u bytes)", tlv_len);
+ /* decode and display the PDU Burst Physical Attributes */
+ physical_attributes_decoder(tree, tvb, offset, tlv_len, pinfo);
+ hf = hf_m2m_phy_attributes;
+ encoding = ENC_NA;
+ break;
+
+ case TLV_EXTENDED_TLV:
+ /* display the Burst length info */
+ proto_item_append_text(ti, " (%u bytes)", tlv_len);
+ /* decode and display the Extended TLV */
+ extended_tlv_decoder(pinfo);
+ break;
+
+ default:
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", "Unknown TLV Type");
+ break;
+ }
+ /* expand the TLV detail */
+ if (hf) {
+ if (offset - tlv_offset == expected_len) {
+ proto_tree_add_tlv(&m2m_tlv_info, tvb, offset - tlv_offset, pinfo, tlv_tree, hf, encoding);
+ } else {
+ expert_add_info_format(pinfo, NULL, &ei_m2m_unexpected_length, "Expected length %d, got %d.", expected_len, offset - tlv_offset);
+ }
+ }
+ offset += tlv_len;
+ /* update tlv_count */
+ tlv_count--;
+ }
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Decode and display the FCH burst */
+static void fch_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo)
+{
+ if(wimax_fch_burst_handle)
+ { /* call FCH dissector */
+ call_dissector(wimax_fch_burst_handle, tvb_new_subset_length(tvb, offset, length), pinfo, tree);
+ }
+ else /* display FCH info */
+ { /* update the info column */
+ col_append_str(pinfo->cinfo, COL_INFO, "FCH Burst: DL Frame Prefix");
+ }
+}
+
+/* Decode and display the CDMA Code Attribute */
+static void cdma_code_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo)
+{
+ if(wimax_cdma_code_burst_handle)
+ { /* call CDMA dissector */
+ call_dissector(wimax_cdma_code_burst_handle, tvb_new_subset_length(tvb, offset, length), pinfo, tree);
+ }
+ else /* display CDMA Code Attribute info */
+ { /* update the info column */
+ col_append_str(pinfo->cinfo, COL_INFO, "CDMA Code Attribute");
+ }
+}
+
+/* Decode and display the PDU Burst */
+static void pdu_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo, gint burst_number, gint frag_type, gint frag_number)
+{
+ fragment_head *pdu_frag;
+ tvbuff_t *pdu_tvb = NULL;
+
+ /* update the info column */
+ switch (frag_type)
+ {
+ case TLV_FIRST_FRAG:
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "First TLV Fragment (%d)", frag_number);
+ break;
+ case TLV_LAST_FRAG:
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "Last TLV Fragment (%d)", frag_number);
+ break;
+ case TLV_MIDDLE_FRAG:
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "Middle TLV Fragment %d", frag_number);
+ break;
+ }
+ if(frag_type == TLV_NO_FRAG)
+ { /* not fragmented PDU */
+ pdu_tvb = tvb_new_subset_length(tvb, offset, length);
+ }
+ else /* fragmented PDU */
+ { /* add the fragment */
+ pdu_frag = fragment_add_seq(&pdu_reassembly_table, tvb, offset, pinfo, burst_number, NULL, frag_number - 1, length, ((frag_type==TLV_LAST_FRAG)?0:1), 0);
+ if(pdu_frag && frag_type == TLV_LAST_FRAG)
+ {
+ /* create the new tvb for defragmented frame */
+ pdu_tvb = tvb_new_chain(tvb, pdu_frag->tvb_data);
+ /* add the defragmented data to the data source list */
+ add_new_data_source(pinfo, pdu_tvb, "Reassembled WiMax PDU Frame");
+ }
+ else
+ {
+ pdu_tvb = NULL;
+ if(frag_type == TLV_LAST_FRAG)
+ { /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", "Incomplete PDU frame");
+ }
+ }
+ }
+ /* process the defragmented PDU burst */
+ if(pdu_tvb)
+ {
+ if(wimax_pdu_burst_handle)
+ {/* decode and display PDU Burst */
+ call_dissector(wimax_pdu_burst_handle, pdu_tvb, pinfo, tree);
+ }
+ else /* display PDU Burst info */
+ { /* update the info column */
+ col_append_str(pinfo->cinfo, COL_INFO, "PDU Burst");
+ }
+ }
+}
+
+/* Decode and display the Fast Feedback Burst */
+static void fast_feedback_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo)
+{
+ if(wimax_ffb_burst_handle)
+ { /* display the TLV Fast Feedback Burst dissector info */
+ call_dissector(wimax_ffb_burst_handle, tvb_new_subset_length(tvb, offset, length), pinfo, tree);
+ }
+ else /* display the Fast Feedback Burst info */
+ { /* update the info column */
+ col_append_str(pinfo->cinfo, COL_INFO, "Fast Feedback Burst");
+ }
+}
+
+static void harq_ack_bursts_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo)
+{
+ if(wimax_hack_burst_handle)
+ { /* call the TLV HARQ ACK Bursts dissector */
+ call_dissector(wimax_hack_burst_handle, tvb_new_subset_length(tvb, offset, length), pinfo, tree);
+ }
+ else /* display the TLV HARQ ACK Bursts info */
+ { /* update the info column */
+ col_append_str(pinfo->cinfo, COL_INFO, "HARQ ACK Bursts");
+ }
+}
+
+static void physical_attributes_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo)
+{
+ if(wimax_phy_attributes_burst_handle)
+ { /* call the TLV PDU Burst Physical Attributes dissector */
+ call_dissector(wimax_phy_attributes_burst_handle, tvb_new_subset_length(tvb, offset, length), pinfo, tree);
+ }
+ else /* display the TLV PDU Burst Physical Attributes info */
+ { /* update the info column */
+ col_append_str(pinfo->cinfo, COL_INFO, "PHY-attr");
+ }
+}
+
+static void extended_tlv_decoder(packet_info *pinfo)
+{
+ /* display the Extended TLV info */
+ /* update the info column */
+ col_append_str(pinfo->cinfo, COL_INFO, "Extended TLV");
+}
+
+/* Display the raw WiMax TLV */
+void proto_tree_add_tlv(tlv_info_t *self, tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tree, gint hf, guint encoding)
+{
+ guint tlv_offset;
+ gint tlv_type, tlv_len;
+
+ /* make sure the TLV information is valid */
+ if(!self->valid)
+ { /* invalid TLV info */
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "Invalid TLV");
+ return;
+ }
+ tlv_offset = offset;
+ /* display TLV type */
+ proto_tree_add_item(tree, hf_m2m_type, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ tlv_offset++;
+ /* check the TLV length type */
+ if( self->length_type )
+ { /* multiple bytes TLV length */
+ /* display the length of the TLV length with MSB */
+ proto_tree_add_item(tree, hf_m2m_len_size, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ tlv_offset++;
+ if(self->size_of_length)
+ /* display the multiple byte TLV length */
+ proto_tree_add_item(tree, hf_m2m_len, tvb, tlv_offset, self->size_of_length, ENC_BIG_ENDIAN);
+ else
+ return;
+ }
+ else /* display the single byte TLV length */
+ proto_tree_add_item(tree, hf_m2m_len, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+
+ tlv_type = get_tlv_type(self);
+ /* Display Frame Number as special case for filter */
+ if ( tlv_type == TLV_FRAME_NUM )
+ {
+ return;
+ }
+
+ /* get the TLV length */
+ tlv_len = get_tlv_length(self);
+ proto_tree_add_item(tree, hf, tvb, (offset + self->value_offset), tlv_len, encoding);
+}
+
+/* Register Wimax Mac to Mac Protocol */
+void proto_register_m2m(void)
+{
+ /* M2M TLV display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_m2m_sequence_number,
+ {
+ "Packet Sequence Number", "m2m.seq_number",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_frame_number,
+ {
+ "Value", "m2m.frame_number",
+ FT_UINT24, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_tlv_count,
+ {
+ "Number of TLVs in the packet", "m2m.tlv_count",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ }
+ };
+
+ /* WiMax TLV display */
+ static hf_register_info hf_tlv[] =
+ {
+ {
+ &hf_m2m_type,
+ {
+ "Type", "m2m.tlv_type",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_len,
+ {
+ "Length", "m2m.tlv_len",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_len_size,
+ {
+ "Length Size", "m2m.tlv_len_size",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+#if 0
+ {
+ &hf_m2m_value_bytes,
+ {
+ "Value (hex)", "m2m.multibyte_tlv_value",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+#endif
+ {
+ &hf_m2m_value_protocol_vers_uint8,
+ {
+ "Value", "m2m.protocol_vers_tlv_value",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_value_burst_num_uint8,
+ {
+ "Value", "m2m.burst_num_tlv_value",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_value_frag_type_uint8,
+ {
+ "Value", "m2m.frag_type_tlv_value",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_value_frag_num_uint8,
+ {
+ "Value", "m2m.frag_num_tlv_value",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_value_pdu_burst,
+ {
+ "Value (hex)", "m2m.pdu_burst_tlv_value",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_value_fast_fb,
+ {
+ "Value (hex)", "m2m.fast_fb_tlv_value",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_value_fch_burst_uint24,
+ {
+ "Value", "m2m.fch_burst_tlv_value",
+ FT_UINT24, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_value_cdma_code_uint24,
+ {
+ "Value", "m2m.cdma_code_tlv_value",
+ FT_UINT24, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_value_crc16_status_uint8,
+ {
+ "Value", "m2m.crc16_status_tlv_value",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_value_burst_power_uint16,
+ {
+ "Value", "m2m.burst_power_tlv_value",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_value_burst_cinr_uint16,
+ {
+ "Value", "m2m.burst_cinr_tlv_value",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_value_preamble_uint16,
+ {
+ "Value", "m2m.preamble_tlv_value",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_value_harq_ack_burst_bytes,
+ {
+ "Value (hex)", "m2m.harq_ack_burst_tlv_value",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_m2m_phy_attributes,
+ {
+ "Value (hex)", "m2m.phy_attributes",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_wimax_invalid_tlv,
+ {
+ "Invalid TLV (hex)", "m2m.invalid_tlv",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL
+ }
+ }
+ };
+
+ static gint *ett[] =
+ {
+ &ett_m2m,
+ &ett_m2m_tlv,
+ &ett_m2m_fch,
+ &ett_m2m_cdma,
+ &ett_m2m_ffb,
+ };
+
+ static ei_register_info ei[] = {
+ { &ei_m2m_unexpected_length, { "m2m.unexpected_length", PI_MALFORMED, PI_ERROR, "Unexpected length", EXPFILL }},
+ };
+
+ expert_module_t* expert_m2m;
+
+ proto_m2m = proto_register_protocol (
+ "WiMax Mac to Mac Packet", /* name */
+ "M2M (m2m)", /* short name */
+ "m2m" /* abbrev */
+ );
+
+ proto_register_field_array(proto_m2m, hf, array_length(hf));
+ proto_register_field_array(proto_m2m, hf_tlv, array_length(hf_tlv));
+ proto_register_subtree_array(ett, array_length(ett));
+ expert_m2m = expert_register_protocol(proto_m2m);
+ expert_register_field_array(expert_m2m, ei, array_length(ei));
+
+ /* Register reassembly table */
+ reassembly_table_register(&pdu_reassembly_table,
+ &addresses_reassembly_table_functions);
+}
+
+/* Register Wimax Mac to Mac Protocol handler */
+void proto_reg_handoff_m2m(void)
+{
+ dissector_handle_t m2m_handle;
+
+ m2m_handle = create_dissector_handle(dissect_m2m, proto_m2m);
+ dissector_add_uint("ethertype", ETHERTYPE_WMX_M2M, m2m_handle);
+
+ /* find the wimax handlers */
+ wimax_cdma_code_burst_handle = find_dissector("wimax_cdma_code_burst_handler");
+ wimax_fch_burst_handle = find_dissector("wimax_fch_burst_handler");
+ wimax_ffb_burst_handle = find_dissector("wimax_ffb_burst_handler");
+ wimax_hack_burst_handle = find_dissector("wimax_hack_burst_handler");
+ wimax_pdu_burst_handle = find_dissector("wimax_pdu_burst_handler");
+ wimax_phy_attributes_burst_handle = find_dissector("wimax_phy_attributes_burst_handler");
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/packet-wmx.c b/plugins/epan/wimax/packet-wmx.c
new file mode 100644
index 0000000000..1cdbd97e82
--- /dev/null
+++ b/plugins/epan/wimax/packet-wmx.c
@@ -0,0 +1,377 @@
+/* packet-wmx.c
+ * WiMax Protocol and dissectors
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <string.h>
+
+#include <epan/packet.h>
+#include <epan/prefs.h>
+#include "wimax-int.h"
+#include "wimax_tlv.h"
+#include "wimax_utils.h"
+
+void proto_register_wimax(void);
+
+/* Global variables */
+gint proto_wimax = -1;
+gint8 arq_enabled = 0;
+gint scheduling_service_type = 0;
+gint mac_sdu_length = 49; /* default SDU size is 49 bytes (11.13.16) */
+extern guint global_cid_max_basic;
+extern gboolean include_cor2_changes;
+
+address bs_address = ADDRESS_INIT_NONE;
+
+
+static int hf_tlv_type = -1;
+static int hf_tlv_length = -1;
+static int hf_tlv_length_size = -1;
+
+#define MAX_NUM_TLVS 256
+/* Global TLV array to retrieve unique subtree identifiers */
+static gint ett_tlv[MAX_NUM_TLVS];
+
+static const gchar tlv_val_1byte[] = "TLV value: %s (0x%02x)";
+static const gchar tlv_val_2byte[] = "TLV value: %s (0x%04x)";
+static const gchar tlv_val_3byte[] = "TLV value: %s (0x%06x)";
+static const gchar tlv_val_4byte[] = "TLV value: %s (0x%08x)";
+static const gchar tlv_val_5byte[] = "TLV value: %s (0x%08x...)";
+
+/*************************************************************/
+/* add_tlv_subtree() */
+/* Return a pointer to a proto_item of a TLV value that */
+/* already contains the type and length of the given TLV. */
+/* tree - the parent to which the new tree will */
+/* be attached */
+/* hfindex - the index of the item to be attached */
+/* tvb - a pointer to the packet data */
+/* start - offset within the packet */
+/* length - length of this item */
+/* encoding - encoding for proto_tree_add_item */
+/* return: */
+/* pointer to a proto_item */
+/*************************************************************/
+proto_item *add_tlv_subtree(tlv_info_t *self, proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, const guint encoding)
+{
+ header_field_info *hf;
+ proto_tree *tlv_tree;
+ proto_item *tlv_item;
+ gint tlv_value_length, tlv_val_offset;
+ guint8 size_of_tlv_length_field;
+ guint8 tlv_type;
+
+ /* Make sure we're dealing with a valid TLV here */
+ if (get_tlv_type(self) < 0)
+ return tree;
+
+ /* Retrieve the necessary TLV information */
+ tlv_val_offset = get_tlv_value_offset(self);
+ tlv_value_length = get_tlv_length(self);
+ size_of_tlv_length_field = get_tlv_size_of_length(self);
+ tlv_type = get_tlv_type(self);
+
+ hf = proto_registrar_get_nth(hfindex);
+
+ tlv_tree = proto_tree_add_subtree(tree, tvb, start, tlv_value_length+tlv_val_offset, ett_tlv[tlv_type], NULL, hf->name);
+
+ proto_tree_add_uint(tlv_tree, hf_tlv_type, tvb, start, 1, tlv_type);
+ if (size_of_tlv_length_field > 0) /* It is */
+ {
+ /* display the length of the length field TLV */
+ proto_tree_add_uint(tlv_tree, hf_tlv_length_size, tvb, start+1, 1, size_of_tlv_length_field);
+ /* display the TLV length */
+ proto_tree_add_uint(tlv_tree, hf_tlv_length, tvb, start+2, size_of_tlv_length_field, tlv_value_length);
+ } else { /* It is not */
+ /* display the TLV length */
+ proto_tree_add_uint(tlv_tree, hf_tlv_length, tvb, start+1, 1, tlv_value_length);
+ }
+
+ tlv_item = proto_tree_add_item(tlv_tree, hfindex, tvb, start+tlv_val_offset, tlv_value_length, encoding);
+
+ /* Return a pointer to the value level */
+ return tlv_item;
+}
+
+/*************************************************************/
+/* add_tlv_subtree_no_item() */
+/* Return a pointer to a proto_tree of a TLV value that */
+/* already contains the type and length, but no value */
+/* tree - the parent to which the new tree will */
+/* be attached */
+/* hfindex - the index of the item to be attached */
+/* tvb - a pointer to the packet data */
+/* start - offset within the packet */
+/* length - length of this item */
+/* return: */
+/* pointer to a proto_tree (to then add value) */
+/*************************************************************/
+proto_tree *add_tlv_subtree_no_item(tlv_info_t *self, proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start)
+{
+ header_field_info *hf;
+ proto_tree *tlv_tree;
+ gint tlv_value_length, tlv_val_offset;
+ guint8 size_of_tlv_length_field;
+ guint8 tlv_type;
+
+ /* Make sure we're dealing with a valid TLV here */
+ if (get_tlv_type(self) < 0)
+ return tree;
+
+ /* Retrieve the necessary TLV information */
+ tlv_val_offset = get_tlv_value_offset(self);
+ tlv_value_length = get_tlv_length(self);
+ size_of_tlv_length_field = get_tlv_size_of_length(self);
+ tlv_type = get_tlv_type(self);
+
+ hf = proto_registrar_get_nth(hfindex);
+
+ tlv_tree = proto_tree_add_subtree(tree, tvb, start, tlv_value_length+tlv_val_offset, ett_tlv[tlv_type], NULL, hf->name);
+
+ proto_tree_add_uint(tlv_tree, hf_tlv_type, tvb, start, 1, tlv_type);
+ if (size_of_tlv_length_field > 0) /* It is */
+ {
+ /* display the length of the length field TLV */
+ proto_tree_add_uint(tlv_tree, hf_tlv_length_size, tvb, start+1, 1, size_of_tlv_length_field);
+ /* display the TLV length */
+ proto_tree_add_uint(tlv_tree, hf_tlv_length, tvb, start+2, size_of_tlv_length_field, tlv_value_length);
+ } else { /* It is not */
+ /* display the TLV length */
+ proto_tree_add_uint(tlv_tree, hf_tlv_length, tvb, start+1, 1, tlv_value_length);
+ }
+
+ /* Return a pointer to the tree level (to manually add item) */
+ return tlv_tree;
+}
+
+/*************************************************************/
+/* add_protocol_subtree() */
+/* Return a pointer to a proto_tree that already contains */
+/* the type and length of a given TLV. */
+/* tree - the parent to which the new tree will */
+/* be attached */
+/* hfindex - the index of the item to be attached */
+/* tvb - a pointer to the packet data */
+/* start - offset within the packet */
+/* length - length of this item */
+/* format - printf style formatting string */
+/* ... - arguments to format */
+/* return: */
+/* pointer to a proto_tree */
+/*************************************************************/
+proto_tree *add_protocol_subtree(tlv_info_t *self, gint idx, proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length _U_, const char *label)
+{
+ /* Declare local variables */
+ proto_tree *tlv_tree;
+ proto_item *tlv_item;
+ gint tlv_value_length, tlv_val_offset;
+ guint8 size_of_tlv_length_field;
+ guint8 tlv_type;
+ guint32 tlv_value;
+ const gchar *hex_fmt;
+
+ /* Make sure we're dealing with a valid TLV here */
+ if (get_tlv_type(self) < 0)
+ return tree;
+
+ /* Retrieve the necessary TLV information */
+ tlv_val_offset = get_tlv_value_offset(self);
+ tlv_value_length = get_tlv_length(self);
+ size_of_tlv_length_field = get_tlv_size_of_length(self);
+ tlv_type = get_tlv_type(self);
+
+ /* display the TLV name and display the value in hex. Highlight type, length, and value. */
+ tlv_item = proto_tree_add_protocol_format(tree, hfindex, tvb, start, tlv_value_length+tlv_val_offset, "%s (%u byte(s))", label, tlv_value_length);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_tlv[tlv_type]);
+
+ proto_tree_add_uint(tlv_tree, hf_tlv_type, tvb, start, 1, tlv_type);
+ if (size_of_tlv_length_field > 0) /* It is */
+ {
+ /* display the length of the length field TLV */
+ proto_tree_add_uint(tlv_tree, hf_tlv_length_size, tvb, start+1, 1, size_of_tlv_length_field);
+ /* display the TLV length */
+ proto_tree_add_uint(tlv_tree, hf_tlv_length, tvb, start+2, size_of_tlv_length_field, tlv_value_length);
+ } else { /* It is not */
+ /* display the TLV length */
+ proto_tree_add_uint(tlv_tree, hf_tlv_length, tvb, start+1, 1, tlv_value_length);
+ }
+
+ /* display the TLV value and make it a subtree */
+ switch (tlv_value_length)
+ {
+ case 1:
+ tlv_value = tvb_get_guint8(tvb, start+tlv_val_offset);
+ hex_fmt = tlv_val_1byte;
+ break;
+ case 2:
+ tlv_value = tvb_get_ntohs(tvb, start+tlv_val_offset);
+ hex_fmt = tlv_val_2byte;
+ break;
+ case 3:
+ tlv_value = tvb_get_ntoh24(tvb, start+tlv_val_offset);
+ hex_fmt = tlv_val_3byte;
+ break;
+ case 4:
+ tlv_value = tvb_get_ntohl(tvb, start+tlv_val_offset);
+ hex_fmt = tlv_val_4byte;
+ break;
+ default:
+ tlv_value = tvb_get_ntohl(tvb, start+tlv_val_offset);
+ hex_fmt = tlv_val_5byte;
+ break;
+ }
+ /* Show "TLV value: " */
+ tlv_tree = proto_tree_add_subtree_format(tlv_tree, tvb, start+tlv_val_offset, tlv_value_length, idx, NULL, hex_fmt, label, tlv_value);
+
+ /* Return a pointer to the value level */
+ return tlv_tree;
+}
+
+
+
+/* WiMax protocol dissector */
+static int dissect_wimax(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *tree _U_, void* data _U_)
+{
+ /* display the WiMax protocol name */
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "WiMax");
+ /* Clear out stuff in the info column */
+ col_clear(pinfo->cinfo, COL_INFO);
+
+ return tvb_captured_length(tvb);
+}
+
+gboolean is_down_link(packet_info *pinfo)
+{
+ if (pinfo->p2p_dir == P2P_DIR_RECV)
+ return TRUE;
+ if (pinfo->p2p_dir == P2P_DIR_UNKNOWN)
+ if(bs_address.len && !cmp_address(&bs_address, &pinfo->src))
+ return TRUE;
+ return FALSE;
+}
+
+
+/* Register Wimax Protocol */
+void proto_register_wimax(void)
+{
+ int i;
+ module_t *wimax_module;
+
+ static hf_register_info hf[] = {
+ { &hf_tlv_type, { "TLV type", "wmx.tlv_type", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_tlv_length, { "TLV length", "wmx.tlv_length", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_tlv_length_size, { "Size of TLV length field", "wmx.tlv_length_size", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ };
+
+ gint *ett_reg[MAX_NUM_TLVS];
+
+ /* Register the WiMax protocols here */
+ proto_wimax = proto_register_protocol (
+ "WiMax Protocol", /* name */
+ "WiMax (wmx)", /* short name */
+ "wmx" /* abbrev */
+ );
+
+ proto_register_field_array(proto_wimax, hf, array_length(hf));
+
+ /* Register the ett TLV array to retrieve unique subtree identifiers */
+ for (i = 0; i < MAX_NUM_TLVS; i++)
+ {
+ ett_tlv[i] = -1;
+ ett_reg[i] = &ett_tlv[i];
+ }
+
+ proto_register_subtree_array(ett_reg, array_length(ett_reg));
+
+ /* Register the WiMax dissector */
+ register_dissector("wmx", dissect_wimax, proto_wimax);
+
+ wimax_module = prefs_register_protocol(proto_wimax, NULL);
+
+ prefs_register_uint_preference(wimax_module, "basic_cid_max",
+ "Maximum Basic CID",
+ "Set the maximum Basic CID"
+ " used in the Wimax decoder"
+ " (if other than the default of 320)."
+ " Note: The maximum Primary CID is"
+ " double the maximum Basic CID.",
+ 10, &global_cid_max_basic);
+
+ prefs_register_bool_preference(wimax_module, "corrigendum_2_version",
+ "Corrigendum 2 Version",
+ "Set to TRUE to use the Corrigendum"
+ " 2 version of Wimax message decoding."
+ " Set to FALSE to use the 802.16e-2005"
+ " version.",
+ &include_cor2_changes);
+ prefs_register_obsolete_preference(wimax_module, "wimax.basic_cid_max");
+ prefs_register_obsolete_preference(wimax_module, "wimax.corrigendum_2_version");
+
+ /*
+ * Call sub-registrations in the correct order because they depend
+ * on proto_register_wimax() being run first.
+ */
+ wimax_proto_register_wimax_cdma();
+ wimax_proto_register_wimax_compact_dlmap_ie();
+ wimax_proto_register_wimax_compact_ulmap_ie();
+ wimax_proto_register_wimax_fch();
+ wimax_proto_register_wimax_ffb();
+ wimax_proto_register_wimax_hack();
+ wimax_proto_register_wimax_harq_map();
+ wimax_proto_register_wimax_pdu();
+ wimax_proto_register_wimax_phy_attributes();
+ wimax_proto_register_wimax_utility_decoders();
+ wimax_proto_register_mac_header_generic();
+ wimax_proto_register_mac_header_type_1();
+ wimax_proto_register_mac_header_type_2();
+}
+
+/*
+ * If we're going to give the register routines for the above files special
+ * names to ensure that they're called in the above order in the above
+ * routine, we have to do the same with their handoff routines, if they
+ * have any - that's the way the registration generation stuff now works.
+ */
+void proto_reg_handoff_wimax(void)
+{
+ wimax_proto_reg_handoff_wimax_pdu();
+ wimax_proto_reg_handoff_mac_header_generic();
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/wimax-int.h b/plugins/epan/wimax/wimax-int.h
new file mode 100644
index 0000000000..c22c1dd14b
--- /dev/null
+++ b/plugins/epan/wimax/wimax-int.h
@@ -0,0 +1,42 @@
+/* wimax-int.h
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __WIMAX_INT_H__
+#define __WIMAX_INT_H__
+
+void wimax_proto_register_wimax_cdma(void);
+void wimax_proto_register_wimax_compact_dlmap_ie(void);
+void wimax_proto_register_wimax_compact_ulmap_ie(void);
+void wimax_proto_register_wimax_fch(void);
+void wimax_proto_register_wimax_ffb(void);
+void wimax_proto_register_wimax_hack(void);
+void wimax_proto_register_wimax_harq_map(void);
+void wimax_proto_register_wimax_pdu(void);
+void wimax_proto_register_wimax_phy_attributes(void);
+void wimax_proto_register_wimax_utility_decoders(void);
+void wimax_proto_register_mac_header_generic(void);
+void wimax_proto_register_mac_header_type_1(void);
+void wimax_proto_register_mac_header_type_2(void);
+
+void wimax_proto_reg_handoff_wimax_pdu(void);
+void wimax_proto_reg_handoff_mac_header_generic(void);
+
+#endif
diff --git a/plugins/epan/wimax/wimax_bits.h b/plugins/epan/wimax/wimax_bits.h
new file mode 100644
index 0000000000..ae0ab4e3a8
--- /dev/null
+++ b/plugins/epan/wimax/wimax_bits.h
@@ -0,0 +1,206 @@
+/* wimax_bits.h
+ * WiMax MAC Management UL-MAP Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Mike Harvey <michael.harvey@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __wimax_bits_h__
+#define __wimax_bits_h__
+
+#include <wsutil/pint.h>
+
+/********************************************************************
+ * Functions for working with nibbles and bits
+ */
+
+/* SWAR functions */
+#define _BITS(n,hi,lo) (((n)>>(lo))&((1<<(((hi)-(lo))+1))-1))
+#define _ADD_SWAP(x,y) { (x) = (x) + (y); (y) = (x) - (y); (x) = (x) - (y); }
+#define _XOR_SWAP(x,y) { (x) ^= (y); (y) ^= (x); (x) ^= (y); }
+#define _SWAP(x,y) do { int t = (x); (x) = (y); (y) = t; } while(0)
+
+
+/********************************************************************
+ * Functions for working with nibbles
+ *
+ */
+
+#define NIBBLE_MASK 0x0F
+#define BYTE_MASK 0xFF
+
+/* extract the nibble at the given nibble address 'n' of tvbuff_t 't' */
+#define TVB_NIB_NIBBLE(n,t) \
+ (((n) & 1) \
+ ? tvb_get_guint8((t), (n)/2) & NIBBLE_MASK \
+ : (tvb_get_guint8((t), (n)/2) >> 4) & NIBBLE_MASK)
+
+/* extract the byte at the given nibble address 'n' of tvbuff_t 't' */
+#define TVB_NIB_BYTE(n,t) \
+ (n) & 1 \
+ ? (tvb_get_ntohs((t), (n)/2) >> 4) & BYTE_MASK \
+ : tvb_get_guint8((t), (n)/2)
+
+/* extract 12 bits at the given nibble address */
+#define TVB_NIB_BITS12(n,t) \
+ (TVB_NIB_NIBBLE(n+2,t) | (TVB_NIB_BYTE(n,t) << 4))
+
+/* extract the word at the given nibble address 'n' of tvbuff_t 't' */
+#define TVB_NIB_WORD(n,t) \
+ (n) & 1 \
+ ? (gint)((tvb_get_ntohl((t), (n)/2) >> 12) & 0x0000FFFF) \
+ : tvb_get_ntohs((t), (n)/2)
+
+/* extract the word at the given nibble address 'n' of tvbuff_t 't' */
+#define TVB_NIB_LONG(n,t) \
+ (n) & 1 \
+ ? (tvb_get_ntohl((t), (n)/2) << 4) | ((tvb_get_guint8((t), (n)/2 + 4) >> 4) & NIBBLE_MASK) \
+ : tvb_get_ntohl((t), (n)/2)
+
+/* Only currently used with nib == 1 or 2 */
+#define TVB_NIB_NIBS(nib, t, num) \
+ ((num) == 1 ? TVB_NIB_NIBBLE(nib,t) : \
+ ((num) == 2 ? TVB_NIB_BYTE(nib,t) : \
+ ((num) == 3 ? TVB_NIB_BITS12(nib,t) : \
+ ((num) == 4 ? TVB_NIB_WORD(nib,t) : \
+ 0))))
+
+/* to highlight nibfields correctly in wireshark
+ * AddItem(..., WSADDR(buf,bit), WSLEN(bit), ...) */
+
+/* determine starting byte to highlight a series of nibbles */
+#define NIB_ADDR(nib) ((nib)/2)
+/* determine number of bytes to highlight a series of nibbles */
+#define NIB_LEN(nib,len) ((1 + ((nib) &1) + (len))/2)
+
+#define NIBHI(nib,len) NIB_ADDR(nib),NIB_LEN(nib,len)
+
+/********************************************************************
+ * bitfield functions - for extracting bitfields from a buffer
+ *
+ * TODO: 64 bit functions use two 32-bit values;
+ * would be better to use 32+8 bits to avoid overrunning buffers
+ *
+ */
+
+/* find the byte-address for the bitfield */
+#define ADDR(bit) ((bit) / 8)
+#define ADDR16(bit) ((bit) / 8)
+#define ADDR32(bit) ((bit) / 8)
+
+/* find the offset (from the MSB) to the start of the bitfield */
+#define OFFSET(bit) ((bit) % 8)
+#define OFFSET16(bit) ((bit) % 8)
+#define OFFSET32(bit) ((bit) % 8)
+
+/* find the number of bits to shift right (SHIFT64 is upper dword) */
+#define SHIFT(bit,num) ( 8 - ((bit)%8) - (num))
+#define SHIFT16(bit,num) (16 - ((bit)%8) - (num))
+#define SHIFT32(bit,num) (32 - ((bit)%8) - (num))
+#define SHIFT64a(bit,num) (num - (32 - OFFSET32(bit)))
+#define SHIFT64b(bit,num) (32 - ((num) - (32 - OFFSET32(bit))))
+
+/* create a mask to mask off the bitfield */
+#define MASK8(num) (0xFF >> (8 - (num)))
+#define MASK16(num) (0xFFFF >> (16 - (num)))
+#define MASK32(num) (0xFFFFFFFF >> (32 - (num)))
+#define MASK64a(bit) (MASK32(32 - OFFSET32(bit)))
+#define MASK64b(bit,num) (MASK32(num - (32 - OFFSET32(bit))))
+
+/* note that if you have a bitfield of length 2 or more, it may cross a
+ * byte boundary so you should use TVB_BIT_BITS16 */
+
+/* extract a single bit
+ * bit ... bit address
+ * tvb ... tvbuff_t
+ */
+#define TVB_BIT_BIT(bit, tvb) \
+ (( tvb_get_guint8(tvb, ADDR(bit)) >> SHIFT(bit,1) ) & 0x1)
+
+/* extract bitfield up to 9 bits
+ * bit ... bit address
+ * tvb ... tvbuff_t
+ * num ... length of bitfield
+ */
+#define TVB_BIT_BITS16(bit, tvb, num) \
+ (( tvb_get_ntohs(tvb, ADDR16(bit)) >> SHIFT16(bit,num) ) & MASK16(num))
+
+/* extract bitfield up to 24 bits
+ * bit ... bit address
+ * tvb ... tvbuff_t
+ * num ... length of bitfield
+ */
+
+#define TVB_BIT_BITS32(bit, tvb, num) \
+ ((tvb_get_ntohl(tvb, ADDR32(bit)) >> SHIFT32(bit,num) ) & MASK32(num))
+
+/* bitfield up to 32 bits */
+#define TVB_BIT_BITS64a(bit, tvb, num) \
+ ((tvb_get_ntohl(tvb, ADDR32(bit)) & MASK64a(bit)) << SHIFT64a(bit,num))
+
+#define TVB_BIT_BITS64b(bit, tvb, num) \
+ ((tvb_get_ntohl(tvb, ADDR32(bit)+4) >> SHIFT64b(bit,num) ) & MASK64b(bit,num))
+
+#define TVB_BIT_BITS64(bit, tvb, num) \
+ ( (OFFSET32(bit)+(num)) <= 32 \
+ ? TVB_BIT_BITS32(bit,tvb,num) \
+ : TVB_BIT_BITS64a(bit,tvb,num) \
+ | TVB_BIT_BITS64b(bit,tvb,num) )
+
+#define TVB_BIT_BITS(bit, tvb, num) \
+ ((num) == 1 ? (gint)TVB_BIT_BIT(bit,tvb) : \
+ ((num) <= 9 ? (gint)TVB_BIT_BITS16(bit,tvb,num) : \
+ ((num) <= 24 ? (gint)TVB_BIT_BITS32(bit,tvb,num) : \
+ ((num) <= 32 ? (gint)TVB_BIT_BITS64(bit,tvb,num) : \
+ (gint)0 ))))
+
+/* to highlight bitfields correctly in wireshark
+ * AddItem(..., WSADDR(buf,bit), WSLEN(bit), ...) */
+
+/* determine starting byte to highlight a series of nibbles */
+#define BIT_ADDR(bit) (ADDR(bit))
+/* determine number of bytes to highlight */
+#define BIT_LEN(bit,len) (1 + ((OFFSET(bit) + len - 1) / 8))
+
+#define BITHI(bit,len) BIT_ADDR(bit),BIT_LEN(bit,len)
+
+/********************************************************************
+ * padding functions - return number of nibbles/bits needed to
+ * pad to a byte boundary */
+
+#define BIT_PADDING(bit, bits) ((bit) % (bits)) ? ((bits) - ((bit) % (bits))) : 0
+#define NIB_PADDING(nib) ((nib) & 0x1)
+
+/********************************************************************
+ * conversion functions - between bytes, nibbles, and bits */
+
+#define BYTE_TO_BIT(n) ((n) * 8)
+#define BYTE_TO_NIB(n) ((n) * 2)
+
+#define BIT_TO_BYTE(n) ((n) / 8)
+#define BIT_TO_NIB(n) ((n) / 4)
+
+#define NIB_TO_BYTE(n) ((n) / 2)
+#define NIB_TO_BIT(n) ((n) * 4)
+
+#endif
+
diff --git a/plugins/epan/wimax/wimax_cdma_code_decoder.c b/plugins/epan/wimax/wimax_cdma_code_decoder.c
new file mode 100644
index 0000000000..b9b504f8df
--- /dev/null
+++ b/plugins/epan/wimax/wimax_cdma_code_decoder.c
@@ -0,0 +1,128 @@
+/* wimax_cdma_code_decoder.c
+ * WiMax CDMA CODE Attribute decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax-int.h"
+
+static int proto_wimax_cdma_code_decoder = -1;
+static gint ett_wimax_cdma_code_decoder = -1;
+
+static int hf_wimax_ranging_code = -1;
+static int hf_wimax_ranging_symbol_offset = -1;
+static int hf_wimax_ranging_subchannel_offset = -1;
+
+static int dissect_wimax_cdma_code_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ gint offset = 0;
+ proto_item *cdma_item;
+ proto_tree *cdma_tree;
+
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "CDMA Code Attribute");
+ if (tree)
+ { /* we are being asked for details */
+ /* display CDMA dissector info */
+ cdma_item = proto_tree_add_item(tree, proto_wimax_cdma_code_decoder, tvb, offset, -1, ENC_NA);
+ /* add CDMA Code subtree */
+ cdma_tree = proto_item_add_subtree(cdma_item, ett_wimax_cdma_code_decoder);
+ /* display the first CDMA Code */
+ proto_tree_add_item(cdma_tree, hf_wimax_ranging_code, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the 2nd CDMA Code */
+ proto_tree_add_item(cdma_tree, hf_wimax_ranging_symbol_offset, tvb, offset+1, 1, ENC_BIG_ENDIAN);
+ /* display the 3rd CDMA Code */
+ proto_tree_add_item(cdma_tree, hf_wimax_ranging_subchannel_offset, tvb, offset+2, 1, ENC_BIG_ENDIAN);
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax CDMA Protocol */
+void wimax_proto_register_wimax_cdma(void)
+{
+ /* TLV display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_wimax_ranging_code,
+ {
+ "Ranging Code", "wmx.cdma.ranging_code",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_wimax_ranging_symbol_offset,
+ {
+ "Ranging Symbol Offset", "wmx.cdma.ranging_symbol_offset",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_wimax_ranging_subchannel_offset,
+ {
+ "Ranging Sub-Channel Offset", "wmx.cdma.ranging_subchannel_offset",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL
+ }
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_wimax_cdma_code_decoder,
+ };
+
+ proto_wimax_cdma_code_decoder = proto_register_protocol (
+ "WiMax CDMA Code Attribute", /* name */
+ "CDMA Code Attribute", /* short name */
+ "wmx.cdma" /* abbrev */
+ );
+
+ /* register the field display messages */
+ proto_register_field_array(proto_wimax_cdma_code_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ register_dissector("wimax_cdma_code_burst_handler", dissect_wimax_cdma_code_decoder, -1);
+}
+
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.c b/plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.c
new file mode 100644
index 0000000000..4016acab6d
--- /dev/null
+++ b/plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.c
@@ -0,0 +1,2123 @@
+/* wimax_compact_dlmap_ie_decoder.c
+ * WiMax HARQ Map Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax-int.h"
+#include "wimax_compact_dlmap_ie_decoder.h"
+
+extern gint proto_wimax;
+
+/* MASKs */
+#define MSB_NIBBLE_MASK 0xF0
+#define LSB_NIBBLE_MASK 0x0F
+
+#define CID_TYPE_NORMAL 0
+#define CID_TYPE_RCID11 1
+#define CID_TYPE_RCID7 2
+#define CID_TYPE_RCID3 3
+
+/* Global Variables */
+guint cid_type = 0;
+guint band_amc_subchannel_type = 0;
+guint max_logical_bands = 12;
+guint num_of_broadcast_symbols = 0;
+guint num_of_dl_band_amc_symbols = 0;
+guint num_of_ul_band_amc_symbols = 0;
+/* from switch HARQ mode extension IE */
+guint harq_mode = 0;
+
+/* forward reference */
+static guint wimax_compact_dlmap_format_configuration_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+static guint wimax_compact_dlmap_rcid_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+static guint wimax_compact_dlmap_harq_control_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+static guint wimax_compact_dlmap_cqich_control_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+static guint wimax_cdlmap_extension_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+guint wimax_extended_diuc_dependent_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+
+static gint proto_wimax_compact_dlmap_ie_decoder = -1;
+
+#if 0 /* not used ?? */
+static gint ett_wimax_compact_dlmap_ie_decoder = -1;
+static gint ett_wimax_format_configuration_ie_decoder = -1;
+static gint ett_wimax_rcid_ie_decoder = -1;
+static gint ett_wimax_harq_control_ie_decoder = -1;
+static gint ett_wimax_extended_diuc_dependent_ie_decoder = -1;
+static gint ett_wimax_cqich_control_ie_decoder = -1;
+static gint ett_wimax_extension_type_ie_decoder = -1;
+#endif
+
+/* New Format Indications */
+static const true_false_string tfs_indication =
+{
+ "New format",
+ "No new format"
+};
+
+/* Prefixes */
+static const true_false_string tfs_prefix =
+{
+ "Enable HARQ",
+ "Temporary Disable HARQ"
+};
+
+/* CQICH Indicator */
+static const true_false_string tfs_cqich_ind =
+{
+ "With CQICH Control IE",
+ "No CQICH Control IE"
+};
+
+/* CID types */
+static const value_string vals_cid_types[] =
+{
+ { 0, "Normal CID" },
+ { 1, "RCID11 (default)" },
+ { 2, "RCID7" },
+ { 3, "RCID3" },
+ { 0, NULL }
+};
+
+/* Subchannel Types */
+static const value_string vals_subchannel_types[] =
+{
+ { 0, "Default Type" },
+ { 1, "1 bin x 6 symbols Type" },
+ { 2, "2 bin x 3 symbols Type" },
+ { 3, "3 bin x 2 symbols Type" },
+ { 0, NULL }
+};
+
+/* Max Logical Bands */
+static const value_string vals_max_logical_bands[] =
+{
+ { 0, "3 Bands" },
+ { 1, "6 Bands" },
+ { 2, "12 Bands (default)" },
+ { 3, "24 Bands" },
+ { 0, NULL }
+};
+
+/* Repetition Coding Indications */
+static const value_string rep_msgs[] =
+{
+ { 0, "No Repetition Coding" },
+ { 1, "Repetition Coding of 2 Used" },
+ { 2, "Repetition Coding of 4 Used" },
+ { 3, "Repetition Coding of 6 Used" },
+ { 0, NULL }
+};
+
+/* Repetition Coding Indications */
+static const value_string vals_allocation_modes[] =
+{
+ { 0, "Same Number Of Subchannels For The Selected Bands" },
+ { 1, "Different Same Number Of Subchannels For The Selected Bands" },
+ { 2, "Total Number Of Subchannels For The Selected Bands Determined by Nsch Code and Nep Code" },
+ { 3, "Reserved" },
+ { 0, NULL }
+};
+
+/* Masks */
+#define DL_MAP_TYPE_MASK 0xE0
+#define UL_MAP_APPEND_MASK 0x10
+#define SHORTENED_DIUC_MASK 0xE0
+#define COMPANDED_SC_MASK 0x1F
+#define DL_MAP_TYPE_MASK_1 0x0E
+#define UL_MAP_APPEND_MASK_1 0x01
+#define SHORTENED_DIUC_MASK_1 0x0E00
+#define COMPANDED_SC_MASK_1 0x01F0
+
+/* display indexies */
+static gint hf_cdlmap_dl_map_type = -1;
+static gint hf_cdlmap_ul_map_append = -1;
+static gint hf_cdlmap_reserved = -1;
+static gint hf_cdlmap_nep_code = -1;
+static gint hf_cdlmap_nsch_code = -1;
+static gint hf_cdlmap_num_bands = -1;
+static gint hf_cdlmap_band_index = -1;
+static gint hf_cdlmap_nb_bitmap = -1;
+static gint hf_cdlmap_dl_map_type_1 = -1;
+static gint hf_cdlmap_ul_map_append_1 = -1;
+static gint hf_cdlmap_reserved_1 = -1;
+static gint hf_cdlmap_nep_code_1 = -1;
+static gint hf_cdlmap_nsch_code_1 = -1;
+static gint hf_cdlmap_num_bands_1 = -1;
+/*static gint hf_cdlmap_band_index_1 = -1;*/
+static gint hf_cdlmap_nb_bitmap_1 = -1;
+
+static gint hf_cdlmap_shortened_diuc = -1;
+static gint hf_cdlmap_companded_sc = -1;
+static gint hf_cdlmap_shortened_uiuc = -1;
+static gint hf_cdlmap_shortened_diuc_1 = -1;
+static gint hf_cdlmap_companded_sc_1 = -1;
+static gint hf_cdlmap_shortened_uiuc_1 = -1;
+
+static gint hf_cdlmap_bin_offset = -1;
+static gint hf_cdlmap_bin_offset_1 = -1;
+
+static gint hf_cdlmap_diuc_num_of_subchannels = -1;
+static gint hf_cdlmap_diuc_num_of_subchannels_1 = -1;
+static gint hf_cdlmap_diuc_repetition_coding_indication = -1;
+static gint hf_cdlmap_diuc_repetition_coding_indication_1 = -1;
+static gint hf_cdlmap_diuc_reserved = -1;
+static gint hf_cdlmap_diuc_reserved_1 = -1;
+
+static gint hf_cdlmap_bit_map_length = -1;
+static gint hf_cdlmap_bit_map_length_1 = -1;
+static gint hf_cdlmap_bit_map = -1;
+
+static gint hf_cdlmap_diuc = -1;
+static gint hf_cdlmap_diuc_1 = -1;
+
+static gint hf_cdlmap_allocation_mode = -1;
+static gint hf_cdlmap_allocation_mode_rsvd = -1;
+static gint hf_cdlmap_num_subchannels = -1;
+static gint hf_cdlmap_allocation_mode_1 = -1;
+static gint hf_cdlmap_allocation_mode_rsvd_1 = -1;
+static gint hf_cdlmap_num_subchannels_1 = -1;
+
+/* static gint hf_cdlmap_reserved_type = -1; */
+static gint hf_cdlmap_reserved_type_1 = -1;
+
+/* display indexies */
+static gint hf_format_config_ie_dl_map_type = -1;
+static gint hf_format_config_ie_dl_map_type_1 = -1;
+static gint hf_format_config_ie_dl_map_type_32 = -1;
+static gint hf_format_config_ie_new_format_indication = -1;
+static gint hf_format_config_ie_new_format_indication_1 = -1;
+static gint hf_format_config_ie_new_format_indication_32 = -1;
+static gint hf_format_config_ie_cid_type = -1;
+static gint hf_format_config_ie_cid_type_1 = -1;
+static gint hf_format_config_ie_safety_pattern = -1;
+static gint hf_format_config_ie_safety_pattern_1 = -1;
+static gint hf_format_config_ie_subchannel_type = -1;
+static gint hf_format_config_ie_subchannel_type_1 = -1;
+static gint hf_format_config_ie_max_logical_bands = -1;
+static gint hf_format_config_ie_max_logical_bands_1 = -1;
+static gint hf_format_config_ie_num_of_broadcast_symbol = -1;
+static gint hf_format_config_ie_num_of_broadcast_symbol_1 = -1;
+static gint hf_format_config_ie_num_of_dl_band_amc_symbol = -1;
+static gint hf_format_config_ie_num_of_dl_band_amc_symbol_1 = -1;
+static gint hf_format_config_ie_num_of_ul_band_amc_symbol = -1;
+static gint hf_format_config_ie_num_of_ul_band_amc_symbol_1 = -1;
+
+/* Format Configuration IE Masks */
+#define FORMAT_CONFIG_IE_DL_MAP_TYPE_MASK 0xE0000000
+#define FORMAT_CONFIG_IE_NEW_FORMAT_IND_MASK 0x10000000
+#define CID_TYPE_MASK_1 0x0C000000
+#define SAFETY_PATTERN_MASK_1 0x03E00000
+#define BAND_AMC_SUBCHANNEL_TYPE_MASK_1 0x00180000
+#define MAX_LOGICAL_BANDS_MASK_1 0x00060000
+#define NUM_BROADCAST_SYMBOLS_MASK_1 0x0001F000
+#define NUM_DL_AMC_SYMBOLS_MASK_1 0x00000FC0
+#define NUM_UL_AMC_SYMBOLS_MASK_1 0x0000003F
+#define CID_TYPE_MASK 0xC0000000
+#define SAFETY_PATTERN_MASK 0x3E000000
+#define BAND_AMC_SUBCHANNEL_TYPE_MASK 0x01800000
+#define MAX_LOGICAL_BANDS_MASK 0x00600000
+#define NUM_BROADCAST_SYMBOLS_MASK 0x001F0000
+#define NUM_DL_AMC_SYMBOLS_MASK 0x0000FC00
+#define NUM_UL_AMC_SYMBOLS_MASK 0x000003F0
+
+/* display indexies */
+static gint hf_harq_rcid_ie_prefix = -1;
+static gint hf_harq_rcid_ie_prefix_1 = -1;
+static gint hf_harq_rcid_ie_normal_cid = -1;
+static gint hf_harq_rcid_ie_normal_cid_1 = -1;
+static gint hf_harq_rcid_ie_cid3 = -1;
+static gint hf_harq_rcid_ie_cid3_1 = -1;
+static gint hf_harq_rcid_ie_cid7 = -1;
+static gint hf_harq_rcid_ie_cid7_1 = -1;
+static gint hf_harq_rcid_ie_cid11 = -1;
+static gint hf_harq_rcid_ie_cid11_1 = -1;
+static gint hf_harq_rcid_ie_cid11_2 = -1;
+static gint hf_harq_rcid_ie_cid11_3 = -1;
+
+/* Masks */
+#define WIMAX_RCID_IE_NORMAL_CID_MASK_1 0x0FFFF0
+#define WIMAX_RCID_IE_PREFIX_MASK 0x8000
+#define WIMAX_RCID_IE_PREFIX_MASK_1 0x0800
+#define WIMAX_RCID_IE_CID3_MASK 0x7000
+#define WIMAX_RCID_IE_CID3_MASK_1 0x0700
+#define WIMAX_RCID_IE_CID7_MASK 0x7F00
+#define WIMAX_RCID_IE_CID7_MASK_1 0x07F0
+#define WIMAX_RCID_IE_CID11_MASK 0x7FF0
+#define WIMAX_RCID_IE_CID11_MASK_1 0x07FF
+
+/* HARQ MAP HARQ Control IE display indexies */
+static gint hf_harq_control_ie_prefix = -1;
+static gint hf_harq_control_ie_ai_sn = -1;
+static gint hf_harq_control_ie_spid = -1;
+static gint hf_harq_control_ie_acid = -1;
+static gint hf_harq_control_ie_reserved = -1;
+static gint hf_harq_control_ie_prefix_1 = -1;
+static gint hf_harq_control_ie_ai_sn_1 = -1;
+static gint hf_harq_control_ie_spid_1 = -1;
+static gint hf_harq_control_ie_acid_1 = -1;
+static gint hf_harq_control_ie_reserved_1 = -1;
+
+/* Masks */
+#define WIMAX_HARQ_CONTROL_IE_PREFIX_MASK 0x80
+#define WIMAX_HARQ_CONTROL_IE_AI_SN_MASK 0x40
+#define WIMAX_HARQ_CONTROL_IE_SPID_MASK 0x30
+#define WIMAX_HARQ_CONTROL_IE_ACID_MASK 0x0F
+#define WIMAX_HARQ_CONTROL_IE_RESERVED_MASK 0x70
+#define WIMAX_HARQ_CONTROL_IE_PREFIX_MASK_1 0x0800
+#define WIMAX_HARQ_CONTROL_IE_AI_SN_MASK_1 0x0400
+#define WIMAX_HARQ_CONTROL_IE_SPID_MASK_1 0x0300
+#define WIMAX_HARQ_CONTROL_IE_ACID_MASK_1 0x00F0
+#define WIMAX_HARQ_CONTROL_IE_RESERVED_MASK_1 0x0700
+
+/* HARQ MAP CQICH Control IE display indexies */
+static gint hf_cqich_control_ie_indicator = -1;
+static gint hf_cqich_control_ie_alloc_id = -1;
+static gint hf_cqich_control_ie_period = -1;
+static gint hf_cqich_control_ie_frame_offset = -1;
+static gint hf_cqich_control_ie_duration = -1;
+static gint hf_cqich_control_ie_cqi_rep_threshold = -1;
+static gint hf_cqich_control_ie_indicator_1 = -1;
+static gint hf_cqich_control_ie_alloc_id_1 = -1;
+static gint hf_cqich_control_ie_period_1 = -1;
+static gint hf_cqich_control_ie_frame_offset_1 = -1;
+static gint hf_cqich_control_ie_duration_1 = -1;
+static gint hf_cqich_control_ie_cqi_rep_threshold_1 = -1;
+
+/* Masks */
+#define WIMAX_CQICH_CONTROL_IE_INDICATOR_MASK 0x8000
+#define WIMAX_CQICH_CONTROL_IE_ALLOCATION_INDEX_MASK 0x7E00
+#define WIMAX_CQICH_CONTROL_IE_PERIOD_MASK 0x0180
+#define WIMAX_CQICH_CONTROL_IE_FRAME_OFFSET_MASK 0x0070
+#define WIMAX_CQICH_CONTROL_IE_DURATION_MASK 0x000F
+#define WIMAX_CQICH_CONTROL_IE_CQI_REP_THRESHOLD_MASK 0x7000
+#define WIMAX_CQICH_CONTROL_IE_INDICATOR_MASK_1 0x080000
+#define WIMAX_CQICH_CONTROL_IE_ALLOCATION_INDEX_MASK_1 0x07E000
+#define WIMAX_CQICH_CONTROL_IE_PERIOD_MASK_1 0x001800
+#define WIMAX_CQICH_CONTROL_IE_FRAME_OFFSET_MASK_1 0x000700
+#define WIMAX_CQICH_CONTROL_IE_DURATION_MASK_1 0x0000F0
+#define WIMAX_CQICH_CONTROL_IE_CQI_REP_THRESHOLD_MASK_1 0x070000
+
+/* Extension Type */
+#define EXTENSION_TYPE_MASK 0xE000
+#define EXTENSION_TYPE_MASK_1 0x0E00
+#define EXTENSION_SUBTYPE_MASK 0x1F00
+#define EXTENSION_SUBTYPE_MASK_1 0x01F0
+#define EXTENSION_LENGTH_MASK 0x00F0
+#define EXTENSION_LENGTH_MASK_1 0x000F
+
+static gint hf_cdlmap_extension_type = -1;
+static gint hf_cdlmap_extension_subtype = -1;
+static gint hf_cdlmap_extension_length = -1;
+static gint hf_cdlmap_extension_type_1 = -1;
+static gint hf_cdlmap_extension_subtype_1 = -1;
+static gint hf_cdlmap_extension_length_1 = -1;
+
+static gint hf_cdlmap_extension_time_diversity_mbs = -1;
+static gint hf_cdlmap_extension_harq_mode = -1;
+static gint hf_cdlmap_extension_unknown_sub_type = -1;
+static gint hf_cdlmap_extension_time_diversity_mbs_1 = -1;
+static gint hf_cdlmap_extension_harq_mode_1 = -1;
+static gint hf_cdlmap_extension_unknown_sub_type_1 = -1;
+
+/* Extended DIUC dependent IE display indexies */
+static gint hf_extended_diuc_dependent_ie_diuc = -1;
+static gint hf_extended_diuc_dependent_ie_diuc_1 = -1;
+static gint hf_extended_diuc_dependent_ie_length = -1;
+static gint hf_extended_diuc_dependent_ie_length_1 = -1;
+static gint hf_extended_diuc_dependent_ie_channel_measurement = -1;
+static gint hf_extended_diuc_dependent_ie_stc_zone = -1;
+static gint hf_extended_diuc_dependent_ie_aas_dl = -1;
+static gint hf_extended_diuc_dependent_ie_data_location = -1;
+static gint hf_extended_diuc_dependent_ie_cid_switch = -1;
+static gint hf_extended_diuc_dependent_ie_mimo_dl_basic = -1;
+static gint hf_extended_diuc_dependent_ie_mimo_dl_enhanced = -1;
+static gint hf_extended_diuc_dependent_ie_harq_map_pointer = -1;
+static gint hf_extended_diuc_dependent_ie_phymod_dl = -1;
+static gint hf_extended_diuc_dependent_ie_dl_pusc_burst_allocation = -1;
+static gint hf_extended_diuc_dependent_ie_ul_interference_and_noise_level = -1;
+static gint hf_extended_diuc_dependent_ie_unknown_diuc = -1;
+
+
+/* Compact DL-MAP IE Types (table 89) */
+#define COMPACT_DL_MAP_TYPE_NORMAL_SUBCHANNEL 0
+#define COMPACT_DL_MAP_TYPE_BAND_AMC 1
+#define COMPACT_DL_MAP_TYPE_SAFETY 2
+#define COMPACT_DL_MAP_TYPE_UIUC 3
+#define COMPACT_DL_MAP_TYPE_FORMAT_CONF_IE 4
+#define COMPACT_DL_MAP_TYPE_HARQ_ACK_BITMAP_IE 5
+#define COMPACT_DL_MAP_TYPE_RESERVED 6
+#define COMPACT_DL_MAP_TYPE_EXTENSION 7
+
+/* Compact DL-MAP IE decoder */
+guint wimax_compact_dlmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset)
+{
+ guint diuc, byte, length = 0;
+ guint dl_map_type, ul_map_append;
+ guint dl_map_offset, nibble_length, bit_map_length;
+ guint nband, band_count, i, allocation_mode;
+
+#ifdef DEBUG
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Compact DL-MAP IEs");
+#endif
+ /* set the local offset */
+ dl_map_offset = offset;
+ /* Get the first byte */
+ byte = tvb_get_guint8(tvb, dl_map_offset);
+ if(nibble_offset & 1)
+ {
+ dl_map_type = ((byte & DL_MAP_TYPE_MASK_1) >> 1);
+ ul_map_append = (byte & UL_MAP_APPEND_MASK_1);
+ }
+ else
+ {
+ dl_map_type = ((byte & DL_MAP_TYPE_MASK) >> 5);
+ ul_map_append = (byte & UL_MAP_APPEND_MASK);
+ }
+ switch (dl_map_type)
+ {
+ case COMPACT_DL_MAP_TYPE_NORMAL_SUBCHANNEL:/* 6.3.2.3.43.6.1 */
+ if(nibble_offset & 1)
+ { /* display the DL-MAP type */
+ proto_tree_add_item(tree, hf_cdlmap_dl_map_type_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the UL-MAP append */
+ proto_tree_add_item(tree, hf_cdlmap_ul_map_append_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ nibble_offset = 0;
+ }
+ else
+ { /* display the DL-MAP type */
+ proto_tree_add_item(tree, hf_cdlmap_dl_map_type, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the UL-MAP append */
+ proto_tree_add_item(tree, hf_cdlmap_ul_map_append, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ nibble_offset = 1;
+ }
+ length = 1;
+ /* decode RCID IE */
+ nibble_length = wimax_compact_dlmap_rcid_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
+ length += nibble_length;
+ dl_map_offset += (nibble_length >> 1);
+ nibble_offset = (nibble_length & 1);
+ /* check harq mode */
+ if(!harq_mode)
+ { /* display the Nep and Nsch Code */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_nep_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ proto_tree_add_item(tree, hf_cdlmap_nsch_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_nep_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_nsch_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ }
+ length += 2;
+ }
+ else if(harq_mode == 1)
+ { /* display the Shortened DIUC and Companded SC */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_shortened_diuc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_companded_sc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_shortened_diuc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_companded_sc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ /* move to next byte */
+ dl_map_offset++;
+ length += 2;
+ }
+ /* decode HARQ Control IE */
+ nibble_length = wimax_compact_dlmap_harq_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
+ length += nibble_length;
+ dl_map_offset += ((nibble_offset + nibble_length) >> 1);
+ nibble_offset = ((nibble_offset + nibble_length) & 1);
+ /* decode CQICH Control IE */
+ nibble_length = wimax_compact_dlmap_cqich_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
+ length += nibble_length;
+ dl_map_offset += ((nibble_offset + nibble_length) >> 1);
+ nibble_offset = ((nibble_offset + nibble_length) & 1);
+ if(ul_map_append)
+ { /* check harq mode */
+ if(harq_mode == 1)
+ { /* display the Shortened UIUC and Companded SC */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_shortened_uiuc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_companded_sc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_shortened_uiuc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_companded_sc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ /* move to next byte */
+ dl_map_offset++;
+ length += 2;
+ }
+ else if(!harq_mode)
+ { /* display the Nep and Nsch Code */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_nep_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ proto_tree_add_item(tree, hf_cdlmap_nsch_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_nep_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_nsch_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ }
+ length += 2;
+ }
+ /* decode HARQ Control IE */
+ nibble_length = wimax_compact_dlmap_harq_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
+ length += nibble_length;
+ }
+ break;
+ case COMPACT_DL_MAP_TYPE_BAND_AMC:/* 6.3.2.3.43.6.2 */
+ if(nibble_offset & 1)
+ { /* display the DL-MAP type */
+ proto_tree_add_item(tree, hf_cdlmap_dl_map_type_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved */
+ proto_tree_add_item(tree, hf_cdlmap_reserved_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ nibble_offset = 0;
+ }
+ else
+ { /* display the DL-MAP type */
+ proto_tree_add_item(tree, hf_cdlmap_dl_map_type, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved */
+ proto_tree_add_item(tree, hf_cdlmap_reserved, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ nibble_offset = 1;
+ }
+ length = 1;
+ /* decode RCID IE */
+ nibble_length = wimax_compact_dlmap_rcid_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
+ length += nibble_length;
+ dl_map_offset += (nibble_length >> 1);
+ nibble_offset = (nibble_length & 1);
+ /* check harq mode */
+ if(!harq_mode)
+ { /* display the Nep and Nsch Code */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_nep_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ proto_tree_add_item(tree, hf_cdlmap_nsch_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_nep_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_nsch_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ }
+ length += 2;
+ }
+ else if(harq_mode == 1)
+ { /* display the Shortened DIUC and Companded SC */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_shortened_diuc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_companded_sc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_shortened_diuc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_companded_sc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ /* move to next byte */
+ dl_map_offset++;
+ length += 2;
+ }
+ /* get the Nband */
+ if(max_logical_bands)
+ { /* get and display the Nband */
+ nband = tvb_get_guint8(tvb, dl_map_offset);
+ if(nibble_offset & 1)
+ {
+ nband = (nband & LSB_NIBBLE_MASK);
+ /* display the Nband */
+ proto_tree_add_item(tree, hf_cdlmap_num_bands_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ nibble_offset = 0;
+ if(max_logical_bands == 3)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_band_index, tvb, dl_map_offset, nband, ENC_NA);
+ length += (nband * 2);
+ /* update offset */
+ dl_map_offset += nband;
+ }
+ else
+ {
+ nibble_offset = (nband & 1);
+ proto_tree_add_item(tree, hf_cdlmap_band_index, tvb, dl_map_offset, ((nband >> 1) + nibble_offset), ENC_NA);
+ length += nband;
+ /* update offset */
+ dl_map_offset += (nband >> 1);
+ }
+ }
+ else
+ {
+ nband = ((nband & MSB_NIBBLE_MASK) >> 4);
+ /* display the Nband */
+ proto_tree_add_item(tree, hf_cdlmap_num_bands, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ nibble_offset = 1;
+ if(max_logical_bands == 3)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_band_index, tvb, dl_map_offset, (nband + nibble_offset), ENC_NA);
+ length += (nband * 2);
+ /* update offset */
+ dl_map_offset += nband;
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_band_index, tvb, dl_map_offset, ((nband >> 1) + nibble_offset), ENC_NA);
+ length += nband;
+ /* update offset */
+ dl_map_offset += ((nband + nibble_offset) >> 1);
+ if(nband & 1)
+ nibble_offset = 0;
+ }
+ }
+ length++;
+ band_count = nband;
+ }
+ else
+ {
+ band_count = 1;
+ /* display the Nb-BITMAP */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_nb_bitmap_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ nibble_offset = 0;
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_nb_bitmap, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ nibble_offset = 1;
+ }
+ length++;
+ }
+ /* Get the Allocation Mode */
+ byte = tvb_get_guint8(tvb, dl_map_offset);
+ if(nibble_offset & 1)
+ {
+ allocation_mode = ((byte & 0x0C) >> 2);
+ proto_tree_add_item(tree, hf_cdlmap_allocation_mode_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_allocation_mode_rsvd_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ nibble_offset = 0;
+ dl_map_offset++;
+ }
+ else
+ {
+ allocation_mode = ((byte & 0xC0) >> 6);
+ proto_tree_add_item(tree, hf_cdlmap_allocation_mode, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_allocation_mode_rsvd, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ nibble_offset = 1;
+ }
+ /* Decode Allocation Mode - need to be done */
+ if(!allocation_mode)
+ {
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_num_subchannels_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_num_subchannels, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ dl_map_offset++;
+ }
+ else if(allocation_mode == 1)
+ {
+ for(i=0; i<band_count; i++)
+ {
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_num_subchannels_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_num_subchannels, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ dl_map_offset++;
+ }
+ }
+ /* decode HARQ Control IE */
+ nibble_length = wimax_compact_dlmap_harq_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
+ length += nibble_length;
+ dl_map_offset += ((nibble_offset + nibble_length) >> 1);
+ nibble_offset = ((nibble_offset + nibble_length) & 1);
+ /* decode CQICH Control IE */
+ nibble_length = wimax_compact_dlmap_cqich_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
+ length += nibble_length;
+ break;
+ case COMPACT_DL_MAP_TYPE_SAFETY:/* 6.3.2.3.43.6.3 */
+ if(nibble_offset & 1)
+ { /* display the DL-MAP type */
+ proto_tree_add_item(tree, hf_cdlmap_dl_map_type_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the UL-MAP append */
+ proto_tree_add_item(tree, hf_cdlmap_ul_map_append_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ nibble_offset = 0;
+ }
+ else
+ { /* display the DL-MAP type */
+ proto_tree_add_item(tree, hf_cdlmap_dl_map_type, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the UL-MAP append */
+ proto_tree_add_item(tree, hf_cdlmap_ul_map_append, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ nibble_offset = 1;
+ }
+ length = 1;
+ /* decode RCID IE */
+ nibble_length = wimax_compact_dlmap_rcid_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
+ length += nibble_length;
+ dl_map_offset += (nibble_length >> 1);
+ nibble_offset = (nibble_length & 1);
+ /* check harq mode */
+ if(!harq_mode)
+ { /* display the Nep and Nsch Code */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_nep_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ proto_tree_add_item(tree, hf_cdlmap_nsch_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_nep_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_nsch_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ }
+ length += 2;
+ }
+ else if(harq_mode == 1)
+ { /* display the Shortened DIUC and Companded SC */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_shortened_diuc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_companded_sc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_shortened_diuc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_companded_sc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ /* move to next byte */
+ dl_map_offset++;
+ length += 2;
+ }
+ /* display BIN offset */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_bin_offset_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_bin_offset, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ }
+ length += 2;
+ /* decode HARQ Control IE */
+ nibble_length = wimax_compact_dlmap_harq_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
+ length += nibble_length;
+ dl_map_offset += ((nibble_offset + nibble_length) >> 1);
+ nibble_offset = ((nibble_offset + nibble_length) & 1);
+ /* decode CQICH Control IE */
+ nibble_length = wimax_compact_dlmap_cqich_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
+ length += nibble_length;
+ dl_map_offset += ((nibble_offset + nibble_length) >> 1);
+ nibble_offset = ((nibble_offset + nibble_length) & 1);
+ if(ul_map_append)
+ { /* check harq mode */
+ if(harq_mode == 1)
+ { /* display the Shortened DIUC and Companded SC */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_shortened_diuc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_companded_sc_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_shortened_diuc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_companded_sc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ /* move to next byte */
+ dl_map_offset++;
+ length += 2;
+ }
+ else if(!harq_mode)
+ { /* display the Nep and Nsch Code */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_nep_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ proto_tree_add_item(tree, hf_cdlmap_nsch_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_nep_code, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_nsch_code_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ }
+ length += 2;
+ }
+ /* display BIN offset */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_bin_offset_1, tvb, dl_map_offset, 2, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_bin_offset, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ }
+ length += 2;
+ /* decode HARQ Control IE */
+ nibble_length = wimax_compact_dlmap_harq_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
+ length += nibble_length;
+ }
+ break;
+ case COMPACT_DL_MAP_TYPE_UIUC:/* 6.3.2.3.43.6.4 */
+ if(nibble_offset & 1)
+ { /* display the DL-MAP type */
+ proto_tree_add_item(tree, hf_cdlmap_dl_map_type_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved */
+ proto_tree_add_item(tree, hf_cdlmap_reserved_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ /* get the new byte */
+ byte = tvb_get_guint8(tvb, dl_map_offset);
+ /* get the DIUC */
+ diuc = ((byte & MSB_NIBBLE_MASK) >> 4);
+ /* display the DIUC */
+ proto_tree_add_item(tree, hf_cdlmap_diuc, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ /* display the DL-MAP type */
+ proto_tree_add_item(tree, hf_cdlmap_dl_map_type, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved */
+ proto_tree_add_item(tree, hf_cdlmap_reserved, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* get the DIUC */
+ diuc = (tvb_get_guint8(tvb, dl_map_offset) & LSB_NIBBLE_MASK);
+ /* display the DIUC */
+ proto_tree_add_item(tree, hf_cdlmap_diuc_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ dl_map_offset++;
+ }
+ length = 2;
+ if(diuc == 15)
+ { /* Extended DIUC dependent IE */
+ nibble_length = wimax_extended_diuc_dependent_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
+ length += nibble_length;
+ dl_map_offset += (nibble_length >> 1);
+ nibble_offset = (nibble_length & 1);
+ }
+ else
+ { /* decode RCID IE */
+ nibble_length = wimax_compact_dlmap_rcid_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
+ length += nibble_length;
+ dl_map_offset += (nibble_length >> 1);
+ nibble_offset = (nibble_length & 1);
+ /* display Number of subchannels */
+ if(nibble_offset & 1)
+ proto_tree_add_item(tree, hf_cdlmap_diuc_num_of_subchannels_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ else
+ proto_tree_add_item(tree, hf_cdlmap_diuc_num_of_subchannels, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ length += 2;
+ /* display the repetition coding indication and reserved bits */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_cdlmap_diuc_repetition_coding_indication_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_diuc_reserved_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_cdlmap_diuc_repetition_coding_indication, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_cdlmap_diuc_reserved, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ length += 1;
+ }
+ /* decode HARQ Control IE */
+ nibble_length = wimax_compact_dlmap_harq_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
+ length += nibble_length;
+ dl_map_offset += ((nibble_offset + nibble_length) >> 1);
+ nibble_offset = ((nibble_offset + nibble_length) & 1);
+ /* decode CQICH Control IE */
+ nibble_length = wimax_compact_dlmap_cqich_control_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
+ length += nibble_length;
+ break;
+ case COMPACT_DL_MAP_TYPE_FORMAT_CONF_IE:/* 6.3.2.3.43.2 */
+ /* decode the format configuration IE */
+ nibble_length = wimax_compact_dlmap_format_configuration_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);
+ length = nibble_length;
+ break;
+ case COMPACT_DL_MAP_TYPE_HARQ_ACK_BITMAP_IE:/* 6.3.2.3.43.6.5 */
+ if(nibble_offset & 1)
+ { /* display the DL-MAP type */
+ proto_tree_add_item(tree, hf_cdlmap_dl_map_type_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved */
+ proto_tree_add_item(tree, hf_cdlmap_reserved_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ length = 1;
+ /* move to next byte */
+ dl_map_offset++;
+ /* get the bit map length */
+ byte = tvb_get_guint8(tvb, dl_map_offset);
+ bit_map_length = ((byte & MSB_NIBBLE_MASK) >> 4);
+ /* display BITMAP Length */
+ proto_tree_add_item(tree, hf_cdlmap_bit_map_length, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display BITMAP */
+ proto_tree_add_item(tree, hf_cdlmap_bit_map, tvb, dl_map_offset, bit_map_length + 1, ENC_NA);
+ length += (1 + bit_map_length * 2);
+ }
+ else
+ {
+ /* display the DL-MAP type */
+ proto_tree_add_item(tree, hf_cdlmap_dl_map_type, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved */
+ proto_tree_add_item(tree, hf_cdlmap_reserved, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display BITMAP Length */
+ proto_tree_add_item(tree, hf_cdlmap_bit_map_length_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ length = 2;
+ /* get the bit map length */
+ bit_map_length = (byte & LSB_NIBBLE_MASK);
+ /* move to next byte */
+ dl_map_offset++;
+ /* display BITMAP */
+ proto_tree_add_item(tree, hf_cdlmap_bit_map, tvb, dl_map_offset, bit_map_length, ENC_NA);
+ length += (bit_map_length * 2);
+ }
+ break;
+ case COMPACT_DL_MAP_TYPE_EXTENSION:/* 6.3.2.3.43.6.6 */
+ /* decode the Compact DL-MAP externsion IE */
+ nibble_length = wimax_cdlmap_extension_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);/*, cqich_indicator);*/
+ length = nibble_length;
+ break;
+ default:/* Reserved Type */
+ /* display the reserved type */
+ proto_tree_add_item(tree, hf_cdlmap_reserved_type_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ length = 1;
+ break;
+ }
+ /* Update the nibble_offset and length */
+ return length;
+}
+
+/* Format Configuration IE shifts */
+#define CID_TYPE_SHIFT 30
+#define SAFETY_PATTERN_SHIFT 25
+#define BAND_AMC_SUBCHANNEL_TYPE_SHIFT 23
+#define MAX_LOGICAL_BANDS_SHIFT 21
+#define NUM_BROADCAST_SYMBOLS_SHIFT 16
+#define NUM_DL_AMC_SYMBOLS_SHIFT 10
+#define NUM_UL_AMC_SYMBOLS_SHIFT 4
+#define CID_TYPE_SHIFT_1 (CID_TYPE_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
+#define SAFETY_PATTERN_SHIFT_1 (SAFETY_PATTERN_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
+#define BAND_AMC_SUBCHANNEL_TYPE_SHIFT_1 (BAND_AMC_SUBCHANNEL_TYPE_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
+#define MAX_LOGICAL_BANDS_SHIFT_1 (MAX_LOGICAL_BANDS_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
+#define NUM_BROADCAST_SYMBOLS_SHIFT_1 (NUM_BROADCAST_SYMBOLS_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
+#define NUM_DL_AMC_SYMBOLS_SHIFT_1 (NUM_DL_AMC_SYMBOLS_SHIFT-NUM_UL_AMC_SYMBOLS_SHIFT)
+/*#define NUM_UL_AMC_SYMBOLS_SHIFT_1 0*/
+
+/* Compact DL-MAP Format Configuration IE (6.3.2.3.43.2) decoder */
+static guint wimax_compact_dlmap_format_configuration_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+{
+ guint length = 0;
+ guint dl_map_type, new_format_ind;
+ guint dl_map_offset;
+ guint32 tvb_value;
+
+#ifdef DEBUG
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Format Configuration IE");
+#endif
+ /* set the local offset */
+ dl_map_offset = offset;
+ /* Get the first byte */
+ tvb_value = tvb_get_guint8(tvb, dl_map_offset);
+ if(nibble_offset & 1)
+ { /* get the DL-MAP type */
+ dl_map_type = ((tvb_value & DL_MAP_TYPE_MASK_1) >> 1);
+ /* ensure the dl-map type is Format Configuration IE */
+ if(dl_map_type != COMPACT_DL_MAP_TYPE_FORMAT_CONF_IE)
+ return 0;
+ new_format_ind = (tvb_value & 0x01);
+ /* display the DL-MAP type */
+ proto_tree_add_item(tree, hf_format_config_ie_dl_map_type_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the New format Indication */
+ proto_tree_add_item(tree, hf_format_config_ie_new_format_indication_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* update the length in nibble */
+ length = 1;
+ /* move to next byte */
+ dl_map_offset++;
+ if(new_format_ind)
+ { /* display the CID Type */
+ proto_tree_add_item(tree, hf_format_config_ie_cid_type, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the Safety Pattern */
+ proto_tree_add_item(tree, hf_format_config_ie_safety_pattern, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the Subchannel pattern */
+ proto_tree_add_item(tree, hf_format_config_ie_subchannel_type, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the max logical bands */
+ proto_tree_add_item(tree, hf_format_config_ie_max_logical_bands, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the number of broadcast symbols */
+ proto_tree_add_item(tree, hf_format_config_ie_num_of_broadcast_symbol, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the number of dl band AMC symbols */
+ proto_tree_add_item(tree, hf_format_config_ie_num_of_dl_band_amc_symbol, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the number of ul band AMC symbols */
+ proto_tree_add_item(tree, hf_format_config_ie_num_of_ul_band_amc_symbol, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
+ /* update the length in nibble */
+ length += 7;
+ /* Get the next 32-bit word */
+ tvb_value = tvb_get_ntohl(tvb, dl_map_offset);
+ /* get the CID type */
+ cid_type = ((tvb_value & CID_TYPE_MASK) >> CID_TYPE_SHIFT);
+ /* get the subchannel type for band AMC */
+ band_amc_subchannel_type = ((tvb_value & BAND_AMC_SUBCHANNEL_TYPE_MASK) >> BAND_AMC_SUBCHANNEL_TYPE_SHIFT);
+ /* get the max logical bands */
+ max_logical_bands = ((tvb_value & MAX_LOGICAL_BANDS_MASK) >> MAX_LOGICAL_BANDS_SHIFT);
+ /* get the number of symbols for broadcast */
+ num_of_broadcast_symbols = ((tvb_value & NUM_BROADCAST_SYMBOLS_MASK) >> NUM_BROADCAST_SYMBOLS_SHIFT);
+ /* get the number of symbols for DL band AMC */
+ num_of_dl_band_amc_symbols = ((tvb_value & NUM_DL_AMC_SYMBOLS_MASK) >> NUM_DL_AMC_SYMBOLS_SHIFT);
+ /* get the number of symbols for UL band AMC */
+ num_of_ul_band_amc_symbols = ((tvb_value & NUM_UL_AMC_SYMBOLS_MASK) >> NUM_UL_AMC_SYMBOLS_SHIFT);
+ }
+ }
+ else
+ {
+ dl_map_type = ((tvb_value & DL_MAP_TYPE_MASK) >> 5);
+ /* ensure the dl-map type is Format Configuration IE */
+ if(dl_map_type != COMPACT_DL_MAP_TYPE_FORMAT_CONF_IE)
+ return 0;
+ new_format_ind = (tvb_value & 0x10);
+ if(new_format_ind)
+ { /* display the DL-MAP type */
+ proto_tree_add_item(tree, hf_format_config_ie_dl_map_type_32, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the New format Indication */
+ proto_tree_add_item(tree, hf_format_config_ie_new_format_indication_32, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the CID Type */
+ proto_tree_add_item(tree, hf_format_config_ie_cid_type_1, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the Safety Pattern */
+ proto_tree_add_item(tree, hf_format_config_ie_safety_pattern_1, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the Subchannel pattern */
+ proto_tree_add_item(tree, hf_format_config_ie_subchannel_type_1, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the max logical bands */
+ proto_tree_add_item(tree, hf_format_config_ie_max_logical_bands_1, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the number of broadcast symbols */
+ proto_tree_add_item(tree, hf_format_config_ie_num_of_broadcast_symbol_1, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the number of dl band AMC symbols */
+ proto_tree_add_item(tree, hf_format_config_ie_num_of_dl_band_amc_symbol_1, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the number of ul band AMC symbols */
+ proto_tree_add_item(tree, hf_format_config_ie_num_of_ul_band_amc_symbol_1, tvb, dl_map_offset, 4, ENC_BIG_ENDIAN);
+ /* update the length in nibble */
+ length = 8;
+ /* Get the next 32-bit word */
+ tvb_value = tvb_get_ntohl(tvb, dl_map_offset);
+ /* get the CID type */
+ cid_type = ((tvb_value & CID_TYPE_MASK_1) >> CID_TYPE_SHIFT_1);
+ /* get the subchannel type for band AMC */
+ band_amc_subchannel_type = ((tvb_value & BAND_AMC_SUBCHANNEL_TYPE_MASK_1) >> BAND_AMC_SUBCHANNEL_TYPE_SHIFT_1);
+ /* get the max logical bands */
+ max_logical_bands = ((tvb_value & MAX_LOGICAL_BANDS_MASK_1) >> MAX_LOGICAL_BANDS_SHIFT_1);
+ /* get the number of symbols for broadcast */
+ num_of_broadcast_symbols = ((tvb_value & NUM_BROADCAST_SYMBOLS_MASK_1) >> NUM_BROADCAST_SYMBOLS_SHIFT_1);
+ /* get the number of symbols for DL band AMC */
+ num_of_dl_band_amc_symbols = ((tvb_value & NUM_DL_AMC_SYMBOLS_MASK_1) >> NUM_DL_AMC_SYMBOLS_SHIFT_1);
+ /* get the number of symbols for UL band AMC */
+ num_of_ul_band_amc_symbols = (tvb_value & NUM_UL_AMC_SYMBOLS_MASK_1);
+ }
+ else
+ { /* display the DL-MAP type */
+ proto_tree_add_item(tree, hf_format_config_ie_dl_map_type, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the New format Indication */
+ proto_tree_add_item(tree, hf_format_config_ie_new_format_indication, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
+ /* update the length in nibble */
+ length = 1;
+ }
+ }
+ /* return the IE length in nibbles */
+ return length;
+}
+
+/* Compact DL-MAP Reduced CID IE (6.3.2.3.43.3) decoder */
+static guint wimax_compact_dlmap_rcid_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+{
+ guint length = 0;
+ guint prefix;
+
+#ifdef DEBUG
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "RCID IE");
+#endif
+ if(nibble_offset & 1)
+ {
+ if(cid_type == CID_TYPE_NORMAL)
+ { /* display the normal CID */
+ proto_tree_add_item(tree, hf_harq_rcid_ie_normal_cid_1, tvb, offset, 3, ENC_BIG_ENDIAN);
+ length = 4;
+ }
+ else
+ { /* Get the prefix bit */
+ prefix = (tvb_get_guint8(tvb, offset) & 0x08);
+ /* display the prefix */
+ proto_tree_add_item(tree, hf_harq_rcid_ie_prefix_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ if(prefix)
+ { /* display the CID11 */
+ proto_tree_add_item(tree, hf_harq_rcid_ie_cid11_3, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 3;
+ }
+ else
+ {
+ if(cid_type == CID_TYPE_RCID11)
+ { /* display the CID11 */
+ proto_tree_add_item(tree, hf_harq_rcid_ie_cid11_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 3;
+ }
+ else if(cid_type == CID_TYPE_RCID7)
+ { /* display the normal CID7 */
+ proto_tree_add_item(tree, hf_harq_rcid_ie_cid7_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 2;
+ }
+ else if(cid_type == CID_TYPE_RCID3)
+ { /* display the CID3 */
+ proto_tree_add_item(tree, hf_harq_rcid_ie_cid3_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 1;
+ }
+ }
+ }
+ }
+ else
+ {
+ if(cid_type == CID_TYPE_NORMAL)
+ { /* display the normal CID */
+ proto_tree_add_item(tree, hf_harq_rcid_ie_normal_cid, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 4;
+ }
+ else
+ { /* Get the prefix bit */
+ prefix = (tvb_get_guint8(tvb, offset) & 0x08);
+ /* display the prefix */
+ proto_tree_add_item(tree, hf_harq_rcid_ie_prefix, tvb, offset, 2, ENC_BIG_ENDIAN);
+ if(prefix || (cid_type == CID_TYPE_RCID11))
+ { /* display the CID11 */
+ proto_tree_add_item(tree, hf_harq_rcid_ie_cid11_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 3;
+ }
+ else
+ {
+ if(cid_type == CID_TYPE_RCID11)
+ { /* display the CID11 */
+ proto_tree_add_item(tree, hf_harq_rcid_ie_cid11, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 3;
+ }
+ else if(cid_type == CID_TYPE_RCID7)
+ { /* display the CID7 */
+ proto_tree_add_item(tree, hf_harq_rcid_ie_cid7, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 2;
+ }
+ else if(cid_type == CID_TYPE_RCID3)
+ { /* display the CID3 */
+ proto_tree_add_item(tree, hf_harq_rcid_ie_cid3, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 1;
+ }
+ }
+ }
+ }
+ /* return the IE length in nibbles */
+ return length;
+}
+
+/* Compact DL-MAP HARQ Control IE (6.3.2.3.43.4) decoder */
+static guint wimax_compact_dlmap_harq_control_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+{
+ guint byte, prefix, length = 0;
+
+#ifdef DEBUG
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "HARQ Control IE");
+#endif
+ /* Get the first byte */
+ byte = tvb_get_guint8(tvb, offset);
+ if(nibble_offset & 1)
+ { /* Get the prefix bit */
+ prefix = (byte & 0x08);
+ /* display the prefix */
+ proto_tree_add_item(tree, hf_harq_control_ie_prefix_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ if(prefix)
+ { /* display the ai_sn */
+ proto_tree_add_item(tree, hf_harq_control_ie_ai_sn_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the spid */
+ proto_tree_add_item(tree, hf_harq_control_ie_spid_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the acid */
+ proto_tree_add_item(tree, hf_harq_control_ie_acid_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 2;
+ }
+ else
+ { /* display the reserved bits */
+ proto_tree_add_item(tree, hf_harq_control_ie_reserved_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 1;
+ }
+ }
+ else
+ { /* Get the prefix bit */
+ prefix = (byte & 0x80);
+ /* display the prefix */
+ proto_tree_add_item(tree, hf_harq_control_ie_prefix, tvb, offset, 1, ENC_BIG_ENDIAN);
+ if(prefix)
+ { /* display the ai_sn */
+ proto_tree_add_item(tree, hf_harq_control_ie_ai_sn, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the spid */
+ proto_tree_add_item(tree, hf_harq_control_ie_spid, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the acid */
+ proto_tree_add_item(tree, hf_harq_control_ie_acid, tvb, offset, 1, ENC_BIG_ENDIAN);
+ length = 2;
+ }
+ else
+ { /* display the reserved bits */
+ proto_tree_add_item(tree, hf_harq_control_ie_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ length = 1;
+ }
+ }
+ /* return the IE length in nibbles */
+ return length;
+}
+
+/* Compact DL-MAP CQICH Control IE (6.3.2.3.43.5) decoder */
+static guint wimax_compact_dlmap_cqich_control_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+{
+ guint byte, cqich_indicator, length = 0;
+
+#ifdef DEBUG
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "CQICH Control IE");
+#endif
+ /* Get the first byte */
+ byte = tvb_get_guint8(tvb, offset);
+ if(nibble_offset & 1)
+ { /* Get the CQICH indicator */
+ cqich_indicator = (byte & 0x08);
+ if(cqich_indicator)
+ { /* display the CQICH indicator */
+ proto_tree_add_item(tree, hf_cqich_control_ie_indicator_1, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* display the allocation index */
+ proto_tree_add_item(tree, hf_cqich_control_ie_alloc_id_1, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* display the period */
+ proto_tree_add_item(tree, hf_cqich_control_ie_period_1, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* display the frame offset */
+ proto_tree_add_item(tree, hf_cqich_control_ie_frame_offset_1, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* display the duration */
+ proto_tree_add_item(tree, hf_cqich_control_ie_duration_1, tvb, offset, 3, ENC_BIG_ENDIAN);
+ length = 4;
+ }
+ else
+ { /* display the CQICH indicator */
+ proto_tree_add_item(tree, hf_cqich_control_ie_indicator_1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the CQI reporting threshold */
+ proto_tree_add_item(tree, hf_cqich_control_ie_cqi_rep_threshold_1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ length = 1;
+ }
+ }
+ else
+ { /* Get the CQICH indicator */
+ cqich_indicator = (byte & 0x80);
+ if(cqich_indicator)
+ { /* display the CQICH indicator */
+ proto_tree_add_item(tree, hf_cqich_control_ie_indicator, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the allocation index */
+ proto_tree_add_item(tree, hf_cqich_control_ie_alloc_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the period */
+ proto_tree_add_item(tree, hf_cqich_control_ie_period, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the frame offset */
+ proto_tree_add_item(tree, hf_cqich_control_ie_frame_offset, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the duration */
+ proto_tree_add_item(tree, hf_cqich_control_ie_duration, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 4;
+ }
+ else
+ { /* display the CQICH indicator */
+ proto_tree_add_item(tree, hf_cqich_control_ie_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the CQI reporting threshold */
+ proto_tree_add_item(tree, hf_cqich_control_ie_cqi_rep_threshold, tvb, offset, 1, ENC_BIG_ENDIAN);
+ length = 1;
+ }
+ }
+ /* return the IE length in nibbles */
+ return length;
+}
+
+/* DL-MAP Extension IE sub-types */
+#define TIME_DIVERSITY_MBS 0
+#define HARQ_MODE_SWITCH 1
+
+/* Compact DL-MAP Extension IE (6.3.2.3.43.6.6) decoder */
+static guint wimax_cdlmap_extension_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+{
+ guint tvb_value, dl_map_type, sub_type, length;
+
+#ifdef DEBUG
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "DL-MAP Extension IE");
+#endif
+ /* Get the first 16-bit word */
+ tvb_value = tvb_get_ntohs(tvb, offset);
+ if(nibble_offset & 1)
+ { /* Get the dl-map type */
+ dl_map_type = ((tvb_value & 0x0E00) >> 9);
+ if(dl_map_type != COMPACT_DL_MAP_TYPE_EXTENSION)
+ return 0;
+ /* Get the sub-type */
+ sub_type = ((tvb_value & 0x01F0) >> 4);
+ /* Get the IE length */
+ length = (tvb_value & 0x000F);
+ /* display the DL-MAP type */
+ proto_tree_add_item(tree, hf_cdlmap_extension_type_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the DL-MAP extension subtype */
+ proto_tree_add_item(tree, hf_cdlmap_extension_subtype_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the IE length */
+ proto_tree_add_item(tree, hf_cdlmap_extension_length_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ switch (sub_type)
+ {
+ case TIME_DIVERSITY_MBS:
+ /* display the time-diversity MBS in HEX */
+ proto_tree_add_item(tree, hf_cdlmap_extension_time_diversity_mbs_1, tvb, offset, (length - 2), ENC_NA);
+ break;
+ case HARQ_MODE_SWITCH:
+ /* display the HARQ mode */
+ proto_tree_add_item(tree, hf_cdlmap_extension_harq_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* Get the next byte */
+ tvb_value = tvb_get_guint8(tvb, offset);
+ /* get the HARQ mode */
+ harq_mode = ((tvb_value & MSB_NIBBLE_MASK) >> 4);
+ break;
+ default:
+ /* display the unknown sub-type in HEX */
+ proto_tree_add_item(tree, hf_cdlmap_extension_unknown_sub_type_1, tvb, offset, (length - 2), ENC_NA);
+ break;
+ }
+ }
+ else
+ { /* Get the dl-map type */
+ dl_map_type = ((tvb_value & 0xE000) >> 13);
+ if(dl_map_type != COMPACT_DL_MAP_TYPE_EXTENSION)
+ return 0;
+ /* Get the sub-type */
+ sub_type = ((tvb_value & 0x1F00) >> 8);
+ /* Get the IE length */
+ length = ((tvb_value & 0x00F0) >> 4);
+ /* display the DL-MAP type */
+ proto_tree_add_item(tree, hf_cdlmap_extension_type, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the DL-MAP extension subtype */
+ proto_tree_add_item(tree, hf_cdlmap_extension_subtype, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the IE length */
+ proto_tree_add_item(tree, hf_cdlmap_extension_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ switch (sub_type)
+ {
+ case TIME_DIVERSITY_MBS:
+ /* display the time-diversity MBS in HEX */
+ proto_tree_add_item(tree, hf_cdlmap_extension_time_diversity_mbs, tvb, (offset + 1), (length - 1), ENC_NA);
+ break;
+ case HARQ_MODE_SWITCH:
+ /* display the HARQ mode */
+ proto_tree_add_item(tree, hf_cdlmap_extension_harq_mode_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* get the HARQ mode */
+ harq_mode = (tvb_value & 0x000F);
+ break;
+ default:
+ /* display the unknown sub-type in HEX */
+ proto_tree_add_item(tree, hf_cdlmap_extension_unknown_sub_type, tvb, (offset + 1), (length - 1), ENC_NA);
+ break;
+ }
+ }
+ /* return the IE length in nibbles */
+ return (length * 2);
+}
+
+/* Extended DIUCs (table 277a) */
+#define CHANNEL_MEASUREMENT_IE 0
+#define STC_ZONE_IE 1
+#define AAS_DL_IE 2
+#define DATA_LOCATION_IN_ANOTHER_BS_IE 3
+#define CID_SWITCH_IE 4
+#define MIMO_DL_BASIC_IE 5
+#define MIMO_DL_ENHANCED_IE 6
+#define HARQ_MAP_POINTER_IE 7
+#define PHYMOD_DL_IE 8
+#define DL_PUSC_BURST_ALLOCATION_IN_OTHER_SEGMENT_IE 11
+#define UL_INTERFERENCE_AND_NOISE_LEVEL_IE 15
+
+/* Extended DIUC IE (8.4.5.3.2) */
+guint wimax_extended_diuc_dependent_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+{
+ guint ext_diuc, length;
+ guint8 byte;
+
+ /* get the first byte */
+ byte = tvb_get_guint8(tvb, offset);
+ if(nibble_offset & 1)
+ { /* get the extended DIUC */
+ ext_diuc = (byte & LSB_NIBBLE_MASK);
+ /* display extended DIUC */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_diuc_1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ offset++;
+ /* get the 2nd byte */
+ byte = tvb_get_guint8(tvb, offset);
+ /* get the length */
+ length = ((byte & MSB_NIBBLE_MASK) >> 4);
+ /* display extended DIUC length */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* 8.4.5.3.2.1 (table 277a) */
+ switch (ext_diuc)
+ {
+ case CHANNEL_MEASUREMENT_IE:
+ /* 8.4.5.3.? Channel_Measurement_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_channel_measurement, tvb, offset, (length + 1), ENC_NA);
+ break;
+ case STC_ZONE_IE:
+ /* 8.4.5.3.4 STC_Zone_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_stc_zone, tvb, offset, (length + 1), ENC_NA);
+ break;
+ case AAS_DL_IE:
+ /* 8.4.5.3.3 AAS_DL_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_aas_dl, tvb, offset, (length + 1), ENC_NA);
+ break;
+ case DATA_LOCATION_IN_ANOTHER_BS_IE:
+ /* 8.4.5.3.6 Data_location_in_another_BS_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_data_location, tvb, offset, (length + 1), ENC_NA);
+ break;
+ case CID_SWITCH_IE:
+ /* 8.4.5.3.7 CID_Switch_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_cid_switch, tvb, offset, (length + 1), ENC_NA);
+ break;
+ case MIMO_DL_BASIC_IE:
+ /* 8.4.5.3.8 MIMO_DL_Basic_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_mimo_dl_basic, tvb, offset, (length + 1), ENC_NA);
+ break;
+ case MIMO_DL_ENHANCED_IE:
+ /* 8.4.5.3.9 MIMO_DL_Enhanced_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_mimo_dl_enhanced, tvb, offset, (length + 1), ENC_NA);
+ break;
+ case HARQ_MAP_POINTER_IE:
+ /* 8.4.5.3.10 HARQ_Map_Pointer_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_harq_map_pointer, tvb, offset, (length + 1), ENC_NA);
+ break;
+ case PHYMOD_DL_IE:
+ /* 8.4.5.3.11 PHYMOD_DL_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_phymod_dl, tvb, offset, (length + 1), ENC_NA);
+ break;
+ case DL_PUSC_BURST_ALLOCATION_IN_OTHER_SEGMENT_IE:
+ /* 8.4.5.3.13 DL PUSC Burst Allocation in Other Segment IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_dl_pusc_burst_allocation, tvb, offset, (length + 1), ENC_NA);
+ break;
+ case UL_INTERFERENCE_AND_NOISE_LEVEL_IE:
+ /* 8.4.5.3.19 UL_interference_and_noise_level_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_ul_interference_and_noise_level, tvb, offset, (length + 1), ENC_NA);
+ break;
+ default:
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_unknown_diuc, tvb, offset, (length + 1), ENC_NA);
+ break;
+ }
+ }
+ else
+ { /* get the extended DIUC */
+ ext_diuc = ((byte & MSB_NIBBLE_MASK) >> 4);
+ /* get the length */
+ length = (byte & LSB_NIBBLE_MASK);
+ /* display extended DIUC */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_diuc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display extended DIUC length */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_length_1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ offset++;
+ /* 8.4.5.3.2.1 (table 277a) */
+ switch (ext_diuc)
+ {
+ case CHANNEL_MEASUREMENT_IE:
+ /* 8.4.5.3.? Channel_Measurement_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_channel_measurement, tvb, offset, length, ENC_NA);
+ break;
+ case STC_ZONE_IE:
+ /* 8.4.5.3.4 STC_Zone_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_stc_zone, tvb, offset, length, ENC_NA);
+ break;
+ case AAS_DL_IE:
+ /* 8.4.5.3.3 AAS_DL_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_aas_dl, tvb, offset, length, ENC_NA);
+ break;
+ case DATA_LOCATION_IN_ANOTHER_BS_IE:
+ /* 8.4.5.3.6 Data_location_in_another_BS_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_data_location, tvb, offset, length, ENC_NA);
+ break;
+ case CID_SWITCH_IE:
+ /* 8.4.5.3.7 CID_Switch_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_cid_switch, tvb, offset, length, ENC_NA);
+ break;
+ case MIMO_DL_BASIC_IE:
+ /* 8.4.5.3.8 MIMO_DL_Basic_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_mimo_dl_basic, tvb, offset, length, ENC_NA);
+ break;
+ case MIMO_DL_ENHANCED_IE:
+ /* 8.4.5.3.9 MIMO_DL_Enhanced_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_mimo_dl_enhanced, tvb, offset, length, ENC_NA);
+ break;
+ case HARQ_MAP_POINTER_IE:
+ /* 8.4.5.3.10 HARQ_Map_Pointer_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_harq_map_pointer, tvb, offset, length, ENC_NA);
+ break;
+ case PHYMOD_DL_IE:
+ /* 8.4.5.3.11 PHYMOD_DL_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_phymod_dl, tvb, offset, length, ENC_NA);
+ break;
+ case DL_PUSC_BURST_ALLOCATION_IN_OTHER_SEGMENT_IE:
+ /* 8.4.5.3.13 DL PUSC Burst Allocation in Other Segment IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_dl_pusc_burst_allocation, tvb, offset, length, ENC_NA);
+ break;
+ case UL_INTERFERENCE_AND_NOISE_LEVEL_IE:
+ /* 8.4.5.3.19 UL_interference_and_noise_level_IE */
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_ul_interference_and_noise_level, tvb, offset, length, ENC_NA);
+ break;
+ default:
+ proto_tree_add_item(tree, hf_extended_diuc_dependent_ie_unknown_diuc, tvb, offset, length, ENC_NA);
+ break;
+ }
+ }
+ return ((length + 1) * 2 ); /* length in nibbles */
+
+}
+
+/* Register Wimax Compact DL-MAP IE Protocol */
+void wimax_proto_register_wimax_compact_dlmap_ie(void)
+{
+ /* Compact DL-MAP IE display */
+ static hf_register_info hf_compact_dlmap[] =
+ {
+ {
+ &hf_cdlmap_dl_map_type,
+ {"DL-MAP Type", "wmx.compact_dlmap.dl_map_type", FT_UINT8, BASE_DEC, NULL, DL_MAP_TYPE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_dl_map_type_1,
+ {"DL-MAP Type", "wmx.compact_dlmap.dl_map_type", FT_UINT8, BASE_DEC, NULL, DL_MAP_TYPE_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_ul_map_append,
+ {"UL-MAP Append", "wmx.compact_dlmap.ul_map_append", FT_UINT8, BASE_HEX, NULL, UL_MAP_APPEND_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_ul_map_append_1,
+ {"UL-MAP Append", "wmx.compact_dlmap.ul_map_append", FT_UINT8, BASE_HEX, NULL, UL_MAP_APPEND_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_reserved,
+ {"Reserved", "wmx.compact_dlmap.reserved", FT_UINT8, BASE_HEX, NULL, UL_MAP_APPEND_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_reserved_1,
+ {"Reserved", "wmx.compact_dlmap.reserved", FT_UINT8, BASE_HEX, NULL, UL_MAP_APPEND_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_nep_code,
+ {"Nep Code", "wmx.compact_dlmap.nep_code", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_nep_code_1,
+ {"Nep Code", "wmx.compact_dlmap.nep_code", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_nsch_code,
+ {"Nsch Code", "wmx.compact_dlmap.nsch_code", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_nsch_code_1,
+ {"Nsch Code", "wmx.compact_dlmap.nsch_code", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_num_bands,
+ {"Number Of Bands", "wmx.compact_dlmap.num_bands", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_num_bands_1,
+ {"Number Of Bands", "wmx.compact_dlmap.num_bands", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_band_index,
+ {"Band Index", "wmx.compact_dlmap.band_index", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+#if 0
+ {
+ &hf_cdlmap_band_index_1,
+ {"Band Index", "wmx.compact_dlmap.band_index", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL}
+ },
+#endif
+ {
+ &hf_cdlmap_nb_bitmap,
+ {"Number Of Bits For Band BITMAP", "wmx.compact_dlmap.nb_bitmap", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_nb_bitmap_1,
+ {"Number Of Bits For Band BITMAP", "wmx.compact_dlmap.nb_bitmap", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_shortened_uiuc,
+ {"Shortened UIUC", "wmx.compact_dlmap.shortened_uiuc", FT_UINT8, BASE_HEX, NULL, SHORTENED_DIUC_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_shortened_uiuc_1,
+ {"Shortened UIUC", "wmx.compact_dlmap.shortened_uiuc", FT_UINT16, BASE_HEX, NULL, SHORTENED_DIUC_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_shortened_diuc,
+ {"Shortened DIUC", "wmx.compact_dlmap.shortened_diuc", FT_UINT8, BASE_HEX, NULL, SHORTENED_DIUC_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_shortened_diuc_1,
+ {"Shortened DIUC", "wmx.compact_dlmap.shortened_diuc", FT_UINT16, BASE_HEX, NULL, SHORTENED_DIUC_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_companded_sc,
+ {"Companded SC", "wmx.compact_dlmap.companded_sc", FT_UINT8, BASE_HEX, NULL, COMPANDED_SC_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_companded_sc_1,
+ {"Companded SC", "wmx.compact_dlmap.companded_sc", FT_UINT16, BASE_HEX, NULL, COMPANDED_SC_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_bin_offset,
+ {"BIN Offset", "wmx.compact_dlmap.bin_offset", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_bin_offset_1,
+ {"BIN Offset", "wmx.compact_dlmap.bin_offset", FT_UINT16, BASE_HEX, NULL, 0x0FF0, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_diuc_num_of_subchannels,
+ {"Number Of Subchannels", "wmx.compact_dlmap.diuc_num_of_subchannels", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_diuc_num_of_subchannels_1,
+ {"Number Of Subchannels", "wmx.compact_dlmap.diuc_num_of_subchannels", FT_UINT16, BASE_DEC, NULL, 0x0FF0, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_diuc_repetition_coding_indication,
+ {"Repetition Coding Indication", "wmx.compact_dlmap.diuc_repetition_coding_indication", FT_UINT8, BASE_DEC, VALS(rep_msgs), 0xC0, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_diuc_repetition_coding_indication_1,
+ {"Repetition Coding Indication", "wmx.compact_dlmap.diuc_repetition_coding_indication", FT_UINT8, BASE_DEC, VALS(rep_msgs), 0x0C, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_diuc_reserved,
+ {"Reserved", "wmx.compact_dlmap.diuc_reserved", FT_UINT8, BASE_HEX, NULL, 0x30, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_diuc_reserved_1,
+ {"Reserved", "wmx.compact_dlmap.diuc_reserved", FT_UINT8, BASE_HEX, NULL, 0x03, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_bit_map_length,
+ {"BIT MAP Length", "wmx.compact_dlmap.bit_map_length", FT_UINT8, BASE_DEC, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_bit_map_length_1,
+ {"BIT MAP Length", "wmx.compact_dlmap.bit_map_length", FT_UINT8, BASE_DEC, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_bit_map,
+ {"BIT MAP", "wmx.compact_dlmap.bit_map", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_diuc,
+ {"DIUC", "wmx.compact_dlmap.diuc", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_diuc_1,
+ {"DIUC", "wmx.compact_dlmap.diuc", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_allocation_mode,
+ {"Allocation Mode", "wmx.compact_dlmap.allocation_mode", FT_UINT8, BASE_DEC, VALS(vals_allocation_modes), 0xC0, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_allocation_mode_1,
+ {"Allocation Mode", "wmx.compact_dlmap.allocation_mode", FT_UINT8, BASE_DEC, VALS(vals_allocation_modes), 0x0C, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_allocation_mode_rsvd,
+ {"Reserved", "wmx.compact_dlmap.allocation_mode_rsvd", FT_UINT8, BASE_DEC, NULL, 0x30, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_allocation_mode_rsvd_1,
+ {"Reserved", "wmx.compact_dlmap.allocation_mode_rsvd", FT_UINT8, BASE_DEC, NULL, 0x03, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_num_subchannels,
+ {"Number Of Subchannels", "wmx.compact_dlmap.num_subchannels", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_num_subchannels_1,
+ {"Number Of Subchannels", "wmx.compact_dlmap.num_subchannels", FT_UINT16, BASE_DEC, NULL, 0x0FF0, NULL, HFILL}
+ },
+#if 0
+ {
+ &hf_cdlmap_reserved_type,
+ {"DL-MAP Reserved Type", "wmx.compact_dlmap.reserved_type", FT_UINT8, BASE_DEC, NULL, DL_MAP_TYPE_MASK, NULL, HFILL}
+ },
+#endif
+ {
+ &hf_cdlmap_reserved_type_1,
+ {"DL-MAP Reserved Type", "wmx.compact_dlmap.reserved_type", FT_UINT8, BASE_DEC, NULL, DL_MAP_TYPE_MASK_1, NULL, HFILL}
+ }
+ };
+
+ /* HARQ MAP Format Configuration IE display */
+ static hf_register_info hf_format_config[] =
+ {
+ {
+ &hf_format_config_ie_dl_map_type,
+ {"DL-MAP Type", "wmx.format_config_ie.dl_map_type", FT_UINT8, BASE_DEC, NULL, DL_MAP_TYPE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_dl_map_type_1,
+ {"DL-MAP Type", "wmx.format_config_ie.dl_map_type", FT_UINT8, BASE_DEC, NULL, DL_MAP_TYPE_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_dl_map_type_32,
+ {"DL-MAP Type", "wmx.format_config_ie.dl_map_type", FT_UINT32, BASE_DEC, NULL, FORMAT_CONFIG_IE_DL_MAP_TYPE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_new_format_indication,
+ {"New Format Indication", "wmx.format_config_ie.new_format_indication", FT_BOOLEAN, 8, TFS(&tfs_indication), UL_MAP_APPEND_MASK, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_new_format_indication_1,
+ {"New Format Indication", "wmx.format_config_ie.new_format_indication", FT_BOOLEAN, 8, TFS(&tfs_indication), UL_MAP_APPEND_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_new_format_indication_32,
+ {"New Format Indication", "wmx.format_config_ie.new_format_indication", FT_BOOLEAN, 32, TFS(&tfs_indication), FORMAT_CONFIG_IE_NEW_FORMAT_IND_MASK, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_cid_type,
+ {"HARQ MAP Indicator", "wmx.harq_map.format_config_ie.indicator", FT_UINT32, BASE_HEX, VALS(vals_cid_types), CID_TYPE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_cid_type_1,
+ {"CID Type", "wmx.harq_map.format_config_ie.cid_type", FT_UINT32, BASE_HEX, VALS(vals_cid_types), CID_TYPE_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_safety_pattern,
+ {"Safety Pattern", "wmx.harq_map.format_config_ie.safety_pattern", FT_UINT32, BASE_HEX, NULL, SAFETY_PATTERN_MASK, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_safety_pattern_1,
+ {"Safety Pattern", "wmx.harq_map.format_config_ie.safety_pattern", FT_UINT32, BASE_HEX, NULL, SAFETY_PATTERN_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_subchannel_type,
+ {"Subchannel Type For Band AMC", "wmx.harq_map.format_config_ie.subchannel_type", FT_UINT32, BASE_HEX, VALS(vals_subchannel_types), BAND_AMC_SUBCHANNEL_TYPE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_subchannel_type_1,
+ {"Subchannel Type For Band AMC", "wmx.harq_map.format_config_ie.subchannel_type", FT_UINT32, BASE_HEX, VALS(vals_subchannel_types), BAND_AMC_SUBCHANNEL_TYPE_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_max_logical_bands,
+ {"Max Logical Bands", "wmx.harq_map.format_config_ie.max_logical_bands", FT_UINT32, BASE_HEX, VALS(vals_max_logical_bands), MAX_LOGICAL_BANDS_MASK, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_max_logical_bands_1,
+ {"Max Logical Bands", "wmx.harq_map.format_config_ie.max_logical_bands", FT_UINT32, BASE_HEX, VALS(vals_max_logical_bands), MAX_LOGICAL_BANDS_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_num_of_broadcast_symbol,
+ {"Number Of Symbols for Broadcast", "wmx.harq_map.format_config_ie.num_of_broadcast_symbol", FT_UINT32, BASE_HEX, NULL, NUM_BROADCAST_SYMBOLS_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_num_of_broadcast_symbol_1,
+ {"Number Of Symbols for Broadcast", "wmx.harq_map.num_of_broadcast_symbol", FT_UINT32, BASE_HEX, NULL, NUM_BROADCAST_SYMBOLS_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_num_of_dl_band_amc_symbol,
+ {"Number Of Symbols for Broadcast", "wmx.harq_map.format_config_ie.num_of_dl_band_amc_symbol", FT_UINT32, BASE_HEX, NULL, NUM_DL_AMC_SYMBOLS_MASK, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_num_of_dl_band_amc_symbol_1,
+ {"Number Of Symbols for Broadcast", "wmx.harq_map.num_of_dl_band_amc_symbol", FT_UINT32, BASE_HEX, NULL, NUM_DL_AMC_SYMBOLS_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_num_of_ul_band_amc_symbol,
+ {"Number Of Symbols for Broadcast", "wmx.harq_map.format_config_ie.num_of_ul_band_amc_symbol", FT_UINT32, BASE_HEX, NULL, NUM_UL_AMC_SYMBOLS_MASK, NULL, HFILL}
+ },
+ {
+ &hf_format_config_ie_num_of_ul_band_amc_symbol_1,
+ {"Number Of Symbols for Broadcast", "wmx.harq_map.num_of_ul_band_amc_symbol", FT_UINT32, BASE_HEX, NULL, NUM_UL_AMC_SYMBOLS_MASK_1, NULL, HFILL}
+ }
+ };
+
+ /* HARQ MAP Reduced CID IE display */
+ static hf_register_info hf_rcid[] =
+ {
+ {
+ &hf_harq_rcid_ie_normal_cid,
+ {"Normal CID", "wmx.harq_map.rcid_ie.normal_cid", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_harq_rcid_ie_normal_cid_1,
+ {"Normal CID", "wmx.harq_map.rcid_ie.normal_cid", FT_UINT24, BASE_HEX, NULL, WIMAX_RCID_IE_NORMAL_CID_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_harq_rcid_ie_prefix,
+ {"Prefix", "wmx.harq_map.rcid_ie.prefix", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_PREFIX_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_rcid_ie_prefix_1,
+ {"Prefix", "wmx.harq_map.rcid_ie.prefix", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_PREFIX_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_harq_rcid_ie_cid3,
+ {"3 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid3", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID3_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_rcid_ie_cid3_1,
+ {"3 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid3", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID3_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_harq_rcid_ie_cid7,
+ {"7 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid7", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID7_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_rcid_ie_cid7_1,
+ {"7 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid7", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID7_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_harq_rcid_ie_cid11,
+ {"11 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid11", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID11_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_rcid_ie_cid11_1,
+ {"11 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid11", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID11_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_harq_rcid_ie_cid11_2,
+ {"11 LSB Of Multicast, AAS or Broadcast CID", "wmx.harq_map.rcid_ie.cid11", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID11_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_rcid_ie_cid11_3,
+ {"11 LSB Of Multicast, AAS or Broadcast CID", "wmx.harq_map.rcid_ie.cid11", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID11_MASK_1, NULL, HFILL}
+ }
+ };
+
+ /* HARQ MAP HARQ Control IE display */
+ static hf_register_info hf_harq_control[] =
+ {
+ {
+ &hf_harq_control_ie_prefix,
+ {"Prefix", "wmx.harq_map.harq_control_ie.prefix", FT_BOOLEAN, 8, TFS(&tfs_prefix), WIMAX_HARQ_CONTROL_IE_PREFIX_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_ai_sn,
+ {"HARQ ID Sequence Number(AI_SN)", "wmx.harq_map.harq_control_ie.ai_sn", FT_UINT8, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_AI_SN_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_spid,
+ {"Subpacket ID (SPID)", "wmx.harq_map.harq_control_ie.spid", FT_UINT8, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_SPID_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_acid,
+ {"HARQ CH ID (ACID)", "wmx.harq_map.harq_control_ie.acid", FT_UINT8, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_ACID_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_reserved,
+ {"Reserved", "wmx.harq_map.harq_control_ie.reserved", FT_UINT8, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_RESERVED_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_prefix_1,
+ {"Prefix", "wmx.harq_map.harq_control_ie.prefix", FT_BOOLEAN, 16, TFS(&tfs_prefix), WIMAX_HARQ_CONTROL_IE_PREFIX_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_ai_sn_1,
+ {"HARQ ID Sequence Number(AI_SN)", "wmx.harq_map.harq_control_ie.ai_sn", FT_UINT16, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_AI_SN_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_spid_1,
+ {"Subpacket ID (SPID)", "wmx.harq_map.harq_control_ie.spid", FT_UINT16, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_SPID_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_acid_1,
+ {"HARQ CH ID (ACID)", "wmx.harq_map.harq_control_ie.acid", FT_UINT16, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_ACID_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_reserved_1,
+ {"Reserved", "wmx.harq_map.harq_control_ie.reserved", FT_UINT16, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_RESERVED_MASK_1, NULL, HFILL}
+ }
+ };
+
+ /* HARQ MAP CQICH Control IE display */
+ static hf_register_info hf_cqich_control[] =
+ {
+ {
+ &hf_cqich_control_ie_indicator,
+ {"CQICH Indicator", "wmx.harq_map.cqich_control_ie.cqich_indicator", FT_BOOLEAN, 16, TFS(&tfs_cqich_ind), WIMAX_CQICH_CONTROL_IE_INDICATOR_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cqich_control_ie_alloc_id,
+ {"Allocation Index", "wmx.harq_map.cqich_control_ie.alloc_id", FT_UINT16, BASE_HEX, NULL, WIMAX_CQICH_CONTROL_IE_ALLOCATION_INDEX_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cqich_control_ie_period,
+ {"PERIOD", "wmx.harq_map.cqich_control_ie.period", FT_UINT16, BASE_HEX, NULL, WIMAX_CQICH_CONTROL_IE_PERIOD_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cqich_control_ie_frame_offset,
+ {"Frame Offset", "wmx.harq_map.cqich_control_ie.frame_offset", FT_UINT16, BASE_HEX, NULL, WIMAX_CQICH_CONTROL_IE_FRAME_OFFSET_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cqich_control_ie_duration,
+ {"Duration", "wmx.harq_map.cqich_control_ie.duration", FT_UINT16, BASE_HEX, NULL, WIMAX_CQICH_CONTROL_IE_DURATION_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cqich_control_ie_cqi_rep_threshold,
+ {"CQI Reporting Threshold", "wmx.harq_map.cqich_control_ie.cqi_rep_threshold", FT_UINT16, BASE_HEX, NULL, WIMAX_CQICH_CONTROL_IE_CQI_REP_THRESHOLD_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cqich_control_ie_indicator_1,
+ {"CQICH Indicator", "wmx.harq_map.cqich_control_ie.cqich_indicator", FT_BOOLEAN, 24, TFS(&tfs_cqich_ind), WIMAX_CQICH_CONTROL_IE_INDICATOR_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_cqich_control_ie_alloc_id_1,
+ {"Allocation Index", "wmx.harq_map.cqich_control_ie.alloc_id", FT_UINT24, BASE_HEX, NULL, WIMAX_CQICH_CONTROL_IE_ALLOCATION_INDEX_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_cqich_control_ie_period_1,
+ {"PERIOD", "wmx.harq_map.cqich_control_ie.period", FT_UINT24, BASE_HEX, NULL, WIMAX_CQICH_CONTROL_IE_PERIOD_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_cqich_control_ie_frame_offset_1,
+ {"Frame Offset", "wmx.harq_map.cqich_control_ie.frame_offset", FT_UINT24, BASE_HEX, NULL, WIMAX_CQICH_CONTROL_IE_FRAME_OFFSET_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_cqich_control_ie_duration_1,
+ {"Duration", "wmx.harq_map.cqich_control_ie.duration", FT_UINT24, BASE_HEX, NULL, WIMAX_CQICH_CONTROL_IE_DURATION_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_cqich_control_ie_cqi_rep_threshold_1,
+ {"CQI Reporting Threshold", "wmx.harq_map.cqich_control_ie.cqi_rep_threshold", FT_UINT24, BASE_HEX, NULL, WIMAX_CQICH_CONTROL_IE_CQI_REP_THRESHOLD_MASK_1, NULL, HFILL}
+ }
+ };
+
+ static hf_register_info hf_extension_type[] =
+ {
+ {
+ &hf_cdlmap_extension_type,
+ {"DL-MAP Type", "wmx.extension_type.dl_map_type", FT_UINT16, BASE_DEC, NULL, EXTENSION_TYPE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_extension_type_1,
+ {"DL-MAP Type", "wmx.extension_type.dl_map_type", FT_UINT16, BASE_DEC, NULL, EXTENSION_TYPE_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_extension_subtype,
+ {"Extension Subtype", "wmx.extension_type.subtype", FT_UINT16, BASE_DEC, NULL, EXTENSION_SUBTYPE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_extension_subtype_1,
+ {"Extension Subtype", "wmx.extension_type.subtype", FT_UINT16, BASE_DEC, NULL, EXTENSION_SUBTYPE_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_extension_length,
+ {"Extension Length", "wmx.extension_type.length", FT_UINT16, BASE_DEC, NULL, EXTENSION_LENGTH_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_extension_length_1,
+ {"Extension Length", "wmx.extension_type.length", FT_UINT16, BASE_DEC, NULL, EXTENSION_LENGTH_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_extension_time_diversity_mbs,
+ {"Time Diversity MBS", "wmx.extension_type.time_diversity_mbs", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_extension_time_diversity_mbs_1,
+ {"Time Diversity MBS", "wmx.extension_type.time_diversity_mbs", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_extension_harq_mode_1,
+ {"HARQ Mode Switch", "wmx.extension_type.harq_mode", FT_UINT16, BASE_HEX, NULL, 0x000F, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_extension_harq_mode,
+ {"HARQ Mode Switch", "wmx.extension_type.harq_mode", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_extension_unknown_sub_type,
+ {"Unknown Extension Subtype", "wmx.extension_type.unknown_sub_type", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_cdlmap_extension_unknown_sub_type_1,
+ {"Unknown Extension Subtype", "wmx.extension_type.unknown_sub_type", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ }
+ };
+
+ /* Extended DIUC dependent IE */
+ static hf_register_info hf_extended_diuc[] =
+ {
+ {
+ &hf_extended_diuc_dependent_ie_diuc,
+ {"Extended DIUC", "wmx.extended_diuc_dependent_ie.diuc", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL }
+ },
+ {
+ &hf_extended_diuc_dependent_ie_diuc_1,
+ {"Extended DIUC", "wmx.extended_diuc_dependent_ie.diuc", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL }
+ },
+ {
+ &hf_extended_diuc_dependent_ie_length,
+ {"Length", "wmx.extended_diuc_dependent_ie.length", FT_UINT8, BASE_DEC, NULL, MSB_NIBBLE_MASK, NULL, HFILL }
+ },
+ {
+ &hf_extended_diuc_dependent_ie_length_1,
+ {"Length", "wmx.extended_diuc_dependent_ie.length", FT_UINT8, BASE_DEC, NULL, LSB_NIBBLE_MASK, NULL, HFILL }
+ },
+ { /* 8.4.5.3.? Channel_Measurement_IE */
+ &hf_extended_diuc_dependent_ie_channel_measurement,
+ {"Channel_Measurement_IE (not implemented)", "wmx.extended_diuc_dependent_ie.channel_measurement", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.3.4 STC_Zone_IE */
+ &hf_extended_diuc_dependent_ie_stc_zone,
+ {"STC_Zone_IE (not implemented)", "wmx.extended_diuc_dependent_ie.stc_zone", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.3.3 AAS_DL_IE */
+ &hf_extended_diuc_dependent_ie_aas_dl,
+ {"AAS_DL_IE (not implemented)", "wmx.extended_diuc_dependent_ie.aas_dl", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.3.6 Data_location_in_another_BS_IE */
+ &hf_extended_diuc_dependent_ie_data_location,
+ {"Data_location_in_another_BS_IE (not implemented)", "wmx.extended_diuc_dependent_ie.data_location", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.3.7 CID_Switch_IE */
+ &hf_extended_diuc_dependent_ie_cid_switch,
+ {"CID_Switch_IE (not implemented)", "wmx.extended_diuc_dependent_ie.cid_switch", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+
+ { /* 8.4.5.3.8 MIMO_DL_Basic_IE */
+ &hf_extended_diuc_dependent_ie_mimo_dl_basic,
+ {"MIMO_DL_Basic_IE (not implemented)", "wmx.extended_diuc_dependent_ie.mimo_dl_basic", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.3.9 MIMO_DL_Enhanced_IE */
+ &hf_extended_diuc_dependent_ie_mimo_dl_enhanced,
+ {"MIMO_DL_Enhanced_IE (not implemented)", "wmx.extended_diuc_dependent_ie.mimo_dl_enhanced", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.3.10 HARQ_Map_Pointer_IE */
+ &hf_extended_diuc_dependent_ie_harq_map_pointer,
+ {"HARQ_Map_Pointer_IE (not implemented)", "wmx.extended_diuc_dependent_ie.harq_map_pointer", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.3.11 PHYMOD_DL_IE */
+ &hf_extended_diuc_dependent_ie_phymod_dl,
+ {"PHYMOD_DL_IE (not implemented)", "wmx.extended_diuc_dependent_ie.phymod_dl", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.3.13 DL PUSC Burst Allocation in Other Segment IE */
+ &hf_extended_diuc_dependent_ie_dl_pusc_burst_allocation,
+ {"DL_PUSC_Burst_Allocation_in_Other_Segment_IE (not implemented)", "wmx.extended_diuc_dependent_ie.dl_pusc_burst_allocation", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.3.19 UL_interference_and_noise_level_IE */
+ &hf_extended_diuc_dependent_ie_ul_interference_and_noise_level,
+ {"UL_interference_and_noise_level_IE (not implemented)", "wmx.extended_diuc_dependent_ie.ul_interference_and_noise_level", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* unknown DIUC */
+ &hf_extended_diuc_dependent_ie_unknown_diuc,
+ {"Unknown Extended DIUC", "wmx.extended_diuc_dependent_ie.unknown_diuc", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ }
+ };
+
+#if 0 /* Not used ?? */
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_wimax_compact_dlmap_ie_decoder,
+ &ett_wimax_format_configuration_ie_decoder,
+ &ett_wimax_rcid_ie_decoder,
+ &ett_wimax_harq_control_ie_decoder,
+ &ett_wimax_extended_diuc_dependent_ie_decoder,
+ &ett_wimax_cqich_control_ie_decoder,
+ &ett_wimax_extension_type_ie_decoder,
+ };
+ proto_register_subtree_array(ett, array_length(ett));
+#endif
+
+ proto_wimax_compact_dlmap_ie_decoder = proto_wimax;
+
+ proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder, hf_compact_dlmap, array_length(hf_compact_dlmap));
+ proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder, hf_format_config, array_length(hf_format_config));
+ proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder, hf_rcid, array_length(hf_rcid));
+ proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder, hf_harq_control, array_length(hf_harq_control));
+ proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder, hf_cqich_control, array_length(hf_cqich_control));
+ proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder, hf_extension_type, array_length(hf_extension_type));
+ proto_register_field_array(proto_wimax_compact_dlmap_ie_decoder, hf_extended_diuc, array_length(hf_extended_diuc));
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.h b/plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.h
new file mode 100644
index 0000000000..49206f8550
--- /dev/null
+++ b/plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.h
@@ -0,0 +1,32 @@
+/* wimax_compact_dlmap_ie_decoder.h
+ * Declarations of routines exported by WiMax HARQ Map Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef _WIMAX_COMPACT_DLMAP_IE_DECODER_H_
+#define _WIMAX_COMPACT_DLMAP_IE_DECODER_H_
+
+extern guint wimax_compact_dlmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+
+#endif /* _WIMAX_COMPACT_DLMAP_IE_DECODER_H_ */
diff --git a/plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.c b/plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.c
new file mode 100644
index 0000000000..0e3adfdb17
--- /dev/null
+++ b/plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.c
@@ -0,0 +1,2137 @@
+/* wimax_compact_ulmap_ie_decoder.c
+ * WiMax Compact UL-MAP IE decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax-int.h"
+#include "wimax_compact_ulmap_ie_decoder.h"
+
+/* MASKs */
+#define MSB_NIBBLE_MASK 0xF0
+#define LSB_NIBBLE_MASK 0x0F
+
+#define CID_TYPE_NORMAL 0
+#define CID_TYPE_RCID11 1
+#define CID_TYPE_RCID7 2
+#define CID_TYPE_RCID3 3
+
+/* Global Variables */
+extern guint cid_type;
+extern guint band_amc_subchannel_type;
+extern guint max_logical_bands;
+extern guint num_of_broadcast_symbols;
+extern guint num_of_dl_band_amc_symbols;
+extern guint num_of_ul_band_amc_symbols;
+extern guint harq_mode;
+extern gint proto_wimax;
+
+/* forward reference */
+guint wimax_cdma_allocation_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+guint wimax_extended_uiuc_dependent_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+static guint wimax_compact_ulmap_rcid_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+static guint wimax_compact_ulmap_harq_control_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+static guint wimax_culmap_extension_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+
+static gint proto_wimax_compact_ulmap_ie_decoder = -1;
+
+#if 0 /* not used ?? */
+static gint ett_wimax_compact_ulmap_ie_decoder = -1;
+static gint ett_wimax_rcid_ie_decoder = -1;
+static gint ett_wimax_harq_control_ie_decoder = -1;
+static gint ett_wimax_extended_uiuc_dependent_ie_decoder = -1;
+static gint ett_wimax_extension_type_ie_decoder = -1;
+#endif
+
+/* Prefixes */
+static const true_false_string tfs_prefix =
+{
+ "Enable HARQ",
+ "Temporary Disable HARQ"
+};
+
+/* Region Changes */
+static const true_false_string tfs_region_change =
+{
+ "Region Changed",
+ "No Region Change"
+};
+
+/* Region Changes */
+static const true_false_string tfs_yes_no_ie =
+{
+ "Yes",
+ "No"
+};
+
+/* Repetition Coding Indications */
+static const value_string vals_repetitions[] =
+{
+ { 0, "No Repetition Coding" },
+ { 1, "Repetition Coding of 2 Used" },
+ { 2, "Repetition Coding of 4 Used" },
+ { 3, "Repetition Coding of 6 Used" },
+ { 0, NULL }
+};
+
+/* Allocation Modes */
+static const value_string vals_allocation_modes[] =
+{
+ { 0, "Same Number Of Subchannels For The Selected Bands" },
+ { 1, "Different Same Number Of Subchannels For The Selected Bands" },
+ { 2, "Total Number Of Subchannels For The Selected Bands Determined by Nsch Code and Nep Code" },
+ { 3, "Reserved" },
+ { 0, NULL }
+};
+
+/* CTypes */
+static const value_string vals_ctypes[] =
+{
+ { 0, "2 Mini-subchannels (defines M=2)" },
+ { 1, "2 Mini-subchannels (defines M=2)" },
+ { 2, "3 Mini-subchannels (defines M=3)" },
+ { 3, "6 Mini-subchannels (defines M=6)" },
+ { 0, NULL }
+};
+
+/* Masks */
+#define UL_MAP_TYPE_MASK 0xE0
+#define UL_MAP_RESERVED_MASK 0x10
+#define SHORTENED_UIUC_MASK 0xE0
+#define COMPANDED_SC_MASK 0x1F
+#define UL_MAP_TYPE_MASK_1 0x0E
+#define UL_MAP_RESERVED_MASK_1 0x01
+#define SHORTENED_UIUC_MASK_1 0x0E00
+#define COMPANDED_SC_MASK_1 0x01F0
+#define MIDDLE_BYTE_MASK 0x0FF0
+
+#define ALLOCATION_MODE_MASK 0xC0
+#define ALLOCATION_MODE_MASK_1 0x0C
+
+/* display indexies */
+static gint hf_culmap_ul_map_type = -1;
+static gint hf_culmap_reserved = -1;
+static gint hf_culmap_nep_code = -1;
+static gint hf_culmap_nsch_code = -1;
+static gint hf_culmap_num_bands = -1;
+static gint hf_culmap_band_index = -1;
+static gint hf_culmap_nb_bitmap = -1;
+static gint hf_culmap_ul_map_type_1 = -1;
+static gint hf_culmap_reserved_1 = -1;
+static gint hf_culmap_nep_code_1 = -1;
+static gint hf_culmap_nsch_code_1 = -1;
+static gint hf_culmap_num_bands_1 = -1;
+/*static gint hf_culmap_band_index_1 = -1;*/
+static gint hf_culmap_nb_bitmap_1 = -1;
+
+static gint hf_culmap_shortened_uiuc = -1;
+static gint hf_culmap_companded_sc = -1;
+static gint hf_culmap_shortened_uiuc_1 = -1;
+static gint hf_culmap_companded_sc_1 = -1;
+
+static gint hf_culmap_bin_offset = -1;
+static gint hf_culmap_bin_offset_1 = -1;
+
+static gint hf_culmap_uiuc_ofdma_symbol_offset = -1;
+static gint hf_culmap_uiuc_ofdma_symbol_offset_1 = -1;
+static gint hf_culmap_uiuc_subchannel_offset_7 = -1;
+static gint hf_culmap_uiuc_num_of_ofdma_symbols_7 = -1;
+static gint hf_culmap_uiuc_num_of_subchannels_7 = -1;
+static gint hf_culmap_uiuc_ranging_method = -1;
+static gint hf_culmap_uiuc_reserved = -1;
+static gint hf_culmap_uiuc_subchannel_offset_7_1 = -1;
+static gint hf_culmap_uiuc_num_of_ofdma_symbols_7_1 = -1;
+static gint hf_culmap_uiuc_num_of_subchannels_7_1 = -1;
+static gint hf_culmap_uiuc_ranging_method_1 = -1;
+static gint hf_culmap_uiuc_reserved_1 = -1;
+static gint hf_culmap_uiuc_repetition_coding_indication = -1;
+static gint hf_culmap_uiuc_repetition_coding_indication_1 = -1;
+/* static gint hf_culmap_uiuc_reserved1 = -1; */
+/* static gint hf_culmap_uiuc_reserved11_1 = -1; */
+static gint hf_culmap_uiuc_subchannel_offset = -1;
+static gint hf_culmap_uiuc_subchannel_offset_1 = -1;
+static gint hf_culmap_uiuc_num_of_ofdma_symbols = -1;
+static gint hf_culmap_uiuc_num_of_ofdma_symbols_1 = -1;
+static gint hf_culmap_uiuc_num_of_subchannels = -1;
+static gint hf_culmap_uiuc_num_of_subchannels_1 = -1;
+
+static gint hf_culmap_harq_region_change_indication = -1;
+static gint hf_culmap_harq_region_change_indication_1 = -1;
+static gint hf_culmap_cqi_region_change_indication = -1;
+static gint hf_culmap_cqi_region_change_indication_1 = -1;
+
+static gint hf_culmap_uiuc = -1;
+static gint hf_culmap_uiuc_1 = -1;
+
+static gint hf_culmap_allocation_mode = -1;
+static gint hf_culmap_allocation_mode_rsvd = -1;
+static gint hf_culmap_num_subchannels = -1;
+static gint hf_culmap_allocation_mode_1 = -1;
+static gint hf_culmap_allocation_mode_rsvd_1 = -1;
+static gint hf_culmap_num_subchannels_1 = -1;
+
+/* static gint hf_culmap_reserved_type = -1; */
+static gint hf_culmap_reserved_type_1 = -1;
+
+/* display indexies */
+static gint hf_rcid_ie_prefix = -1;
+static gint hf_rcid_ie_prefix_1 = -1;
+static gint hf_rcid_ie_normal_cid = -1;
+static gint hf_rcid_ie_normal_cid_1 = -1;
+static gint hf_rcid_ie_cid3 = -1;
+static gint hf_rcid_ie_cid3_1 = -1;
+static gint hf_rcid_ie_cid7 = -1;
+static gint hf_rcid_ie_cid7_1 = -1;
+static gint hf_rcid_ie_cid11 = -1;
+static gint hf_rcid_ie_cid11_1 = -1;
+static gint hf_rcid_ie_cid11_2 = -1;
+static gint hf_rcid_ie_cid11_3 = -1;
+
+/* Masks */
+#define WIMAX_RCID_IE_NORMAL_CID_MASK_1 0x0FFFF0
+#define WIMAX_RCID_IE_PREFIX_MASK 0x8000
+#define WIMAX_RCID_IE_PREFIX_MASK_1 0x0800
+#define WIMAX_RCID_IE_CID3_MASK 0x7000
+#define WIMAX_RCID_IE_CID3_MASK_1 0x0700
+#define WIMAX_RCID_IE_CID7_MASK 0x7F00
+#define WIMAX_RCID_IE_CID7_MASK_1 0x07F0
+#define WIMAX_RCID_IE_CID11_MASK 0x7FF0
+#define WIMAX_RCID_IE_CID11_MASK_1 0x07FF
+
+/* HARQ MAP HARQ Control IE display indexies */
+static gint hf_harq_control_ie_prefix = -1;
+static gint hf_harq_control_ie_ai_sn = -1;
+static gint hf_harq_control_ie_spid = -1;
+static gint hf_harq_control_ie_acid = -1;
+static gint hf_harq_control_ie_reserved = -1;
+static gint hf_harq_control_ie_prefix_1 = -1;
+static gint hf_harq_control_ie_ai_sn_1 = -1;
+static gint hf_harq_control_ie_spid_1 = -1;
+static gint hf_harq_control_ie_acid_1 = -1;
+static gint hf_harq_control_ie_reserved_1 = -1;
+
+/* Masks */
+#define WIMAX_HARQ_CONTROL_IE_PREFIX_MASK 0x80
+#define WIMAX_HARQ_CONTROL_IE_AI_SN_MASK 0x40
+#define WIMAX_HARQ_CONTROL_IE_SPID_MASK 0x30
+#define WIMAX_HARQ_CONTROL_IE_ACID_MASK 0x0F
+#define WIMAX_HARQ_CONTROL_IE_RESERVED_MASK 0x70
+#define WIMAX_HARQ_CONTROL_IE_PREFIX_MASK_1 0x0800
+#define WIMAX_HARQ_CONTROL_IE_AI_SN_MASK_1 0x0400
+#define WIMAX_HARQ_CONTROL_IE_SPID_MASK_1 0x0300
+#define WIMAX_HARQ_CONTROL_IE_ACID_MASK_1 0x00F0
+#define WIMAX_HARQ_CONTROL_IE_RESERVED_MASK_1 0x0700
+
+/* Extension Type */
+#define EXTENSION_TYPE_MASK 0xE000
+#define EXTENSION_TYPE_MASK_1 0x0E00
+#define EXTENSION_SUBTYPE_MASK 0x1F00
+#define EXTENSION_SUBTYPE_MASK_1 0x01F0
+#define EXTENSION_LENGTH_MASK 0x00F0
+#define EXTENSION_LENGTH_MASK_1 0x000F
+
+static gint hf_culmap_extension_type = -1;
+static gint hf_culmap_extension_subtype = -1;
+static gint hf_culmap_extension_length = -1;
+static gint hf_culmap_extension_type_1 = -1;
+static gint hf_culmap_extension_subtype_1 = -1;
+static gint hf_culmap_extension_length_1 = -1;
+
+/* static gint hf_culmap_extension_time_diversity_mbs = -1; */
+static gint hf_culmap_extension_harq_mode = -1;
+static gint hf_culmap_extension_unknown_sub_type = -1;
+/* static gint hf_culmap_extension_time_diversity_mbs_1 = -1; */
+static gint hf_culmap_extension_harq_mode_1 = -1;
+static gint hf_culmap_extension_unknown_sub_type_1 = -1;
+
+/* UL-MAP CDMA Allocation IE */
+#define CDMA_ALLOCATION_DURATION_MASK 0xFC00
+#define CDMA_ALLOCATION_UIUC_MASK 0x03C0
+#define CDMA_ALLOCATION_REPETITION_CODE_MASK 0x0030
+#define CDMA_ALLOCATION_FRAME_NUMBER_INDEX_MASK 0x000F
+
+#define CDMA_ALLOCATION_RANGING_SUBCHANNEL_MASK 0xFE
+#define CDMA_ALLOCATION_BW_REQUEST_MANDATORY_MASK 0x01
+
+#define CDMA_ALLOCATION_DURATION_MASK_1 0x0FC0
+#define CDMA_ALLOCATION_UIUC_MASK_1 0x003C
+#define CDMA_ALLOCATION_REPETITION_CODE_MASK_1 0x0003
+#define CDMA_ALLOCATION_FRAME_NUMBER_INDEX_MASK_1 0xF0000000
+#define CDMA_ALLOCATION_RANGING_CODE_MASK_1 0x0FF00000
+#define CDMA_ALLOCATION_RANGING_SYMBOL_MASK_1 0x000FF000
+#define CDMA_ALLOCATION_RANGING_SUBCHANNEL_MASK_1 0x00000FE0
+#define CDMA_ALLOCATION_BW_REQUEST_MANDATORY_MASK_1 0x00000010
+
+static gint hf_cdma_allocation_duration = -1;
+static gint hf_cdma_allocation_uiuc = -1;
+static gint hf_cdma_allocation_repetition = -1;
+static gint hf_cdma_allocation_frame_number_index = -1;
+static gint hf_cdma_allocation_ranging_code = -1;
+static gint hf_cdma_allocation_ranging_symbol = -1;
+static gint hf_cdma_allocation_ranging_subchannel = -1;
+static gint hf_cdma_allocation_bw_req = -1;
+static gint hf_cdma_allocation_duration_1 = -1;
+static gint hf_cdma_allocation_uiuc_1 = -1;
+static gint hf_cdma_allocation_repetition_1 = -1;
+static gint hf_cdma_allocation_frame_number_index_1 = -1;
+static gint hf_cdma_allocation_ranging_code_1 = -1;
+static gint hf_cdma_allocation_ranging_symbol_1 = -1;
+static gint hf_cdma_allocation_ranging_subchannel_1 = -1;
+static gint hf_cdma_allocation_bw_req_1 = -1;
+
+/* UL-MAP Extended UIUCs (table 290a) */
+#define MINI_SUBCHANNEL_CTYPE_MASK 0xC0
+#define MINI_SUBCHANNEL_CTYPE_MASK_16 0x0C00
+#define MINI_SUBCHANNEL_DURATION_MASK 0x3F
+#define MINI_SUBCHANNEL_DURATION_MASK_16 0x03F0
+#define MINI_SUBCHANNEL_CID_MASK 0xFFFF00
+#define MINI_SUBCHANNEL_UIUC_MASK 0x0000F0
+#define MINI_SUBCHANNEL_REPETITION_MASK 0x00000C
+#define MINI_SUBCHANNEL_CID_MASK_1 0x0FFFF000
+#define MINI_SUBCHANNEL_UIUC_MASK_1 0x00000F00
+#define MINI_SUBCHANNEL_REPETITION_MASK_1 0x000000C0
+#define MINI_SUBCHANNEL_CID_MASK_2 0x03FFFF00
+#define MINI_SUBCHANNEL_UIUC_MASK_2 0x000000F0
+#define MINI_SUBCHANNEL_REPETITION_MASK_2 0x0000000C
+#define MINI_SUBCHANNEL_CID_MASK_3 0x3FFFF000
+#define MINI_SUBCHANNEL_UIUC_MASK_3 0x00000F00
+#define MINI_SUBCHANNEL_REPETITION_MASK_3 0x000000C0
+#define MINI_SUBCHANNEL_PADDING_MASK 0xF0
+#define MINI_SUBCHANNEL_PADDING_MASK_1 0x0000000F
+
+static gint hf_extended_uiuc_ie_uiuc = -1;
+static gint hf_extended_uiuc_ie_length = -1;
+static gint hf_extended_uiuc_ie_uiuc_1 = -1;
+static gint hf_extended_uiuc_ie_length_1 = -1;
+static gint hf_extended_uiuc_ie_power_control = -1;
+static gint hf_extended_uiuc_ie_power_measurement_frame = -1;
+static gint hf_extended_uiuc_ie_power_control_24 = -1;
+static gint hf_extended_uiuc_ie_power_measurement_frame_24 = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_ctype = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_duration = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_ctype_16 = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_duration_16 = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_cid = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_repetition = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_padding = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_cid_1 = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_1 = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_1 = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_cid_2 = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_2 = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_2 = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_cid_3 = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_3 = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_3 = -1;
+static gint hf_extended_uiuc_ie_mini_subchannel_alloc_padding_1 = -1;
+static gint hf_extended_uiuc_ie_aas_ul = -1;
+static gint hf_extended_uiuc_ie_cqich_alloc = -1;
+static gint hf_extended_uiuc_ie_ul_zone = -1;
+static gint hf_extended_uiuc_ie_phymod_ul = -1;
+static gint hf_extended_uiuc_ie_mimo_ul_basic = -1;
+static gint hf_extended_uiuc_ie_fast_tracking = -1;
+static gint hf_extended_uiuc_ie_ul_pusc_burst_allocation = -1;
+static gint hf_extended_uiuc_ie_fast_ranging = -1;
+static gint hf_extended_uiuc_ie_ul_allocation_start = -1;
+static gint hf_extended_uiuc_ie_unknown_uiuc = -1;
+
+
+/* Compact UL-MAP IE Types (table 90) */
+#define COMPACT_UL_MAP_TYPE_NORMAL_SUBCHANNEL 0
+#define COMPACT_UL_MAP_TYPE_BAND_AMC 1
+#define COMPACT_UL_MAP_TYPE_SAFETY 2
+#define COMPACT_UL_MAP_TYPE_UIUC 3
+#define COMPACT_UL_MAP_TYPE_HARQ_REGION_IE 4
+#define COMPACT_UL_MAP_TYPE_CQICH_REGION_IE 5
+#define COMPACT_UL_MAP_TYPE_RESERVED 6
+#define COMPACT_UL_MAP_TYPE_EXTENSION 7
+
+/* Compact UL-MAP IE decoder */
+guint wimax_compact_ulmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset)
+{
+ guint uiuc, byte, length = 0;
+ guint ul_map_type;
+ guint harq_region_change_indication;
+ guint cqi_region_change_indication;
+ guint ul_map_offset, nibble_length;
+ guint nband, band_count, i, allocation_mode;
+
+#ifdef DEBUG
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Compact UL-MAP IEs");
+#endif
+ /* set the local offset */
+ ul_map_offset = offset;
+ /* Get the first byte */
+ byte = tvb_get_guint8(tvb, ul_map_offset);
+ /* get the ul-map type */
+ if(nibble_offset & 1)
+ {
+ ul_map_type = ((byte & UL_MAP_TYPE_MASK_1) >> 1);
+ }
+ else
+ {
+ ul_map_type = ((byte & UL_MAP_TYPE_MASK) >> 5);
+ }
+ /* process the Compact UL-MAP IE (table 90) */
+ switch (ul_map_type)
+ {
+ case COMPACT_UL_MAP_TYPE_NORMAL_SUBCHANNEL:/* 6.3.2.3.43.7.1 */
+ /* display the UL-MAP type and reserved bit */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_culmap_ul_map_type_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved */
+ proto_tree_add_item(tree, hf_culmap_reserved_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ ul_map_offset++;
+ nibble_offset = 0;
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_culmap_ul_map_type, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved */
+ proto_tree_add_item(tree, hf_culmap_reserved, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ nibble_offset = 1;
+ }
+ length = 1;
+ /* decode RCID IE */
+ nibble_length = wimax_compact_ulmap_rcid_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
+ length += nibble_length;
+ ul_map_offset += (nibble_length >> 1);
+ nibble_offset = (nibble_length & 1);
+ /* check harq mode */
+ if(!harq_mode)
+ { /* display the Nep and Nsch Code */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_culmap_nep_code_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ ul_map_offset++;
+ proto_tree_add_item(tree, hf_culmap_nsch_code, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_culmap_nep_code, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_culmap_nsch_code_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ ul_map_offset++;
+ }
+ length += 2;
+ }
+ else if(harq_mode == 1)
+ { /* display the Shortened UIUC and Companded SC */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_culmap_shortened_uiuc_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_culmap_companded_sc_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_culmap_shortened_uiuc, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_culmap_companded_sc, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ /* move to next byte */
+ ul_map_offset++;
+ length += 2;
+ }
+ /* decode HARQ Control IE */
+ nibble_length = wimax_compact_ulmap_harq_control_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
+ length += nibble_length;
+ break;
+ case COMPACT_UL_MAP_TYPE_BAND_AMC:/* 6.3.2.3.43.7.2 */
+ /* display the UL-MAP type and reserved bit */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_culmap_ul_map_type_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved */
+ proto_tree_add_item(tree, hf_culmap_reserved_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ ul_map_offset++;
+ nibble_offset = 0;
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_culmap_ul_map_type, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved */
+ proto_tree_add_item(tree, hf_culmap_reserved, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ nibble_offset = 1;
+ }
+ length = 1;
+ /* decode RCID IE */
+ nibble_length = wimax_compact_ulmap_rcid_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
+ length += nibble_length;
+ ul_map_offset += (nibble_length >> 1);
+ nibble_offset = (nibble_length & 1);
+ /* check harq mode */
+ if(!harq_mode)
+ { /* display the Nep and Nsch Code */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_culmap_nep_code_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ ul_map_offset++;
+ proto_tree_add_item(tree, hf_culmap_nsch_code, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_culmap_nep_code, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_culmap_nsch_code_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ ul_map_offset++;
+ }
+ length += 2;
+ }
+ else if(harq_mode == 1)
+ { /* display the Shortened UIUC and Companded SC */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_culmap_shortened_uiuc_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_culmap_companded_sc_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_culmap_shortened_uiuc, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_culmap_companded_sc, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ /* move to next byte */
+ ul_map_offset++;
+ length += 2;
+ }
+ /* get the Nband */
+ if(max_logical_bands)
+ { /* get and display the Nband */
+ nband = tvb_get_guint8(tvb, ul_map_offset);
+ length++;
+ if(nibble_offset & 1)
+ {
+ nband = (nband & LSB_NIBBLE_MASK);
+ /* display the Nband */
+ proto_tree_add_item(tree, hf_culmap_num_bands_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ ul_map_offset++;
+ nibble_offset = 0;
+ if(max_logical_bands == 3)
+ {
+ proto_tree_add_item(tree, hf_culmap_band_index, tvb, ul_map_offset, nband, ENC_NA);
+ length += (nband * 2);
+ /* update offset */
+ ul_map_offset += nband;
+ }
+ else
+ {
+ nibble_offset = (nband & 1);
+ proto_tree_add_item(tree, hf_culmap_band_index, tvb, ul_map_offset, ((nband >> 1) + nibble_offset), ENC_NA);
+ length += nband;
+ /* update offset */
+ ul_map_offset += (nband >> 1);
+ }
+ }
+ else
+ {
+ nband = ((nband & MSB_NIBBLE_MASK) >> 4);
+ /* display the Nband */
+ proto_tree_add_item(tree, hf_culmap_num_bands, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ nibble_offset = 1;
+ if(max_logical_bands == 3)
+ {
+ proto_tree_add_item(tree, hf_culmap_band_index, tvb, ul_map_offset, (nband + nibble_offset), ENC_NA);
+ length += (nband * 2);
+ /* update offset */
+ ul_map_offset += nband;
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_culmap_band_index, tvb, ul_map_offset, ((nband >> 1) + nibble_offset), ENC_NA);
+ length += nband;
+ /* update offset */
+ ul_map_offset += ((nband + nibble_offset) >> 1);
+ if(nband & 1)
+ nibble_offset = 0;
+ }
+ }
+ band_count = nband;
+ }
+ else
+ {
+ band_count = 1;
+ /* display the Nb-BITMAP */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_culmap_nb_bitmap_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ ul_map_offset++;
+ nibble_offset = 0;
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_culmap_nb_bitmap, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ nibble_offset = 1;
+ }
+ length++;
+ }
+ /* Get the Allocation Mode */
+ byte = tvb_get_guint8(tvb, ul_map_offset);
+ if(nibble_offset & 1)
+ {
+ allocation_mode = ((byte & ALLOCATION_MODE_MASK_1) >> 2);
+ proto_tree_add_item(tree, hf_culmap_allocation_mode_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_culmap_allocation_mode_rsvd_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ nibble_offset = 0;
+ ul_map_offset++;
+ }
+ else
+ {
+ allocation_mode = ((byte & ALLOCATION_MODE_MASK) >> 6);
+ proto_tree_add_item(tree, hf_culmap_allocation_mode, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_culmap_allocation_mode_rsvd, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ nibble_offset = 1;
+ }
+ length++;
+ /* Decode Allocation Mode - need to be done */
+ if(!allocation_mode)
+ {
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_culmap_num_subchannels_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_culmap_num_subchannels, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ ul_map_offset++;
+ length += 2;
+ }
+ else if(allocation_mode == 1)
+ {
+ for(i=0; i<band_count; i++)
+ {
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_culmap_num_subchannels_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_culmap_num_subchannels, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ ul_map_offset++;
+ }
+ length += (band_count * 2);
+ }
+ /* decode HARQ Control IE */
+ nibble_length = wimax_compact_ulmap_harq_control_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
+ length += nibble_length;
+ break;
+ case COMPACT_UL_MAP_TYPE_SAFETY:/* 6.3.2.3.43.7.3 */
+ /* display the UL-MAP type and reserved bit */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_culmap_ul_map_type_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved */
+ proto_tree_add_item(tree, hf_culmap_reserved_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ ul_map_offset++;
+ nibble_offset = 0;
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_culmap_ul_map_type, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved */
+ proto_tree_add_item(tree, hf_culmap_reserved, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ nibble_offset = 1;
+ }
+ length = 1;
+ /* decode RCID IE */
+ nibble_length = wimax_compact_ulmap_rcid_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
+ length += nibble_length;
+ ul_map_offset += (nibble_length >> 1);
+ nibble_offset = (nibble_length & 1);
+ /* check harq mode */
+ if(!harq_mode)
+ { /* display the Nep and Nsch Code */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_culmap_nep_code_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ ul_map_offset++;
+ proto_tree_add_item(tree, hf_culmap_nsch_code, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_culmap_nep_code, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_culmap_nsch_code_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ ul_map_offset++;
+ }
+ length += 2;
+ }
+ else if(harq_mode == 1)
+ { /* display the Shortened UIUC and Companded SC */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_culmap_shortened_uiuc_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_culmap_companded_sc_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_culmap_shortened_uiuc, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_culmap_companded_sc, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ /* move to next byte */
+ ul_map_offset++;
+ length += 2;
+ }
+ /* display BIN offset */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_culmap_bin_offset_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ ul_map_offset++;
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_culmap_bin_offset, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ ul_map_offset++;
+ }
+ length += 2;
+ /* decode HARQ Control IE */
+ nibble_length = wimax_compact_ulmap_harq_control_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
+ length += nibble_length;
+ break;
+ case COMPACT_UL_MAP_TYPE_UIUC:/* 6.3.2.3.43.7.4 */
+ /* display the UL-MAP type and reserved bit */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_culmap_ul_map_type_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved */
+ proto_tree_add_item(tree, hf_culmap_reserved_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ ul_map_offset++;
+ /* get the new byte */
+ byte = tvb_get_guint8(tvb, ul_map_offset);
+ /* get the UIUC */
+ uiuc = ((byte & MSB_NIBBLE_MASK) >> 4);
+ /* display the UIUC */
+ proto_tree_add_item(tree, hf_culmap_uiuc, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ /* display the UL-MAP type */
+ proto_tree_add_item(tree, hf_culmap_ul_map_type, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the reserved */
+ proto_tree_add_item(tree, hf_culmap_reserved, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* get the UIUC */
+ uiuc = (byte & LSB_NIBBLE_MASK);
+ /* display the UIUC */
+ proto_tree_add_item(tree, hf_culmap_uiuc_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ }
+ length = 2;
+ /* decode RCID IE */
+ nibble_length = wimax_compact_ulmap_rcid_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
+ length += nibble_length;
+ ul_map_offset += (nibble_length >> 1);
+ nibble_offset = (nibble_length & 1);
+ if(uiuc == 15)
+ { /* Extended UIUC dependent IE */
+ nibble_length = wimax_extended_uiuc_dependent_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
+ length += nibble_length;
+ ul_map_offset += (nibble_length >> 1);
+ nibble_offset = (nibble_length & 1);
+ }
+ else if(uiuc == 14)
+ { /* CDMA Allocation IE */
+ nibble_length = wimax_cdma_allocation_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
+ length += nibble_length;
+ ul_map_offset += (nibble_length >> 1);
+ nibble_offset = (nibble_length & 1);
+ }
+ else if(uiuc == 12)
+ {
+ if(nibble_offset & 1)
+ {
+ /* display the OFDMA symbol offset */
+ proto_tree_add_item(tree, hf_culmap_uiuc_ofdma_symbol_offset_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ /* display the subchannel offset */
+ proto_tree_add_item(tree, hf_culmap_uiuc_subchannel_offset_7_1, tvb, ul_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the number of OFDMA symbols */
+ proto_tree_add_item(tree, hf_culmap_uiuc_num_of_ofdma_symbols_7_1, tvb, ul_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the number of subchannels */
+ proto_tree_add_item(tree, hf_culmap_uiuc_num_of_subchannels_7_1, tvb, ul_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the ranging method */
+ proto_tree_add_item(tree, hf_culmap_uiuc_ranging_method_1, tvb, ul_map_offset, 4, ENC_BIG_ENDIAN);
+ /* display the reserved */
+ proto_tree_add_item(tree, hf_culmap_uiuc_reserved_1, tvb, ul_map_offset, 4, ENC_BIG_ENDIAN);
+ ul_map_offset += 3;
+ }
+ else
+ { /* display the OFDMA symbol offset */
+ proto_tree_add_item(tree, hf_culmap_uiuc_ofdma_symbol_offset, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ /* display the subchannel offset */
+ proto_tree_add_item(tree, hf_culmap_uiuc_subchannel_offset_7, tvb, ul_map_offset, 3, ENC_BIG_ENDIAN);
+ /* display the number of OFDMA symbols */
+ proto_tree_add_item(tree, hf_culmap_uiuc_num_of_ofdma_symbols_7, tvb, ul_map_offset, 3, ENC_BIG_ENDIAN);
+ /* display the number of subchannels */
+ proto_tree_add_item(tree, hf_culmap_uiuc_num_of_subchannels_7, tvb, ul_map_offset, 3, ENC_BIG_ENDIAN);
+ /* display the ranging method */
+ proto_tree_add_item(tree, hf_culmap_uiuc_ranging_method, tvb, ul_map_offset, 3, ENC_BIG_ENDIAN);
+ /* display the reserved */
+ proto_tree_add_item(tree, hf_culmap_uiuc_reserved, tvb, ul_map_offset, 3, ENC_BIG_ENDIAN);
+ ul_map_offset += 3;
+ }
+ length += 8;
+ }
+ else
+ { /* display Number of subchannels */
+ if(nibble_offset & 1)
+ proto_tree_add_item(tree, hf_culmap_uiuc_num_of_subchannels_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ else
+ proto_tree_add_item(tree, hf_culmap_uiuc_num_of_subchannels, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ length += 2;
+ /* display the repetition coding indication and reserved bits */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_culmap_uiuc_repetition_coding_indication_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_culmap_uiuc_reserved_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ nibble_offset = 0;
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_culmap_uiuc_repetition_coding_indication, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_culmap_uiuc_reserved, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ nibble_offset = 1;
+ }
+ length += 1;
+ }
+ /* decode HARQ Control IE */
+ nibble_length = wimax_compact_ulmap_harq_control_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);
+ length += nibble_length;
+ break;
+ case COMPACT_UL_MAP_TYPE_HARQ_REGION_IE:/* 6.3.2.3.43.7.5 */
+ if(nibble_offset & 1)
+ { /* display the UL-MAP type */
+ proto_tree_add_item(tree, hf_culmap_ul_map_type_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the HARQ Region Change Indication */
+ proto_tree_add_item(tree, hf_culmap_harq_region_change_indication_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* get the HARQ Region Change Indication */
+ harq_region_change_indication = (byte & 0x01);
+ /* move to next byte */
+ ul_map_offset++;
+ nibble_offset = 0;
+ }
+ else
+ { /* display the UL-MAP type */
+ proto_tree_add_item(tree, hf_culmap_ul_map_type, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the HARQ Region Change Indication */
+ proto_tree_add_item(tree, hf_culmap_harq_region_change_indication, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* get the HARQ Region Change Indication */
+ harq_region_change_indication = (byte & 0x10);
+ nibble_offset = 1;
+ }
+ length = 1;
+ if(harq_region_change_indication == 1)
+ {
+ if(nibble_offset & 1)
+ {
+ /* display the OFDMA symbol offset */
+ proto_tree_add_item(tree, hf_culmap_uiuc_ofdma_symbol_offset_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ /* display the subchannel offset */
+ proto_tree_add_item(tree, hf_culmap_uiuc_subchannel_offset_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ /* display the number of OFDMA symbols */
+ proto_tree_add_item(tree, hf_culmap_uiuc_num_of_ofdma_symbols_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ /* display the number of subchannels */
+ proto_tree_add_item(tree, hf_culmap_uiuc_num_of_subchannels_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ }
+ else
+ { /* display the OFDMA symbol offset */
+ proto_tree_add_item(tree, hf_culmap_uiuc_ofdma_symbol_offset, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ /* display the subchannel offset */
+ proto_tree_add_item(tree, hf_culmap_uiuc_subchannel_offset, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ /* display the number of OFDMA symbols */
+ proto_tree_add_item(tree, hf_culmap_uiuc_num_of_ofdma_symbols, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ /* display the number of subchannels */
+ proto_tree_add_item(tree, hf_culmap_uiuc_num_of_subchannels, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ }
+ length += 8;
+ }
+ break;
+ case COMPACT_UL_MAP_TYPE_CQICH_REGION_IE:/* 6.3.2.3.43.7.6 */
+ if(nibble_offset & 1)
+ { /* display the UL-MAP type */
+ proto_tree_add_item(tree, hf_culmap_ul_map_type_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the CQI Region Change Indication */
+ proto_tree_add_item(tree, hf_culmap_cqi_region_change_indication_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* get the CQI Region Change Indication */
+ cqi_region_change_indication = (byte & 0x01);
+ /* move to next byte */
+ ul_map_offset++;
+ nibble_offset = 0;
+ }
+ else
+ { /* display the UL-MAP type */
+ proto_tree_add_item(tree, hf_culmap_ul_map_type, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* display the CQI Region Change Indication */
+ proto_tree_add_item(tree, hf_culmap_cqi_region_change_indication, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ /* get the CQI Region Change Indication */
+ cqi_region_change_indication = (byte & 0x10);
+ nibble_offset = 1;
+ }
+ length = 1;
+ if(cqi_region_change_indication == 1)
+ {
+ if(nibble_offset & 1)
+ {
+ /* display the OFDMA symbol offset */
+ proto_tree_add_item(tree, hf_culmap_uiuc_ofdma_symbol_offset_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ /* display the subchannel offset */
+ proto_tree_add_item(tree, hf_culmap_uiuc_subchannel_offset_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ /* display the number of OFDMA symbols */
+ proto_tree_add_item(tree, hf_culmap_uiuc_num_of_ofdma_symbols_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ /* display the number of subchannels */
+ proto_tree_add_item(tree, hf_culmap_uiuc_num_of_subchannels_1, tvb, ul_map_offset, 2, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ }
+ else
+ { /* display the OFDMA symbol offset */
+ proto_tree_add_item(tree, hf_culmap_uiuc_ofdma_symbol_offset, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ /* display the subchannel offset */
+ proto_tree_add_item(tree, hf_culmap_uiuc_subchannel_offset, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ /* display the number of OFDMA symbols */
+ proto_tree_add_item(tree, hf_culmap_uiuc_num_of_ofdma_symbols, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ /* display the number of subchannels */
+ proto_tree_add_item(tree, hf_culmap_uiuc_num_of_subchannels, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ ul_map_offset++;
+ }
+ length += 8;
+ }
+ break;
+ case COMPACT_UL_MAP_TYPE_EXTENSION:/* 6.3.2.3.43.7.7 */
+ /* decode the Compact UL-MAP externsion IE */
+ nibble_length = wimax_culmap_extension_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);/*, cqich_indicator);*/
+ length = nibble_length;
+ break;
+ default:/* Reserved Type */
+ /* display the reserved type */
+ proto_tree_add_item(tree, hf_culmap_reserved_type_1, tvb, ul_map_offset, 1, ENC_BIG_ENDIAN);
+ length = 1;
+ break;
+ }
+ /* Update the nibble_offset and length */
+ return length;
+}
+
+/* Compact UL-MAP Reduced CID IE (6.3.2.3.43.3) decoder */
+static guint wimax_compact_ulmap_rcid_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+{
+ guint length = 0;
+ guint prefix;
+
+#ifdef DEBUG
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "RCID IE");
+#endif
+ if(nibble_offset & 1)
+ {
+ if(cid_type == CID_TYPE_NORMAL)
+ { /* display the normal CID */
+ proto_tree_add_item(tree, hf_rcid_ie_normal_cid_1, tvb, offset, 3, ENC_BIG_ENDIAN);
+ length = 4;
+ }
+ else
+ { /* Get the prefix bit */
+ prefix = (tvb_get_guint8(tvb, offset) & 0x08);
+ /* display the prefix */
+ proto_tree_add_item(tree, hf_rcid_ie_prefix_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ if(prefix)
+ { /* display the CID11 */
+ proto_tree_add_item(tree, hf_rcid_ie_cid11_3, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 3;
+ }
+ else
+ {
+ if(cid_type == CID_TYPE_RCID11)
+ { /* display the CID11 */
+ proto_tree_add_item(tree, hf_rcid_ie_cid11_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 3;
+ }
+ else if(cid_type == CID_TYPE_RCID7)
+ { /* display the normal CID7 */
+ proto_tree_add_item(tree, hf_rcid_ie_cid7_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 2;
+ }
+ else if(cid_type == CID_TYPE_RCID3)
+ { /* display the CID3 */
+ proto_tree_add_item(tree, hf_rcid_ie_cid3_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 1;
+ }
+ }
+ }
+ }
+ else
+ {
+ if(cid_type == CID_TYPE_NORMAL)
+ { /* display the normal CID */
+ proto_tree_add_item(tree, hf_rcid_ie_normal_cid, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 4;
+ }
+ else
+ { /* Get the prefix bit */
+ prefix = (tvb_get_guint8(tvb, offset) & 0x08);
+ /* display the prefix */
+ proto_tree_add_item(tree, hf_rcid_ie_prefix, tvb, offset, 2, ENC_BIG_ENDIAN);
+ if(prefix || (cid_type == CID_TYPE_RCID11))
+ { /* display the CID11 */
+ proto_tree_add_item(tree, hf_rcid_ie_cid11_2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 3;
+ }
+ else
+ {
+ if(cid_type == CID_TYPE_RCID11)
+ { /* display the CID11 */
+ proto_tree_add_item(tree, hf_rcid_ie_cid11, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 3;
+ }
+ else if(cid_type == CID_TYPE_RCID7)
+ { /* display the CID7 */
+ proto_tree_add_item(tree, hf_rcid_ie_cid7, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 2;
+ }
+ else if(cid_type == CID_TYPE_RCID3)
+ { /* display the CID3 */
+ proto_tree_add_item(tree, hf_rcid_ie_cid3, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 1;
+ }
+ }
+ }
+ }
+ /* return the IE length in nibbles */
+ return length;
+}
+
+/* Compact UL-MAP HARQ Control IE (6.3.2.3.43.4) decoder */
+static guint wimax_compact_ulmap_harq_control_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+{
+ guint byte, prefix, length = 0;
+
+#ifdef DEBUG
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "HARQ Control IE");
+#endif
+ /* Get the first byte */
+ byte = tvb_get_guint8(tvb, offset);
+ if(nibble_offset & 1)
+ { /* Get the prefix bit */
+ prefix = (byte & 0x08);
+ /* display the prefix */
+ proto_tree_add_item(tree, hf_harq_control_ie_prefix_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ if(prefix)
+ { /* display the ai_sn */
+ proto_tree_add_item(tree, hf_harq_control_ie_ai_sn_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the spid */
+ proto_tree_add_item(tree, hf_harq_control_ie_spid_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the acid */
+ proto_tree_add_item(tree, hf_harq_control_ie_acid_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 2;
+ }
+ else
+ { /* display the reserved bits */
+ proto_tree_add_item(tree, hf_harq_control_ie_reserved_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ length = 1;
+ }
+ }
+ else
+ { /* Get the prefix bit */
+ prefix = (byte & 0x80);
+ /* display the prefix */
+ proto_tree_add_item(tree, hf_harq_control_ie_prefix, tvb, offset, 1, ENC_BIG_ENDIAN);
+ if(prefix)
+ { /* display the ai_sn */
+ proto_tree_add_item(tree, hf_harq_control_ie_ai_sn, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the spid */
+ proto_tree_add_item(tree, hf_harq_control_ie_spid, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the acid */
+ proto_tree_add_item(tree, hf_harq_control_ie_acid, tvb, offset, 1, ENC_BIG_ENDIAN);
+ length = 2;
+ }
+ else
+ { /* display the reserved bits */
+ proto_tree_add_item(tree, hf_harq_control_ie_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ length = 1;
+ }
+ }
+ /* return the IE length in nibbles */
+ return length;
+}
+
+/* UL-MAP Extension IE sub-types */
+#define HARQ_MODE_SWITCH 0
+#define EXTENSION_TYPE_SHIFT 13
+#define EXTENSION_TYPE_SHIFT_1 9
+#define EXTENSION_SUBTYPE_SHIFT 8
+#define EXTENSION_SUBTYPE_SHIFT_1 4
+#define EXTENSION_LENGTH_SHIFT 4
+
+/* Compact UL-MAP Extension IE (6.3.2.3.43.7.7) decoder */
+static guint wimax_culmap_extension_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+{
+ guint tvb_value, ul_map_type, sub_type, length;
+
+#ifdef DEBUG
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "UL-MAP Extension IE");
+#endif
+ /* Get the first 16-bit word */
+ tvb_value = tvb_get_ntohs(tvb, offset);
+ if(nibble_offset & 1)
+ { /* Get the ul-map type */
+ ul_map_type = ((tvb_value & EXTENSION_TYPE_MASK_1) >> EXTENSION_TYPE_SHIFT_1);
+ if(ul_map_type != COMPACT_UL_MAP_TYPE_EXTENSION)
+ return 0;
+ /* Get the sub-type */
+ sub_type = ((tvb_value & EXTENSION_SUBTYPE_MASK_1) >> EXTENSION_SUBTYPE_SHIFT_1);
+ /* Get the IE length */
+ length = (tvb_value & EXTENSION_LENGTH_MASK_1);
+ /* display the UL-MAP type */
+ proto_tree_add_item(tree, hf_culmap_extension_type_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the UL-MAP extension subtype */
+ proto_tree_add_item(tree, hf_culmap_extension_subtype_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the IE length */
+ proto_tree_add_item(tree, hf_culmap_extension_length_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ switch (sub_type)
+ {
+ case HARQ_MODE_SWITCH:
+ /* display the HARQ mode */
+ proto_tree_add_item(tree, hf_culmap_extension_harq_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* Get the next byte */
+ tvb_value = tvb_get_guint8(tvb, offset);
+ /* get the HARQ mode */
+ harq_mode = ((tvb_value & MSB_NIBBLE_MASK) >> 4);
+ break;
+ default:
+ /* display the unknown sub-type in HEX */
+ proto_tree_add_item(tree, hf_culmap_extension_unknown_sub_type_1, tvb, offset, (length - 2), ENC_NA);
+ break;
+ }
+ }
+ else
+ { /* Get the UL-MAp type */
+ ul_map_type = ((tvb_value & EXTENSION_TYPE_MASK) >> EXTENSION_TYPE_SHIFT);
+ if(ul_map_type != COMPACT_UL_MAP_TYPE_EXTENSION)
+ return 0;
+ /* Get the sub-type */
+ sub_type = ((tvb_value & EXTENSION_SUBTYPE_MASK) >> EXTENSION_SUBTYPE_SHIFT);
+ /* Get the IE length */
+ length = ((tvb_value & EXTENSION_LENGTH_MASK) >> EXTENSION_LENGTH_SHIFT);
+ /* display the UL-MAP type */
+ proto_tree_add_item(tree, hf_culmap_extension_type, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the UL-MAP extension subtype */
+ proto_tree_add_item(tree, hf_culmap_extension_subtype, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the IE length */
+ proto_tree_add_item(tree, hf_culmap_extension_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ switch (sub_type)
+ {
+ case HARQ_MODE_SWITCH:
+ /* display the HARQ mode */
+ proto_tree_add_item(tree, hf_culmap_extension_harq_mode_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* get the HARQ mode */
+ harq_mode = (tvb_value & LSB_NIBBLE_MASK);
+ break;
+ default:
+ /* display the unknown sub-type in HEX */
+ proto_tree_add_item(tree, hf_culmap_extension_unknown_sub_type, tvb, (offset + 1), (length - 1), ENC_NA);
+ break;
+ }
+ }
+ /* return the IE length in nibbles */
+ return (length * 2);
+}
+
+/* 8.4.5.4.3 (table 290) */
+guint wimax_cdma_allocation_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+{
+#ifdef DEBUG
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "CDMA Allocation IE");
+#endif
+ if(nibble_offset & 1)
+ { /* display the Duration */
+ proto_tree_add_item(tree, hf_cdma_allocation_duration_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the UIUC */
+ proto_tree_add_item(tree, hf_cdma_allocation_uiuc_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the Repetition Coding Indication */
+ proto_tree_add_item(tree, hf_cdma_allocation_repetition_1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the frame number index */
+ proto_tree_add_item(tree, hf_cdma_allocation_frame_number_index_1, tvb, offset, 4, ENC_BIG_ENDIAN);
+ /* display the Ranging Code */
+ proto_tree_add_item(tree, hf_cdma_allocation_ranging_code_1, tvb, offset, 4, ENC_BIG_ENDIAN);
+ /* display the Ranging Symbol */
+ proto_tree_add_item(tree, hf_cdma_allocation_ranging_symbol_1, tvb, offset, 4, ENC_BIG_ENDIAN);
+ /* display the Ranging Subchannel */
+ proto_tree_add_item(tree, hf_cdma_allocation_ranging_subchannel_1, tvb, offset, 4, ENC_BIG_ENDIAN);
+ /* display the BW Request Mandatory */
+ proto_tree_add_item(tree, hf_cdma_allocation_bw_req_1, tvb, offset, 4, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* display the Duration */
+ proto_tree_add_item(tree, hf_cdma_allocation_duration, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the UIUC */
+ proto_tree_add_item(tree, hf_cdma_allocation_uiuc, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the Repetition Coding Indication */
+ proto_tree_add_item(tree, hf_cdma_allocation_repetition, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the frame number index */
+ proto_tree_add_item(tree, hf_cdma_allocation_frame_number_index, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display the Ranging Code */
+ proto_tree_add_item(tree, hf_cdma_allocation_ranging_code, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the Ranging Symbol */
+ proto_tree_add_item(tree, hf_cdma_allocation_ranging_symbol, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the Ranging Subchannel */
+ proto_tree_add_item(tree, hf_cdma_allocation_ranging_subchannel, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display the BW Request Mandatory */
+ proto_tree_add_item(tree, hf_cdma_allocation_bw_req, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ /* return the IE length in nibbles */
+ return 8;
+}
+
+/* Extended UIUCs (table 290a) */
+#define POWER_CONTROL_IE 0
+#define MINI_SUBCHANNEL_ALLOCATION_IE 1
+#define AAS_UL_IE 2
+#define CQICH_ALLOC_IE 3
+#define UL_ZONE_IE 4
+#define PHYMOD_UL_IE 5
+#define MIMO_UL_BASIC_IE 6
+#define UL_MAP_FAST_TRACKING_IE 7
+#define UL_PUSC_BURST_ALLOCATION_IN_OTHER_SEGMENT_IE 8
+#define FAST_RANGING_IE 9
+#define UL_ALLOCATION_START_IE 10
+
+/* 8.4.5.4.4.1 (table 290b) */
+guint wimax_extended_uiuc_dependent_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+{
+ guint ext_uiuc, length, m, i;
+ guint8 byte;
+
+#ifdef DEBUG
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Extended UIUC IE");
+#endif
+
+ /* get the first byte */
+ byte = tvb_get_guint8(tvb, offset);
+ if(nibble_offset & 1)
+ { /* get the extended UIUC */
+ ext_uiuc = (byte & LSB_NIBBLE_MASK);
+ /* display extended UIUC */
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_uiuc_1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ offset++;
+ /* get the 2nd byte */
+ byte = tvb_get_guint8(tvb, offset);
+ /* get the length */
+ length = ((byte & MSB_NIBBLE_MASK) >> 4);
+ /* display extended UIUC length */
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_length_1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* get the extended UIUC */
+ ext_uiuc = ((byte & MSB_NIBBLE_MASK) >> 4);
+ /* get the length */
+ length = (byte & LSB_NIBBLE_MASK);
+ /* display extended UIUC */
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_uiuc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display extended UIUC length */
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* move to next byte */
+ offset++;
+ }
+ /* 8.4.5.4.4.1 (table 290b) */
+ switch (ext_uiuc)
+ {
+ case POWER_CONTROL_IE:
+ /* 8.4.5.4.5 Power Control IE */
+ if(nibble_offset & 1)
+ { /* display power control value */
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_power_control_24, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* display power measurement frame value */
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_power_measurement_frame_24, tvb, offset, 3, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* display power control value */
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_power_control, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display power measurement frame value */
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_power_measurement_frame, tvb, (offset + 1), 1, ENC_BIG_ENDIAN);
+ }
+ break;
+ case MINI_SUBCHANNEL_ALLOCATION_IE:
+ /* 8.4.5.4.8 Mini Subchannel Allocation IE */
+ /* set the M value */
+ switch (length)
+ {
+ case 15:
+ m = 6;
+ break;
+ case 9:
+ m = 3;
+ break;
+ case 7:
+ default:
+ m = 2;
+ break;
+ }
+ if(nibble_offset & 1)
+ {
+ /* display MINI Subchannel Allocation CType value */
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_ctype_16, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* display MINI Subchannel Allocation Duration value */
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_duration_16, tvb, offset, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* display MINI Subchannel Allocation CType value */
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_ctype, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* display MINI Subchannel Allocation Duration value */
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_duration, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ offset++;
+ /* decode and display CIDs, UIUCs, and Repetitions */
+ for(i=0; i<m; i+=2)
+ {
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_cid_1, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_1, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_1, tvb, offset, 4, ENC_BIG_ENDIAN);
+ if(i < (m-2))
+ {
+ offset += 3;
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_cid_3, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_3, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_3, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 3;
+ }
+ else if(m == 3)
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_padding_1, tvb, offset, 4, ENC_BIG_ENDIAN);
+ }
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_cid, tvb, offset, 3, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_repetition, tvb, offset, 3, ENC_BIG_ENDIAN);
+ offset += 3;
+ if(i < (m-2))
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_cid_2, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_2, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_2, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
+ }
+ else if(m == 3)
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mini_subchannel_alloc_padding, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ }
+ }
+ break;
+ case AAS_UL_IE:
+ /* 8.4.5.4.6 AAS UL IE */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_aas_ul, tvb, offset, (length + 1), ENC_NA);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_aas_ul, tvb, offset, length, ENC_NA);
+ }
+ break;
+ case CQICH_ALLOC_IE:
+ /* 8.4.5.4.12 CQICH_ALLOC_IE */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_cqich_alloc, tvb, offset, (length + 1), ENC_NA);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_cqich_alloc, tvb, offset, length, ENC_NA);
+ }
+ break;
+ case UL_ZONE_IE:
+ /* 8.4.5.4.7 UL Zone Switch IE */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_ul_zone, tvb, offset, (length + 1), ENC_NA);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_ul_zone, tvb, offset, length, ENC_NA);
+ }
+ break;
+ case PHYMOD_UL_IE:
+ /* 8.4.5.4.14 PHYMOD_UL_IE */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_phymod_ul, tvb, offset, (length + 1), ENC_NA);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_phymod_ul, tvb, offset, length, ENC_NA);
+ }
+ break;
+ case MIMO_UL_BASIC_IE:
+ /* 8.4.5.4.11 MIMO_UL_BASIC_IE */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mimo_ul_basic, tvb, offset, (length + 1), ENC_NA);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_mimo_ul_basic, tvb, offset, length, ENC_NA);
+ }
+ break;
+ case UL_MAP_FAST_TRACKING_IE:
+ /* 8.4.5.4.22 UL_MAP_FAST_TRACKING_IE */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_fast_tracking, tvb, offset, (length + 1), ENC_NA);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_fast_tracking, tvb, offset, length, ENC_NA);
+ }
+ break;
+ case UL_PUSC_BURST_ALLOCATION_IN_OTHER_SEGMENT_IE:
+ /* 8.4.5.4.17 UL PUSC Burst Allocation in Other Segment IE */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_ul_pusc_burst_allocation, tvb, offset, (length + 1), ENC_NA);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_ul_pusc_burst_allocation, tvb, offset, length, ENC_NA);
+ }
+ break;
+ case FAST_RANGING_IE:
+ /* 8.4.5.4.21 FAST_RANGING_IE */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_fast_ranging, tvb, offset, (length + 1), ENC_NA);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_fast_ranging, tvb, offset, length, ENC_NA);
+ }
+ break;
+ case UL_ALLOCATION_START_IE:
+ /* 8.4.5.4.15`UL_ALLOCATION_START_IE */
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_ul_allocation_start, tvb, offset, (length + 1), ENC_NA);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_ul_allocation_start, tvb, offset, length, ENC_NA);
+ }
+ break;
+ default:
+ if(nibble_offset & 1)
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_unknown_uiuc, tvb, offset, (length + 1), ENC_NA);
+ }
+ else
+ {
+ proto_tree_add_item(tree, hf_extended_uiuc_ie_unknown_uiuc, tvb, offset, length, ENC_NA);
+ }
+ break;
+ }
+ return ((length + 1) * 2 ); /* length in nibbles */
+}
+
+/* Register Wimax Compact UL-MAP IE Protocol */
+void wimax_proto_register_wimax_compact_ulmap_ie(void)
+{
+ /* Compact UL-MAP IE display */
+ static hf_register_info hf_compact_ulmap[] =
+ {
+ {
+ &hf_culmap_ul_map_type,
+ {"UL-MAP Type", "wmx.compact_ulmap.ul_map_type", FT_UINT8, BASE_DEC, NULL, UL_MAP_TYPE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_ul_map_type_1,
+ {"UL-MAP Type", "wmx.compact_ulmap.ul_map_type", FT_UINT8, BASE_DEC, NULL, UL_MAP_TYPE_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_culmap_reserved,
+ {"Reserved", "wmx.compact_ulmap.reserved", FT_UINT8, BASE_HEX, NULL, UL_MAP_RESERVED_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_reserved_1,
+ {"Reserved", "wmx.compact_ulmap.reserved", FT_UINT8, BASE_HEX, NULL, UL_MAP_RESERVED_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_culmap_nep_code,
+ {"Nep Code", "wmx.compact_ulmap.nep_code", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_nep_code_1,
+ {"Nep Code", "wmx.compact_ulmap.nep_code", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_nsch_code,
+ {"Nsch Code", "wmx.compact_ulmap.nsch_code", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_nsch_code_1,
+ {"Nsch Code", "wmx.compact_ulmap.nsch_code", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_shortened_uiuc,
+ {"Shortened UIUC", "wmx.compact_ulmap.shortened_uiuc", FT_UINT8, BASE_HEX, NULL, SHORTENED_UIUC_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_companded_sc,
+ {"Companded SC", "wmx.compact_ulmap.companded_sc", FT_UINT8, BASE_HEX, NULL, COMPANDED_SC_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_shortened_uiuc_1,
+ {"Shortened UIUC", "wmx.compact_ulmap.shortened_uiuc", FT_UINT16, BASE_HEX, NULL, SHORTENED_UIUC_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_culmap_companded_sc_1,
+ {"Companded SC", "wmx.compact_ulmap.companded_sc", FT_UINT16, BASE_HEX, NULL, COMPANDED_SC_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_culmap_num_bands,
+ {"Number Of Bands", "wmx.compact_ulmap.num_bands", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_num_bands_1,
+ {"Number Of Bands", "wmx.compact_ulmap.num_bands", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_band_index,
+ {"Band Index", "wmx.compact_ulmap.band_index", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_culmap_nb_bitmap,
+ {"Number Of Bits For Band BITMAP", "wmx.compact_ulmap.nb_bitmap", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_nb_bitmap_1,
+ {"Number Of Bits For Band BITMAP", "wmx.compact_ulmap.nb_bitmap", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_allocation_mode,
+ {"Allocation Mode", "wmx.compact_ulmap.allocation_mode", FT_UINT8, BASE_DEC, VALS(vals_allocation_modes), ALLOCATION_MODE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_allocation_mode_1,
+ {"Allocation Mode", "wmx.compact_ulmap.allocation_mode", FT_UINT8, BASE_DEC, VALS(vals_allocation_modes), ALLOCATION_MODE_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_culmap_allocation_mode_rsvd,
+ {"Reserved", "wmx.compact_ulmap.allocation_mode_rsvd", FT_UINT8, BASE_DEC, NULL, 0x30, NULL, HFILL}
+ },
+ {
+ &hf_culmap_allocation_mode_rsvd_1,
+ {"Reserved", "wmx.compact_ulmap.allocation_mode_rsvd", FT_UINT8, BASE_DEC, NULL, 0x03, NULL, HFILL}
+ },
+ {
+ &hf_culmap_num_subchannels,
+ {"Number Of Subchannels", "wmx.compact_ulmap.num_subchannels", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_culmap_num_subchannels_1,
+ {"Number Of Subchannels", "wmx.compact_ulmap.num_subchannels", FT_UINT16, BASE_DEC, NULL, MIDDLE_BYTE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_bin_offset,
+ {"BIN Offset", "wmx.compact_ulmap.bin_offset", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_culmap_bin_offset_1,
+ {"BIN Offset", "wmx.compact_ulmap.bin_offset", FT_UINT16, BASE_HEX, NULL, MIDDLE_BYTE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc,
+ {"UIUC", "wmx.compact_ulmap.uiuc", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_1,
+ {"UIUC", "wmx.compact_ulmap.uiuc", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_ofdma_symbol_offset,
+ {"OFDMA Symbol Offset", "wmx.compact_ulmap.uiuc_ofdma_symbol_offset", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_ofdma_symbol_offset_1,
+ {"OFDMA Symbol Offset", "wmx.compact_ulmap.uiuc_ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, MIDDLE_BYTE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_subchannel_offset_7,
+ {"Subchannel Offset", "wmx.compact_ulmap.uiuc_subchannel_offset", FT_UINT24, BASE_DEC, NULL, 0xFE0000, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_num_of_ofdma_symbols_7,
+ {"Number Of OFDMA Symbols", "wmx.compact_ulmap.uiuc_num_of_ofdma_symbols", FT_UINT24, BASE_DEC, NULL, 0x01FC00, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_num_of_subchannels_7,
+ {"Number Of Subchannels", "wmx.compact_ulmap.uiuc_num_of_subchannels", FT_UINT24, BASE_DEC, NULL, 0x0003F8, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_ranging_method,
+ {"Ranging Method", "wmx.compact_ulmap.uiuc_ranging_method", FT_UINT24, BASE_DEC, NULL, 0x000006, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_reserved,
+ {"Reserved", "wmx.compact_ulmap.uiuc_reserved", FT_UINT24, BASE_HEX, NULL, 0x000001, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_subchannel_offset_7_1,
+ {"Subchannel Offset", "wmx.compact_ulmap.uiuc_subchannel_offset", FT_UINT32, BASE_DEC, NULL, 0x00FE0000, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_num_of_ofdma_symbols_7_1,
+ {"Number Of OFDMA Symbols", "wmx.compact_ulmap.uiuc_num_of_ofdma_symbols", FT_UINT32, BASE_DEC, NULL, 0x0001FC00, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_num_of_subchannels_7_1,
+ {"Number Of Subchannels", "wmx.compact_ulmap.uiuc_num_of_subchannels", FT_UINT32, BASE_DEC, NULL, 0x000003F80, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_ranging_method_1,
+ {"Ranging Method", "wmx.compact_ulmap.uiuc_ranging_method", FT_UINT32, BASE_DEC, NULL, 0x00000006, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_reserved_1,
+ {"Reserved", "wmx.compact_ulmap.uiuc_reserved", FT_UINT32, BASE_HEX, NULL, 0x00000001, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_repetition_coding_indication,
+ {"Repetition Coding Indication", "wmx.compact_ulmap.uiuc_repetition_coding_indication", FT_UINT8, BASE_DEC, VALS(vals_repetitions), ALLOCATION_MODE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_repetition_coding_indication_1,
+ {"Repetition Coding Indication", "wmx.compact_ulmap.uiuc_repetition_coding_indication", FT_UINT8, BASE_DEC, VALS(vals_repetitions), ALLOCATION_MODE_MASK_1, NULL, HFILL}
+ },
+#if 0
+ {
+ &hf_culmap_uiuc_reserved1,
+ {"Reserved", "wmx.compact_ulmap.uiuc_reserved1", FT_UINT8, BASE_HEX, NULL, 0x30, NULL, HFILL}
+ },
+#endif
+#if 0
+ {
+ &hf_culmap_uiuc_reserved11_1,
+ {"Reserved", "wmx.compact_ulmap.uiuc_reserved1", FT_UINT8, BASE_HEX, NULL, 0x03, NULL, HFILL}
+ },
+#endif
+
+ {
+ &hf_culmap_uiuc_subchannel_offset,
+ {"Subchannel Offset", "wmx.compact_ulmap.uiuc_subchannel_offset", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_subchannel_offset_1,
+ {"Subchannel Offset", "wmx.compact_ulmap.uiuc_subchannel_offset", FT_UINT16, BASE_DEC, NULL, MIDDLE_BYTE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_num_of_ofdma_symbols,
+ {"Number Of OFDMA Symbols", "wmx.compact_ulmap.uiuc_num_of_ofdma_symbols", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_num_of_ofdma_symbols_1,
+ {"Number Of OFDMA Symbols", "wmx.compact_ulmap.uiuc_num_of_ofdma_symbols", FT_UINT16, BASE_DEC, NULL, MIDDLE_BYTE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_num_of_subchannels,
+ {"Number Of Subchannels", "wmx.compact_ulmap.uiuc_num_of_subchannels", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_culmap_uiuc_num_of_subchannels_1,
+ {"Number Of Subchannels", "wmx.compact_ulmap.uiuc_num_of_subchannels", FT_UINT16, BASE_DEC, NULL, MIDDLE_BYTE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_harq_region_change_indication,
+ {"HARQ Region Change Indication", "wmx.compact_ulmap.harq_region_change_indication", FT_BOOLEAN, 8, TFS(&tfs_region_change), 0x10, NULL, HFILL}
+ },
+ {
+ &hf_culmap_harq_region_change_indication_1,
+ {"HARQ Region Change Indication", "wmx.compact_ulmap.harq_region_change_indication", FT_BOOLEAN, 8, TFS(&tfs_region_change), 0x01, NULL, HFILL}
+ },
+ {
+ &hf_culmap_cqi_region_change_indication,
+ {"CQI Region Change Indication", "wmx.compact_ulmap.cqi_region_change_indication", FT_BOOLEAN, 8, TFS(&tfs_region_change), 0x10, NULL, HFILL}
+ },
+ {
+ &hf_culmap_cqi_region_change_indication_1,
+ {"CQI Region Change Indication", "wmx.compact_ulmap.cqi_region_change_indication", FT_BOOLEAN, 8, TFS(&tfs_region_change), 0x01, NULL, HFILL}
+ },
+#if 0
+ {
+ &hf_culmap_reserved_type,
+ {"UL-MAP Reserved Type", "wmx.compact_ulmap.reserved_type", FT_UINT8, BASE_DEC, NULL, UL_MAP_TYPE_MASK, NULL, HFILL}
+ },
+#endif
+ {
+ &hf_culmap_reserved_type_1,
+ {"UL-MAP Reserved Type", "wmx.compact_ulmap.reserved_type", FT_UINT8, BASE_DEC, NULL, UL_MAP_TYPE_MASK_1, NULL, HFILL}
+ }
+ };
+
+ /* HARQ MAP Reduced CID IE display */
+ static hf_register_info hf_rcid[] =
+ {
+ {
+ &hf_rcid_ie_normal_cid,
+ {"Normal CID", "wmx.harq_map.rcid_ie.normal_cid", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_rcid_ie_normal_cid_1,
+ {"Normal CID", "wmx.harq_map.rcid_ie.normal_cid", FT_UINT24, BASE_HEX, NULL, WIMAX_RCID_IE_NORMAL_CID_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_rcid_ie_prefix,
+ {"Prefix", "wmx.harq_map.rcid_ie.prefix", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_PREFIX_MASK, NULL, HFILL}
+ },
+ {
+ &hf_rcid_ie_prefix_1,
+ {"Prefix", "wmx.harq_map.rcid_ie.prefix", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_PREFIX_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_rcid_ie_cid3,
+ {"3 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid3", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID3_MASK, NULL, HFILL}
+ },
+ {
+ &hf_rcid_ie_cid3_1,
+ {"3 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid3", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID3_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_rcid_ie_cid7,
+ {"7 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid7", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID7_MASK, NULL, HFILL}
+ },
+ {
+ &hf_rcid_ie_cid7_1,
+ {"7 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid7", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID7_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_rcid_ie_cid11,
+ {"11 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid11", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID11_MASK, NULL, HFILL}
+ },
+ {
+ &hf_rcid_ie_cid11_1,
+ {"11 LSB Of Basic CID", "wmx.harq_map.rcid_ie.cid11", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID11_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_rcid_ie_cid11_2,
+ {"11 LSB Of Multicast, AAS or Broadcast CID", "wmx.harq_map.rcid_ie.cid11", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID11_MASK, NULL, HFILL}
+ },
+ {
+ &hf_rcid_ie_cid11_3,
+ {"11 LSB Of Multicast, AAS or Broadcast CID", "wmx.harq_map.rcid_ie.cid11", FT_UINT16, BASE_HEX, NULL, WIMAX_RCID_IE_CID11_MASK_1, NULL, HFILL}
+ }
+ };
+
+ /* HARQ MAP HARQ Control IE display */
+ static hf_register_info hf_harq_control[] =
+ {
+ {
+ &hf_harq_control_ie_prefix,
+ {"Prefix", "wmx.harq_map.harq_control_ie.prefix", FT_BOOLEAN, 8, TFS(&tfs_prefix), WIMAX_HARQ_CONTROL_IE_PREFIX_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_ai_sn,
+ {"HARQ ID Sequence Number(AI_SN)", "wmx.harq_map.harq_control_ie.ai_sn", FT_UINT8, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_AI_SN_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_spid,
+ {"Subpacket ID (SPID)", "wmx.harq_map.harq_control_ie.spid", FT_UINT8, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_SPID_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_acid,
+ {"HARQ CH ID (ACID)", "wmx.harq_map.harq_control_ie.acid", FT_UINT8, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_ACID_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_reserved,
+ {"Reserved", "wmx.harq_map.harq_control_ie.reserved", FT_UINT8, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_RESERVED_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_prefix_1,
+ {"Prefix", "wmx.harq_map.harq_control_ie.prefix", FT_BOOLEAN, 16, TFS(&tfs_prefix), WIMAX_HARQ_CONTROL_IE_PREFIX_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_ai_sn_1,
+ {"HARQ ID Sequence Number(AI_SN)", "wmx.harq_map.harq_control_ie.ai_sn", FT_UINT16, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_AI_SN_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_spid_1,
+ {"Subpacket ID (SPID)", "wmx.harq_map.harq_control_ie.spid", FT_UINT16, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_SPID_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_acid_1,
+ {"HARQ CH ID (ACID)", "wmx.harq_map.harq_control_ie.acid", FT_UINT16, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_ACID_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_harq_control_ie_reserved_1,
+ {"Reserved", "wmx.harq_map.harq_control_ie.reserved", FT_UINT16, BASE_HEX, NULL, WIMAX_HARQ_CONTROL_IE_RESERVED_MASK_1, NULL, HFILL}
+ }
+ };
+
+ static hf_register_info hf_extension_type[] =
+ {
+ {
+ &hf_culmap_extension_type,
+ {"UL-MAP Type", "wmx.extension_type.ul_map_type", FT_UINT16, BASE_DEC, NULL, EXTENSION_TYPE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_extension_type_1,
+ {"UL-MAP Type", "wmx.extension_type.ul_map_type", FT_UINT16, BASE_DEC, NULL, EXTENSION_TYPE_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_culmap_extension_subtype,
+ {"Extension Subtype", "wmx.extension_type.subtype", FT_UINT16, BASE_DEC, NULL, EXTENSION_SUBTYPE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_extension_subtype_1,
+ {"Extension Subtype", "wmx.extension_type.subtype", FT_UINT16, BASE_DEC, NULL, EXTENSION_SUBTYPE_MASK_1, NULL, HFILL}
+ },
+ {
+ &hf_culmap_extension_length,
+ {"Extension Length", "wmx.extension_type.length", FT_UINT16, BASE_DEC, NULL, EXTENSION_LENGTH_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_extension_length_1,
+ {"Extension Length", "wmx.extension_type.length", FT_UINT16, BASE_DEC, NULL, EXTENSION_LENGTH_MASK_1, NULL, HFILL}
+ },
+#if 0
+ {
+ &hf_culmap_extension_time_diversity_mbs,
+ {"Time Diversity MBS", "wmx.extension_type.time_diversity_mbs", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+#endif
+#if 0
+ {
+ &hf_culmap_extension_time_diversity_mbs_1,
+ {"Time Diversity MBS", "wmx.extension_type.time_diversity_mbs", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+#endif
+ {
+ &hf_culmap_extension_harq_mode_1,
+ {"HARQ Mode Switch", "wmx.extension_type.harq_mode", FT_UINT16, BASE_HEX, NULL, 0x000F, NULL, HFILL}
+ },
+ {
+ &hf_culmap_extension_harq_mode,
+ {"HARQ Mode Switch", "wmx.extension_type.harq_mode", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL}
+ },
+ {
+ &hf_culmap_extension_unknown_sub_type,
+ {"Unknown Extension Subtype", "wmx.extension_type.unknown_sub_type", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_culmap_extension_unknown_sub_type_1,
+ {"Unknown Extension Subtype", "wmx.extension_type.unknown_sub_type", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ }
+ };
+
+ static hf_register_info hf_cdma_allocation[] =
+ {
+ { /* display the Duration */
+ &hf_cdma_allocation_duration,
+ {"Duration", "wmx.cdma_allocation.duration", FT_UINT16, BASE_DEC, NULL, CDMA_ALLOCATION_DURATION_MASK, NULL, HFILL}
+ },
+ { /* display the UIUC */
+ &hf_cdma_allocation_uiuc,
+ {"UIUC For Transmission", "wmx.cdma_allocation.uiuc", FT_UINT16, BASE_DEC, NULL, CDMA_ALLOCATION_UIUC_MASK, NULL, HFILL}
+ },
+ { /* display the Repetition Coding Indication */
+ &hf_cdma_allocation_repetition,
+ {"Repetition Coding Indication", "wmx.cdma_allocation.allocation_repetition", FT_UINT16, BASE_DEC, VALS(vals_repetitions), CDMA_ALLOCATION_REPETITION_CODE_MASK, NULL, HFILL}
+ },
+ { /* display the Frame Number Index */
+ &hf_cdma_allocation_frame_number_index,
+ {"Frame Number Index (LSBs of relevant frame number)", "wmx.cdma_allocation.frame_number_index", FT_UINT16, BASE_DEC, NULL, CDMA_ALLOCATION_FRAME_NUMBER_INDEX_MASK, NULL, HFILL}
+ },
+ { /* display the Ranging Code */
+ &hf_cdma_allocation_ranging_code,
+ {"Ranging Code", "wmx.cdma_allocation.ranging_code", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* display the Ranging Symbol */
+ &hf_cdma_allocation_ranging_symbol,
+ {"Ranging Symbol", "wmx.cdma_allocation.ranging_symbol", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* display the Ranging Subchannel */
+ &hf_cdma_allocation_ranging_subchannel,
+ {"Ranging Subchannel", "wmx.cdma_allocation.ranging_subchannel", FT_UINT8, BASE_DEC, NULL, CDMA_ALLOCATION_RANGING_SUBCHANNEL_MASK, NULL, HFILL}
+ },
+ { /* display the BW Request Mandatory */
+ &hf_cdma_allocation_bw_req,
+ {"BW Request Mandatory", "wmx.cdma_allocation.bw_req", FT_BOOLEAN, 8, TFS(&tfs_yes_no_ie), CDMA_ALLOCATION_BW_REQUEST_MANDATORY_MASK, NULL, HFILL}
+ },
+ { /* display the Duration */
+ &hf_cdma_allocation_duration_1,
+ {"Duration", "wmx.cdma_allocation.duration", FT_UINT16, BASE_DEC, NULL, CDMA_ALLOCATION_DURATION_MASK_1, NULL, HFILL}
+ },
+ { /* display the UIUC */
+ &hf_cdma_allocation_uiuc_1,
+ {"UIUC For Transmission", "wmx.cdma_allocation.uiuc", FT_UINT16, BASE_DEC, NULL, CDMA_ALLOCATION_UIUC_MASK_1, NULL, HFILL}
+ },
+ { /* display the Repetition Coding Indication */
+ &hf_cdma_allocation_repetition_1,
+ {"Repetition Coding Indication", "wmx.cdma_allocation.allocation_repetition", FT_UINT16, BASE_DEC, VALS(vals_repetitions), CDMA_ALLOCATION_REPETITION_CODE_MASK_1, NULL, HFILL}
+ },
+ { /* display the Frame Number Index */
+ &hf_cdma_allocation_frame_number_index_1,
+ {"Frame Number Index (LSBs of relevant frame number)", "wmx.cdma_allocation.frame_number_index", FT_UINT32, BASE_DEC, NULL, CDMA_ALLOCATION_FRAME_NUMBER_INDEX_MASK_1, NULL, HFILL}
+ },
+ { /* display the Ranging Code */
+ &hf_cdma_allocation_ranging_code_1,
+ {"Ranging Code", "wmx.cdma_allocation.ranging_code", FT_UINT32, BASE_DEC, NULL, CDMA_ALLOCATION_RANGING_CODE_MASK_1, NULL, HFILL}
+ },
+ { /* display the Ranging Symbol */
+ &hf_cdma_allocation_ranging_symbol_1,
+ {"Ranging Symbol", "wmx.cdma_allocation.ranging_symbol", FT_UINT32, BASE_DEC, NULL, CDMA_ALLOCATION_RANGING_SYMBOL_MASK_1, NULL, HFILL}
+ },
+ { /* display the Ranging Subchannel */
+ &hf_cdma_allocation_ranging_subchannel_1,
+ {"Ranging Subchannel", "wmx.cdma_allocation.ranging_subchannel", FT_UINT32, BASE_DEC, NULL, CDMA_ALLOCATION_RANGING_SUBCHANNEL_MASK_1, NULL, HFILL}
+ },
+ { /* display the BW Request Mandatory */
+ &hf_cdma_allocation_bw_req_1,
+ {"BW Request Mandatory", "wmx.cdma_allocation.bw_req", FT_BOOLEAN, 32, TFS(&tfs_yes_no_ie), CDMA_ALLOCATION_BW_REQUEST_MANDATORY_MASK_1, NULL, HFILL}
+ }
+ };
+
+ static hf_register_info hf_extended_uiuc[] =
+ {
+ { /* 8.4.5.4.4 Extended UIUC */
+ &hf_extended_uiuc_ie_uiuc,
+ {"Extended UIUC", "wmx.extended_uiuc_ie.uiuc", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, NULL, HFILL }
+ },
+ { /* 8.4.5.4.4 Extended UIUC */
+ &hf_extended_uiuc_ie_uiuc_1,
+ {"Extended UIUC", "wmx.extended_uiuc_ie.uiuc", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, NULL, HFILL }
+ },
+ { /* 8.4.5.4.4 IE Length */
+ &hf_extended_uiuc_ie_length,
+ {"Length", "wmx.extended_uiuc_ie.length", FT_UINT8, BASE_DEC, NULL, MSB_NIBBLE_MASK, NULL, HFILL }
+ },
+ { /* 8.4.5.4.4 IE Length */
+ &hf_extended_uiuc_ie_length_1,
+ {"Length", "wmx.extended_uiuc_ie.length", FT_UINT24, BASE_DEC, NULL, LSB_NIBBLE_MASK, NULL, HFILL }
+ },
+ { /* 8.4.5.4.5 Power Control IE */
+ &hf_extended_uiuc_ie_power_control,
+ {"Power Control", "wmx.extended_uiuc_ie.power_control", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.4.5 Power Control IE */
+ &hf_extended_uiuc_ie_power_control_24,
+ {"Power Control", "wmx.extended_uiuc_ie.power_control", FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_power_measurement_frame,
+ {"Power Measurement Frame", "wmx.extended_uiuc_ie.power_measurement_frame", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_power_measurement_frame_24,
+ {"Power Measurement Frame", "wmx.extended_uiuc_ie.power_measurement_frame", FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.4.8 Mini Subchannel Allocation IE */
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_ctype,
+ {"C Type", "wmx.extended_uiuc_ie.mini_subchannel_alloc.ctype", FT_UINT8, BASE_HEX, VALS(vals_ctypes), MINI_SUBCHANNEL_CTYPE_MASK, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_ctype_16,
+ {"C Type", "wmx.extended_uiuc_ie.mini_subchannel_alloc.ctype", FT_UINT16, BASE_HEX, VALS(vals_ctypes), MINI_SUBCHANNEL_CTYPE_MASK_16, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_duration,
+ {"Duration", "wmx.extended_uiuc_ie.mini_subchannel_alloc.duration", FT_UINT8, BASE_DEC, NULL, MINI_SUBCHANNEL_DURATION_MASK, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_duration_16,
+ {"Duration", "wmx.extended_uiuc_ie.mini_subchannel_alloc.duration", FT_UINT16, BASE_DEC, NULL, MINI_SUBCHANNEL_DURATION_MASK_16, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_cid,
+ {"CID", "wmx.extended_uiuc_ie.mini_subchannel_alloc.cid", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_CID_MASK, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc,
+ {"UIUC", "wmx.extended_uiuc_ie.mini_subchannel_alloc.uiuc", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_UIUC_MASK, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_repetition,
+ {"Repetition", "wmx.extended_uiuc_ie.mini_subchannel_alloc.repetition", FT_UINT24, BASE_HEX, VALS(vals_repetitions), MINI_SUBCHANNEL_REPETITION_MASK, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_cid_1,
+ {"CID", "wmx.extended_uiuc_ie.mini_subchannel_alloc.cid", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_CID_MASK_1, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_1,
+ {"UIUC", "wmx.extended_uiuc_ie.mini_subchannel_alloc.uiuc", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_UIUC_MASK_1, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_1,
+ {"Repetition", "wmx.extended_uiuc_ie.mini_subchannel_alloc.repetition", FT_UINT24, BASE_HEX, VALS(vals_repetitions), MINI_SUBCHANNEL_REPETITION_MASK_1, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_cid_2,
+ {"CID", "wmx.extended_uiuc_ie.mini_subchannel_alloc.cid", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_CID_MASK_2, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_2,
+ {"UIUC", "wmx.extended_uiuc_ie.mini_subchannel_alloc.uiuc", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_UIUC_MASK_2, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_2,
+ {"Repetition", "wmx.extended_uiuc_ie.mini_subchannel_alloc.repetition", FT_UINT24, BASE_HEX, VALS(vals_repetitions), MINI_SUBCHANNEL_REPETITION_MASK_2, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_cid_3,
+ {"CID", "wmx.extended_uiuc_ie.mini_subchannel_alloc.cid", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_CID_MASK_3, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_3,
+ {"UIUC", "wmx.extended_uiuc_ie.mini_subchannel_alloc.uiuc", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_UIUC_MASK_2, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_3,
+ {"Repetition", "wmx.extended_uiuc_ie.mini_subchannel_alloc.repetition", FT_UINT24, BASE_HEX, VALS(vals_repetitions), MINI_SUBCHANNEL_REPETITION_MASK_3, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_padding,
+ {"Padding", "wmx.extended_uiuc_ie.mini_subchannel_alloc.padding", FT_UINT8, BASE_HEX, NULL, MINI_SUBCHANNEL_PADDING_MASK, NULL, HFILL }
+ },
+ {
+ &hf_extended_uiuc_ie_mini_subchannel_alloc_padding_1,
+ {"Padding", "wmx.extended_uiuc_ie.mini_subchannel_alloc.padding", FT_UINT24, BASE_HEX, NULL, MINI_SUBCHANNEL_PADDING_MASK_1, NULL, HFILL }
+ },
+ { /* 8.4.5.4.6 AAS_UL_IE */
+ &hf_extended_uiuc_ie_aas_ul,
+ {"AAS_UL_IE (not implemented)", "wmx.extended_uiuc_ie.aas_ul", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.4.12 CQICH Allocation IE */
+ &hf_extended_uiuc_ie_cqich_alloc,
+ {"CQICH Allocation IE (not implemented)", "wmx.extended_uiuc_ie.cqich_alloc", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.4.7 UL Zone IE */
+ &hf_extended_uiuc_ie_ul_zone,
+ {"UL Zone IE (not implemented)", "wmx.extended_uiuc_ie.ul_zone", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+
+ { /* 8.4.5.4.14 MIMO_UL_Basic_IE */
+ &hf_extended_uiuc_ie_mimo_ul_basic,
+ {"MIMO UL Basic IE (not implemented)", "wmx.extended_uiuc_ie.mimo_ul_basic", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.4.22 UL-MAP Fast Tracking IE */
+ &hf_extended_uiuc_ie_fast_tracking,
+ {"UL-MAP Fast Tracking IE (not implemented)", "wmx.extended_uiuc_ie.fast_tracking", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.4.21 Fast Ranging IE */
+ &hf_extended_uiuc_ie_fast_ranging,
+ {"Fast Ranging IE (not implemented)", "wmx.extended_uiuc_ie.fast_ranging", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.4.14 UL-MAP Physical Modifier IE */
+ &hf_extended_uiuc_ie_phymod_ul,
+ {"UL-MAP Physical Modifier IE (not implemented)", "wmx.extended_uiuc_ie.phymod_ul", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.4.17 UL PUSC Burst Allocation in Other Segment IE */
+ &hf_extended_uiuc_ie_ul_pusc_burst_allocation,
+ {"UL_PUSC_Burst_Allocation_in_Other_Segment_IE (not implemented)", "wmx.extended_uiuc_ie.ul_pusc_burst_allocation", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* 8.4.5.4.15 UL Allocation Start IE */
+ &hf_extended_uiuc_ie_ul_allocation_start,
+ {"UL Allocation Start IE (not implemented)", "wmx.extended_uiuc_ie.ul_allocation_start", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
+ { /* unknown UIUC */
+ &hf_extended_uiuc_ie_unknown_uiuc,
+ {"Unknown Extended UIUC", "wmx.extended_uiuc.unknown_uiuc", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ }
+ };
+
+#if 0 /* not used ?? */
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_wimax_compact_ulmap_ie_decoder,
+ &ett_wimax_rcid_ie_decoder,
+ &ett_wimax_harq_control_ie_decoder,
+ &ett_wimax_extended_uiuc_dependent_ie_decoder,
+ &ett_wimax_extension_type_ie_decoder,
+ };
+ proto_register_subtree_array(ett, array_length(ett));
+#endif
+
+ proto_wimax_compact_ulmap_ie_decoder = proto_wimax;
+
+ proto_register_field_array(proto_wimax_compact_ulmap_ie_decoder, hf_compact_ulmap, array_length(hf_compact_ulmap));
+ proto_register_field_array(proto_wimax_compact_ulmap_ie_decoder, hf_rcid, array_length(hf_rcid));
+ proto_register_field_array(proto_wimax_compact_ulmap_ie_decoder, hf_harq_control, array_length(hf_harq_control));
+ proto_register_field_array(proto_wimax_compact_ulmap_ie_decoder, hf_extension_type, array_length(hf_extension_type));
+ proto_register_field_array(proto_wimax_compact_ulmap_ie_decoder, hf_cdma_allocation, array_length(hf_cdma_allocation));
+ proto_register_field_array(proto_wimax_compact_ulmap_ie_decoder, hf_extended_uiuc, array_length(hf_extended_uiuc));
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.h b/plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.h
new file mode 100644
index 0000000000..c83c5aa160
--- /dev/null
+++ b/plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.h
@@ -0,0 +1,32 @@
+/* wimax_compact_ulmap_ie_decoder.h
+ * WiMax HARQ Map Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef _WIMAX_COMPACT_ULMAP_IE_DECODER_H_
+#define _WIMAX_COMPACT_ULMAP_IE_DECODER_H_
+
+extern guint wimax_compact_ulmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+
+#endif /* _WIMAX_COMPACT_ULMAP_IE_DECODER_H_ */
diff --git a/plugins/epan/wimax/wimax_fch_decoder.c b/plugins/epan/wimax/wimax_fch_decoder.c
new file mode 100644
index 0000000000..80de85e56d
--- /dev/null
+++ b/plugins/epan/wimax/wimax_fch_decoder.c
@@ -0,0 +1,258 @@
+/* wimax_fch_decoder.c
+ * WiMax FCH Burst decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <string.h>
+
+#include <epan/packet.h>
+#include "wimax-int.h"
+
+extern gint proto_wimax;
+
+extern address bs_address; /* declared in packet-wmx.c */
+
+static int proto_wimax_fch_decoder = -1;
+static gint ett_wimax_fch_decoder = -1;
+
+#define FCH_BURST_LENGTH 3
+/* FCH Burst bits */
+#define USED_SUB_CHANNEL_GROUP_0 0x800000
+#define USED_SUB_CHANNEL_GROUP_1 0x400000
+#define USED_SUB_CHANNEL_GROUP_2 0x200000
+#define USED_SUB_CHANNEL_GROUP_3 0x100000
+#define USED_SUB_CHANNEL_GROUP_4 0x080000
+#define USED_SUB_CHANNEL_GROUP_5 0x040000
+#define FCH_RESERVED_1 0x020000
+#define REPETITION_CODING_INDICATION 0x018000
+#define CODING_INDICATION 0x007000
+#define DL_MAP_LENGTH 0x000FF0
+#define FCH_RESERVED_2 0x00000F
+
+static int hf_fch_used_subchannel_group0 = -1;
+static int hf_fch_used_subchannel_group1 = -1;
+static int hf_fch_used_subchannel_group2 = -1;
+static int hf_fch_used_subchannel_group3 = -1;
+static int hf_fch_used_subchannel_group4 = -1;
+static int hf_fch_used_subchannel_group5 = -1;
+static int hf_fch_reserved_1 = -1;
+static int hf_fch_repetition_coding_indication = -1;
+static int hf_fch_coding_indication = -1;
+static int hf_fch_dlmap_length = -1;
+static int hf_fch_reserved_2 = -1;
+
+static const value_string used_or_not_used[] =
+{
+ { 0, "Is Not Used" },
+ { 1, "Is Used" },
+ { 0, NULL }
+};
+
+/* DL Frame Prefix Repetition Coding Indications */
+static const value_string repetition_coding_indications[] =
+{
+ { 0, "No Repetition Coding" },
+ { 1, "Repetition Coding of 2 Used" },
+ { 2, "Repetition Coding of 4 Used" },
+ { 3, "Repetition Coding of 6 Used" },
+ { 0, NULL }
+};
+
+/* DL Frame Prefix Coding Indications */
+static const value_string coding_indications[] =
+{
+ { 0, "CC Encoding Used" },
+ { 1, "BTC Encoding Used" },
+ { 2, "CTC Encoding Used" },
+ { 3, "ZT CC Encoding Used" },
+ { 4, "CC Encoding with optional interleaver" },
+ { 5, "LDPC Encoding Used" },
+ { 6, "Reserved" },
+ { 7, "Reserved" },
+ { 0, NULL }
+};
+
+static int dissect_wimax_fch_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ gint offset = 0;
+ proto_item *fch_item = NULL;
+ proto_tree *fch_tree = NULL;
+
+ /* save the base station address (once) */
+ if(!bs_address.len)
+ copy_address(&bs_address, &(pinfo->src));
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "FCH");
+ if (tree)
+ { /* we are being asked for details */
+ /* display FCH dissector info */
+ fch_item = proto_tree_add_protocol_format(tree, proto_wimax_fch_decoder, tvb, offset, 3, "DL Frame Prefix (24 bits)");
+ /* add FCH subtree */
+ fch_tree = proto_item_add_subtree(fch_item, ett_wimax_fch_decoder);
+ /* Decode and display the used sub-channel groups */
+ proto_tree_add_item(fch_tree, hf_fch_used_subchannel_group0, tvb, offset, FCH_BURST_LENGTH, ENC_BIG_ENDIAN);
+ proto_tree_add_item(fch_tree, hf_fch_used_subchannel_group1, tvb, offset, FCH_BURST_LENGTH, ENC_BIG_ENDIAN);
+ proto_tree_add_item(fch_tree, hf_fch_used_subchannel_group2, tvb, offset, FCH_BURST_LENGTH, ENC_BIG_ENDIAN);
+ proto_tree_add_item(fch_tree, hf_fch_used_subchannel_group3, tvb, offset, FCH_BURST_LENGTH, ENC_BIG_ENDIAN);
+ proto_tree_add_item(fch_tree, hf_fch_used_subchannel_group4, tvb, offset, FCH_BURST_LENGTH, ENC_BIG_ENDIAN);
+ proto_tree_add_item(fch_tree, hf_fch_used_subchannel_group5, tvb, offset, FCH_BURST_LENGTH, ENC_BIG_ENDIAN);
+ proto_tree_add_item(fch_tree, hf_fch_reserved_1, tvb, offset, FCH_BURST_LENGTH, ENC_BIG_ENDIAN);
+ /* Decode and display the repetition coding indication */
+ proto_tree_add_item(fch_tree, hf_fch_repetition_coding_indication, tvb, offset, FCH_BURST_LENGTH, ENC_BIG_ENDIAN);
+ /* Decode and display the coding indication */
+ proto_tree_add_item(fch_tree, hf_fch_coding_indication, tvb, offset, FCH_BURST_LENGTH, ENC_BIG_ENDIAN);
+ /* Decode and display the DL MAP length */
+ proto_tree_add_item(fch_tree, hf_fch_dlmap_length, tvb, offset, FCH_BURST_LENGTH, ENC_BIG_ENDIAN);
+ proto_tree_add_item(fch_tree, hf_fch_reserved_2, tvb, offset, FCH_BURST_LENGTH, ENC_BIG_ENDIAN);
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax FCH Protocol */
+void wimax_proto_register_wimax_fch(void)
+{
+ /* TLV display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_fch_used_subchannel_group0,
+ {
+ "Sub-Channel Group 0", "wmx.fch.subchannel_group0",
+ FT_UINT24, BASE_DEC, VALS(used_or_not_used), USED_SUB_CHANNEL_GROUP_0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_fch_used_subchannel_group1,
+ {
+ "Sub-Channel Group 1", "wmx.fch.subchannel_group1",
+ FT_UINT24, BASE_DEC, VALS(used_or_not_used), USED_SUB_CHANNEL_GROUP_1,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_fch_used_subchannel_group2,
+ {
+ "Sub-Channel Group 2", "wmx.fch.subchannel_group2",
+ FT_UINT24, BASE_DEC, VALS(used_or_not_used), USED_SUB_CHANNEL_GROUP_2,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_fch_used_subchannel_group3,
+ {
+ "Sub-Channel Group 3", "wmx.fch.subchannel_group3",
+ FT_UINT24, BASE_DEC, VALS(used_or_not_used), USED_SUB_CHANNEL_GROUP_3,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_fch_used_subchannel_group4,
+ {
+ "Sub-Channel Group 4", "wmx.fch.subchannel_group4",
+ FT_UINT24, BASE_DEC, VALS(used_or_not_used), USED_SUB_CHANNEL_GROUP_4,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_fch_used_subchannel_group5,
+ {
+ "Sub-Channel Group 5", "wmx.fch.subchannel_group5",
+ FT_UINT24, BASE_DEC, VALS(used_or_not_used), USED_SUB_CHANNEL_GROUP_5,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_fch_reserved_1,
+ {
+ "Reserved", "wmx.fch.reserved1",
+ FT_UINT24, BASE_DEC, NULL, FCH_RESERVED_1,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_fch_repetition_coding_indication,
+ {
+ "Repetition Coding Indication", "wmx.fch.repetition_coding_indication",
+ FT_UINT24, BASE_DEC, VALS(repetition_coding_indications), REPETITION_CODING_INDICATION,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_fch_coding_indication,
+ {
+ "Coding Indication", "wmx.fch.coding_indication",
+ FT_UINT24, BASE_DEC, VALS(coding_indications), CODING_INDICATION,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_fch_dlmap_length,
+ {
+ "DL Map Length", "wmx.fch.dl_map_length",
+ FT_UINT24, BASE_DEC, NULL, DL_MAP_LENGTH,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_fch_reserved_2,
+ {
+ "Reserved", "wmx.fch.reserved2",
+ FT_UINT24, BASE_DEC, NULL, FCH_RESERVED_2,
+ NULL, HFILL
+ }
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_wimax_fch_decoder,
+ };
+
+ proto_wimax_fch_decoder = proto_wimax;
+
+ /* register the field display messages */
+ proto_register_field_array(proto_wimax_fch_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ register_dissector("wimax_fch_burst_handler", dissect_wimax_fch_decoder, -1);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/wimax_ffb_decoder.c b/plugins/epan/wimax/wimax_ffb_decoder.c
new file mode 100644
index 0000000000..4e1ea997c9
--- /dev/null
+++ b/plugins/epan/wimax/wimax_ffb_decoder.c
@@ -0,0 +1,141 @@
+/* wimax_ffb_decoder.c
+ * WiMax Fast Feedback packet decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax-int.h"
+
+extern gint proto_wimax;
+
+static gint proto_wimax_ffb_decoder = -1;
+static gint ett_wimax_ffb_decoder = -1;
+
+/* static gint hf_ffb_burst = -1; */
+static gint hf_ffb_num_of_ffbs = -1;
+static gint hf_ffb_type = -1;
+static gint hf_ffb_subchannel = -1;
+static gint hf_ffb_symboloffset = -1;
+static gint hf_ffb_value = -1;
+
+
+static int dissect_wimax_ffb_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ gint offset = 0;
+ guint length, num_of_ffbs, i;
+ proto_item *ffb_item = NULL;
+ proto_tree *ffb_tree = NULL;
+
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Fast Feedback Burst:");
+ if (tree)
+ { /* we are being asked for details */
+ /* get the tvb reported length */
+ length = tvb_reported_length(tvb);
+ /* display Fast Feedback Burst dissector info */
+ ffb_item = proto_tree_add_protocol_format(tree, proto_wimax_ffb_decoder, tvb, offset, length, "Fast Feedback Burst (%u bytes)", length);
+ /* add Fast Feedback Burst subtree */
+ ffb_tree = proto_item_add_subtree(ffb_item, ett_wimax_ffb_decoder);
+ /* get the number of FFBs */
+ num_of_ffbs = tvb_get_guint8(tvb, offset);
+ /* display the number of FFBs */
+ proto_tree_add_item(ffb_tree, hf_ffb_num_of_ffbs, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ /* display the FFB type */
+ proto_tree_add_item(ffb_tree, hf_ffb_type, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ /* display the FFBs */
+ for(i = 0; i < num_of_ffbs; i++)
+ {
+ proto_tree_add_item(ffb_tree, hf_ffb_subchannel, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ffb_tree, hf_ffb_symboloffset, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ffb_tree, hf_ffb_value, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ }
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax FFB Protocol */
+void wimax_proto_register_wimax_ffb(void)
+{
+ /* FFB display */
+ static hf_register_info hf[] =
+ {
+#if 0
+ {
+ &hf_ffb_burst,
+ {"Fast Feedback Burst", "wmx.ffb.burst", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+#endif
+ {
+ &hf_ffb_num_of_ffbs,
+ {"Number Of Fast Feedback", "wmx.ffb.num_of_ffbs", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_ffb_type,
+ {"Fast Feedback Type", "wmx.ffb.ffb_type", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_ffb_subchannel,
+ {"Physical Subchannel", "wmx.ffb.subchannel", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_ffb_symboloffset,
+ {"Symbol Offset", "wmx.ffb.symbol_offset", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_ffb_value,
+ {"Fast Feedback Value", "wmx.ffb.ffb_value", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_wimax_ffb_decoder,
+ };
+
+ proto_wimax_ffb_decoder = proto_wimax;
+
+ /* register the field display messages */
+ proto_register_field_array(proto_wimax_ffb_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ register_dissector("wimax_ffb_burst_handler", dissect_wimax_ffb_decoder, -1);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/wimax_hack_decoder.c b/plugins/epan/wimax/wimax_hack_decoder.c
new file mode 100644
index 0000000000..db24c2b5bf
--- /dev/null
+++ b/plugins/epan/wimax/wimax_hack_decoder.c
@@ -0,0 +1,153 @@
+/* wimax_hack_decoder.c
+ * WiMax HARQ ACK Burst decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax-int.h"
+
+extern gint proto_wimax;
+
+static gint proto_wimax_hack_decoder = -1;
+static gint ett_wimax_hack_decoder = -1;
+
+static const value_string vals_flags[] =
+{
+ {0, "Even Half-Slot (tiles 0,2,4)"},
+ {1, "Odd Half-Slot (tiles 1,3,5)"},
+ {0, NULL}
+};
+
+static const value_string vals_values[] =
+{
+ {0, "ACK"},
+ {1, "NACK"},
+ {0, NULL}
+};
+
+/* static gint hf_hack_burst = -1; */
+static gint hf_hack_num_of_hacks = -1;
+static gint hf_hack_half_slot_flag = -1;
+static gint hf_hack_subchannel = -1;
+static gint hf_hack_symboloffset = -1;
+static gint hf_hack_value = -1;
+
+
+static int dissect_wimax_hack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ gint offset = 0;
+ guint length, num_of_hacks, i;
+ proto_item *hack_item = NULL;
+ proto_tree *hack_tree = NULL;
+
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "HARQ ACK Burst:");
+ if (tree)
+ { /* we are being asked for details */
+ /* get the tvb reported length */
+ length = tvb_reported_length(tvb);
+ /* display HARQ ACK Burst dissector info */
+ hack_item = proto_tree_add_protocol_format(tree, proto_wimax_hack_decoder, tvb, offset, length, "HARQ ACK Burst (%u bytes)", length);
+ /* add HARQ ACK Burst subtree */
+ hack_tree = proto_item_add_subtree(hack_item, ett_wimax_hack_decoder);
+ /* get the number of HARQ ACKs */
+ num_of_hacks = tvb_get_guint8(tvb, offset);
+ /* display the number of HARQ ACKs */
+ proto_tree_add_item(hack_tree, hf_hack_num_of_hacks, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ /* display the HARQ ACKs */
+ for(i = 0; i < num_of_hacks; i++)
+ {
+ proto_tree_add_item(hack_tree, hf_hack_subchannel, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(hack_tree, hf_hack_symboloffset, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(hack_tree, hf_hack_half_slot_flag, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(hack_tree, hf_hack_value, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ }
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax HARQ ACK Protocol */
+void wimax_proto_register_wimax_hack(void)
+{
+ /* HARQ ACK display */
+ static hf_register_info hf[] =
+ {
+#if 0
+ {
+ &hf_hack_burst,
+ {"HARQ ACK Burst", "wmx.hack.burst", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+#endif
+ {
+ &hf_hack_num_of_hacks,
+ {"Number Of HARQ ACKs/NACKs", "wmx.hack.num_of_hacks", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_hack_subchannel,
+ {"Physical Subchannel", "wmx.hack.subchannel", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_hack_symboloffset,
+ {"Symbol Offset", "wmx.hack.symbol_offset", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_hack_half_slot_flag,
+ {"Half-Slot Flag", "wmx.hack.half_slot_flag", FT_UINT8, BASE_DEC, VALS(vals_flags), 0x0, NULL, HFILL}
+ },
+ {
+ &hf_hack_value,
+ {"ACK Value", "wmx.hack.hack_value", FT_UINT8, BASE_DEC, VALS(vals_values), 0x0, NULL, HFILL}
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_wimax_hack_decoder,
+ };
+
+ proto_wimax_hack_decoder = proto_wimax;
+
+ register_dissector("wimax_hack_burst_handler", dissect_wimax_hack_decoder, -1);
+ proto_register_field_array(proto_wimax_hack_decoder, hf, array_length(hf));
+
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/wimax_harq_map_decoder.c b/plugins/epan/wimax/wimax_harq_map_decoder.c
new file mode 100644
index 0000000000..8eaf381f25
--- /dev/null
+++ b/plugins/epan/wimax/wimax_harq_map_decoder.c
@@ -0,0 +1,242 @@
+/* wimax_harq_map_decoder.c
+ * WiMax HARQ Map Message decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include <epan/expert.h>
+#include "crc.h"
+#include "wimax-int.h"
+#include "wimax_compact_dlmap_ie_decoder.h"
+#include "wimax_compact_ulmap_ie_decoder.h"
+
+extern gint proto_wimax;
+
+static gint proto_wimax_harq_map_decoder = -1;
+static gint ett_wimax_harq_map_decoder = -1;
+
+/* MASKs */
+#define LSB_NIBBLE_MASK 0x0F
+
+/* HARQ MAP masks */
+#define WIMAX_HARQ_MAP_INDICATOR_MASK 0xE00000
+#define WIMAX_HARQ_UL_MAP_APPENDED_MASK 0x100000
+#define WIMAX_HARQ_MAP_RESERVED_MASK 0x080000
+#define WIMAX_HARQ_MAP_MSG_LENGTH_MASK 0x07FC00
+#define WIMAX_HARQ_MAP_DL_IE_COUNT_MASK 0x0003F0
+#define WIMAX_HARQ_MAP_MSG_LENGTH_SHIFT 10
+#define WIMAX_HARQ_MAP_DL_IE_COUNT_SHIFT 4
+
+/* HARQ MAP display indexies */
+static gint hf_harq_map_indicator = -1;
+static gint hf_harq_ul_map_appended = -1;
+static gint hf_harq_map_reserved = -1;
+static gint hf_harq_map_msg_length = -1;
+static gint hf_harq_dl_ie_count = -1;
+static gint hf_harq_map_msg_crc = -1;
+static gint hf_harq_map_msg_crc_status = -1;
+
+static expert_field ei_harq_map_msg_crc = EI_INIT;
+
+
+/* Copied and renamed from proto.c because global value_strings don't work for plugins */
+static const value_string plugin_proto_checksum_vals[] = {
+ { PROTO_CHECKSUM_E_BAD, "Bad" },
+ { PROTO_CHECKSUM_E_GOOD, "Good" },
+ { PROTO_CHECKSUM_E_UNVERIFIED, "Unverified" },
+ { PROTO_CHECKSUM_E_NOT_PRESENT, "Not present" },
+
+ { 0, NULL }
+};
+
+/* HARQ MAP message decoder */
+static int dissector_wimax_harq_map_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint i, offset = 0;
+ guint tvb_len, length, dl_ie_count;
+ guint ie_length;
+ proto_item *harq_map_item = NULL;
+ proto_tree *harq_map_tree = NULL;
+ guint nibble_offset;
+ proto_item *parent_item = NULL;
+ guint ulmap_appended;
+ guint32 harq_map_msg_crc, calculated_crc;
+ guint32 first_24bits;
+
+ /* check the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ if(!tvb_len)
+ { /* do nothing if tvb is empty */
+ return 0;
+ }
+ /* Ensure the right payload type */
+ first_24bits = tvb_get_ntoh24(tvb, offset);
+ if((first_24bits & WIMAX_HARQ_MAP_INDICATOR_MASK) != WIMAX_HARQ_MAP_INDICATOR_MASK)
+ { /* do nothing if tvb is not a HARQ MAP message */
+ return 0;
+ }
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "HARQ-MAP Message: ");
+ if (tree)
+ { /* we are being asked for details */
+ /* get the parent */
+ parent_item = proto_tree_get_parent(tree);
+ /* display HARQ-MAP Message and create subtree */
+ harq_map_item = proto_tree_add_protocol_format(tree, proto_wimax_harq_map_decoder, tvb, offset, tvb_len, "HARQ-MAP Message (%u bytes)", tvb_len);
+ harq_map_tree = proto_item_add_subtree(harq_map_item, ett_wimax_harq_map_decoder);
+ /* display the HARQ MAP Indicator */
+ proto_tree_add_item(harq_map_tree, hf_harq_map_indicator, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* display the HARQ MAp UL-MAP Appended */
+ proto_tree_add_item(harq_map_tree, hf_harq_ul_map_appended, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* display the reserved bit */
+ proto_tree_add_item(harq_map_tree, hf_harq_map_reserved, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* display the HARQ MAP message length */
+ proto_tree_add_item(harq_map_tree, hf_harq_map_msg_length, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* display the DL IE count */
+ proto_tree_add_item(harq_map_tree, hf_harq_dl_ie_count, tvb, offset, 3, ENC_BIG_ENDIAN);
+ /* get the message length */
+ length = ((first_24bits & WIMAX_HARQ_MAP_MSG_LENGTH_MASK) >> WIMAX_HARQ_MAP_MSG_LENGTH_SHIFT);
+ /* get the DL IE count */
+ dl_ie_count = ((first_24bits & WIMAX_HARQ_MAP_DL_IE_COUNT_MASK) >> WIMAX_HARQ_MAP_DL_IE_COUNT_SHIFT);
+ /* get the UL MAP appended */
+ ulmap_appended = (first_24bits & WIMAX_HARQ_UL_MAP_APPENDED_MASK);
+
+ /* set the offsets to Compact DL-MAP IEs */
+ offset += 2;
+ nibble_offset = 1;
+ /* process the compact dl_map ies */
+ for(i=0; i<dl_ie_count; i++)
+ { /* add the DL-MAp IEs info */
+ proto_item_append_text(parent_item, " - DL-MAP IEs");
+ /* decode Compact DL-MAP IEs */
+ ie_length = wimax_compact_dlmap_ie_decoder(harq_map_tree, pinfo, tvb, offset, nibble_offset);
+ offset += ((nibble_offset + ie_length) >> 1);
+ nibble_offset = ((nibble_offset + ie_length) & 1);
+ }
+ /* check if there exist the compact ul_map IEs */
+ if (ulmap_appended)
+ { /* add the UL-MAp IEs info */
+ proto_item_append_text(parent_item, ",UL-MAP IEs");
+ /* process the compact ul_map ies */
+ while(offset < (length - (int)sizeof(harq_map_msg_crc)))
+ { /* decode Compact UL-MAP IEs */
+ ie_length = wimax_compact_ulmap_ie_decoder(harq_map_tree, pinfo, tvb, offset, nibble_offset);
+ /* Prevent endless loop with erroneous data. */
+ if (ie_length < 2)
+ ie_length = 2;
+ offset += ((nibble_offset + ie_length) >> 1);
+ nibble_offset = ((nibble_offset + ie_length) & 1);
+ }
+ }
+ /* handle the padding */
+ if(nibble_offset)
+ {
+ /* add the Padding info */
+ proto_item_append_text(parent_item, ",Padding");
+ proto_tree_add_protocol_format(harq_map_tree, proto_wimax_harq_map_decoder, tvb, offset, 1, "Padding Nibble: 0x%x", (tvb_get_guint8(tvb, offset) & LSB_NIBBLE_MASK));
+ }
+ /* add the CRC info */
+ proto_item_append_text(parent_item, ",CRC");
+ /* calculate the HARQ MAM Message CRC */
+ calculated_crc = wimax_mac_calc_crc32(tvb_get_ptr(tvb, 0, length - (int)sizeof(harq_map_msg_crc)), length - (int)sizeof(harq_map_msg_crc));
+ proto_tree_add_checksum(tree, tvb, length - (int)sizeof(harq_map_msg_crc), hf_harq_map_msg_crc, hf_harq_map_msg_crc_status, &ei_harq_map_msg_crc,
+ pinfo, calculated_crc, ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax HARQ MAP Protocol */
+void wimax_proto_register_wimax_harq_map(void)
+{
+ /* HARQ MAP display */
+ static hf_register_info hf_harq_map[] =
+ {
+ {
+ &hf_harq_map_indicator,
+ {"HARQ MAP Indicator", "wmx.harq_map.indicator", FT_UINT24, BASE_HEX, NULL, WIMAX_HARQ_MAP_INDICATOR_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_ul_map_appended,
+ {"HARQ UL-MAP Appended", "wmx.harq_map.ul_map_appended", FT_UINT24, BASE_HEX, NULL, WIMAX_HARQ_UL_MAP_APPENDED_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_map_reserved,
+ {"Reserved", "wmx.harq_map.reserved", FT_UINT24, BASE_HEX, NULL, WIMAX_HARQ_MAP_RESERVED_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_map_msg_length,
+ {"Map Message Length", "wmx.harq_map.msg_length", FT_UINT24, BASE_DEC, NULL, WIMAX_HARQ_MAP_MSG_LENGTH_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_dl_ie_count,
+ {"DL IE Count", "wmx.harq_map.dl_ie_count", FT_UINT24, BASE_DEC, NULL, WIMAX_HARQ_MAP_DL_IE_COUNT_MASK, NULL, HFILL}
+ },
+ {
+ &hf_harq_map_msg_crc,
+ {"HARQ MAP Message CRC", "wmx.harq_map.msg_crc", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_harq_map_msg_crc_status,
+ {"HARQ MAP Message CRC Status", "wmx.harq_map.msg_crc.status", FT_UINT8, BASE_NONE, VALS(plugin_proto_checksum_vals), 0x0, NULL, HFILL}
+ },
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_wimax_harq_map_decoder,
+ };
+
+ static ei_register_info ei[] = {
+ { &ei_harq_map_msg_crc, { "wmx.harq_map.bad_checksum", PI_CHECKSUM, PI_ERROR, "Bad checksum", EXPFILL }},
+ };
+
+ expert_module_t* expert_harq_map;
+
+ proto_wimax_harq_map_decoder = proto_wimax;
+
+ proto_register_subtree_array(ett, array_length(ett));
+ proto_register_field_array(proto_wimax_harq_map_decoder, hf_harq_map, array_length(hf_harq_map));
+ expert_harq_map = expert_register_protocol(proto_wimax_harq_map_decoder);
+ expert_register_field_array(expert_harq_map, ei, array_length(ei));
+
+ register_dissector("wimax_harq_map_handler", dissector_wimax_harq_map_decoder, proto_wimax_harq_map_decoder);
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/wimax_mac.h b/plugins/epan/wimax/wimax_mac.h
new file mode 100644
index 0000000000..b5ac72f01b
--- /dev/null
+++ b/plugins/epan/wimax/wimax_mac.h
@@ -0,0 +1,701 @@
+/* wimax_mac.h
+ * WiMax MAC Definitions
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef WIMAX_MAC_H
+#define WIMAX_MAC_H
+
+#define IP_HEADER_BYTE 0x45
+
+/* WiMax MAC Header/Subheader Sizes */
+#define WIMAX_MAC_HEADER_SIZE 6
+#define WIMAX_MAC_SUBHEADER_MESH_SIZE 2
+#define WIMAX_MAC_SUBHEADER_FAST_FEEDBACK_SIZE 1
+#define WIMAX_MAC_SUBHEADER_GRANT_MGMT_SIZE 2
+
+#define WIMAX_MAC_SUBHEADER_FRAG_SIZE(x) (((x) & (WIMAX_MAC_TYPE_EXTENDED | WIMAX_MAC_TYPE_ARQ)) ? 3 : 2)
+#define WIMAX_MAC_SUBHEADER_PACK_SIZE(x) (((x) & (WIMAX_MAC_TYPE_EXTENDED | WIMAX_MAC_TYPE_ARQ)) ? 3 : 2)
+
+#define WIMAX_MAC_HEADER_GENERIC 0
+#define WIMAX_MAC_CID_PADDING 0xFFFE
+
+/* wimax mac arq */
+#define ARQ_CUMULATIVE_ACK_ENTRY 1
+#define ARQ_CUMULATIVE_ACK_BLOCK_SEQ 3
+#define ARQ_ACK_MAP_SIZE 2
+
+/* WiMax MAC Header Sub-types (Table 6) */
+#define WIMAX_MAC_TYPE_MESH (1 << 5)
+#define WIMAX_MAC_TYPE_ARQ (1 << 4)
+#define WIMAX_MAC_TYPE_EXTENDED (1 << 3)
+#define WIMAX_MAC_TYPE_FRAGMENTATION (1 << 2)
+#define WIMAX_MAC_TYPE_PACKING (1 << 1)
+#define WIMAX_MAC_TYPE_FAST_FEEDBACK (1 << 0)
+#define WIMAX_MAC_TYPE_GRANT_MGMT (1 << 0)
+
+/* wimax mac management messages (Table 14) */
+#define MAC_MGMT_MSG_UCD 0
+#define MAC_MGMT_MSG_DCD 1
+#define MAC_MGMT_MSG_DL_MAP 2
+#define MAC_MGMT_MSG_UL_MAP 3
+#define MAC_MGMT_MSG_RNG_REQ 4
+#define MAC_MGMT_MSG_RNG_RSP 5
+#define MAC_MGMT_MSG_REG_REQ 6
+#define MAC_MGMT_MSG_REG_RSP 7
+
+#define MAC_MGMT_MSG_PKM_REQ 9
+#define MAC_MGMT_MSG_PKM_RSP 10
+#define MAC_MGMT_MSG_DSA_REQ 11
+#define MAC_MGMT_MSG_DSA_RSP 12
+#define MAC_MGMT_MSG_DSA_ACK 13
+#define MAC_MGMT_MSG_DSC_REQ 14
+#define MAC_MGMT_MSG_DSC_RSP 15
+#define MAC_MGMT_MSG_DSC_ACK 16
+#define MAC_MGMT_MSG_DSD_REQ 17
+#define MAC_MGMT_MSG_DSD_RSP 18
+
+#define MAC_MGMT_MSG_MCA_REQ 21
+#define MAC_MGMT_MSG_MCA_RSP 22
+#define MAC_MGMT_MSG_DBPC_REQ 23
+#define MAC_MGMT_MSG_DBPC_RSP 24
+#define MAC_MGMT_MSG_RES_CMD 25
+#define MAC_MGMT_MSG_SBC_REQ 26
+#define MAC_MGMT_MSG_SBC_RSP 27
+#define MAC_MGMT_MSG_CLK_CMP 28
+#define MAC_MGMT_MSG_DREG_CMD 29
+#define MAC_MGMT_MSG_DSX_RVD 30
+#define MAC_MGMT_MSG_TFTP_CPLT 31
+#define MAC_MGMT_MSG_TFTP_RSP 32
+#define MAC_MGMT_MSG_ARQ_FEEDBACK 33
+#define MAC_MGMT_MSG_ARQ_DISCARD 34
+#define MAC_MGMT_MSG_ARQ_RESET 35
+#define MAC_MGMT_MSG_REP_REQ 36
+#define MAC_MGMT_MSG_REP_RSP 37
+#define MAC_MGMT_MSG_FPC 38
+#define MAC_MGMT_MSG_MSH_NCFG 39
+#define MAC_MGMT_MSG_MSH_NENT 40
+#define MAC_MGMT_MSG_MSH_DSCH 41
+#define MAC_MGMT_MSG_MSH_CSCH 42
+#define MAC_MGMT_MSG_MSH_CSCF 43
+#define MAC_MGMT_MSG_AAS_FBCK_REQ 44
+#define MAC_MGMT_MSG_AAS_FBCK_RSP 45
+#define MAC_MGMT_MSG_AAS_BEAM_SELECT 46
+#define MAC_MGMT_MSG_AAS_BEAM_REQ 47
+#define MAC_MGMT_MSG_AAS_BEAM_RSP 48
+#define MAC_MGMT_MSG_DREG_REQ 49
+
+#define MAC_MGMT_MSG_MOB_SLP_REQ 50
+#define MAC_MGMT_MSG_MOB_SLP_RSP 51
+#define MAC_MGMT_MSG_MOB_TRF_IND 52
+#define MAC_MGMT_MSG_MOB_NBR_ADV 53
+#define MAC_MGMT_MSG_MOB_SCN_REQ 54
+#define MAC_MGMT_MSG_MOB_SCN_RSP 55
+#define MAC_MGMT_MSG_MOB_BSHO_REQ 56
+#define MAC_MGMT_MSG_MOB_MSHO_REQ 57
+#define MAC_MGMT_MSG_MOB_BSHO_RSP 58
+#define MAC_MGMT_MSG_MOB_HO_IND 59
+#define MAC_MGMT_MSG_MOB_SCN_REP 60
+#define MAC_MGMT_MSG_MOB_PAG_ADV 61
+#define MAC_MGMT_MSG_MBS_MAP 62
+#define MAC_MGMT_MSG_PMC_REQ 63
+#define MAC_MGMT_MSG_PMC_RSP 64
+#define MAC_MGMT_MSG_PRC_LT_CTRL 65
+#define MAC_MGMT_MSG_MOB_ASC_REP 66
+#define MAC_MGMT_MSG_TYPE_MAX 67
+
+/* DL-MAP types (Table 276) */
+#define DL_MAP_EXTENDED_2_DIUC 14
+#define DL_MAP_EXTENDED_IE 15
+/* DL-MAP Extended UIUC Code (table 277a) */
+#define DL_MAP_AAS_IE 2
+#define DL_MAP_EXTENDED_CID_SWITCH_IE 4
+#define DL_MAP_HARQ_IE 7
+/* DL-MAP Extended-2 UIUC Code (table 277c) */
+#define DL_MAP_EXTENDED_2_HARQ 7
+
+/* UL-MAP types (Table 288) */
+#define UL_MAP_FAST_FEEDBACK_CHANNEL 0
+#define UL_MAP_CDMA_BR_RANGING_IE 12
+#define UL_MAP_PAPR_RECUCTION_ALLOC_SAFETY_ZONE 13
+#define UL_MAP_CDMA_ALLOCATION_IE 14
+#define UL_MAP_EXTENDED_IE 15
+/* UL-MAP Extended UIUC Code (table 290a) */
+#define UL_MAP_CQICH_ALLOCATION_IE 3
+
+/* DCD types (Table 358)*/
+#define DCD_DOWNLINK_BURST_PROFILE 1
+#define DCD_BS_EIRP 2
+#define DCD_FRAME_DURATION 3
+#define DCD_PHY_TYPE 4
+#define DCD_POWER_ADJUSTMENT 5
+#define DCD_CHANNEL_NR 6
+#define DCD_TTG 7
+#define DCD_RTG 8
+#define DCD_RSS 9
+#define DCD_EIRXP 9
+#define DCD_CHANNEL_SWITCH_FRAME_NR 10
+#define DCD_FREQUENCY 12
+#define DCD_BS_ID 13
+#define DCD_FRAME_DURATION_CODE 14
+#define DCD_FRAME_NR 15
+#define DCD_SIZE_CQICH_ID 16
+#define DCD_H_ARQ_ACK_DELAY 17
+#define DCD_MAC_VERSION 148
+
+#define DCD_RESTART_COUNT 154
+
+#define DCD_BURST_FREQUENCY 1
+#define DCD_BURST_FEC_CODE_TYPE 150
+#define DCD_BURST_DIUC_EXIT_THRESHOLD 151
+#define DCD_BURST_DIUC_ENTRY_THRESHOLD 152
+#define DCD_BURST_TCS_ENABLE 153
+/*#define DCD_MAXIMUM_RETRANSMISSION 20*/
+/* TLV types */
+#define DCD_TLV_T_19_PERMUTATION_TYPE_FOR_BROADCAST_REGION_IN_HARQ_ZONE 19
+#define DCD_TLV_T_20_MAXIMUM_RETRANSMISSION 20
+#define DCD_TLV_T_21_DEFAULT_RSSI_AND_CINR_AVERAGING_PARAMETER 21
+#define DCD_TLV_T_22_DL_AMC_ALLOCATED_PHYSICAL_BANDS_BITMAP 22
+#define DCD_TLV_T_34_DL_REGION_DEFINITION 34
+#define DCD_TLV_T_50_HO_TYPE_SUPPORT 50
+#define DCD_TLV_T_31_H_ADD_THRESHOLD 31
+#define DCD_TLV_T_32_H_DELETE_THRESHOLD 32
+#define DCD_TLV_T_33_ASR 33
+#define DCD_TLV_T_34_DL_REGION_DEFINITION 34
+#define DCD_TLV_T_35_PAGING_GROUP_ID 35
+#define DCD_TLV_T_36_TUSC1_PERMUTATION_ACTIVE_SUBCHANNELS_BITMAP 36
+#define DCD_TLV_T_37_TUSC2_PERMUTATION_ACTIVE_SUBCHANNELS_BITMAP 37
+#define DCD_TLV_T_51_HYSTERSIS_MARGIN 51
+#define DCD_TLV_T_52_TIME_TO_TRIGGER_DURATION 52
+#define DCD_TLV_T_54_TRIGGER 54
+#define DCD_TLV_T_60_NOISE_AND_INTERFERENCE 60
+#define DCD_TLV_T_153_DOWNLINK_BURST_PROFILE_FOR_MULTIPLE_FEC_TYPES 153
+#define DCD_TLV_T_22_DL_AMC_ALLOCATED_PHYSICAL_BANDS_BITMAP 22
+#define DCD_TLV_T_541_TYPE_FUNCTION_ACTION 1
+#define DCD_TLV_T542_TRIGGER_VALUE 2
+#define DCD_TLV_T_543_TRIGGER_AVERAGING_DURATION 3
+#define DCD_TLV_T_45_PAGING_INTERVAL_LENGTH 45
+
+/* UCD types (Table 353) */
+#define UCD_UPLINK_BURST_PROFILE 1
+#define UCD_RESERVATION_TIMEOUT 2
+#define UCD_BW_REQ_SIZE 3
+#define UCD_RANGING_REQ_SIZE 4
+#define UCD_FREQUENCY 5
+
+#define UCD_TLV_T_7_HO_RANGING_START 7
+#define UCD_TLV_T_8_RANGING_HO_END 8
+#define UCD_INITIAL_RANGING_CODES 150
+#define UCD_PERIODIC_RANGING_CODES 151
+#define UCD_BANDWIDTH_REQUEST_CODES 152
+#define UCD_PERIODIC_RANGING_BACKOFF_START 153
+#define UCD_PERIODIC_RANGING_BACKOFF_END 154
+#define UCD_START_OF_RANGING_CODES_GROUP 155
+#define UCD_PERMUTATION_BASE 156
+#define UCD_UL_ALLOCATED_SUBCHANNELS_BITMAP 157
+#define UCD_TLV_T_158_OPTIONAL_PERMUTATION_UL_ALLOCATED_SUBCHANNELS_BITMAP 158
+#define UCD_TLV_T_159_BAND_AMC_ALLOCATION_THRESHHOLD 159
+#define UCD_TLV_T_160_BAND_AMC_RELEASE_THRESHOLD 160
+#define UCD_TLV_T_161_BAND_AMC_ALLOCATION_TIMER 161
+#define UCD_TLV_T_162_BAND_AMC_RELEASE_TIMER 162
+#define UCD_TLV_T_163_BAND_STATUS_REPORT_MAX_PERIOD 163
+#define UCD_TLV_T_164_BAND_AMC_RETRY_TIMER 164
+#define UCD_TLV_T_170_SAFETY_CHANNEL_RETRY_TIMER 170
+#define UCD_TLV_T_171_HARQ_ACK_DELAY_FOR_DL_BURST 171
+
+#define UCD_TLV_T_172_CQICH_BAND_AMC_TRANSITION_DELAY 172
+#define UCD_TLV_T_174_MAXIMUM_RETRANSMISSION 174
+#define UCD_TLV_T_176_SIZE_OF_CQICH_ID_FIELD 176
+#define UCD_TLV_T_177_NORMALIZED_CN_OVERRIDE_2 177
+#define UCD_TLV_T_186_UPPER_BOUND__AAS_PREAMBLE 186
+#define UCD_TLV_T_187_LOWER_BOUND_AAS_PREAMBLE 187
+#define UCD_TLV_T_188_ALLOW_AAS_BEAM_SELECT_MESSAGE 188
+#define UCD_TLV_T_189_USE_CQICH_INDICATION_FLAG 189
+#define UCD_TLV_T_190_MS_SPECIFIC_UP_POWER_OFFSET_ADJUSTMENT_STEP 190
+#define UCD_TLV_T_191_MS_SPECIFIC_DOWN_POWER_OFSET_ADJUSTMENT_STEP 191
+#define UCD_TLV_T_192_MIN_LEVEL_POWER_OFFSET_ADJUSTMENT 192
+#define UCD_TLV_T_193_MAX_LEVEL_POWER_OFFSETR_ADJUSTMENT 193
+#define UCD_TLV_T_194_HANDOVER_RANGING_CODES 194
+#define UCD_TLV_T_195_INITIAL_RANGING_INTERVAL 195
+#define UCD_TLV_T_196_TX_POWER_REPORT 196
+#define UCD_TLV_T_197_NORMALIZED_CN_FOR_CHANNEL_SOUNDING 197
+#define UCD_TLV_T_198_INTIAL_RANGING_BACKOFF_START 198
+#define UCD_TLV_T_199_INITIAL_RANGING_BACKOFF_END 199
+#define UCD_TLV_T_200_BANDWIDTH_REQUESET_BACKOFF_START 200
+#define UCD_TLV_T_201_BANDWIDTH_REQUEST_BACKOFF_END 201
+#define UCD_TLV_T_202_UPLINK_BURST_PROFILE_FOR_MULTIPLE_FEC_TYPES 202
+#define UCD_TLV_T_203_UL_PUSC_SUBCHANNEL_ROTATION 203
+#define UCD_TLV_T_205_RELATIVE_POWER_OFFSET_UL_HARQ_BURST 205
+#define UCD_TLV_T_206_RELATIVE_POWER_OFFSET_UL_BURST_CONTAINING_MAC_MGMT_MSG 206
+#define UCD_TLV_T_207_UL_INITIAL_TRANSMIT_TIMING 207
+#define UCD_TLV_T_210_FAST_FEEDBACK_REGION 210
+#define UCD_TLV_T_211_HARQ_ACK_REGION 211
+#define UCD_TLV_T_212_RANGING_REGION 212
+#define UCD_TLV_T_213_SOUNDING_REGION 213
+
+/* Table 357 */
+#define UCD_BURST_FEC 150
+#define UCD_BURST_RANGING_DATA_RATIO 151
+/*#define UCD_BURST_POWER_BOOST 151*/
+/*#define UCD_BURST_TCS_ENABLE 152*/
+
+/* RNG-REQ types (Table 364) */
+/* Sorted these values */
+#define RNG_REQ_DL_BURST_PROFILE 1
+#define RNG_REQ_SS_MAC_ADDRESS 2
+#define RNG_REQ_RANGING_ANOMALIES 3
+#define RNG_REQ_AAS_BROADCAST 4
+#define RNG_REQ_SERVING_BS_ID 5
+#define RNG_REQ_RANGING_PURPOSE_INDICATION 6
+#define RNG_REQ_HO_ID 7
+#define RNG_REQ_POWER_DOWN_INDICATOR 8
+#define RNG_REQ_PAGING_CONTROLLER_ID 9
+#define RNG_REQ_MAC_HASH_SKIP_THRESHOLD 10
+#define RNG_REQ_ENABLED_ACTION_TRIGGERED 11
+#define RNG_REQ_REQUESTED_DNLK_REP_CODING_LEVEL 12
+#define RNG_REQ_CMAC_KEY_COUNT 13
+#define RNG_REQ_POWER_SAVING_CLASS_PARAMETERS 21
+
+/* RNG-REQ/RSP Power Saving Class Parameter TLV's (Table 364a) */
+#define RNG_POWER_SAVING_CLASS_FLAGS 1
+#define RNG_POWER_SAVING_CLASS_ID 2
+#define RNG_POWER_SAVING_CLASS_TYPE 3
+#define RNG_START_FRAME_NUMBER 4
+#define RNG_INITIAL_SLEEP_WINDOW 5
+#define RNG_LISTENING_WINDOW 6
+#define RNG_FINAL_SLEEP_WINDOW_BASE 7
+#define RNG_FINAL_SLEEP_WINDOW_EXPONENT 8
+#define RNG_SLPID 9
+#define RNG_CID 10
+#define RNG_DIRECTION 11
+
+/* RNG-RSP types (Table 367) */
+#define RNG_RSP_TIMING_ADJUST 1
+#define RNG_RSP_POWER_LEVEL_ADJUST 2
+#define RNG_RSP_OFFSET_FREQ_ADJUST 3
+#define RNG_RSP_RANGING_STATUS 4
+#define RNG_RSP_DL_FREQ_OVERRIDE 5
+#define RNG_RSP_UL_CHANNEL_ID_OVERRIDE 6
+#define RNG_RSP_DL_OPERATIONAL_BURST_PROFILE 7
+#define RNG_RSP_SS_MAC_ADDRESS 8
+#define RNG_RSP_BASIC_CID 9
+#define RNG_RSP_PRIMARY_MGMT_CID 10
+#define RNG_RSP_AAS_BROADCAST_PERMISSION 11
+#define RNG_RSP_FRAME_NUMBER 12
+#define RNG_RSP_OPPORTUNITY_NUMBER 13
+#define RNG_RSP_SERVICE_LEVEL_PREDICTION 17
+#define RNG_RSP_GLOBAL_SERVICE_CLASS_NAME 18
+#define RNG_RSP_RESOURCE_RETAIN_FLAG 20
+#define RNG_RSP_HO_PROCESS_OPTIMIZATION 21
+/* Sorted the following values (for readability) */
+#define RNG_RSP_HO_ID 22
+#define RNG_RSP_LOCATION_UPDATE_RESPONSE 23
+#define RNG_RSP_PAGING_INFORMATION 24
+#define RNG_RSP_PAGING_CONTROLLER_ID 25
+#define RNG_RSP_NEXT_PERIODIC_RANGING 26
+#define RNG_RSP_POWER_SAVING_CLASS_PARAMETERS 27
+#define RNG_RSP_MAC_HASH_SKIP_THRESHOLD 28
+#define RNG_RSP_SBC_RSP_ENCODINGS 29
+#define RNG_RSP_REG_RSP_ENCODINGS 30
+#define RNG_RSP_SA_CHALLENGE_TUPLE 31
+#define RNG_RSP_ENABLED_ACTION_TRIGGERED 32
+#define RNG_RSP_DL_OP_BURST_PROFILE_OFDMA 33
+#define RNG_RSP_RANGING_CODE_ATTRIBUTES 150
+#define RNG_RSP_SA_CHALLENGE_BS_RANDOM 1
+#define RNG_RSP_SA_CHALLENGE_AKID 2
+
+/* SBC types (section 11.8) */
+#define SBC_BW_ALLOC_SUPPORT 1
+#define SBC_TRANSITION_GAPS 2
+#define SBC_REQ_MAX_TRANSMIT_POWER 3
+#define SBC_MAC_PDU 4
+#define SBC_PKM_FLOW_CONTROL 15
+#define SBC_AUTH_POLICY_SUPPORT 16
+#define SBC_MAX_SECURITY_ASSOCIATIONS 17
+#define SBC_REQ_CURR_TRANSMITTED_POWER 147
+#define SBC_SS_FFT_SIZES 150
+#define SBC_SS_DEMODULATOR 151
+#define SBC_SS_MODULATOR 152
+#define SBC_SS_NUM_UL_ARQ_ACK_CHANNEL 153
+#define SBC_SS_PERMUTATION_SUPPORT 154
+#define SBC_SS_DEMODULATOR_MIMO_SUPPORT 156
+#define SBC_SS_MIMO_UPLINK_SUPPORT 157
+#define SBC_SS_OFDMA_AAS_PRIVATE_MAP_SUPPORT 158
+#define SBC_SS_OFDMA_AAS_CAPABILITIES 159
+#define SBC_SS_CINR_MEASUREMENT_CAPABILITY 160
+#define SBC_SS_NUM_DL_ARQ_ACK_CHANNEL 161
+
+#define SBC_TLV_T_26_POWER_SAVE_CLASS_TYPES_CAPABILITY 26
+#define SBC_TLV_T_28_HO_TRIGGER_METRIC_SUPPORT 28
+#define SBC_TLV_T_27_EXTENSION_CAPABILITY 27
+
+#define SBC_TLV_T_162_HARQ_INCREMENTAL_REDUNDANCY_BUFFER_CAPABILITY 162
+#define SBC_TLV_T_163_HARQ_CHASE_COMBINING_AND_CC_IR_BUFFER_CAPABILITY 163
+#define SBC_TLV_T_167_ASSOCIATION_SUPPORT 167
+#define SBC_TLV_T_170_UPLINK_POWER_CONTROL_SUPPORT 170
+#define SBC_TLV_T_171_MINIMUM_NUM_OF_FRAMES 171
+#define SBC_TLV_T_172 172
+#define SBC_TLV_T_173_UL_CONTROL_CHANNEL_SUPPORT 173
+#define SBC_TLV_T_174_OFDMA_MS_CSIT_CAPABILITY 174
+#define SBC_TLV_T_175_MAX_NUM_BST_PER_FRM_CAPABILITY_HARQ 175
+#define SBC_TLV_T_176 176
+#define SBC_TLV_T_177_OFDMA_SS_MODULATOR_FOR_MIMO_SUPPORT 177
+#define SBC_TLV_T_178_SDMA_PILOT_CAPABILITY 178
+#define SBC_TLV_T_179_OFDMA_MULTIPLE_DL_BURST_PROFILE_CAPABILITY 179
+#define SBC_TLV_T_204_OFDMA_PARAMETERS_SETS 204
+
+/* DREG-REQ DREG-CMD types (Sections 6.3.2.3.42 and 6.3.2.3.26) */
+#define DREG_PAGING_INFO 1
+#define DREG_REQ_DURATION 2
+#define DREG_PAGING_CONTROLLER_ID 3
+#define DREG_IDLE_MODE_RETAIN_INFO 4
+#define DREG_MAC_HASH_SKIP_THRESHOLD 5
+#define DREG_PAGING_CYCLE_REQUEST 52
+
+/* REP-REQ types (Sections 11.11) */
+#define REP_REQ_REPORT_REQUEST 1
+/* REP-REQ report request subtypes */
+#define REP_REQ_REPORT_TYPE 1
+#define REP_REQ_CHANNEL_NUMBER 2
+#define REP_REQ_CHANNEL_TYPE 3
+#define REP_REQ_ZONE_SPEC_PHY_CINR_REQ 4
+#define REP_REQ_PREAMBLE_PHY_CINR_REQ 5
+#define REP_REQ_ZONE_SPEC_EFF_CINR_REQ 6
+#define REP_REQ_PREAMBLE_EFF_CINR_REQ 7
+#define REP_REQ_CHANNEL_SELECTIVITY_REPORT 8
+
+/* REP-RSP types (Sections 11.12) */
+#define REP_RSP_REPORT_TYPE 1
+#define REP_RSP_CHANNEL_TYPE 2
+#define REP_RSP_ZONE_SPECIFIC_PHY_CINR 3
+#define REP_RSP_PREAMBLE_PHY_CINR 4
+#define REP_RSP_ZONE_SPECIFIC_EFFECTIVE_CINR 5
+#define REP_RSP_PREAMBLE_EFFECTIVE_CINR 6
+/* REP-RSP report subtypes */
+#define REP_RSP_REPORT_CHANNEL_NUMBER 1
+#define REP_RSP_REPORT_START_FRAME 2
+#define REP_RSP_REPORT_DURATION 3
+#define REP_RSP_REPORT_BASIC_REPORT 4
+#define REP_RSP_REPORT_CINR_REPORT 5
+#define REP_RSP_REPORT_RSSI_REPORT 6
+/* REP-RSP channel type report subtypes */
+#define REP_RSP_CHANNEL_TYPE_SUBCHANNEL 1
+#define REP_RSP_CHANNEL_TYPE_BAND_AMC 2
+#define REP_RSP_CHANNEL_TYPE_SAFETY_CHANNEL 3
+#define REP_RSP_CHANNEL_TYPE_ENHANCED_BAND_AMC 4
+#define REP_RSP_CHANNEL_TYPE_SOUNDING 5
+/* REP-RSP zone-specific physical CINR report subtypes */
+#define REP_RSP_ZONE_SPECIFIC_PHY_CINR_PUSC_SC0 1
+#define REP_RSP_ZONE_SPECIFIC_PHY_CINR_PUSC_SC1 2
+#define REP_RSP_ZONE_SPECIFIC_PHY_CINR_FUSC 3
+#define REP_RSP_ZONE_SPECIFIC_PHY_CINR_OPTIONAL_FUSC 4
+#define REP_RSP_ZONE_SPECIFIC_PHY_CINR_SAFETY_CHANNEL 5
+#define REP_RSP_ZONE_SPECIFIC_PHY_CINR_AMC 6
+/* REP-RSP preamble physical CINR report subtypes */
+#define REP_RSP_PREAMBLE_PHY_CINR_CONFIGURATION1 1
+#define REP_RSP_PREAMBLE_PHY_CINR_CONFIGURATION3 2
+#define REP_RSP_PREAMBLE_PHY_CINR_BAND_AMC 3
+/* REP-RSP zone-specific effective CINR report subtypes */
+#define REP_RSP_ZONE_SPECIFIC_EFFECTIVE_CINR_PUSC_SC0 1
+#define REP_RSP_ZONE_SPECIFIC_EFFECTIVE_CINR_PUSC_SC1 2
+#define REP_RSP_ZONE_SPECIFIC_EFFECTIVE_CINR_FUSC 3
+#define REP_RSP_ZONE_SPECIFIC_EFFECTIVE_CINR_OPTIONAL_FUSC 4
+#define REP_RSP_ZONE_SPECIFIC_EFFECTIVE_CINR_AMC_AAS 5
+/* REP-RSP preamble effective CINR report subtypes */
+#define REP_RSP_PREAMBLE_EFFECTIVE_CINR_CONFIGURATION1 1
+#define REP_RSP_PREAMBLE_EFFECTIVE_CINR_CONFIGURATION3 2
+#define REP_RSP_CHANNEL_SELECTIVITY 3
+/* REP-RSP channel selectivity report subtypes */
+#define FREQUENCY_SELECTIVITY_REPORT 1
+
+/* REG types (Section 11.7) */
+#define REG_ARQ_PARAMETERS 1
+#define REG_SS_MGMT_SUPPORT 2
+#define REG_IP_MGMT_MODE 3
+#define REG_IP_VERSION 4
+#define REG_REQ_SECONDARY_MGMT_CID 5
+#define REG_RSP_SECONDARY_MGMT_CID 5
+#define REG_UL_TRANSPORT_CIDS_SUPPORTED 6
+#define REG_IP_PHS_SDU_ENCAP 7
+#define REG_MAX_CLASSIFIERS_SUPPORTED 8
+#define REG_PHS_SUPPORT 9
+#define REG_ARQ_SUPPORT 10
+#define REG_DSX_FLOW_CONTROL 11
+#define REG_MAC_CRC_SUPPORT 12
+#define REG_MCA_FLOW_CONTROL 13
+#define REG_MCAST_POLLING_CIDS 14
+#define REG_NUM_DL_TRANS_CID 15
+#if 0 /* WIMAX_16E_2005 changes this to SBC scope */
+#define REG_PKM_FLOW_CONTROL 15
+#define REG_AUTH_POLICY_SUPPORT 16
+#define REG_MAX_SECURITY_ASSOCIATIONS 17
+#endif
+#if 0 /* TODO: scope has been changed to SBC scope */
+#define REG_DL_TRANSPORT_CIDS_SUPPORTED 15
+#endif
+#define REG_MAC_ADDRESS 18
+
+#define REG_TLV_T_20_MAX_MAC_DATA_PER_FRAME_SUPPORT 20
+#define REG_TLV_T_20_1_MAX_MAC_LEVEL_DATA_PER_DL_FRAME 1
+#define REG_TLV_T_20_2_MAX_MAC_LEVEL_DATA_PER_UL_FRAME 2
+#define REG_TLV_T_21_PACKING_SUPPORT 21
+#define REG_TLV_T_22_MAC_EXTENDED_RTPS_SUPPORT 22
+#define REG_TLV_T_23_MAX_NUM_BURSTS_TRANSMITTED_CONCURRENTLY_TO_THE_MS 23
+#define REG_RSP_TLV_T_24_CID_UPDATE_ENCODINGS 24
+#define REG_RSP_TLV_T_24_1_CID_UPDATE_ENCODINGS_NEW_CID 1
+#define REG_RSP_TLV_T_24_2_CID_UPDATE_ENCODINGS_SFID 2
+#define REG_RSP_TLV_T_24_3_CID_UPDATE_ENCODINGS_CONNECTION_INFO 3
+#define REG_RSP_TLV_T_25_COMPRESSED_CID_UPDATE_ENCODINGS 25
+#define REG_TLV_T_26_METHOD_FOR_ALLOCATING_IP_ADDR_SECONDARY_MGMNT_CONNECTION 26
+#define REG_TLV_T_27_HANDOVER_SUPPORTED 27
+#define REG_RSP_TLV_T_28_HO_SYSTEM_RESOURCE_RETAIN_TIME 28
+#define REG_TLV_T_29_HO_PROCESS_OPTIMIZATION_MS_TIMER 29
+#define REG_RSP_TLV_T_30_MS_HANDOVER_RETRANSMISSION_TIMER 30
+#define REG_TLV_T_31_MOBILITY_FEATURES_SUPPORTED 31
+#define REG_REQ_TLV_T_32_SLEEP_MODE_RECOVERY_TIME 32
+#define REG_REQ_TLV_T_33_MS_PREV_IP_ADDR 33
+#define REG_RSP_TLV_T_34_SKIP_ADDR_ACQUISITION 34
+#define REG_RSP_TLV_T_35_SAID_UPDATE_ENCODINGS 35
+#define REG_RSP_TLV_T_35_1_NEW_SAID 1
+#define REG_RSP_TLV_T_35_2_OLD_SAID 2
+#define REG_RSP_TLV_T_36_TOTAL_PROVISIONED_SERVICE_FLOW_DSAs 36
+#define REG_TLV_T_37_IDLE_MODE_TIMEOUT 37
+#define REG_RSP_TLV_T_38_SA_TEK_UPDATE 38
+#define REG_RSP_TLV_T_38_1_SA_TEK_UPDATE_TYPE 1
+#define REG_RSP_TLV_T_38_2_NEW_SAID 2
+#define REG_RSP_TLV_T_38_3_OLD_SAID 3
+#define REG_RSP_TLV_T_38_4_OLD_TEK_PARAMETERS 4
+#define REG_RSP_TLV_T_38_5_NEW_TEK_GTEK_PARAMETERS 5
+#define REG_RSP_TLV_T_38_6_GKEK_PARAMETERS 6
+#define REG_RSP_TLV_T_39_GKEK_PARAMETERS 39
+#define REG_TLV_T_40_ARQ_ACK_TYPE 40
+#define REG_TLV_T_41_MS_HO_CONNECTIONS_PARAM_PROCESSING_TIME 41
+#define REG_TLV_T_42_MS_HO_TEK_PROCESSING_TIME 42
+#define REG_TLV_T_43_MAC_HEADER_AND_EXTENDED_SUBHEADER_SUPPORT 43
+#define REG_RSP_TLV_T_44_SN_REPORTING_BASE 44
+#define REG_REQ_TLV_T_45_MS_PERIODIC_RANGING_TIMER_INFO 45
+#define REG_HANDOVER_INDICATION_READINESS_TIMER 46
+#define REG_REQ_BS_SWITCHING_TIMER 47
+#define REG_POWER_SAVING_CLASS_CAPABILITY 48
+
+
+
+/* PKM types (Table 370) */
+#define PKM_ATTR_DISPLAY_STRING 6
+#define PKM_ATTR_AUTH_KEY 7
+#define PKM_ATTR_TEK 8
+#define PKM_ATTR_KEY_LIFE_TIME 9
+#define PKM_ATTR_KEY_SEQ_NUM 10
+#define PKM_ATTR_HMAC_DIGEST 11
+#define PKM_ATTR_SAID 12
+#define PKM_ATTR_TEK_PARAM 13
+#define PKM_ATTR_CBC_IV 15
+#define PKM_ATTR_ERROR_CODE 16
+#define PKM_ATTR_CA_CERTIFICATE 17
+#define PKM_ATTR_SS_CERTIFICATE 18
+#define PKM_ATTR_SECURITY_CAPABILITIES 19
+#define PKM_ATTR_CRYPTO_SUITE 20
+#define PKM_ATTR_CRYPTO_LIST 21
+#define PKM_ATTR_VERSION 22
+#define PKM_ATTR_SA_DESCRIPTOR 23
+#define PKM_ATTR_SA_TYPE 24
+#define PKM_ATTR_SECURITY_NEGOTIATION_PARAMETERS 25
+#define PKM_ATTR_PKM_CONFIG_SETTINGS 27
+#define PKM_ATTR_PKM_EAP_PAYLOAD 28
+#define PKM_ATTR_PKM_NONCE 29
+#define PKM_ATTR_AUTH_RESULT_CODE 30
+#define PKM_ATTR_SA_SERVICE_TYPE 31
+#define PKM_ATTR_FRAME_NUMBER 32
+#define PKM_ATTR_SS_RANDOM 33
+#define PKM_ATTR_BS_RANDOM 34
+#define PKM_ATTR_PRE_PAK 35
+#define PKM_ATTR_PAK_AK_SEQ_NUMBER 36
+#define PKM_ATTR_BS_CERTIFICATE 37
+#define PKM_ATTR_SIG_BS 38
+#define PKM_ATTR_MS_MAC_ADDRESS 39
+#define PKM_ATTR_CMAC_DIGEST 40
+#define PKM_ATTR_KEY_PUSH_MODES 41
+#define PKM_ATTR_KEY_PUSH_COUNTER 42
+#define PKM_ATTR_GKEK 43
+#define PKM_ATTR_SIG_SS 44
+#define PKM_ATTR_AKID 45
+#define PKM_ATTR_ASSOCIATED_GKEK_SEQ_NUM 46
+#define PKM_ATTR_GKEK_PARAMETERS 47
+
+#define PKM_ATTR_PKM_CONFIG_SETTINGS_AUTHORIZE_WAIT_TIMEOUT 1
+#define PKM_ATTR_PKM_CONFIG_SETTINGS_REAUTHORIZE_WAIT_TIMEOUT 2
+#define PKM_ATTR_PKM_CONFIG_SETTINGS_AUTHORIZATION_GRACE_TIME 3
+#define PKM_ATTR_PKM_CONFIG_SETTINGS_OPERATIONAL_WAIT_TIMEOUT 4
+#define PKM_ATTR_PKM_CONFIG_SETTINGS_REKEY_WAIT_TIMEOUT 5
+#define PKM_ATTR_PKM_CONFIG_SETTINGS_TEK_GRACE_TIME 6
+#define PKM_ATTR_PKM_CONFIG_SETTINGS_AUTHORIZE_REJECT_WAIT_TIMEOUT 7
+
+#define PKM_ATTR_SECURITY_NEGOTIATION_PARAMETER_SUB_PKM_VERSION_SUPPORT 1
+#define PKM_ATTR_SECURITY_NEGOTIATION_PARAMETER_SUB_AUTHORIZATION_POLICY_SUPPORT 2
+#define PKM_ATTR_SECURITY_NEGOTIATION_PARAMETER_SUB_MESSAGE_AUTHENTICATION_CODE 3
+#define PKM_ATTR_SECURITY_NEGOTIATION_PARAMETER_SUB_PN_WINDOW_SIZE 4
+#define PKM_ATTR_SECURITY_NEGOTIATION_PARAMETER_SUB_PKM_FLOW_CONTROL 5
+#define PKM_ATTR_SECURITY_NEGOTIATION_PARAMETER_SUB_MAX_SUPPT_SECURITY_ASSNS 6
+
+/* Common TLV Encoding types (Table 346) */
+#define SHORT_HMAC_TUPLE_COR2 140
+#define CMAC_TUPLE 141
+#define VENDOR_SPECIFIC_INFO 143
+#define VENDOR_ID_ENCODING 144
+#define DSx_UPLINK_FLOW 145
+#define DSx_DOWNLINK_FLOW 146
+#define CURRENT_TX_POWER 147
+#define MAC_VERSION_ENCODING 148
+#define HMAC_TUPLE 149
+#define SHORT_HMAC_TUPLE 150
+
+/* Section 11.13.18 */
+#define ARQ_ENABLE 18
+#define ARQ_WINDOW_SIZE 19
+#define ARQ_TRANSMITTER_DELAY 20
+#define ARQ_RECEIVER_DELAY 21
+#define ARQ_BLOCK_LIFETIME 22
+#define ARQ_SYNC_LOSS_TIMEOUT 23
+#define ARQ_DELIVER_IN_ORDER 24
+#define ARQ_RX_PURGE_TIMEOUT 25
+#define ARQ_BLOCK_SIZE 26
+
+/* Section 6.2.3.2.26 */
+
+/* Service Flow Encodings (SFE) (Table 383) */
+#define SFE_SF_ID 1
+#define SFE_CID 2
+#define SFE_SERVICE_CLASS_NAME 3
+#define SFE_MBS_SERVICE 4
+#define SFE_QOS_PARAMS_SET 5
+#define SFE_TRAFFIC_PRIORITY 6
+#define SFE_MAX_STR 7
+#define SFE_MAX_TRAFFIC_BURST 8
+#define SFE_MIN_RTR 9
+#define SFE_RESERVED_10 10
+#define SFE_UL_SCHEDULING 11
+#define SFE_TX_POLICY 12
+#define SFE_TOLERATED_JITTER 13
+#define SFE_MAX_LATENCY 14
+#define SFE_FIXED_LEN_SDU 15
+#define SFE_SDU_SIZE 16
+#define SFE_TARGET_SAID 17
+#define SFE_ARQ_ENABLE 18
+#define SFE_ARQ_WINDOW_SIZE 19
+#define SFE_ARQ_TRANSMITTER_DELAY 20
+#define SFE_ARQ_RECEIVER_DELAY 21
+#define SFE_ARQ_BLOCK_LIFETIME 22
+#define SFE_ARQ_SYNC_LOSS_TIMEOUT 23
+#define SFE_ARQ_DELIVER_IN_ORDER 24
+#define SFE_ARQ_RX_PURGE_TIMEOUT 25
+#define SFE_ARQ_BLOCK_SIZE 26
+#define SFE_RESERVED_27 27
+#define SFE_CS_SPECIFICATION 28
+#define SFE_TYPE_OF_DATA_DELIVERY_SERVICES 29
+#define SFE_SDU_INTER_ARRIVAL_INTERVAL 30
+#define SFE_TIME_BASE 31
+#define SFE_PAGING_PREFERENCE 32
+#define SFE_MBS_ZONE_IDENTIFIER_ASSIGNMENT 33
+#define SFE_RESERVED_34 34
+#define SFE_GLOBAL_SERVICE_CLASS_NAME 35
+#define SFE_RESERVED_36 36
+#define SFE_SN_FEEDBACK_ENABLED 37
+#define SFE_FSN_SIZE 38
+#define SFE_CID_ALLOCATION_FOR_ACTIVE_BS 39
+#define SFE_UNSOLICITED_GRANT_INTERVAL 40
+#define SFE_UNSOLOCITED_POLLING_INTERVAL 41
+#define SFE_PDU_SN_EXT_SUBHEADER_HARQ_REORDER 42
+#define SFE_MBS_CONTENTS_ID 43
+#define SFE_HARQ_SERVICE_FLOWS 44
+#define SFE_AUTHORIZATION_TOKEN 45
+#define SFE_HARQ_CHANNEL_MAPPING 46
+
+/* Convergence Servicerameter Encoding Rules (Section 11.13.19.2) */
+#define SFE_CSPER_ATM 99
+#define SFE_CSPER_PACKET_IPV4 100
+#define SFE_CSPER_PACKET_IPV6 101
+#define SFE_CSPER_PACKET_802_3 102
+#define SFE_CSPER_PACKET_802_1Q 103
+#define SFE_CSPER_PACKET_IPV4_802_3 104
+#define SFE_CSPER_PACKET_IPV6_802_3 105
+#define SFE_CSPER_PACKET_IPV4_802_1Q 106
+#define SFE_CSPER_PACKET_IPV6_802_1Q 107
+#define SFE_CSPER_PACKET_IP_ROCH_COMPRESSION 108
+#define SFE_CSPER_PACKET_IP_ECRTP_COMPRESSION 109
+#define SFE_CSPER_PACKET_IP_802_3_ROCH_COMPRESSION 110
+#define SFE_CSPER_PACKET_IP_802_3_ECRTP_COMPRESSION 111
+
+/* Section 11.13.19.3 */
+#define CST_CLASSIFIER_ACTION 1
+#define CST_CLASSIFIER_ERROR_PARAM_SET 2
+#define CST_PACKET_CLASSIFICATION_RULE 3
+#define CST_PHS_DSC_ACTION 4
+#define CST_PHS_ERROR_PARAM_SET 5
+#define CST_PHS_RULE 6
+
+/* Section 11.13.19.3.3 */
+#define CST_ERROR_SET_ERRORED_PARAM 1
+#define CST_ERROR_SET_ERROR_CODE 2
+#define CST_ERROR_SET_ERROR_MSG 3
+
+/* Section 11.13.19.4 */
+#define CST_ATM_SWITCHING 1
+#define CST_ATM_CLASSIFIER 2
+#define CST_ATM_CLASSIFIER_DSC_ACTION 3
+#define CST_ATM_CLASSIFIER_ERROR_PARAMETER_SET 4
+
+#define ATM_VPI_CLASSIFIER 1
+#define ATM_VCI_CLASSIFIER 2
+#define ATM_CLASSIFIER_ID 3
+
+/* Section 11.13.19.3.4 */
+#define CST_PKT_CLASS_RULE_PRIORITY 1
+#define CST_PKT_CLASS_RULE_RANGE_MASK 2
+#define CST_PKT_CLASS_RULE_PROTOCOL 3
+#define CST_PKT_CLASS_RULE_SRC_IP 4
+#define CST_PKT_CLASS_RULE_DST_IP 5
+#define CST_PKT_CLASS_RULE_SRCPORT_RANGE 6
+#define CST_PKT_CLASS_RULE_DSTPORT_RANGE 7
+#define CST_PKT_CLASS_RULE_DST_MAC 8
+#define CST_PKT_CLASS_RULE_SRC_MAC 9
+#define CST_PKT_CLASS_RULE_ETHERTYPE 10
+#define CST_PKT_CLASS_RULE_USER_PRIORITY 11
+#define CST_PKT_CLASS_RULE_VLAN_ID 12
+#define CST_PKT_CLASS_RULE_PHSI 13
+#define CST_PKT_CLASS_RULE_INDEX 14
+#define CST_PKT_CLASS_RULE_IPv6_FLOW_LABEL 15
+#define CST_PKT_CLASS_RULE_LARGE_CONTEXT_ID 16
+#define CST_PKT_CLASS_RULE_SHORT_FORMAT_CONTEXT_ID 18
+#define CST_CLASSIFIER_ACTION_RULE 19
+#define CST_PKT_CLASS_RULE_VENDOR_SPEC 143
+
+/* Section 11.13.19.3.7 */
+#define CST_PHS_PHSI 1
+#define CST_PHS_PHSF 2
+#define CST_PHS_PHSM 3
+#define CST_PHS_PHSS 4
+#define CST_PHS_PHSV 5
+#define CST_PHS_VENDOR_SPEC 143
+
+#endif /* WIMAX_MAC_H */
diff --git a/plugins/epan/wimax/wimax_pdu_decoder.c b/plugins/epan/wimax/wimax_pdu_decoder.c
new file mode 100644
index 0000000000..d17b46288f
--- /dev/null
+++ b/plugins/epan/wimax/wimax_pdu_decoder.c
@@ -0,0 +1,267 @@
+/* wimax_pdu_decoder.c
+ * WiMax PDU Burst decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "crc.h"
+#include "wimax-int.h"
+#include "wimax_utils.h"
+
+extern gint proto_wimax;
+
+void proto_reg_handoff_wimax_pdu(void);
+
+static dissector_handle_t mac_generic_decoder_handle = NULL;
+static dissector_handle_t mac_header_type1_handle = NULL;
+static dissector_handle_t mac_header_type2_handle = NULL;
+static dissector_handle_t wimax_harq_map_handle = NULL;
+
+#define WIMAX_PDU_PADDING_MASK 0xFF
+#define WIMAX_INVALID_PDU_MASK 0xF0
+#define WIMAX_MAP_TYPE_MASK 0xE0 /* 0b111 */
+#define WIMAX_HARQ_MAP_MSG_IND 0xE0 /* 0b111 */
+#define WIMAX_COMPRESSED_DL_MAP_IND 0xC0 /* 0b110 */
+#define REDUCED_PRIVATE_MAP_MASK 0x0C /* 0b11 */
+
+#define WIMAX_MAC_HEADER_SIZE 6
+#define WIMAX_MAC_HEADER_INFO_FIELDS 5
+#define WIMAX_MAC_HEADER_HT_FIELD 0x80
+#define WIMAX_MAC_HEADER_EC_FIELD 0x40
+#define WIMAX_MAC_HEADER_LENGTH_MSB_MASK 0x07
+
+#define WIMAX_HARQ_MAP_MSG_LENGTH_MASK1 0x07FC
+/* Global Variables. */
+gboolean first_gmh;
+
+static gint proto_wimax_pdu_decoder = -1;
+static gint ett_wimax_pdu_decoder = -1;
+
+static int hf_wimax_value_bytes = -1;
+
+static int dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset;
+ guint mac_ht, mac_ec;
+ guint first_byte, length;
+ guint mac_hcs, mac_hcs_calculated;
+ proto_item *pdu_item = NULL;
+ proto_tree *pdu_tree = NULL;
+
+#ifndef STATIC_DATA
+ /* generate the table of CRC32 remainders for all possible bytes */
+ wimax_mac_gen_crc32_table();
+ /* generate the table of CRC8 remainders for all possible bytes */
+ wimax_mac_gen_crc8_table();
+#endif
+
+ /* parsing the PDU burst */
+ for(offset = 0; offset < tvb_reported_length(tvb); )
+ {
+ if (offset == 0)
+ {
+ first_gmh = TRUE;
+ }
+ else
+ {
+ first_gmh = FALSE;
+ }
+ /* get the length of the remainder */
+ length = tvb_reported_length_remaining(tvb, offset);
+ /* get the first byte at offset */
+ first_byte = tvb_get_guint8(tvb, offset);
+ /* check for padding */
+ if(first_byte == WIMAX_PDU_PADDING_MASK)
+ { /* Padding */
+ /* display message */
+ pdu_item = proto_tree_add_protocol_format(tree, proto_wimax_pdu_decoder, tvb, offset, length, "Padding (%u bytes)", length);
+ /* add subtree */
+ pdu_tree = proto_item_add_subtree(pdu_item, ett_wimax_pdu_decoder);
+ /* display the padding in Hex */
+ proto_tree_add_item(pdu_tree, hf_wimax_value_bytes, tvb, offset, length, ENC_NA);
+ break;
+ }
+ else if((first_byte & WIMAX_MAP_TYPE_MASK) == WIMAX_HARQ_MAP_MSG_IND)
+ { /* HARQ MAP message (no mac header) */
+ /* get the HARQ MAp Message Length */
+ length = ((tvb_get_ntohs(tvb, offset) & WIMAX_HARQ_MAP_MSG_LENGTH_MASK1) >> 2);
+ if (length == 0)
+ {
+ length = 3; /* At least 3 bytes. This prevents endless loop */
+ }
+ call_dissector(wimax_harq_map_handle, tvb_new_subset_length(tvb,offset,length), pinfo, tree);
+ offset += length;
+ continue;
+ }
+ else if((first_byte & WIMAX_MAP_TYPE_MASK) == WIMAX_COMPRESSED_DL_MAP_IND)
+ {
+ if(is_down_link(pinfo))
+ { /* decode compressed dl-map without mac header */
+ if ((first_byte & REDUCED_PRIVATE_MAP_MASK) == REDUCED_PRIVATE_MAP_MASK)
+ {
+ length = wimax_decode_dlmap_reduced_aas(tvb, pinfo, tree);
+ }
+ else
+ {
+ length = wimax_decode_dlmapc(tvb, pinfo, tree);
+ }
+ offset += length;
+ continue;
+ }
+ }
+ else if((first_byte & WIMAX_INVALID_PDU_MASK) == WIMAX_INVALID_PDU_MASK)
+ { /* Invalid PDU */
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Invalid PDU");
+ /* display message */
+ pdu_item = proto_tree_add_protocol_format(tree, proto_wimax_pdu_decoder, tvb, offset, length, "Invalid PDU (%u bytes)", length);
+ /* add subtree */
+ pdu_tree = proto_item_add_subtree(pdu_item, ett_wimax_pdu_decoder);
+ /* display the invalid MAC Header in Hex */
+ proto_tree_add_item(pdu_tree, hf_wimax_value_bytes, tvb, offset, length, ENC_NA);
+ break;
+ }
+ /* calculate the MAC header HCS */
+ mac_hcs_calculated = wimax_mac_calc_crc8(tvb_get_ptr(tvb, offset, WIMAX_MAC_HEADER_INFO_FIELDS), WIMAX_MAC_HEADER_INFO_FIELDS);
+ /* get the Header Check Sequence (HCS) in the header */
+ mac_hcs = tvb_get_guint8(tvb, offset + WIMAX_MAC_HEADER_SIZE - 1);
+ /* verify the HCS */
+ if(mac_hcs != mac_hcs_calculated)
+ {
+ /* update the info column */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "MAC Header CRC error");
+ /* display message */
+ pdu_item = proto_tree_add_protocol_format(tree, proto_wimax_pdu_decoder, tvb, offset, WIMAX_MAC_HEADER_SIZE, "MAC Header CRC error %X (in header) and %X (calculated)", mac_hcs, mac_hcs_calculated);
+ /* add subtree */
+ pdu_tree = proto_item_add_subtree(pdu_item, ett_wimax_pdu_decoder);
+ /* display the bad MAC Header in Hex */
+ proto_tree_add_item(pdu_tree, hf_wimax_value_bytes, tvb, offset, length, ENC_NA);
+ break;
+ }
+ /* get the Header Type (HT) */
+ mac_ht = ((first_byte & WIMAX_MAC_HEADER_HT_FIELD)?1:0);
+ /* get the Encryption Control (EC) */
+ mac_ec = ((first_byte & WIMAX_MAC_HEADER_EC_FIELD)?1:0);
+ /* update the MAC length for Generic MAC frame */
+ if(!mac_ht)
+ { /* Generic MAC Header with payload */
+ /* get the MAC length */
+ length = (tvb_get_guint8(tvb, offset+1) & WIMAX_MAC_HEADER_LENGTH_MSB_MASK);
+ length = ((length<<8) | tvb_get_guint8(tvb, offset+2));
+ }
+ else /* MAC signaling Headers or Bandwidth Request Headers */
+ { /* set the mac length */
+ length = WIMAX_MAC_HEADER_SIZE;
+ }
+ /* display PDU frame info */
+ /*
+ pdu_item = proto_tree_add_protocol_format(tree, proto_wimax_pdu_decoder, tvb, offset, length, "PDU Frame (%u bytes)", length);
+ */
+ pdu_item = proto_tree_add_protocol_format(tree, proto_wimax_pdu_decoder, tvb, offset, length, "PDU (%u bytes)", length);
+ /* add PDU subtree */
+ pdu_tree = proto_item_add_subtree(pdu_item, ett_wimax_pdu_decoder);
+ if (length == 0) {
+ offset += 6; /* Add header size. */
+ /* Must skip the code below or tvb_new_subset_length()
+ * keeps allocating memory until it runs out. */
+ continue;
+ }
+ /* process the valid MAC header */
+ if(mac_ht)
+ { /* MAC signaling Headers or Bandwidth Request Headers */
+ /* check the header type */
+ if(mac_ec)
+ { /* MAC Signaling Header Type II Header */
+ proto_item_append_text(pdu_item, " - Mac Type II Header: ");
+ call_dissector(mac_header_type2_handle, tvb_new_subset_length(tvb,offset,length), pinfo, pdu_tree);
+ }
+ else
+ { /* MAC Signaling Header Type I Header */
+ proto_item_append_text(pdu_item, " - Mac Type I Header: ");
+ call_dissector(mac_header_type1_handle, tvb_new_subset_length(tvb,offset,length), pinfo, pdu_tree);
+ }
+ }
+ else /* Generic MAC Header with payload */
+ {
+ call_dissector(mac_generic_decoder_handle, tvb_new_subset_length(tvb,offset,length), pinfo, pdu_tree);
+ }
+ offset += length;
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax PDU Burst Protocol */
+void wimax_proto_register_wimax_pdu(void)
+{
+ /* PDU display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_wimax_value_bytes,
+ {
+ "Values", "wmx.pdu.value",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_wimax_pdu_decoder,
+ };
+
+ proto_wimax_pdu_decoder = proto_wimax;
+
+ register_dissector("wimax_pdu_burst_handler", dissect_wimax_pdu_decoder, -1);
+ proto_register_field_array(proto_wimax_pdu_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+void
+wimax_proto_reg_handoff_wimax_pdu(void)
+{
+ mac_generic_decoder_handle = find_dissector("mac_header_generic_handler");
+ mac_header_type1_handle = find_dissector("mac_header_type_1_handler");
+ mac_header_type2_handle = find_dissector("mac_header_type_2_handler");
+ wimax_harq_map_handle = find_dissector("wimax_harq_map_handler");
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/wimax_phy_attributes_decoder.c b/plugins/epan/wimax/wimax_phy_attributes_decoder.c
new file mode 100644
index 0000000000..e1fa8d0bc4
--- /dev/null
+++ b/plugins/epan/wimax/wimax_phy_attributes_decoder.c
@@ -0,0 +1,190 @@
+/* wimax_phy_attributes_decoder.c
+ * WiMax PDU Burst Physical Attributes decoder
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* Include files */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include "wimax-int.h"
+
+extern gint proto_wimax;
+
+static gint proto_wimax_phy_attributes_decoder = -1;
+static gint ett_wimax_phy_attributes_decoder = -1;
+
+static const value_string vals_subchannel_types[] =
+{
+ { 0, "DL PUSC"},
+ { 1, "DL FUSC"},
+ {16, "UL PUSC"},
+ {0, NULL}
+};
+
+static const value_string vals_modulation_rates[] =
+{
+ {0, "BPSK R=1/2"},
+ {1, "QPSK R=1/2"},
+ {2, "QPSK R=3/4"},
+ {3, "16-QAM R=1/2"},
+ {4, "16-QAM R=3/4"},
+ {5, "64-QAM R=1/2"},
+ {6, "64-QAM R=2/3"},
+ {7, "64-QAM R=3/4"},
+ {8, "64-QAM R=5/6"},
+ {0, NULL}
+};
+
+static const value_string vals_encoding_types[] =
+{
+ {0, "Tail biting convolutional coding (CCTB)"},
+ {1, "Convolutional turbo coding (CTC)"},
+ {0, NULL}
+};
+
+static gint hf_phy_attributes_subchannelization_type = -1;
+static gint hf_phy_attributes_permbase = -1;
+static gint hf_phy_attributes_modulation_rate = -1;
+static gint hf_phy_attributes_encoding_type = -1;
+static gint hf_phy_attributes_num_repeat = -1;
+static gint hf_phy_attributes_symbol_offset = -1;
+static gint hf_phy_attributes_num_of_slots = -1;
+static gint hf_phy_attributes_subchannel = -1;
+
+
+
+static int dissect_wimax_phy_attributes_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
+{
+ guint offset = 0;
+ guint tvb_len;
+/* guint num_of_slots;*/
+ proto_item *phy_item = NULL;
+ proto_tree *phy_tree = NULL;
+
+ /* update the info column */
+ /*col_append_str(pinfo->cinfo, COL_INFO, "PDU Burst Physical Attributes:");*/
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "PHY-attr");
+ if (tree)
+ { /* we are being asked for details */
+ /* get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* display PDU Burst Physical Attributes dissector info */
+ phy_item = proto_tree_add_protocol_format(tree, proto_wimax_phy_attributes_decoder, tvb, offset, tvb_len, "PDU Burst Physical Attributes (%u bytes)", tvb_len);
+ /* add PDU Burst Physical Attributes subtree */
+ phy_tree = proto_item_add_subtree(phy_item, ett_wimax_phy_attributes_decoder);
+ /* display the subchannelization type */
+ proto_tree_add_item(phy_tree, hf_phy_attributes_subchannelization_type, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ /* display the permbase */
+ proto_tree_add_item(phy_tree, hf_phy_attributes_permbase, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ /* display the modulation rate */
+ proto_tree_add_item(phy_tree, hf_phy_attributes_modulation_rate, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ /* display the encoding type */
+ proto_tree_add_item(phy_tree, hf_phy_attributes_encoding_type, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ /* display the numRepeat */
+ proto_tree_add_item(phy_tree, hf_phy_attributes_num_repeat, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ /* display the symbol offset */
+ proto_tree_add_item(phy_tree, hf_phy_attributes_symbol_offset, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ /* display the number of slots */
+ proto_tree_add_item(phy_tree, hf_phy_attributes_num_of_slots, tvb, offset, 2, ENC_BIG_ENDIAN);
+ /* get the number of slots */
+/* num_of_slots = tvb_get_guint16(tvb, offset);*/
+ /* move to next field */
+ offset += 2;
+ /* display the physical subchannel list */
+ while(offset < tvb_len)
+ {
+ proto_tree_add_item(phy_tree, hf_phy_attributes_subchannel, tvb, offset++, 1, ENC_BIG_ENDIAN);
+ }
+ }
+ return tvb_captured_length(tvb);
+}
+
+/* Register Wimax PDU Burst Physical Attributes Protocol */
+void wimax_proto_register_wimax_phy_attributes(void)
+{
+ /* Physical Attributes display */
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_phy_attributes_subchannelization_type,
+ {"Subchannelization Type", "wmx.phy_attributes.subchannelization_type", FT_UINT8, BASE_DEC, VALS(vals_subchannel_types), 0x0, NULL, HFILL}
+ },
+ {
+ &hf_phy_attributes_permbase,
+ {"Permbase", "wmx.phy_attributes.permbase", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_phy_attributes_modulation_rate,
+ {"Modulation Rate", "wmx.phy_attributes.modulation_rate", FT_UINT8, BASE_DEC, VALS(vals_modulation_rates), 0x0, NULL, HFILL}
+ },
+ {
+ &hf_phy_attributes_encoding_type,
+ {"Encoding Type", "wmx.phy_attributes.encoding_type", FT_UINT8, BASE_DEC, VALS(vals_encoding_types), 0x0, NULL, HFILL}
+ },
+ {
+ &hf_phy_attributes_num_repeat,
+ {"numRepeat", "wmx.phy_attributes.num_repeat", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_phy_attributes_symbol_offset,
+ {"Symbol Offset", "wmx.phy_attributes.symbol_offset", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_phy_attributes_num_of_slots,
+ {"Number Of Slots", "wmx.phy_attributes.num_of_slots", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_phy_attributes_subchannel,
+ {"Subchannel", "wmx.phy_attributes.subchannel", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ }
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] =
+ {
+ &ett_wimax_phy_attributes_decoder
+ };
+
+ proto_wimax_phy_attributes_decoder = proto_wimax;
+
+ register_dissector("wimax_phy_attributes_burst_handler", dissect_wimax_phy_attributes_decoder, -1);
+
+ proto_register_field_array(proto_wimax_phy_attributes_decoder, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/wimax_tlv.c b/plugins/epan/wimax/wimax_tlv.c
new file mode 100644
index 0000000000..2fc4738b05
--- /dev/null
+++ b/plugins/epan/wimax/wimax_tlv.c
@@ -0,0 +1,187 @@
+/* wimax_tlv.c
+ * WiMax TLV handling functions
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "config.h"
+
+#include "wimax_tlv.h"
+
+/*************************************************************/
+/* init_tlv_info() */
+/* retrive the tlv information from specified tvb and offset */
+/* parameter: */
+/* info - pointer of a tlv information data structure */
+/* return: */
+/* 0-success */
+/* !=0-the invalid size of the TLV length (failed) */
+/*************************************************************/
+gint init_tlv_info(tlv_info_t *info, tvbuff_t *tvb, gint offset)
+{
+ guint tlv_len;
+
+ /* get TLV type */
+ info->type = (guint8)tvb_get_guint8( tvb, offset );
+ /* get TLV length */
+ tlv_len = (guint)tvb_get_guint8( tvb, (offset + 1) );
+ /* set the TLV value offset */
+ info->value_offset = 2;
+ /* adjust for multiple-byte TLV length */
+ if((tlv_len & WIMAX_TLV_EXTENDED_LENGTH_MASK) != 0)
+ { /* multiple bytes TLV length */
+ info->length_type = 1;
+ /* get the size of the TLV length */
+ tlv_len = (tlv_len & WIMAX_TLV_LENGTH_MASK);
+ info->size_of_length = tlv_len;
+ /* update the TLV value offset */
+ info->value_offset += tlv_len;
+ switch (tlv_len)
+ {
+ case 0:
+ info->length = 0; /* no length */
+ break;
+ case 1:
+ info->length = (gint32)tvb_get_guint8( tvb, (offset + 2) ); /* 8 bit */
+ break;
+ case 2:
+ info->length = (gint32)tvb_get_ntohs( tvb, (offset + 2) ); /* 16 bit */
+ break;
+ case 3:
+ info->length = (gint32)tvb_get_ntoh24( tvb, (offset + 2) ); /* 24 bit */
+ break;
+ case 4:
+ info->length = (gint32)tvb_get_ntohl( tvb, (offset + 2) ); /* 32 bit */
+ break;
+ default:
+ /* mark invalid tlv */
+ info->valid = 0;
+ /* failed, return the invalid size of the tlv length */
+ return (gint)tlv_len;
+ break;
+ }
+ }
+ else /* single byte length */
+ {
+ info->length_type = 0;
+ info->size_of_length = 0;
+ info->length = (gint32)tlv_len;
+ }
+ /* mark valid tlv */
+ info->valid = 1;
+ /* success */
+ return 0;
+}
+
+/*************************************************************/
+/* get_tlv_type() */
+/* get the tlv type of the specified tlv information */
+/* parameter: */
+/* info - pointer of a tlv information data structure */
+/* return: */
+/* >=0 - TLV type */
+/* =-1 - invalid tlv info */
+/*************************************************************/
+gint get_tlv_type(tlv_info_t *info)
+{
+ if(info->valid)
+ return (gint)info->type;
+ return -1;
+}
+
+/**************************************************************/
+/* get_tlv_size_of_length() */
+/* get the size of tlv length of the specified tlv information*/
+/* parameter: */
+/* info - pointer of a tlv information data structure */
+/* return: */
+/* >=0 - the size of TLV length */
+/* =-1 - invalid tlv info */
+/**************************************************************/
+gint get_tlv_size_of_length(tlv_info_t *info)
+{
+ if(info->valid)
+ return (gint)info->size_of_length;
+ return -1;
+}
+
+/*************************************************************/
+/* get_tlv_length() */
+/* get the tlv length of the specified tlv information */
+/* parameter: */
+/* info - pointer of a tlv information data structure */
+/* return: */
+/* >=0 - TLV length */
+/* =-1 - invalid tlv info */
+/*************************************************************/
+gint32 get_tlv_length(tlv_info_t *info)
+{
+ if(info->valid)
+ return (gint32)info->length;
+ return -1;
+}
+
+/*************************************************************/
+/* get_tlv_value_offset() */
+/* get the tlv value offset of the specified tlv information */
+/* parameter: */
+/* info - pointer of a tlv information data structure */
+/* return: */
+/* >0 - TLV value offset in byte */
+/* =-1 - invalid tlv info */
+/*************************************************************/
+gint get_tlv_value_offset(tlv_info_t *info)
+{
+ if(info->valid)
+ return (gint)info->value_offset;
+ return -1;
+}
+
+/*************************************************************/
+/* get_tlv_length_type() */
+/* get the tlv length type of the specified tlv information */
+/* parameter: */
+/* info - pointer of a tlv information data structure */
+/* return: */
+/* 0 - single byte TLV length */
+/* 1 - multiple bytes TLV length */
+/*************************************************************/
+gint get_tlv_length_type(tlv_info_t *info)
+{
+ if(info->valid)
+ return (gint)info->length_type;
+ return -1;
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/wimax_tlv.h b/plugins/epan/wimax/wimax_tlv.h
new file mode 100644
index 0000000000..28bc249327
--- /dev/null
+++ b/plugins/epan/wimax/wimax_tlv.h
@@ -0,0 +1,57 @@
+/* wimax_tlv.h
+ * WiMax TLV handling function header file
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef _WIMAX_TLV_H_
+#define _WIMAX_TLV_H_
+
+#include <epan/packet.h>
+
+#define WIMAX_TLV_EXTENDED_LENGTH_MASK 0x80
+#define WIMAX_TLV_LENGTH_MASK 0x7F
+
+#define MAX_TLV_LEN 64000
+
+typedef struct
+{
+ guint8 valid; /* TLV info status: 0=invalid; 1=valid */
+ guint8 type; /* TLV type */
+ guint8 length_type; /* length type: 0=single byte; 1=multiple bytes */
+ guint8 size_of_length; /* size of the TLV length */
+ guint value_offset; /* the offset of TLV value field */
+ gint32 length; /* length of TLV value field */
+} tlv_info_t;
+
+gint init_tlv_info(tlv_info_t *info, tvbuff_t *tvb, gint offset);
+gint valid_tlv_info(tlv_info_t *info);
+gint get_tlv_type(tlv_info_t *info);
+gint get_tlv_length_type(tlv_info_t *info);
+gint get_tlv_size_of_length(tlv_info_t *info);
+gint get_tlv_value_offset(tlv_info_t *info);
+gint32 get_tlv_length(tlv_info_t *info);
+proto_item *add_tlv_subtree(tlv_info_t *info, proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, const guint encoding);
+proto_tree *add_tlv_subtree_no_item(tlv_info_t *info, proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start);
+proto_tree *add_protocol_subtree(tlv_info_t *info, gint idx, proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const char *label);
+
+#endif /* WIMAX_TLV_H */
diff --git a/plugins/epan/wimax/wimax_utils.c b/plugins/epan/wimax/wimax_utils.c
new file mode 100644
index 0000000000..e1cd8cacb5
--- /dev/null
+++ b/plugins/epan/wimax/wimax_utils.c
@@ -0,0 +1,3407 @@
+/* wimax_utils.c
+ * WiMax Utility Decoders
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/*
+#define DEBUG
+*/
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include <epan/expert.h>
+#include "wimax-int.h"
+#include "wimax_tlv.h"
+#include "wimax_mac.h"
+
+#include "wimax_utils.h"
+
+extern gint proto_mac_mgmt_msg_rng_req_decoder;
+extern gint proto_mac_mgmt_msg_reg_req_decoder;
+
+extern gint mac_sdu_length; /* declared in packet-wmx.c */
+extern gboolean include_cor2_changes;
+
+static gint proto_wimax_utility_decoders = -1;
+static gint ett_wimax_service_flow_encodings = -1;
+static gint ett_wimax_cst_encoding_rules = -1;
+static gint ett_wimax_error_parameter_set = -1;
+static gint ett_wimax_hmac_tuple = -1;
+static gint ett_wimax_cmac_tuple = -1;
+static gint ett_wimax_short_hmac_tuple = -1;
+static gint ett_security_negotiation_parameters = -1;
+static gint ett_pkm_tlv_encoded_attributes_decoder = -1;
+static gint ett_sa_descriptor_decoder = -1;
+static gint ett_cryptographic_suite_list_decoder = -1;
+static gint ett_security_capabilities_decoder = -1;
+static gint ett_vendor_specific_info_decoder = -1;
+static gint ett_vendor_id_encoding_decoder = -1;
+static gint ett_ul_service_flow_decoder = -1;
+static gint ett_dl_service_flow_decoder = -1;
+
+static dissector_handle_t eap_handle = NULL;
+
+const unit_name_string wimax_units_byte_bytes = { " byte", " bytes" };
+const unit_name_string wimax_units_bit_sec = { "bits/s", NULL };
+const unit_name_string wimax_units_db = { "dB", NULL };
+const unit_name_string wimax_units_dbm = { "dBm", NULL };
+const unit_name_string wimax_units_frame_frames = { " frame", " frames" };
+const unit_name_string wimax_units_frame_offset = { " frame offset", NULL };
+const unit_name_string wimax_units_hz = { "Hz", NULL };
+const unit_name_string wimax_units_khz = { "kHz", NULL };
+const unit_name_string wimax_units_ms = { "ms", NULL };
+const unit_name_string wimax_units_ps = { "PS", NULL };
+
+
+/* The following two variables save the Scheduling Service type for
+ the Grant Management subheader dissector and track whether or not
+ one has been seen.
+ */
+static guint scheduling_service_type = -1;
+gint seen_a_service_type = 0;
+
+/* The following two functions set and access the variables above */
+guint get_service_type( void )
+{
+ return scheduling_service_type;
+}
+
+static void set_service_type( guint set_to )
+{
+ if( seen_a_service_type == 0 ){
+ scheduling_service_type = set_to;
+ seen_a_service_type = 1;
+ }
+}
+
+/* Setup protocol subtree array */
+static gint *ett[] =
+{
+ &ett_wimax_service_flow_encodings,
+ &ett_wimax_cst_encoding_rules,
+ &ett_wimax_error_parameter_set,
+ &ett_wimax_hmac_tuple,
+ &ett_wimax_cmac_tuple,
+ &ett_wimax_short_hmac_tuple,
+ &ett_security_negotiation_parameters,
+ &ett_pkm_tlv_encoded_attributes_decoder,
+ &ett_sa_descriptor_decoder,
+ &ett_cryptographic_suite_list_decoder,
+ &ett_security_capabilities_decoder,
+ &ett_vendor_specific_info_decoder,
+ &ett_vendor_id_encoding_decoder,
+ &ett_ul_service_flow_decoder,
+ &ett_dl_service_flow_decoder,
+};
+
+static const value_string vals_mbs_service[] =
+{
+ {0, "No available MBS"},
+ {1, "Single-BS-MBS"},
+ {2, "Multi-BS-MBS"},
+ {0, NULL}
+};
+
+static const value_string vals_ul_grant_scheduling[] =
+{
+ {0, "Reserved"},
+ {1, "Undefined (BS implementation-dependent)"},
+ {2, "BE (default)"},
+ {3, "nrtPS"},
+ {4, "rtPS"},
+ {5, "Extended rtPS"},
+ {6, "UGS"},
+ {0, NULL}
+};
+
+static const value_string vals_fixed_len_sdu[] =
+{
+ {0, "Variable-length SDUs (default)"},
+ {1, "Fixed-length SDUs"},
+ {0, NULL}
+};
+
+static const value_string vals_arq_enable[] =
+{
+ {0, "ARQ not requested/accepted"},
+ {1, "ARQ requested/accepted"},
+ {0, NULL}
+};
+#if 0
+static const value_string vals_arq_block_lifetime[] =
+{
+ {0, "Infinite"},
+ {0, NULL}
+};
+#endif
+static const value_string vals_arq_sync_loss_timeout[] =
+{
+ {0, "Infinite"},
+ {0, NULL}
+};
+
+static const value_string vals_arq_deliver_in_order[] =
+{
+ {0, "Order of delivery is not preserved"},
+ {1, "Order of delivery is preserved"},
+ {0, NULL}
+};
+static const value_string vals_arq_rx_purge_timeout[] =
+{
+ {0, "Infinite"},
+ {0, NULL}
+};
+
+static const value_string vals_fsn_size[] =
+{
+ {0, "3-bit FSN"},
+ {1, "11-bit FSN (default)"},
+ {0, NULL}
+};
+
+static const value_string vals_sn_fb_enable[] =
+{
+ {0, "Is disabled (default)"},
+ {1, "Is enabled"},
+ {0, NULL}
+};
+
+static const value_string vals_harq[] =
+{
+ {0, "Non HARQ (default)"},
+ {1, "HARQ connection" },
+ {0, NULL}
+};
+
+static const value_string vals_cs_specification[] =
+{
+ { 0, "Reserved"},
+ { 1, "Packet, IPv4"},
+ { 2, "Packet, IPv6"},
+ { 3, "Packet, IEEE 802.3/Ethernet"},
+ { 4, "Packet, IEEE 802.1Q VLAN"},
+ { 5, "Packet, IPv4 over IEEE 802.3/Ethernet"},
+ { 6, "Packet, IPv6 over IEEE 802.3/Ethernet"},
+ { 7, "Packet, IPv4 over IEEE 802.1Q VLAN"},
+ { 8, "Packet, IPv6 over IEEE 802.1Q VLAN"},
+ { 9, "ATM"},
+ {10, "Packet, IEEE 802.3/Ethernet with ROCH header compression"},
+ {11, "Packet, IEEE 802.3/Ethernet with ECRTP header compression"},
+ {12, "Packet, IP2 with ROCH header compression"},
+ {13, "Packet, IP2 with ECRTP header compression"},
+ {0, NULL}
+};
+
+static const value_string vals_type_of_data_delivery_services[] =
+{
+ {0, "Continuing grant service"},
+ {1, "Real time variable rate service"},
+ {2, "Non-real time variable rate service"},
+ {3, "Best-efforts service"},
+ {4, "Extended real-time variable rate service"},
+ {0, NULL}
+};
+
+static const value_string vals_paging_preference[] =
+{
+ {0, "No paging generation"},
+ {1, "Paging generation"},
+ {0, NULL}
+};
+static const value_string vals_pdu_sn_ext_subheader[] =
+{
+ {0, "No support for PDU SN in this connection (default)"},
+ {1, "PDU SN (short) extended Subheader"},
+ {2, "PDU SN (long) extended Subheader"},
+ {0, NULL}
+};
+
+static const value_string vals_cst_classifier_action[] =
+{
+ {0, "DSC Add Classifier"},
+ {1, "DSC Replace Classifier"},
+ {2, "DSC Delete Classifier"},
+ {0, NULL}
+};
+
+static const value_string vals_cst_phs_dsc_action[] =
+{
+ {0, "Add PHS rule"},
+ {1, "Set PHS rule"},
+ {2, "Delete PHS rule"},
+ {3, "Delete all PHS rules"},
+ {0, NULL}
+};
+
+static const value_string vals_verify[] =
+{
+ {0, "Verify"},
+ {1, "Don't verify"},
+ {0, NULL}
+};
+
+static const value_string vals_atm_switching_encodings[] =
+{
+ {0, "No switching methodology applied"},
+ {1, "VP switching"},
+ {2, "VC switching"},
+ {0, NULL}
+};
+
+static const value_string vals_cc[] =
+{
+ { 0, "OK/success"},
+ { 1, "Reject-other"},
+ { 2, "Reject-unrecognized-configuration-setting"},
+ { 3, "Reject-temporary / reject-resource"},
+ { 4, "Reject-permanent / reject-admin"},
+ { 5, "Reject-not-owner"},
+ { 6, "Reject-service-flow-not-found"},
+ { 7, "Reject-service-flow-exists"},
+ { 8, "Reject-required-parameter-not-present"},
+ { 9, "Reject-header-suppression"},
+ {10, "Reject-unknown-transaction-id"},
+ {11, "Reject-authentication-failure"},
+ {12, "Reject-add-aborted"},
+ {13, "Reject-exceeded-dynamic-service-limit"},
+ {14, "Reject-not-authorized-for-the-request-SAID"},
+ {15, "Reject-fail-to-establish-the-requested-SA"},
+ {16, "Reject-not-supported-parameter"},
+ {17, "Reject-not-supported-parameter-value"},
+ {0, NULL}
+};
+
+static const value_string vals_classification_action_rule[] =
+{
+ {0, "None"},
+ {1, "Discarded packet"},
+ {0, NULL}
+};
+
+static const true_false_string tfs_supported =
+{
+ "supported",
+ "not supported"
+};
+
+#if 0
+static const true_false_string disabled_enabled =
+{
+ "enabled",
+ "disabled"
+};
+#endif
+
+#if 0
+static const true_false_string default_enabled =
+{
+ "enabled",
+ "use default action"
+};
+#endif
+
+static const value_string vals_pkm_attr_error_codes[] =
+{ /* table 373 */
+ {0, "All (no information)"},
+ {1, "Auth Reject Auth Invalid (unauthorized SS)"},
+ {2, "Auth Reject, Key Reject (unauthorized SAID)"},
+ {3, "Auth Invalid (unsolicited)"},
+ {4, "Auth Invalid, TEK Invalid (invalid key sequence number)"},
+ {5, "Auth Invalid (message (key request) authorization failure)"},
+ {6, "Auth Reject (permanent authorization failure)"},
+ {0, NULL}
+};
+
+static const value_string vs_sa_type[] =
+{
+ {0, "Primary"},
+ {1, "Static"},
+ {2, "Dynamic"},
+ {0, NULL}
+};
+
+static const value_string va_key_push_modes[] =
+{
+ {0, "GKEK update mode"},
+ {1, "GTEK update mode"},
+ {0, NULL}
+};
+
+#if 0
+static const value_string vals_pkm_version[] =
+{
+ {0, "Reserved"},
+ {1, "PKM (Initial standard release"},
+ {0, NULL}
+};
+#endif
+
+static const value_string vs_success_reject[] =
+{
+ {0, "Success"},
+ {1, "Reject"},
+ {0, NULL}
+};
+
+static const value_string vs_sa_service_type[] =
+{
+ {0, "Unicast service"},
+ {1, "Group multicast service"},
+ {2, "MBS service"},
+ {0, NULL}
+};
+
+static const value_string vals_data_encryption_ids[] =
+{ /* table 375 */
+ {0, "No data encryption"},
+ {1, "CBC-Mode, 56-bit DES"},
+ {2, "CCM-Mode, 128-bit AES"},
+ {3, "CBC-Mode, 128-bit AES"},
+ {128, "CTR-Mode, 128-bit AES for MBS with 8 bit ROC"},
+ {0, NULL}
+};
+
+static const value_string vals_data_authentication_ids[] =
+{ /* table 376 */
+ {0, "No data authentication"},
+ {1, "CCM-Mode, 128-bit AES"},
+ {0, NULL}
+};
+
+static const value_string vals_tek_encryption_ids[] =
+{ /* table 377 */
+ {0, "No TEK encryption"},
+ {1, "3-DES EDE with 128-bit key"},
+ {2, "RSA with 1024-bit key"},
+ {3, "ECB mode AES with 128-bit key"},
+ {4, "AES key wrap with 128-bit key"},
+ {0, NULL}
+};
+
+static const value_string vals_dcd_mac_version[] =
+{
+ {1, "Conformance with IEEE Std 802.16-2001"},
+ {2, "Conformance with IEEE Std 802.16c-2002 and its predecessors"},
+ {3, "Conformance with IEEE Std 802.16a-2003 and its predecessors"},
+ {4, "Conformance with IEEE Std 802.16-2004"},
+ {5, "Conformance with IEEE Std 802.16-2004 and IEEE Std 802.16e-2005"},
+ {6, "reserved"},
+ {0, NULL}
+};
+
+/* fix fields */
+static gint hf_sfe_unknown_type = -1;
+static gint hf_sfe_sf_id = -1;
+static gint hf_sfe_cid = -1;
+static gint hf_sfe_service_class_name = -1;
+static gint hf_sfe_mbs_service = -1;
+static gint hf_sfe_qos_params_set = -1;
+static gint hf_sfe_set_provisioned = -1;
+static gint hf_sfe_set_admitted = -1;
+static gint hf_sfe_set_active = -1;
+static gint hf_sfe_set_rsvd = -1;
+static gint hf_sfe_traffic_priority = -1;
+static gint hf_sfe_max_str = -1;
+static gint hf_sfe_max_traffic_burst = -1;
+static gint hf_sfe_min_rtr = -1;
+static gint hf_sfe_reserved_10 = -1;
+static gint hf_sfe_ul_grant_scheduling = -1;
+static gint hf_sfe_req_tx_policy = -1;
+static gint hf_sfe_policy_broadcast_bwr = -1;
+static gint hf_sfe_policy_multicast_bwr = -1;
+static gint hf_sfe_policy_piggyback = -1;
+static gint hf_sfe_policy_fragment = -1;
+static gint hf_sfe_policy_headers = -1;
+static gint hf_sfe_policy_packing = -1;
+static gint hf_sfe_policy_crc = -1;
+static gint hf_sfe_policy_rsvd1 = -1;
+static gint hf_sfe_jitter = -1;
+static gint hf_sfe_max_latency = -1;
+static gint hf_sfe_fixed_len_sdu = -1;
+static gint hf_sfe_sdu_size = -1;
+static gint hf_sfe_target_said = -1;
+static gint hf_sfe_cs_specification = -1;
+static gint hf_sfe_type_of_data_delivery_services = -1;
+static gint hf_sfe_sdu_inter_arrival_interval = -1;
+static gint hf_sfe_time_base = -1;
+static gint hf_sfe_paging_preference = -1;
+static gint hf_sfe_mbs_zone_identifier_assignment = -1;
+static gint hf_sfe_sn_feedback_enabled = -1;
+static gint hf_sfe_harq_service_flows = -1;
+static gint hf_sfe_harq_channel_mapping_index = -1;
+static gint hf_sfe_fsn_size = -1;
+static gint hf_sfe_unsolicited_grant_interval = -1;
+static gint hf_sfe_unsolicited_polling_interval = -1;
+/* static gint hf_sfe_harq_channel_mapping = -1; */
+static gint hf_sfe_global_service_class_name = -1;
+static gint hf_sfe_reserved_36 = -1;
+static gint hf_sfe_reserved_34 = -1;
+
+static gint hf_sfe_arq_enable = -1;
+static gint hf_sfe_arq_transmitter_delay = -1;
+static gint hf_sfe_arq_receiver_delay = -1;
+static gint hf_sfe_arq_block_lifetime = -1;
+static gint hf_sfe_arq_sync_loss_timeout = -1;
+static gint hf_sfe_arq_transmitter_delay_cor2 = -1;
+static gint hf_sfe_arq_receiver_delay_cor2 = -1;
+static gint hf_sfe_arq_block_lifetime_cor2 = -1;
+static gint hf_sfe_arq_sync_loss_timeout_cor2 = -1;
+static gint hf_sfe_arq_deliver_in_order = -1;
+static gint hf_sfe_arq_rx_purge_timeout = -1;
+static gint hf_sfe_arq_window_size = -1;
+static gint hf_sfe_arq_block_size = -1;
+static gint hf_sfe_arq_block_size_cor2 = -1;
+static gint hf_sfe_arq_min_block_size = -1;
+static gint hf_sfe_arq_max_block_size = -1;
+
+/* static gint hf_sfe_cid_alloc_for_active_bs = -1; */
+static gint hf_sfe_cid_alloc_for_active_bs_cid = -1;
+static gint hf_sfe_pdu_sn_ext_subheader_reorder = -1;
+static gint hf_sfe_mbs_contents_ids = -1;
+static gint hf_sfe_mbs_contents_ids_id = -1;
+static gint hf_sfe_authorization_token = -1;
+
+static gint hf_cst_classifier_dsc_action = -1;
+static gint hf_cst_error_set_errored_param = -1;
+static gint hf_cst_error_set_error_code = -1;
+static gint hf_cst_error_set_error_msg = -1;
+
+static gint hf_cst_pkt_class_rule = -1;
+
+static gint hf_cst_pkt_class_rule_priority = -1;
+static gint hf_cst_pkt_class_rule_range_mask = -1;
+static gint hf_cst_pkt_class_rule_tos_low = -1;
+static gint hf_cst_pkt_class_rule_tos_high = -1;
+static gint hf_cst_pkt_class_rule_tos_mask = -1;
+static gint hf_cst_pkt_class_rule_protocol = -1;
+/*static gint hf_cst_pkt_class_rule_protocol_number = -1;*/
+static gint hf_cst_pkt_class_rule_ip_masked_src_address = -1;
+static gint hf_cst_pkt_class_rule_ip_masked_dest_address = -1;
+static gint hf_cst_pkt_class_rule_src_ipv4 = -1;
+static gint hf_cst_pkt_class_rule_dest_ipv4 = -1;
+static gint hf_cst_pkt_class_rule_mask_ipv4 = -1;
+static gint hf_cst_pkt_class_rule_src_ipv6 = -1;
+static gint hf_cst_pkt_class_rule_dest_ipv6 = -1;
+static gint hf_cst_pkt_class_rule_mask_ipv6 = -1;
+static gint hf_cst_pkt_class_rule_prot_src_port_range = -1;
+static gint hf_cst_pkt_class_rule_src_port_low = -1;
+static gint hf_cst_pkt_class_rule_src_port_high = -1;
+static gint hf_cst_pkt_class_rule_prot_dest_port_range = -1;
+static gint hf_cst_pkt_class_rule_dest_port_low = -1;
+static gint hf_cst_pkt_class_rule_dest_port_high = -1;
+static gint hf_cst_pkt_class_rule_dest_mac_address = -1;
+static gint hf_cst_pkt_class_rule_dest_mac = -1;
+static gint hf_cst_pkt_class_rule_src_mac_address = -1;
+static gint hf_cst_pkt_class_rule_src_mac = -1;
+static gint hf_cst_pkt_class_rule_mask_mac = -1;
+static gint hf_cst_pkt_class_rule_ethertype = -1;
+static gint hf_cst_pkt_class_rule_etype = -1;
+static gint hf_cst_pkt_class_rule_eprot1 = -1;
+static gint hf_cst_pkt_class_rule_eprot2 = -1;
+static gint hf_cst_pkt_class_rule_user_priority = -1;
+static gint hf_cst_pkt_class_rule_pri_low = -1;
+static gint hf_cst_pkt_class_rule_pri_high = -1;
+static gint hf_cst_pkt_class_rule_vlan_id = -1;
+static gint hf_cst_pkt_class_rule_vlan_id1 = -1;
+static gint hf_cst_pkt_class_rule_vlan_id2 = -1;
+static gint hf_cst_pkt_class_rule_phsi = -1;
+static gint hf_cst_pkt_class_rule_index = -1;
+static gint hf_cst_pkt_class_rule_ipv6_flow_label = -1;
+static gint hf_cst_pkt_class_rule_vendor_spec = -1;
+static gint hf_cst_pkt_class_rule_classifier_action_rule = -1;
+static gint hf_cst_pkt_class_rule_classifier_action_rule_bit0 = -1;
+static gint hf_cst_pkt_class_rule_classifier_action_rule_bit1 = -1;
+
+static gint hf_cst_large_context_id = -1;
+static gint hf_cst_short_format_context_id = -1;
+
+static gint hf_cst_phs_dsc_action = -1;
+static gint hf_cst_phs_rule = -1;
+static gint hf_cst_phs_phsi = -1;
+static gint hf_cst_phs_phsf = -1;
+static gint hf_cst_phs_phsm = -1;
+static gint hf_cst_phs_phss = -1;
+static gint hf_cst_phs_phsv = -1;
+static gint hf_cst_phs_vendor_spec = -1;
+static gint hf_cst_invalid_tlv = -1;
+
+static gint hf_csper_atm_switching_encoding = -1;
+static gint hf_csper_atm_classifier = -1;
+static gint hf_csper_atm_classifier_vpi = -1;
+static gint hf_csper_atm_classifier_vci = -1;
+static gint hf_csper_atm_classifier_id = -1;
+/*static gint hf_csper_atm_classifier_dsc_action = -1;*/
+static gint hf_csper_unknown_type = -1;
+
+static gint hf_xmac_tuple_rsvd = -1;
+static gint hf_xmac_tuple_key_seq_num = -1;
+static gint hf_hmac_tuple_hmac_digest = -1;
+static gint hf_packet_number_counter = -1;
+static gint hf_cmac_tuple_cmac_value = -1;
+static gint hf_cmac_tuple_bsid = -1;
+
+/* bit masks */
+/* 11.13.4 */
+#define SFE_QOS_PARAMS_SET_PROVISIONED_SET 0x01
+#define SFE_QOS_PARAMS_SET_ADMITTED_SET 0x02
+#define SFE_QOS_PARAMS_SET_ACTIVE_SET 0x04
+#define SFE_QOS_PARAMS_SET_RESERVED 0xF8
+/* 11.13.12 */
+#define SFE_REQ_TX_POLICY_BROADCAST_BWR 0x01
+#define SFE_REQ_TX_POLICY_MULTICAST_BWR 0x02
+#define SFE_REQ_TX_POLICY_PIGGYBACK 0x04
+#define SFE_REQ_TX_POLICY_FRAGMENT_DATA 0x08
+#define SFE_REQ_TX_POLICY_PAYLOAD_HEADER 0x10
+#define SFE_REQ_TX_POLICY_PACKINGS 0x20
+#define SFE_REQ_TX_POLICY_CRC 0x40
+#define SFE_REQ_TX_POLICY_RESERVED 0x80
+
+/* bit masks */
+/* 11.13.19.3.4.17 */
+#define CST_PKT_CLASS_RULE_CLASSIFIER_ACTION_RULE_BIT0 0x80
+#define CST_PKT_CLASS_RULE_CLASSIFIER_ACTION_RULE_RSV 0x7F
+
+/* bit masks */
+/* 11.1.2 (table 348) */
+#define XMAC_TUPLE_RESERVED 0xF0
+#define XMAC_TUPLE_KEY_SEQ_NUM 0x0F
+
+/* WiMax Security Negotiation Parameters display */
+static gint hf_snp_pkm_version_support = -1;
+static gint hf_snp_pkm_version_support_bit0 = -1;
+static gint hf_snp_pkm_version_support_bit1 = -1;
+static gint hf_snp_pkm_version_support_reserved = -1;
+static gint hf_snp_auth_policy_support = -1;
+static gint hf_snp_auth_policy_support_bit0 = -1;
+static gint hf_snp_auth_policy_support_bit1 = -1;
+static gint hf_snp_auth_policy_support_bit2 = -1;
+static gint hf_snp_auth_policy_support_bit3 = -1;
+static gint hf_snp_auth_policy_support_bit4 = -1;
+static gint hf_snp_auth_policy_support_bit5 = -1;
+static gint hf_snp_auth_policy_support_bit6 = -1;
+static gint hf_snp_auth_policy_support_bit7 = -1;
+static gint hf_snp_mac_mode = -1;
+static gint hf_snp_mac_mode_bit0 = -1;
+static gint hf_snp_mac_mode_bit1 = -1;
+static gint hf_snp_mac_mode_bit1_rsvd = -1;
+static gint hf_snp_mac_mode_bit2 = -1;
+static gint hf_snp_mac_mode_bit3 = -1;
+static gint hf_snp_mac_mode_bit4 = -1;
+static gint hf_snp_mac_mode_bit5 = -1;
+static gint hf_snp_mac_mode_reserved = -1;
+static gint hf_snp_mac_mode_reserved1 = -1;
+static gint hf_snp_pn_window_size = -1;
+static gint hf_snp_max_conc_transactions = -1;
+static gint hf_snp_max_suppt_sec_assns = -1;
+static gint hf_snp_unknown_type = -1;
+
+/* bit masks */
+/* 11.8.4.1 */
+#define SNP_PKM_VERSION_SUPPORT_BIT0 0x01
+#define SNP_PKM_VERSION_SUPPORT_BIT1 0x02
+#define SNP_PKM_VERSION_SUPPORT_RSV 0xFC
+/* 11.8.4.2 */
+#define SNP_AUTH_POLICY_SUPPORT_BIT0 0x01
+#define SNP_AUTH_POLICY_SUPPORT_BIT1 0x02
+#define SNP_AUTH_POLICY_SUPPORT_BIT2 0x04
+#define SNP_AUTH_POLICY_SUPPORT_BIT3 0x08
+#define SNP_AUTH_POLICY_SUPPORT_BIT4 0x10
+#define SNP_AUTH_POLICY_SUPPORT_BIT5 0x20
+#define SNP_AUTH_POLICY_SUPPORT_BIT6 0x40
+#define SNP_AUTH_POLICY_SUPPORT_BIT7 0x80
+/* 11.8.4.3 */
+#define SNP_MAC_MODE_BIT0 0x01
+#define SNP_MAC_MODE_BIT1 0x02
+#define SNP_MAC_MODE_BIT2 0x04
+#define SNP_MAC_MODE_BIT3 0x08
+#define SNP_MAC_MODE_BIT4 0x10
+#define SNP_MAC_MODE_BIT5 0x20
+#define SNP_MAC_MODE_RSV 0xE0
+#define SNP_MAC_MODE_RSV1 0xC0
+
+/* PKM display */
+static gint hf_pkm_msg_unknown_type = -1;
+static gint hf_pkm_msg_attr_display = -1;
+static gint hf_pkm_config_settings_authorize_waitout = -1;
+static gint hf_pkm_config_settings_reauthorize_waitout = -1;
+static gint hf_pkm_config_settings_grace_time = -1;
+static gint hf_pkm_config_settings_operational_waittime = -1;
+static gint hf_pkm_msg_attr_auth_key = -1;
+static gint hf_pkm_msg_attr_tek = -1;
+static gint hf_pkm_msg_attr_key_life_time = -1;
+static gint hf_pkm_msg_attr_key_seq_num = -1;
+static gint hf_pkm_msg_attr_hmac_digest = -1;
+static gint hf_pkm_msg_attr_said = -1;
+static gint hf_pkm_msg_attr_cbc_iv = -1;
+static gint hf_pkm_msg_attr_error_code = -1;
+static gint hf_pkm_msg_attr_ca_certificate = -1;
+static gint hf_pkm_msg_attr_ss_certificate = -1;
+static gint hf_pkm_attr_auth_result_code = -1;
+static gint hf_pkm_attr_sa_service_type = -1;
+static gint hf_pkm_attr_frame_number = -1;
+static gint hf_pkm_attr_ss_random = -1;
+static gint hf_pkm_attr_bs_random = -1;
+static gint hf_pkm_attr_pre_pak = -1;
+static gint hf_pkm_attr_bs_certificate = -1;
+static gint hf_pkm_attr_sig_bs = -1;
+static gint hf_pkm_attr_ms_mac_address = -1;
+static gint hf_pkm_attr_cmac_digest = -1;
+static gint hf_pkm_attr_cmac_digest_pn = -1;
+static gint hf_pkm_attr_cmac_digest_value = -1;
+static gint hf_pkm_attr_eap_payload = -1;
+static gint hf_pkm_attr_nonce = -1;
+static gint hf_pkm_sa_type = -1;
+static gint hf_pkm_msg_crypto_suite = -1;
+static gint hf_pkm_msg_crypto_suite_msb = -1;
+static gint hf_pkm_msg_crypto_suite_middle = -1;
+static gint hf_pkm_msg_crypto_suite_lsb = -1;
+/*static gint hf_pkm_msg_version = -1;*/
+static gint hf_pkm_attr_push_modes = -1;
+static gint hf_pkm_attr_key_push_counter = -1;
+static gint hf_pkm_attr_gkek = -1;
+static gint hf_pkm_attr_sig_ss = -1;
+static gint hf_pkm_attr_akid = -1;
+static gint hf_pkm_config_settings_rekey_wait_timeout = -1;
+static gint hf_pkm_config_settings_tek_grace_time = -1;
+static gint hf_pkm_config_settings_authorize_reject_wait_timeout = -1;
+
+/* static gint hf_pkm_attr_pak_ak_seq_number = -1; */
+static gint hf_pkm_attr_associated_gkek_seq_number = -1;
+/* static gint hf_pkm_attr_gkek_params = -1; */
+
+/* static gint hf_common_tlv_unknown_type = -1; */
+static gint hf_common_tlv_mac_version = -1;
+static gint hf_common_tlv_vendor_id = -1;
+static gint hf_common_tlv_vendor_specific_type = -1;
+static gint hf_common_tlv_vendor_specific_length = -1;
+static gint hf_common_tlv_vendor_specific_length_size = -1;
+static gint hf_common_tlv_vendor_specific_value = -1;
+static gint hf_common_current_transmitted_power = -1;
+
+static expert_field ei_common_tlv_info = EI_INIT;
+
+/* Register WiMax Utility Routines */
+void wimax_proto_register_wimax_utility_decoders(void)
+{
+ /* WiMax Service Flow Encodings display */
+ static hf_register_info hf_sfe[] =
+ {
+ { /* 1 Service Flow ID */
+ &hf_sfe_sf_id,
+ {"Service Flow ID", "wmx.sfe.sf_id", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 2 CID */
+ &hf_sfe_cid,
+ {"CID", "wmx.sfe.cid", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 3 Service Class Name */
+ &hf_sfe_service_class_name,
+ {"Service Class Name", "wmx.sfe.service_class_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 4 MBS Service */
+ &hf_sfe_mbs_service,
+ {"MBS Service", "wmx.sfe.mbs_service", FT_UINT8, BASE_DEC, VALS(vals_mbs_service), 0x0, NULL, HFILL}
+ },
+ { /* 5 QoS Parameter Set Type */
+ &hf_sfe_qos_params_set,
+ {"QoS Parameter Set Type", "wmx.sfe.qos_params_set", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 5.1 */
+ &hf_sfe_set_provisioned,
+ {"Provisioned Set", "wmx.sfe.qos_params_set.provisioned", FT_BOOLEAN, 8, NULL, SFE_QOS_PARAMS_SET_PROVISIONED_SET, NULL, HFILL}
+ },
+ { /* 5.2 */
+ &hf_sfe_set_admitted,
+ {"Admitted Set", "wmx.sfe.qos_params_set.admitted", FT_BOOLEAN, 8, NULL, SFE_QOS_PARAMS_SET_ADMITTED_SET, NULL, HFILL}
+ },
+ { /* 5.3 */
+ &hf_sfe_set_active,
+ {"Active Set", "wmx.sfe.qos_params_set.active", FT_BOOLEAN, 8, NULL, SFE_QOS_PARAMS_SET_ACTIVE_SET, NULL, HFILL}
+ },
+ { /* 5.4 */
+ &hf_sfe_set_rsvd,
+ {"Reserved", "wmx.sfe.qos_params_set.rsvd", FT_UINT8, BASE_HEX, NULL, SFE_QOS_PARAMS_SET_RESERVED, NULL, HFILL}
+ },
+ { /* 6 Traffic Priority */
+ &hf_sfe_traffic_priority,
+ {"Traffic Priority", "wmx.sfe.traffic_priority", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 7 Maximum Sustained Traffic Rate */
+ &hf_sfe_max_str,
+ {"Maximum Sustained Traffic Rate", "wmx.sfe.msr", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_bit_sec, 0x0, NULL, HFILL}
+ },
+ { /* 8 Maximum Traffic Burst */
+ &hf_sfe_max_traffic_burst,
+ {"Maximum Traffic Burst", "wmx.sfe.max_traffic_burst", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_byte_bytes, 0x0, NULL, HFILL}
+ },
+ { /* 9 Minimum Reserved Traffic Rate */
+ &hf_sfe_min_rtr,
+ {"Minimum Reserved Traffic Rate", "wmx.sfe.mrr", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_bit_sec, 0x0, NULL, HFILL}
+ },
+ {
+ /* 10 Reserved */
+ &hf_sfe_reserved_10,
+ {"Reserved", "wmx.sfe.reserved_10", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+#if 0
+ { /* 10 reserved by 16E */
+ &hf_sfe_mtr,
+ {"Minimum tolerable traffic rate", "wmx.sfe.mtr", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL}
+ },
+#endif
+ { /* 11 Service Flow Scheduling Type */
+ &hf_sfe_ul_grant_scheduling,
+ {"Uplink Grant Scheduling Type", "wmx.sfe.uplink_grant_scheduling", FT_UINT8, BASE_DEC, VALS(vals_ul_grant_scheduling), 0x0, NULL, HFILL}
+ },
+ { /* 12 Request/Transmission Policy */
+ &hf_sfe_req_tx_policy,
+ {"Request/Transmission Policy", "wmx.sfe.req_tx_policy", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 12.1 */
+ &hf_sfe_policy_broadcast_bwr,
+ {"The Service Flow Shall Not Use Broadcast Bandwidth Request Opportunities", "wmx.sfe.policy.broadcast_bwr", FT_BOOLEAN, 8, NULL, SFE_REQ_TX_POLICY_BROADCAST_BWR, NULL, HFILL}
+ },
+ { /* 12.2 */
+ &hf_sfe_policy_multicast_bwr,
+ {"The Service Flow Shall Not Use Multicast Bandwidth Request Opportunities", "wmx.sfe.policy.bit1", FT_BOOLEAN, 8, NULL, SFE_REQ_TX_POLICY_MULTICAST_BWR, NULL, HFILL}
+ },
+ { /* 12.3 */
+ &hf_sfe_policy_piggyback,
+ {"The Service Flow Shall Not Piggyback Requests With Data", "wmx.sfe.policy.piggyback", FT_BOOLEAN, 8, NULL, SFE_REQ_TX_POLICY_PIGGYBACK, NULL, HFILL}
+ },
+ { /* 12.4 */
+ &hf_sfe_policy_fragment,
+ {"The Service Flow Shall Not Fragment Data", "wmx.sfe.policy.fragment", FT_BOOLEAN, 8, NULL, SFE_REQ_TX_POLICY_FRAGMENT_DATA, NULL, HFILL}
+ },
+ { /* 12.5 */
+ &hf_sfe_policy_headers,
+ {"The Service Flow Shall Not Suppress Payload Headers", "wmx.sfe.policy.headers", FT_BOOLEAN, 8, NULL, SFE_REQ_TX_POLICY_PAYLOAD_HEADER, NULL, HFILL}
+ },
+ { /* 12.6 */
+ &hf_sfe_policy_packing,
+ {"The Service Flow Shall Not Pack Multiple SDUs (Or Fragments) Into Single MAC PDUs", "wmx.sfe.policy.packing", FT_BOOLEAN, 8, NULL, SFE_REQ_TX_POLICY_PACKINGS, NULL, HFILL}
+ },
+ { /* 12.7 */
+ &hf_sfe_policy_crc,
+ {"The Service Flow Shall Not Include CRC In The MAC PDU", "wmx.sfe.policy.crc", FT_BOOLEAN, 8, NULL, SFE_REQ_TX_POLICY_CRC, NULL, HFILL}
+ },
+ { /* 12.8 */
+ &hf_sfe_policy_rsvd1,
+ {"Reserved", "wmx.sfe.policy.rsvd1", FT_UINT8, BASE_HEX, NULL, SFE_REQ_TX_POLICY_RESERVED, NULL, HFILL}
+ },
+ { /* 13 Tolerated Jitter */
+ &hf_sfe_jitter,
+ {"Tolerated Jitter", "wmx.sfe.jitter", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_ms, 0x0, NULL, HFILL}
+ },
+ { /* 14 Maximum Latency */
+ &hf_sfe_max_latency,
+ {"Maximum Latency", "wmx.sfe.max_latency", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_ms, 0x0, NULL, HFILL}
+ },
+ { /* 15 Fixed/Variable Length SDU */
+ &hf_sfe_fixed_len_sdu,
+ {"Fixed/Variable Length SDU", "wmx.sfe.fixed_len_sdu", FT_UINT8, BASE_DEC, VALS(vals_fixed_len_sdu), 0x0, NULL, HFILL}
+ },
+ { /* 16 SDU Size */
+ &hf_sfe_sdu_size,
+ {"SDU Size", "wmx.sfe.sdu_size", FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_byte_bytes, 0x0, NULL, HFILL}
+ },
+ { /* 17 SAID Onto Which SF Is Mapped */
+ &hf_sfe_target_said,
+ {"SAID Onto Which SF Is Mapped", "wmx.sfe.target_said", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 18 ARQ Enable */
+ &hf_sfe_arq_enable,
+ {"ARQ Enable", "wmx.arq.enable", FT_UINT8, BASE_DEC, VALS(vals_arq_enable), 0x0, NULL, HFILL}
+ },
+ { /* 19 ARQ Window Size */
+ &hf_sfe_arq_window_size,
+ {"ARQ Window Size", "wmx.arq.window_size", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 20 ARQ Transmitter Delay */
+ &hf_sfe_arq_transmitter_delay,
+ {"ARQ Transmitter Delay (10us granularity)", "wmx.arq.transmitter_delay", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 21 ARQ Receiver Delay */
+ &hf_sfe_arq_receiver_delay,
+ {"ARQ Receiver Delay (10us granularity)", "wmx.arq.receiver_delay", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 22 ARQ Block Lifetime */
+ &hf_sfe_arq_block_lifetime,
+ {"ARQ Block Lifetime (10us granularity)", "wmx.arq.block_lifetime", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 23 ARQ Sync Loss Timeout */
+ &hf_sfe_arq_sync_loss_timeout,
+ {"ARQ Sync Loss Timeout (10us granularity)", "wmx.arq.sync_loss_timeout", FT_UINT16, BASE_DEC, VALS(vals_arq_sync_loss_timeout), 0x0, NULL, HFILL}
+ },
+ { /* 20 ARQ Transmitter Delay */
+ &hf_sfe_arq_transmitter_delay_cor2,
+ {"ARQ Transmitter Delay (100us granularity)", "wmx.arq.transmitter_delay", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 21 ARQ Receiver Delay */
+ &hf_sfe_arq_receiver_delay_cor2,
+ {"ARQ Receiver Delay (100us granularity)", "wmx.arq.receiver_delay", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 22 ARQ Block Lifetime */
+ &hf_sfe_arq_block_lifetime_cor2,
+ {"ARQ Block Lifetime (100us granularity)", "wmx.arq.block_lifetime", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 23 ARQ Sync Loss Timeout */
+ &hf_sfe_arq_sync_loss_timeout_cor2,
+ {"ARQ Sync Loss Timeout (100us granularity)", "wmx.arq.sync_loss_timeout", FT_UINT16, BASE_DEC, VALS(vals_arq_sync_loss_timeout), 0x0, NULL, HFILL}
+ },
+ { /* 24 ARQ Deliver In Order */
+ &hf_sfe_arq_deliver_in_order,
+ {"ARQ Deliver In Order", "wmx.arq.deliver_in_order", FT_UINT8, BASE_DEC, VALS(vals_arq_deliver_in_order), 0x0, NULL, HFILL}
+ },
+ { /* 25 ARQ Purge Timeout */
+ &hf_sfe_arq_rx_purge_timeout,
+ {"ARQ RX Purge Timeout (100us granularity)", "wmx.arq.rx_purge_timeout", FT_UINT16, BASE_DEC, VALS(vals_arq_rx_purge_timeout), 0x0, NULL, HFILL}
+ },
+ { /* 26 ARQ Block Size */
+ &hf_sfe_arq_block_size,
+ {"ARQ Block Size", "wmx.arq.block_size", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 26 ARQ Block Size */
+ &hf_sfe_arq_block_size_cor2,
+ {"ARQ Block Size", "wmx.arq.block_size", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 26 ARQ Block Size for Corrigendum 2 */
+ &hf_sfe_arq_min_block_size,
+ {"ARQ Minimum Block Size", "wmx.arq.min_block_size", FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL}
+ },
+ { /* 26 ARQ Block Size for Corrigendum 2 */
+ &hf_sfe_arq_max_block_size,
+ {"ARQ Maximum Block Size", "wmx.arq.max_block_size", FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL}
+ },
+ /* 27 reserved */
+ { /* 28 CS Specification */
+ &hf_sfe_cs_specification,
+ {"CS Specification", "wmx.sfe.cs_specification", FT_UINT8, BASE_DEC, VALS(vals_cs_specification), 0x0, NULL, HFILL}
+ },
+ { /* 29 Type of Data Delivery Services */
+ &hf_sfe_type_of_data_delivery_services,
+ {"Type of Data Delivery Services", "wmx.sfe.type_of_data_delivery_services", FT_UINT8, BASE_DEC, VALS(vals_type_of_data_delivery_services), 0x0, NULL, HFILL}
+ },
+ { /* 30 SDU Inter-Arrival Interval */
+ &hf_sfe_sdu_inter_arrival_interval,
+ {"SDU Inter-Arrival Interval (in the resolution of 0.5 ms)", "wmx.sfe.sdu_inter_arrival_interval", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 31 Time Base */
+ &hf_sfe_time_base,
+ {"Time Base", "wmx.sfe.time_base", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_ms, 0x0, NULL, HFILL}
+ },
+ { /* 32 Paging Preference */
+ &hf_sfe_paging_preference,
+ {"Paging Preference", "wmx.sfe.paging_preference", FT_UINT8, BASE_DEC, VALS(vals_paging_preference), 0x0, NULL, HFILL}
+ },
+ { /* 33 MBS Zone Identifier */
+ &hf_sfe_mbs_zone_identifier_assignment,
+ {"MBS Zone Identifier", "wmx.sfe.mbs_zone_identifier", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 34 Traffic Indication Preference */
+ &hf_sfe_reserved_34,
+ {"Reserved", "wmx.sfe.reserved_34", FT_UINT8, BASE_DEC, NULL /*VALS(vals_traffic_indication_preference)*/, 0x0, NULL, HFILL}
+ },
+ { /* 35 Global Service Class Name */
+ &hf_sfe_global_service_class_name,
+ {"Global Service Class Name", "wmx.sfe.global_service_class_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ /* 36 reserved by 16E */
+ /* 36 Reserved */
+ {
+ &hf_sfe_reserved_36,
+ {"Reserved", "wmx.sfe.reserved_36", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 37 SN Feedback Enable */
+ &hf_sfe_sn_feedback_enabled,
+ {"SN Feedback", "wmx.sfe.sn_feedback_enabled", FT_UINT8, BASE_DEC, VALS(vals_sn_fb_enable), 0x0, NULL, HFILL}
+ },
+ { /* 38 FSN Size */
+ &hf_sfe_fsn_size,
+ {"FSN Size", "wmx.sfe.fsn_size", FT_UINT8, BASE_DEC, VALS(vals_fsn_size), 0x0, NULL, HFILL}
+ },
+#if 0
+ { /* 39 CID allocation for Active BSs */
+ &hf_sfe_cid_alloc_for_active_bs,
+ {"CID Allocation For Active BSs", "wmx.sfe.cid_alloc_for_active_bs", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+#endif
+ { /* 39.1 */
+ &hf_sfe_cid_alloc_for_active_bs_cid,
+ {"CID", "wmx.sfe.cid_alloc_for_active_bs_cid", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 40 Unsolicited Grant Interval */
+ &hf_sfe_unsolicited_grant_interval,
+ {"Unsolicited Grant Interval", "wmx.sfe.unsolicited_grant_interval", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_ms, 0x0, NULL, HFILL}
+ },
+ { /* 41 Unsolicited Polling Interval */
+ &hf_sfe_unsolicited_polling_interval,
+ {"Unsolicited Polling Interval", "wmx.sfe.unsolicited_polling_interval", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_ms, 0x0, NULL, HFILL}
+ },
+ { /* 42 PDU SN extended subheader for HARQ reordering */
+ &hf_sfe_pdu_sn_ext_subheader_reorder,
+ {"PDU SN Extended Subheader For HARQ Reordering", "wmx.sfe.pdu_sn_ext_subheader_reorder", FT_UINT8, BASE_DEC, VALS(vals_pdu_sn_ext_subheader), 0x0, NULL, HFILL}
+ },
+ { /* 43 MBS contents ID */
+ &hf_sfe_mbs_contents_ids,
+ {"MBS contents IDs", "wmx.sfe.mbs_contents_ids", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 43.1 */
+ &hf_sfe_mbs_contents_ids_id,
+ {"MBS Contents ID", "wmx.sfe.mbs_contents_ids_id", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 44 HARQ Service Flows */
+ &hf_sfe_harq_service_flows,
+ {"HARQ Service Flows", "wmx.sfe.harq_service_flows", FT_UINT8, BASE_DEC, VALS(vals_harq), 0x0, NULL, HFILL}
+ },
+ { /* 45 Authorization Token */
+ &hf_sfe_authorization_token,
+ {"Authorization Token", "wmx.sfe.authorization_token", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+#if 0
+ { /* 46 HARQ Channel Mapping */
+ &hf_sfe_harq_channel_mapping,
+ {"HARQ Channel Mapping", "wmx.sfe.harq_channel_mapping", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+#endif
+ { /* 46.1 HARQ Channel Index*/
+ &hf_sfe_harq_channel_mapping_index,
+ {"HARQ Channel Index", "wmx.sfe.harq_channel_mapping.index", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ /* unknown types */
+ { /* unknown SFE types */
+ &hf_sfe_unknown_type,
+ {"Unknown SFE TLV type", "wmx.sfe.unknown_type", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ }
+ };
+
+ /* WiMax Convergence Service Parameter Encoding Rules display */
+ static hf_register_info hf_csper[] =
+ { /* 99 - 111 CS parameter encoding rules */
+ { /* Classifier DSC Action */
+ &hf_cst_classifier_dsc_action,
+ {"Classifier DSC Action", "wmx.cst.classifier_action", FT_UINT8, BASE_DEC, VALS(vals_cst_classifier_action), 0x0, NULL, HFILL}
+ },
+ { /* Errored Parameter */
+ &hf_cst_error_set_errored_param,
+ {"Errored Parameter", "wmx.cst.error_set.errored_param", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Error Code */
+ &hf_cst_error_set_error_code,
+ {"Error Code", "wmx.cst.error_set.error_code", FT_UINT8, BASE_HEX, VALS(vals_cc), 0x0, NULL, HFILL}
+ },
+ { /* Error Message */
+ &hf_cst_error_set_error_msg,
+ {"Error Message", "wmx.cst.error_set.error_msg", FT_STRINGZ, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Packet Classification Rule */
+ &hf_cst_pkt_class_rule,
+ {"Packet Classification Rule", "wmx.cst.pkt_class_rule", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Classification Rule Priority */
+ &hf_cst_pkt_class_rule_priority,
+ {"Classification Rule Priority", "wmx.cst.pkt_class_rule.priority", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* ToS/Differentiated Services Codepoint (DSCP) Range And Mask */
+ &hf_cst_pkt_class_rule_range_mask,
+ {"ToS/Differentiated Services Codepoint (DSCP) Range And Mask", "wmx.cst.pkt_class_rule.range_mask", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* ToS-Low */
+ &hf_cst_pkt_class_rule_tos_low,
+ {"ToS-Low", "wmx.cst.pkt_class_rule.tos-low", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ { /* ToS-High */
+ &hf_cst_pkt_class_rule_tos_high,
+ {"ToS-High", "wmx.cst.pkt_class_rule.tos-high", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ { /* ToS-Mask */
+ &hf_cst_pkt_class_rule_tos_mask,
+ {"ToS-Mask", "wmx.cst.pkt_class_rule.tos-mask", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Protocol */
+ &hf_cst_pkt_class_rule_protocol,
+ {"Protocol", "wmx.cst.pkt_class_rule.protocol", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+#if 0 /* Removed by the changes of 802.16E 2005 */
+ { /* Protocol */
+ &hf_cst_pkt_class_rule_protocol,
+ {"Protocol", "wmx.cst.pkt_class_rule.protocol", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL}
+ },
+ { /* Protocol Number */
+ &hf_cst_pkt_class_rule_protocol_number,
+ {"Protocol Number", "wmx.cst.pkt_class_rule.protocol.number", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL}
+ },
+#endif
+ { /* IP Masked Source Address */
+ &hf_cst_pkt_class_rule_ip_masked_src_address,
+ {"IP Masked Source Address", "wmx.cst.pkt_class_rule.ip_masked_src_address", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* IP Masked Destination Address */
+ &hf_cst_pkt_class_rule_ip_masked_dest_address,
+ {"IP Masked Destination Address", "wmx.cst.pkt_class_rule.ip_masked_dest_address", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* IPv4 Source Address */
+ &hf_cst_pkt_class_rule_src_ipv4,
+ {"IPv4 Source Address", "wmx.cst.pkt_class_rule.src_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* IPv4 Destination Address */
+ &hf_cst_pkt_class_rule_dest_ipv4,
+ {"IPv4 Destination Address", "wmx.cst.pkt_class_rule.dst_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* IPv4 Mask */
+ &hf_cst_pkt_class_rule_mask_ipv4,
+ {"IPv4 Mask", "wmx.cst.pkt_class_rule.mask_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* IPv6 Source Address */
+ &hf_cst_pkt_class_rule_src_ipv6,
+ {"IPv6 Source Address", "wmx.cst.pkt_class_rule.src_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* IPv6 Destination Address */
+ &hf_cst_pkt_class_rule_dest_ipv6,
+ {"IPv6 Destination Address", "wmx.cst.pkt_class_rule.dst_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* IPv6 Mask */
+ &hf_cst_pkt_class_rule_mask_ipv6,
+ {"IPv6 Mask", "wmx.cst.pkt_class_rule.mask_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Protocol Source Port Range */
+ &hf_cst_pkt_class_rule_prot_src_port_range,
+ {"Protocol Source Port Range", "wmx.cst.pkt_class_rule.prot_src_port_range", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Src-Port Low */
+ &hf_cst_pkt_class_rule_src_port_low,
+ {"Src-Port Low", "wmx.cst.pkt_class_rule.src_port_low", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Src-Port High */
+ &hf_cst_pkt_class_rule_src_port_high,
+ {"Src-Port High", "wmx.cst.pkt_class_rule.src_port_high", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Protocol Destination Port Range */
+ &hf_cst_pkt_class_rule_prot_dest_port_range,
+ {"Protocol Destination Port Range", "wmx.cst.pkt_class_rule.prot_dest_port_range", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Dst-Port Low */
+ &hf_cst_pkt_class_rule_dest_port_low,
+ {"Dst-Port Low", "wmx.cst.pkt_class_rule.dst_port_low", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Dst-Port High */
+ &hf_cst_pkt_class_rule_dest_port_high,
+ {"Dst-Port High", "wmx.cst.pkt_class_rule.dst_port_high", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 802.3/Ethernet Destination MAC Address */
+ &hf_cst_pkt_class_rule_dest_mac_address,
+ {"802.3/Ethernet Destination MAC Address", "wmx.cst.pkt_class_rule.dest_mac_address", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Destination MAC Address */
+ &hf_cst_pkt_class_rule_dest_mac,
+ {"Destination MAC Address", "wmx.cst.pkt_class_rule.dst_mac", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 802.3/Ethernet Source MAC Address */
+ &hf_cst_pkt_class_rule_src_mac_address,
+ {"802.3/Ethernet Source MAC Address", "wmx.cst.pkt_class_rule.src_mac_address", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Source MAC Address */
+ &hf_cst_pkt_class_rule_src_mac,
+ {"Source MAC Address", "wmx.cst.pkt_class_rule.src_mac", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* MAC Address Mask */
+ &hf_cst_pkt_class_rule_mask_mac,
+ {"MAC Address Mask", "wmx.cst.pkt_class_rule.mask_mac", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Ethertype/IEEE Std 802.2-1998 SAP */
+ &hf_cst_pkt_class_rule_ethertype,
+ {"Ethertype/IEEE Std 802.2-1998 SAP", "wmx.cst.pkt_class_rule.ethertype", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Ethertype */
+ &hf_cst_pkt_class_rule_etype,
+ {"Ethertype", "wmx.cst.pkt_class_rule.etype", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Eprot1 */
+ &hf_cst_pkt_class_rule_eprot1,
+ {"Eprot1", "wmx.cst.pkt_class_rule.eprot1", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Eprot2 */
+ &hf_cst_pkt_class_rule_eprot2,
+ {"Eprot2", "wmx.cst.pkt_class_rule.eprot2", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ { /* IEEE Std 802.1D-1998 User_Priority */
+ &hf_cst_pkt_class_rule_user_priority,
+ {"IEEE Std 802.1D-1998 User_Priority", "wmx.cst.pkt_class_rule.user_priority", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_cst_pkt_class_rule_pri_low,
+ {"Pri-Low", "wmx.cst.pkt_class_rule.pri-low", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_cst_pkt_class_rule_pri_high,
+ {"Pri-High", "wmx.cst.pkt_class_rule.pri-high", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* IEEE Std 802.1Q-1998 VLAN_ID */
+ &hf_cst_pkt_class_rule_vlan_id,
+ {"IEEE Std 802.1Q-1998 VLAN_ID", "wmx.cst.pkt_class_rule.vlan_id", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Vlan_Id1 */
+ &hf_cst_pkt_class_rule_vlan_id1,
+ {"Vlan_Id1", "wmx.cst.pkt_class_rule.vlan_id1", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Vlan_Id2 */
+ &hf_cst_pkt_class_rule_vlan_id2,
+ {"Vlan_Id2", "wmx.cst.pkt_class_rule.vlan_id2", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Associated PHSI */
+ &hf_cst_pkt_class_rule_phsi,
+ {"Associated PHSI", "wmx.cst.pkt_class_rule.phsi", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Packet Classifier Rule Index */
+ &hf_cst_pkt_class_rule_index,
+ {"Packet Classifier Rule Index (PCRI)", "wmx.cst.pkt_class_rule.index", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Large Context ID for ROHC/ECRTP Compressed Packet or ROHC Feedback Packet */
+ &hf_cst_large_context_id,
+ {"Large Context ID", "wmx.cst.large_context_id", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Short-Format Context ID for ROHC/ECRTP Compressed Packet or ROHC Feedback Packet */
+ &hf_cst_short_format_context_id,
+ {"Short-Format Context ID", "wmx.cst.short_format_context_id", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Vendor-Specific Classifier Parameters */
+ &hf_cst_pkt_class_rule_vendor_spec,
+ {"Vendor-Specific Classifier Parameters", "wmx.cst.pkt_class_rule.vendor_spec", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* Classifier Action Rule */
+ &hf_cst_pkt_class_rule_classifier_action_rule,
+ {"Classifier Action Rule", "wmx.cst.pkt_class_rule.classifier.action.rule", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_cst_pkt_class_rule_classifier_action_rule_bit0,
+ {"Bit #0", "wmx.cst.pkt_class_rule.classifier.action.rule.bit0", FT_UINT8, BASE_HEX, VALS(vals_classification_action_rule), CST_PKT_CLASS_RULE_CLASSIFIER_ACTION_RULE_BIT0, NULL, HFILL}
+ },
+ {
+ &hf_cst_pkt_class_rule_classifier_action_rule_bit1,
+ {"Reserved", "wmx.cst.pkt_class_rule.classifier.action.rule.reserved", FT_UINT8, BASE_HEX, NULL, CST_PKT_CLASS_RULE_CLASSIFIER_ACTION_RULE_RSV, NULL, HFILL}
+ },
+ { /* PHS DSC action */
+ &hf_cst_phs_dsc_action,
+ {"PHS DSC action", "wmx.cst.phs_dsc_action", FT_UINT8, BASE_DEC, VALS(vals_cst_phs_dsc_action), 0x0, NULL, HFILL}
+ },
+ { /* PHS Rule */
+ &hf_cst_phs_rule,
+ {"PHS Rule", "wmx.cst.phs_rule", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* PHS Rule 1 */
+ &hf_cst_phs_phsi,
+ {"PHSI", "wmx.cst.phs_rule.phsi", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* PHS Rule 2 */
+ &hf_cst_phs_phsf,
+ {"PHSF", "wmx.cst.phs_rule.phsf", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* PHS Rule 3 */
+ &hf_cst_phs_phsm,
+ {"PHSM (bit x: 0-don't suppress the (x+1) byte; 1-suppress the (x+1) byte)", "wmx.cst.phs_rule.phsm", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* PHS Rule 4 */
+ &hf_cst_phs_phss,
+ {"PHSS", "wmx.cst.phs_rule.phss", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* PHS Rule 5 */
+ &hf_cst_phs_phsv,
+ {"PHSV", "wmx.cst.phs_rule.phsv", FT_UINT8, BASE_DEC, VALS(vals_verify), 0x0, NULL, HFILL}
+ },
+ { /* PHS Rule 143 */
+ &hf_cst_phs_vendor_spec,
+ {"Vendor-Specific PHS Parameters", "wmx.cst.phs.vendor_spec", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* IPv6 Flow Label */
+ &hf_cst_pkt_class_rule_ipv6_flow_label,
+ {"IPv6 Flow Label", "wmx.cst.pkt_class_rule.ipv6_flow_label", FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ { /* ATM Switching Encoding */
+ &hf_csper_atm_switching_encoding,
+ {"ATM Switching Encoding", "wmx.csper.atm_switching_encoding", FT_UINT8, BASE_DEC, VALS(vals_atm_switching_encodings), 0x0, NULL, HFILL}
+ },
+ { /* ATM Classifier TLV */
+ &hf_csper_atm_classifier,
+ {"ATM Classifier TLV", "wmx.csper.atm_classifier", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* ATM VPI Classifier */
+ &hf_csper_atm_classifier_vpi,
+ {"VPI Classifier", "wmx.csper.atm_classifier_vpi", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ { /* ATM VCI Classifier */
+ &hf_csper_atm_classifier_vci,
+ {"VCI Classifier", "wmx.csper.atm_classifier_vci", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ { /* ATM Classifier ID */
+ &hf_csper_atm_classifier_id,
+ {"Classifier ID", "wmx.csper.atm_classifier_tlv", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ /* unknown types */
+ { /* unknown CSPER types */
+ &hf_csper_unknown_type,
+ {"Unknown CSPER TLV type", "wmx.csper.unknown_type", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_cst_invalid_tlv,
+ {"Invalid TLV", "wmx.cst.invalid_tlv", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ }
+ };
+
+ /* WiMax HMAC/CMAC/Short-HMAC Tuples display */
+ static hf_register_info hf_xmac[] =
+ {
+ {
+ &hf_xmac_tuple_rsvd,
+ {"Reserved", "wmx.xmac_tuple.reserved", FT_UINT8, BASE_HEX, NULL, XMAC_TUPLE_RESERVED, NULL, HFILL}
+ },
+ {
+ &hf_xmac_tuple_key_seq_num,
+ {"Key Sequence Number", "wmx.xmac_tuple.key_sn", FT_UINT8, BASE_DEC, NULL, XMAC_TUPLE_KEY_SEQ_NUM, NULL, HFILL}
+ },
+ {
+ &hf_hmac_tuple_hmac_digest,
+ {"HMAC Digest", "wmx.xmac_tuple.hmac_digest", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_cmac_tuple_bsid,
+ {"BSID", "wmx.cmac_tuple.bsid", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_cmac_tuple_cmac_value,
+ {"CMAC Value", "wmx.cmac_tuple.cmac.value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_packet_number_counter,
+ {"Packet Number Counter", "wmx.xmac_tuple.packet_number_count", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ }
+ };
+
+ static hf_register_info hf_snp[] =
+ {
+ { /* 11.8.4.1 */
+ &hf_snp_pkm_version_support,
+ {"PKM Version Support", "wmx.security_negotiation_parameters.pkm_version_support",FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_snp_pkm_version_support_bit0,
+ {"PKM version 1", "wmx.security_negotiation_parameters.pkm_version_support.bit0",FT_BOOLEAN, 8, TFS(&tfs_supported), SNP_PKM_VERSION_SUPPORT_BIT0, NULL, HFILL}
+ },
+ {
+ &hf_snp_pkm_version_support_bit1,
+ {"PKM version 2", "wmx.security_negotiation_parameters.pkm_version_support.bit1",FT_BOOLEAN, 8, TFS(&tfs_supported), SNP_PKM_VERSION_SUPPORT_BIT1, NULL, HFILL}
+ },
+ {
+ &hf_snp_pkm_version_support_reserved,
+ {"Reserved", "wmx.security_negotiation_parameters.pkm_version_support.reserved",FT_UINT8, BASE_HEX, NULL, SNP_PKM_VERSION_SUPPORT_RSV, NULL, HFILL}
+ },
+ { /* 11.8.4.2 */
+ &hf_snp_auth_policy_support,
+ {"Authorization Policy Support", "wmx.security_negotiation_parameters.auth_policy_support",FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_snp_auth_policy_support_bit0,
+ {"RSA-based Authorization At The Initial Network Entry", "wmx.security_negotiation_parameters.auth_policy_support.bit0",FT_BOOLEAN, 8, TFS(&tfs_supported), SNP_AUTH_POLICY_SUPPORT_BIT0, NULL, HFILL}
+ },
+ {
+ &hf_snp_auth_policy_support_bit1,
+ {"EAP-based Authorization At The Initial Network Entry", "wmx.security_negotiation_parameters.auth_policy_support.bit1",FT_BOOLEAN, 8, TFS(&tfs_supported), SNP_AUTH_POLICY_SUPPORT_BIT1, NULL, HFILL}
+ },
+ {
+ &hf_snp_auth_policy_support_bit2,
+ {"Authenticated EAP-based Authorization At The Initial Network Entry", "wmx.security_negotiation_parameters.auth_policy_support.bit2",FT_BOOLEAN, 8, TFS(&tfs_supported), SNP_AUTH_POLICY_SUPPORT_BIT2, NULL, HFILL}
+ },
+ {
+ &hf_snp_auth_policy_support_bit3,
+ {"Reserved", "wmx.security_negotiation_parameters.auth_policy_support.bit3",FT_UINT8, BASE_HEX, NULL, SNP_AUTH_POLICY_SUPPORT_BIT3, NULL, HFILL}
+ },
+ {
+ &hf_snp_auth_policy_support_bit4,
+ {"RSA-based Authorization At Re-entry", "wmx.security_negotiation_parameters.auth_policy_support.bit4",FT_BOOLEAN, 8, TFS(&tfs_supported), SNP_AUTH_POLICY_SUPPORT_BIT4, NULL, HFILL}
+ },
+ {
+ &hf_snp_auth_policy_support_bit5,
+ {"EAP-based Authorization At Re-entry", "wmx.security_negotiation_parameters.auth_policy_support.bit5",FT_BOOLEAN, 8, TFS(&tfs_supported), SNP_AUTH_POLICY_SUPPORT_BIT5, NULL, HFILL}
+ },
+ {
+ &hf_snp_auth_policy_support_bit6,
+ {"Authenticated EAP-based Authorization At Re-entry", "wmx.security_negotiation_parameters.auth_policy_support.bit6",FT_BOOLEAN, 8, TFS(&tfs_supported), SNP_AUTH_POLICY_SUPPORT_BIT6, NULL, HFILL}
+ },
+ {
+ &hf_snp_auth_policy_support_bit7,
+ {"Reserved", "wmx.security_negotiation_parameters.auth_policy_support.bit7",FT_UINT8, BASE_HEX, NULL, SNP_AUTH_POLICY_SUPPORT_BIT7, NULL, HFILL}
+ },
+ { /* 11.8.4.3 */
+ &hf_snp_mac_mode,
+ {"MAC (Message Authentication Code) Mode", "wmx.security_negotiation_parameters.mac_mode",FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_snp_mac_mode_bit0,
+ {"HMAC", "wmx.security_negotiation_parameters.mac_mode.bit0",FT_BOOLEAN, 8, TFS(&tfs_supported), SNP_MAC_MODE_BIT0, NULL, HFILL}
+ },
+ {
+ &hf_snp_mac_mode_bit1,
+ {"CMAC", "wmx.security_negotiation_parameters.mac_mode.bit1",FT_BOOLEAN, 8, TFS(&tfs_supported), SNP_MAC_MODE_BIT1, NULL, HFILL}
+ },
+ {
+ &hf_snp_mac_mode_bit1_rsvd,
+ {"Reserved", "wmx.security_negotiation_parameters.mac_mode.bit1_rsvd",FT_BOOLEAN, 8, TFS(&tfs_supported), SNP_MAC_MODE_BIT1, NULL, HFILL}
+ },
+ {
+ &hf_snp_mac_mode_bit2,
+ {"64-bit Short-HMAC", "wmx.security_negotiation_parameters.mac_mode.bit2",FT_BOOLEAN, 8, TFS(&tfs_supported), SNP_MAC_MODE_BIT2, NULL, HFILL}
+ },
+ {
+ &hf_snp_mac_mode_bit3,
+ {"80-bit Short-HMAC", "wmx.security_negotiation_parameters.mac_mode.bit3",FT_BOOLEAN, 8, TFS(&tfs_supported), SNP_MAC_MODE_BIT3, NULL, HFILL}
+ },
+ {
+ &hf_snp_mac_mode_bit4,
+ {"96-bit Short-HMAC", "wmx.security_negotiation_parameters.mac_mode.bit4",FT_BOOLEAN, 8, TFS(&tfs_supported), SNP_MAC_MODE_BIT4, NULL, HFILL}
+ },
+ {
+ &hf_snp_mac_mode_bit5,
+ {"CMAC", "wmx.security_negotiation_parameters.mac_mode.bit5",FT_BOOLEAN, 8, TFS(&tfs_supported), SNP_MAC_MODE_BIT5, NULL, HFILL}
+ },
+ {
+ &hf_snp_mac_mode_reserved,
+ {"Reserved", "wmx.security_negotiation_parameters.mac_mode.reserved",FT_UINT8, BASE_HEX, NULL, SNP_MAC_MODE_RSV, NULL, HFILL}
+ },
+ {
+ &hf_snp_mac_mode_reserved1,
+ {"Reserved", "wmx.security_negotiation_parameters.mac_mode.reserved",FT_UINT8, BASE_HEX, NULL, SNP_MAC_MODE_RSV1, NULL, HFILL}
+ },
+ { /* 11.8.4.4 */
+ &hf_snp_pn_window_size,
+ {"PN Window Size", "wmx.security_negotiation_parameters.pn_window_size",FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.8.4.5 */
+ &hf_snp_max_conc_transactions,
+ {"Maximum concurrent transactions (0 indicates no limit)", "wmx.security_negotiation_parameters.max_conc_transactions",FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.8.4.6 */
+ &hf_snp_max_suppt_sec_assns,
+ {"Maximum number of security associations supported by the SS", "wmx.security_negotiation_parameters.max_suppt_sec_assns",FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_snp_unknown_type,
+ {"Unknown Security Negotiation Parameter type", "wmx.security_negotiation_parameters.unknown.type",FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ }
+ };
+
+ static hf_register_info hf_pkm[] =
+ {
+ { /* 11.9.1 - type 6 */
+ &hf_pkm_msg_attr_display,
+ {"Display String", "wmx.pkm_msg.pkm_attr.display_string", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.2 - type 7 */
+ &hf_pkm_msg_attr_auth_key,
+ {"Auth Key", "wmx.pkm_msg.pkm_attr.auth_key", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.3 - type 8 */
+ &hf_pkm_msg_attr_tek,
+ {"TEK", "wmx.pkm_msg.pkm_attr.tek", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.4 - type 9 */
+ &hf_pkm_msg_attr_key_life_time,
+ {"Key Lifetime", "wmx.pkm_msg.pkm_attr.key_life_time", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.5 - type 10 */
+ &hf_pkm_msg_attr_key_seq_num,
+ {"Key Sequence Number", "wmx.pkm_msg.pkm_attr.key_seq_num", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.6 - type 11 */
+ &hf_pkm_msg_attr_hmac_digest,
+ {"HMAC-Digest", "wmx.pkm_msg.pkm_attr.hmac_digest", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.7 - type 12 */
+ &hf_pkm_msg_attr_said,
+ {"SAID", "wmx.pkm_msg.pkm_attr.said", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+#if 0 /* not been used */
+ { /* 11.9.8 - type 13 */
+ &hf_pkm_msg_attr_tek_param,
+ {"TEK Parameters", "wmx.pkm_msg.pkm_attr.tek_parameters", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL}
+ },
+#endif
+ { /* 11.9.9 - type 15 */
+ &hf_pkm_msg_attr_cbc_iv,
+ {"CBC IV", "wmx.pkm_msg.pkm_attr.cbc_iv", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.10 - type 16 */
+ &hf_pkm_msg_attr_error_code,
+ {"Error Code", "wmx.pkm_msg.pkm_attr.error_code", FT_UINT8, BASE_DEC, VALS(vals_pkm_attr_error_codes), 0x0, NULL, HFILL}
+ },
+ { /* 11.9.11 - type 17 */
+ &hf_pkm_msg_attr_ca_certificate,
+ {"CA Certificate", "wmx.pkm_msg.pkm_attr.ca_certificate", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.12 - type 18 */
+ &hf_pkm_msg_attr_ss_certificate,
+ {"SS Certificate", "wmx.pkm_msg.pkm_attr.ss_certificate", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+#if 0 /* not been used */
+ { /* 11.9.13 - type 19 */
+ &hf_pkm_msg_attr_security_capabilities,
+ {"Security Capabilities", "wmx.pkm_msg.pkm_attr.security_capabilities", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL}
+ },
+#endif
+ { /* 11.9.14 - type 20 */
+ &hf_pkm_msg_crypto_suite,
+ {"Cryptography", "wmx.pkm_msg.pkm_attr.crypto_suite", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_pkm_msg_crypto_suite_msb,
+ {"Data Encryption Algorithm Identifiers", "wmx.pkm_msg.pkm_attr.crypto_suite.msb", FT_UINT8, BASE_DEC, VALS(vals_data_encryption_ids), 0x0, NULL, HFILL}
+ },
+ {
+ &hf_pkm_msg_crypto_suite_middle,
+ {"Data Authentication Algorithm Identifiers", "wmx.pkm_msg.pkm_attr.crypto_suite.middle", FT_UINT8, BASE_DEC, VALS(vals_data_authentication_ids), 0x0, NULL, HFILL}
+ },
+ {
+ &hf_pkm_msg_crypto_suite_lsb,
+ {"TEK Encryption Algorithm Identifiers", "wmx.pkm_msg.pkm_attr.crypto_suite.lsb", FT_UINT8, BASE_DEC, VALS(vals_tek_encryption_ids), 0x0, NULL, HFILL}
+ },
+#if 0 /* not been used */
+ { /* 11.9.15 - type 21 */
+ &hf_pkm_msg_crypto_list,
+ {"Cryptographic-Suite List", "wmx.pkm_msg.pkm_attr.crypto_suite_list", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL}
+ },
+#endif
+#if 0 /* deleted by 802.16E */
+ { /* 11.9.16 - type 22 */
+ &hf_pkm_msg_version,
+ {"Reserved ", "wmx.pkm_msg.pkm_attr.version", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL}
+ },
+#endif
+#if 0 /* not been used */
+ { /* 11.9.17 - type 23 */
+ &hf_pkm_msg_sa_descriptor,
+ {"SA Descriptor", "wmx.pkm_msg.pkm_attr.sa_descriptor", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL}
+ },
+#endif
+ { /* 11.9.18 - type 24 */
+ &hf_pkm_sa_type,
+ {"SA Type", "wmx.pkm_msg.pkm_attr.sa_type", FT_UINT8, BASE_DEC, VALS(vs_sa_type), 0x0, NULL, HFILL}
+ },
+#if 0 /* not been used */
+ { /* 11.9.?? - type 25 */
+ &hf_pkm_attr_security_negotiation_parameters,
+ {"Security Negotiation Parameters", "wmx.pkm_msg.pkm_attr.security_negotiation_parameters", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL}
+ },
+#endif
+#if 0 /* not been used */
+ { /* 11.9.19 - type 27 */
+ &hf_pkm_attr_config_settings,
+ {"PKM Configuration Settings", "wmx.pkm_msg.pkm_attr.config_settings", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL}
+ },
+#endif
+ { /* 11.9.19.1 */
+ &hf_pkm_config_settings_authorize_waitout,
+ {"Authorize Wait Timeout (in seconds)", "wmx.pkm_msg.pkm_attr.config_settings.authorize_waitout", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.19.2 */
+ &hf_pkm_config_settings_reauthorize_waitout,
+ {"Reauthorize Wait Timeout (in seconds)", "wmx.pkm_msg.pkm_attr.config_settings.reauthorize_waitout", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.19.3 */
+ &hf_pkm_config_settings_grace_time,
+ {"Authorization Grace Time (in seconds)", "wmx.pkm_msg.pkm_attr.config_settings.grace_time", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.19.4 */
+ &hf_pkm_config_settings_operational_waittime,
+ {"Operational Wait Timeout (in seconds)", "wmx.pkm_msg.pkm_attr.config_settings.operational_wait_timeout", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.19.5 */
+ &hf_pkm_config_settings_rekey_wait_timeout,
+ {"Rekey Wait Timeout (in seconds)", "wmx.pkm_msg.pkm_attr.config_settings.rekey_wait_timeout", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.19.6 */
+ &hf_pkm_config_settings_tek_grace_time,
+ {"TEK Grace Time (in seconds)", "wmx.pkm_msg.pkm_attr.config_settings.tek_grace_time", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.19.7 */
+ &hf_pkm_config_settings_authorize_reject_wait_timeout,
+ {"Authorize Reject Wait Timeout(in seconds)", "wmx.pkm_msg.pkm_attr.config_settings.authorize_reject_wait_timeout", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.20 - type 29 */
+ &hf_pkm_attr_nonce,
+ {"Nonce", "wmx.pkm_msg.pkm_attr.nonce", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.21 - type 33 */
+ &hf_pkm_attr_ss_random,
+ {"SS_RANDOM", "wmx.pkm_msg.pkm_attr.ss_random", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.22 - type 34 */
+ &hf_pkm_attr_bs_random,
+ {"BS_RANDOM", "wmx.pkm_msg.pkm_attr.bs_random", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.23 - type 35 */
+ &hf_pkm_attr_pre_pak,
+ {"Pre-PAK", "wmx.pkm_msg.pkm_attr.pre_pak", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+#if 0 /* no definition */
+ { /* 11.9.?? - type 36 */
+ &hf_pkm_attr_pak_ak_seq_number,
+ {"PAK/AK Sequence Number", "wmx.pkm_msg.pkm_attr.pak_ak_seq_number", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+#endif
+ { /* 11.9.24 - type 37 */
+ &hf_pkm_attr_bs_certificate,
+ {"BS Certificate", "wmx.pkm_msg.pkm_attr.bs_certificate", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.25 - type 38 */
+ &hf_pkm_attr_sig_bs,
+ {"SigBS", "wmx.pkm_msg.pkm_attr.sig_bs",FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.26 - type 39 */
+ &hf_pkm_attr_ms_mac_address,
+ {"MS-MAC Address", "wmx.pkm_msg.pkm_attr.ms_mac_address",FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.27 - type 40 */
+ &hf_pkm_attr_cmac_digest,
+ {"CMAC Digest", "wmx.pkm_msg.pkm_attr.cmac_digest",FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_pkm_attr_cmac_digest_pn,
+ {"CMAC Packet Number counter, CMAC_PN_*", "wmx.pkm_msg.pkm_attr.cmac_digest.pn",FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_pkm_attr_cmac_digest_value,
+ {"CMAC Value", "wmx.pkm_msg.pkm_attr.cmac_digest.value",FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.28 - type 41 */
+ &hf_pkm_attr_push_modes,
+ {"Key Push Modes", "wmx.pkm_msg.pkm_attr.key_push_modes",FT_UINT8, BASE_DEC, VALS(va_key_push_modes), 0x0, NULL, HFILL}
+ },
+ { /* 11.9.29 - type 42 */
+ &hf_pkm_attr_key_push_counter,
+ {"Key Push Counter", "wmx.pkm_msg.pkm_attr.key_push_counter",FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.30 - type 43 */
+ &hf_pkm_attr_gkek,
+ {"GKEK", "wmx.pkm_msg.pkm_attr.gkek",FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.31 - type 44 */
+ &hf_pkm_attr_sig_ss,
+ {"SigSS", "wmx.pkm_msg.pkm_attr.sig_ss",FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.32 - type 45 */
+ &hf_pkm_attr_akid,
+ {"AKID", "wmx.pkm_msg.pkm_attr.akid",FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.33 - type 28 */
+ &hf_pkm_attr_eap_payload,
+ {"EAP Payload", "wmx.pkm_msg.pkm_attr.eap_payload", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { /* 11.9.34 - type 30 */
+ &hf_pkm_attr_auth_result_code,
+ {"Auth Result Code", "wmx.pkm_msg.pkm_attr.auth_result_code", FT_UINT8, BASE_DEC, VALS(vs_success_reject), 0x0, NULL, HFILL}
+ },
+ { /* 11.9.35 - type 31 */
+ &hf_pkm_attr_sa_service_type,
+ {"SA Service Type", "wmx.pkm_msg.pkm_attr.sa_service_type", FT_UINT8, BASE_DEC, VALS(vs_sa_service_type), 0x0, NULL, HFILL}
+ },
+#if 0 /* same as 11.9.19 */
+ { /* 11.9.36 - type 27 */
+ &hf_pkm_attr_config_settings,
+ {"PKMv2 Configuration Settings", "wmx.pkm_msg.pkm_attr.config_settings", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL}
+ },
+#endif
+ { /* 11.9.37 - type 32 */
+ &hf_pkm_attr_frame_number,
+ {"Frame Number", "wmx.pkm_msg.pkm_attr.frame_number", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+#if 1 /* no definitions [??] */
+ { /* 11.9.?? - type 46 */
+ &hf_pkm_attr_associated_gkek_seq_number,
+ {"Associated GKEK Sequence Number", "wmx.pkm_msg.pkm_attr.associated_gkek_seq_number",FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+#endif
+#if 0
+ { /* 11.9.?? - type 47 */
+ &hf_pkm_attr_gkek_params,
+ {"GKEK Parameters", "wmx.pkm_msg.pkm_attr.gkek_params",FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+#endif
+ {
+ &hf_pkm_msg_unknown_type,
+ {"Unknown Type", "wmx.pkm.unknown.type", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ }
+ };
+
+ /* WiMax Common TLV Encoding display */
+ static hf_register_info hf_common_tlv[] =
+ {
+ {
+ &hf_common_tlv_mac_version,
+ { "MAC Version", "wmx.common_tlv.mac_version", FT_UINT8, BASE_DEC, VALS(vals_dcd_mac_version), 0x0, NULL, HFILL}
+ },
+ {
+ &hf_common_tlv_vendor_id,
+ { "Vendor ID Encoding", "wmx.common_tlv.vendor_id_encoding", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_common_tlv_vendor_specific_type,
+ { "Vendor Specific Type", "wmx.common_tlv.vendor_specific_type", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_common_tlv_vendor_specific_length_size,
+ {
+ "Vendor Specific Length Size", "wmx.common_tlv.vendor_specific_length_size",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_common_tlv_vendor_specific_length,
+ { "Vendor Specific Length", "wmx.common_tlv.vendor_specific_length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_common_tlv_vendor_specific_value,
+ { "Vendor Specific Value", "wmx.common_tlv.vendor_specific_value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ {
+ &hf_common_current_transmitted_power,
+ { "Current Transmitted Power", "wmx.common_tlv.current_transmitted_power", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+#if 0
+ {
+ &hf_common_tlv_unknown_type,
+ {"Unknown Common TLV Type", "wmx.common_tlv.unknown_type", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ }
+#endif
+ };
+
+ static ei_register_info ei[] = {
+ { &ei_common_tlv_info, { "wmx.common_tlv.invalid", PI_PROTOCOL, PI_WARN, "Invalid TLV info", EXPFILL }},
+ };
+
+ expert_module_t* expert_wimax_utility;
+
+ if(proto_wimax_utility_decoders == -1)
+ {
+ proto_wimax_utility_decoders = proto_register_protocol (
+ "WiMax Sub-TLV Messages",
+ /* name */
+ "WiMax Sub-TLV (sub)", /* short name */
+ "wmx.sub" /* abbrev */
+ );
+
+ proto_register_subtree_array(ett, array_length(ett));
+ proto_register_field_array(proto_wimax_utility_decoders, hf_sfe, array_length(hf_sfe));
+ proto_register_field_array(proto_wimax_utility_decoders, hf_csper, array_length(hf_csper));
+ proto_register_field_array(proto_wimax_utility_decoders, hf_xmac, array_length(hf_xmac));
+ proto_register_field_array(proto_wimax_utility_decoders, hf_snp, array_length(hf_snp));
+ proto_register_field_array(proto_wimax_utility_decoders, hf_pkm, array_length(hf_pkm));
+ proto_register_field_array(proto_wimax_utility_decoders, hf_common_tlv, array_length(hf_common_tlv));
+ expert_wimax_utility = expert_register_protocol(proto_wimax_utility_decoders);
+ expert_register_field_array(expert_wimax_utility, ei, array_length(ei));
+
+ eap_handle = find_dissector("eap");
+ }
+}
+
+/**************************************************************/
+/* wimax_error_parameter_set_decoder() */
+/* decode and display the WiMax Error Parameter Set */
+/* parameter: */
+/* tvb - pointer of the tvb of error_parameter_set */
+/* tree - pointer of Wireshark display tree */
+/* pinfo - pointer of Wireshark packet information structure*/
+/**************************************************************/
+void wimax_error_parameter_set_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ guint offset;
+ guint tvb_len, tlv_len;
+ gint tlv_type;
+ proto_item *ceps_item = NULL;
+ proto_tree *ceps_tree = NULL;
+ tlv_info_t tlv_info;
+
+ /* get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ offset = 0;
+ /* display error parameter information */
+ ceps_item = proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, tvb_len, "Error Parameter Set (%u bytes)", tvb_len);
+ /* add CS Parameter Encoding Rules subtree */
+ ceps_tree = proto_item_add_subtree(ceps_item, ett_wimax_error_parameter_set);
+ /* do nothing if the TLV fields is not exist */
+ if(!tvb_len)
+ return;
+ /* report error if the packet size is less than 2 bytes (type+length) */
+ if(tvb_len < 2)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Invalid Error Parameter Set");
+ return;
+ }
+ /* process the classifier error parameter set */
+ while(offset < tvb_len)
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "EPS TLV error");
+ proto_tree_add_item(ceps_tree, hf_cst_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(ceps_tree, proto_wimax_utility_decoders, tvb, offset, (tlv_len+2+get_tlv_size_of_length(&tlv_info)), "EPS TLV Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, tlv_len, offset, tvb_len);
+#endif
+ /* parse the Classifier Error Parameter Set */
+ switch (tlv_type)
+ {
+ case CST_ERROR_SET_ERRORED_PARAM:
+ add_tlv_subtree(&tlv_info, ceps_tree, hf_cst_error_set_errored_param, tvb, offset, ENC_NA);
+ break;
+ case CST_ERROR_SET_ERROR_CODE:
+ add_tlv_subtree(&tlv_info, ceps_tree, hf_cst_error_set_error_code, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case CST_ERROR_SET_ERROR_MSG:
+ add_tlv_subtree(&tlv_info, ceps_tree, hf_cst_error_set_error_msg, tvb, offset, ENC_ASCII|ENC_NA);
+ break;
+ }
+ offset += (tlv_len+get_tlv_value_offset(&tlv_info));
+ }
+}
+
+/****************************************************************/
+/* wimax_convengence_service_parameter_encoding_rules_decoder() */
+/* decode and display the WiMax Convergence Service Parameter */
+/* Encoding Rules */
+/* parameter: */
+/* sfe_type - Service Flow Encodings type */
+/* tvb - pointer of the tvb of service flow encodings */
+/* tree - pointer of Wireshark display tree */
+/* pinfo - pointer of Wireshark packet information structure */
+/****************************************************************/
+/* CS Parameter Encoding Rules handling function */
+void wimax_convengence_service_parameter_encoding_rules_decoder(guint sfe_type, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ guint offset, tlv_offset;
+ guint tvb_len, tlv_len, length;
+ gint tlv_type;
+ proto_item *csper_item;
+ proto_tree *csper_tree;
+ proto_tree *tlv_tree, *ti_tree;
+ proto_item *tlv_item, *ti_item;
+ tlv_info_t tlv_info;
+ gboolean ipv6 = ((sfe_type == SFE_CSPER_PACKET_IPV6) || (sfe_type == SFE_CSPER_PACKET_IPV6_802_3) || (sfe_type == SFE_CSPER_PACKET_IPV6_802_1Q));
+
+ /* sanity check */
+ if((sfe_type < SFE_CSPER_ATM) || (sfe_type > SFE_CSPER_PACKET_IP_802_3_ECRTP_COMPRESSION))
+ return; /* invalid CS Parameter Encodings */
+
+ /* get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ offset = 0;
+ /* display SFE information */
+ csper_item = proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, tvb_len, "Convergence Service Parameter Encoding Rules (%u bytes)", tvb_len);
+ /* add CS Parameter Encoding Rules subtree */
+ csper_tree = proto_item_add_subtree(csper_item, ett_wimax_cst_encoding_rules);
+ /* do nothing if the TLV fields is not exist */
+ if(!tvb_len)
+ return;
+ /* report error if the packet size is less than 2 bytes (type+length) */
+ if(tvb_len < 2)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Invalid Convergence Service Parameter Encoding Rules");
+ return;
+ }
+ /* process WiMax Service Flow Encodings */
+ while(offset < tvb_len)
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "CSPER TLV error");
+ proto_tree_add_item(csper_tree, hf_cst_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(csper_tree, proto_wimax_utility_decoders, tvb, offset, (tlv_len+2+get_tlv_size_of_length(&tlv_info)), "CSPER TLV Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, tlv_len, offset, tvb_len);
+#endif
+ /* update the offset */
+ offset += get_tlv_value_offset(&tlv_info);
+ /* parse the CS parameter Encoding Rule TLV */
+ if(sfe_type == SFE_CSPER_ATM)
+ { /* ATM CS Encodings */
+ switch (tlv_type)
+ {
+ case CST_ATM_SWITCHING:
+ add_tlv_subtree(&tlv_info, csper_tree, hf_csper_atm_switching_encoding, tvb, offset-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ case CST_ATM_CLASSIFIER:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(&tlv_info, csper_tree, hf_csper_atm_classifier, tvb, offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_wimax_cst_encoding_rules);
+ tlv_offset = offset;
+ while(tlv_offset < (tlv_len + offset))
+ {
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, tlv_offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ length = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "ATM Classifier TLV error");
+ proto_tree_add_item(tlv_tree, hf_cst_invalid_tlv, tvb, offset, (tlv_len - tlv_offset), ENC_NA);
+ break;
+ }
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(csper_tree, proto_wimax_utility_decoders, tvb, offset, (tlv_len+2+get_tlv_size_of_length(&tlv_info)), "ATM Classifier TLV Type: %u (%u bytes, offset=%u, tlv_len=%u)", tlv_type, length, offset, tlv_len);
+#endif
+ switch (tlv_type)
+ {
+ case ATM_VPI_CLASSIFIER:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_csper_atm_classifier_vpi, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ break;
+ case ATM_VCI_CLASSIFIER:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_csper_atm_classifier_vci, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ break;
+ case ATM_CLASSIFIER_ID:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_csper_atm_classifier_id, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ break;
+ default:
+ break;
+ }
+ tlv_offset += (length + get_tlv_value_offset(&tlv_info));
+ } /* end of while loop */
+ break;
+ case CST_ATM_CLASSIFIER_DSC_ACTION:
+ add_tlv_subtree(&tlv_info, csper_tree, hf_cst_classifier_dsc_action, tvb, offset-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ case CST_ATM_CLASSIFIER_ERROR_PARAMETER_SET:
+ /* call the error parameter set function */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_wimax_cst_encoding_rules, csper_tree, proto_wimax_utility_decoders, tvb, offset-get_tlv_value_offset(&tlv_info), tlv_len, "Classifier Error Parameter Set");
+ wimax_error_parameter_set_decoder(tvb_new_subset_length(tvb, offset, tlv_len), pinfo, tlv_tree);
+ break;
+ default:
+ /* display the unknown ATM CS encoding in hex */
+ add_tlv_subtree(&tlv_info, csper_tree, hf_csper_unknown_type, tvb, offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ break;
+ }
+ }
+ else
+ {
+ switch (tlv_type)
+ {
+ case CST_CLASSIFIER_ACTION:
+ add_tlv_subtree(&tlv_info, csper_tree, hf_cst_classifier_dsc_action, tvb, offset-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ case CST_CLASSIFIER_ERROR_PARAM_SET:
+ case CST_PHS_ERROR_PARAM_SET:
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_wimax_cst_encoding_rules, csper_tree, proto_wimax_utility_decoders, tvb, offset-get_tlv_value_offset(&tlv_info), tlv_len, "Classifier Error Parameter Set");
+ /* call the error parameter set function */
+ wimax_error_parameter_set_decoder(tvb_new_subset_length(tvb, offset, tlv_len), pinfo, tlv_tree);
+ break;
+ case CST_PACKET_CLASSIFICATION_RULE:
+ {
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(&tlv_info, csper_tree, hf_cst_pkt_class_rule, tvb, offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_wimax_cst_encoding_rules);
+ tlv_offset = offset;
+ while(tlv_offset < (tlv_len + offset))
+ {
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, tlv_offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ length = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Packet Classification Rule TLV error");
+ proto_tree_add_item(tlv_tree, hf_cst_invalid_tlv, tvb, offset, (tlv_len - tlv_offset), ENC_NA);
+ break;
+ }
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(csper_tree, proto_wimax_utility_decoders, tvb, tlv_offset, (length + get_tlv_value_offset(&tlv_info)), "Packet Classification Rule TLV Type: %u (%u bytes, offset=%u, tlv_len=%u)", tlv_type, length, tlv_offset, tlv_len);
+#endif
+ /* update the offset */
+ tlv_offset += get_tlv_value_offset(&tlv_info);
+ switch (tlv_type)
+ {
+ case CST_PKT_CLASS_RULE_PRIORITY:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_priority, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ case CST_PKT_CLASS_RULE_RANGE_MASK:
+ /* add TLV subtree */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_range_mask, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_wimax_cst_encoding_rules);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_tos_low, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_tos_high, tvb, tlv_offset + 1, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_tos_mask, tvb, tlv_offset + 2, 1, ENC_BIG_ENDIAN);
+ break;
+ case CST_PKT_CLASS_RULE_PROTOCOL:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_protocol, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ case CST_PKT_CLASS_RULE_SRC_IP:
+ /* add TLV subtree */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_ip_masked_src_address, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_wimax_cst_encoding_rules);
+ if(ipv6)
+ {
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_src_ipv6, tvb, tlv_offset, 16, ENC_NA);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_mask_ipv6, tvb, tlv_offset + 16, 16, ENC_NA);
+ }
+ else
+ {
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_src_ipv4, tvb, tlv_offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_mask_ipv4, tvb, tlv_offset + 4, 4, ENC_BIG_ENDIAN);
+ }
+ break;
+ case CST_PKT_CLASS_RULE_DST_IP:
+ /* add TLV subtree */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_ip_masked_dest_address, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_wimax_cst_encoding_rules);
+ if(ipv6)
+ {
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_dest_ipv6, tvb, tlv_offset, 16, ENC_NA);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_mask_ipv6, tvb, tlv_offset + 16, 16, ENC_NA);
+ }
+ else
+ {
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_dest_ipv4, tvb, tlv_offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_mask_ipv4, tvb, tlv_offset + 4, 4, ENC_BIG_ENDIAN);
+ }
+ break;
+ case CST_PKT_CLASS_RULE_SRCPORT_RANGE:
+ /* add TLV subtree */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_prot_src_port_range, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_wimax_cst_encoding_rules);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_src_port_low, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_src_port_high, tvb, tlv_offset + 2, 2, ENC_BIG_ENDIAN);
+ break;
+ case CST_PKT_CLASS_RULE_DSTPORT_RANGE:
+ /* add TLV subtree */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_prot_dest_port_range, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_wimax_cst_encoding_rules);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_dest_port_low, tvb, tlv_offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_dest_port_high, tvb, tlv_offset + 2, 2, ENC_BIG_ENDIAN);
+ break;
+ case CST_PKT_CLASS_RULE_DST_MAC:
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_dest_mac_address, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_wimax_cst_encoding_rules);
+ /* add TLV subtree */
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_dest_mac, tvb, tlv_offset, 6, ENC_NA);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_mask_mac, tvb, tlv_offset + 6, 6, ENC_NA);
+ break;
+ case CST_PKT_CLASS_RULE_SRC_MAC:
+ /* add TLV subtree */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_src_mac_address, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_wimax_cst_encoding_rules);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_src_mac, tvb, tlv_offset, 6, ENC_NA);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_mask_mac, tvb, tlv_offset + 6, 6, ENC_NA);
+ break;
+ case CST_PKT_CLASS_RULE_ETHERTYPE:
+ /* add TLV subtree */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_ethertype, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_wimax_cst_encoding_rules);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_etype, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_eprot1, tvb, tlv_offset + 1, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_eprot2, tvb, tlv_offset + 2, 1, ENC_BIG_ENDIAN);
+ break;
+ case CST_PKT_CLASS_RULE_USER_PRIORITY:
+ /* add TLV subtree */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_user_priority, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_wimax_cst_encoding_rules);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_pri_low, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_pri_high, tvb, tlv_offset + 1, 1, ENC_BIG_ENDIAN);
+ break;
+ case CST_PKT_CLASS_RULE_VLAN_ID:
+ /* add TLV subtree */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_vlan_id, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ ti_tree = proto_item_add_subtree(ti_item, ett_wimax_cst_encoding_rules);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_vlan_id1, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_vlan_id2, tvb, tlv_offset + 1, 1, ENC_BIG_ENDIAN);
+ break;
+ case CST_PKT_CLASS_RULE_PHSI:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_phsi, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ case CST_PKT_CLASS_RULE_INDEX:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_index, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ case CST_PKT_CLASS_RULE_IPv6_FLOW_LABEL:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_ipv6_flow_label, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ case CST_PKT_CLASS_RULE_VENDOR_SPEC:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_vendor_spec, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ break;
+ case CST_CLASSIFIER_ACTION_RULE:
+ /* add TLV subtree */
+ ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_pkt_class_rule_classifier_action_rule, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ ti_tree = proto_item_add_subtree(ti_item, ett_wimax_cst_encoding_rules);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_classifier_action_rule_bit0, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ti_tree, hf_cst_pkt_class_rule_classifier_action_rule_bit1, tvb, tlv_offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case CST_PKT_CLASS_RULE_LARGE_CONTEXT_ID:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_large_context_id, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ case CST_PKT_CLASS_RULE_SHORT_FORMAT_CONTEXT_ID:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_short_format_context_id, tvb, tlv_offset-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ default:
+ break;
+ } /* end of switch */
+ tlv_offset += length;
+ } /* end of while loop */
+ break;
+ }
+ case CST_PHS_DSC_ACTION:
+ add_tlv_subtree(&tlv_info, csper_tree, hf_cst_phs_dsc_action, tvb, offset-get_tlv_value_offset(&tlv_info), ENC_BIG_ENDIAN);
+ break;
+ case CST_PHS_RULE:
+ {
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(&tlv_info, csper_tree, hf_cst_phs_rule, tvb, offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_wimax_cst_encoding_rules);
+ tlv_offset = offset;
+ while(tlv_offset < (tlv_len + offset))
+ {
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, tlv_offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ length = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || length > MAX_TLV_LEN || length < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "PHS n Rule TLV error");
+ proto_tree_add_item(tlv_tree, hf_cst_invalid_tlv, tvb, offset, (tlv_len - tlv_offset), ENC_NA);
+ break;
+ }
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(csper_tree, proto_wimax_utility_decoders, tvb, offset, (tlv_len+2+get_tlv_size_of_length(&tlv_info)), "PHS Rule TLV Type: %u (%u bytes, offset=%u, tlv_len=%u)", tlv_type, length, offset, tlv_len);
+#endif
+ switch (tlv_type)
+ {
+ case CST_PHS_PHSI:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_phs_phsi, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ break;
+ case CST_PHS_PHSF:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_phs_phsf, tvb, tlv_offset, ENC_NA);
+ break;
+ case CST_PHS_PHSM:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_phs_phsm, tvb, tlv_offset, ENC_NA);
+ break;
+ case CST_PHS_PHSS:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_phs_phss, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ break;
+ case CST_PHS_PHSV:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_phs_phsv, tvb, tlv_offset, ENC_BIG_ENDIAN);
+ break;
+ case CST_PHS_VENDOR_SPEC:
+ add_tlv_subtree(&tlv_info, tlv_tree, hf_cst_phs_vendor_spec, tvb, tlv_offset, ENC_NA);
+ break;
+ }
+ tlv_offset += (length+get_tlv_value_offset(&tlv_info));
+ }
+ break;
+ }
+ default:
+ /* display the unknown csper type in hex */
+ add_tlv_subtree(&tlv_info, tree, hf_csper_unknown_type, tvb, offset-get_tlv_value_offset(&tlv_info), ENC_NA);
+ break;
+ } /* end of switch */
+ } /* end of if */
+ offset += tlv_len;
+ } /* end of while loop */
+}
+
+/**************************************************************/
+/* wimax_service_flow_encodings_decoder() */
+/* decode and display the WiMax Service Flow Encodings */
+/* parameter: */
+/* tvb - pointer of the tvb of service flow encodings */
+/* tree - pointer of Wireshark display tree */
+/* pinfo - pointer of Wireshark packet information structure*/
+/**************************************************************/
+void wimax_service_flow_encodings_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ guint offset, i;
+ guint tvb_len, tlv_len, tlv_value_offset, tlv_value;
+ gint tlv_type;
+ guint value;
+ proto_item *tlv_item = NULL;
+ proto_tree *tlv_tree = NULL;
+ tlv_info_t tlv_info;
+
+ /* get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+#ifdef DEBUG /* for debug only */
+ /* display dissector information */
+ proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, 0, tvb_len, "WiMax Service Flow Encodings (%u bytes)", tvb_len);
+#endif
+ /* process WiMax Service Flow Encodings */
+ offset = 0;
+ /* do nothing if the TLV fields is not exist */
+ if(!tvb_len)
+ return;
+ /* report error if the packet size is less than 2 bytes (type+length) */
+ if(tvb_len < 2)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Invalid Service Flow Encodings");
+ return;
+ }
+ while(offset < tvb_len)
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Service Flow Encodings TLV error");
+ proto_tree_add_item(tree, hf_cst_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, (tlv_len + tlv_value_offset), "Service Flow Encodings TLV Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, tlv_len, offset, tvb_len);
+#endif
+ /* update the offset */
+ offset += tlv_value_offset;
+ /* parse the Service Flow Encodings TLV */
+ switch (tlv_type)
+ {
+ case SFE_SF_ID:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_sf_id, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_CID:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_cid, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_SERVICE_CLASS_NAME:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_service_class_name, tvb, offset-tlv_value_offset, ENC_ASCII|ENC_NA);
+ break;
+ case SFE_MBS_SERVICE:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_mbs_service, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_QOS_PARAMS_SET:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(&tlv_info, tree, hf_sfe_qos_params_set, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_wimax_service_flow_encodings);
+ proto_tree_add_item(tlv_tree, hf_sfe_set_provisioned, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sfe_set_admitted, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sfe_set_active, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sfe_set_rsvd, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SFE_TRAFFIC_PRIORITY:
+ tlv_item = add_tlv_subtree(&tlv_info, tree, hf_sfe_traffic_priority, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ proto_item_append_text(tlv_item, " (allowed values are 0-7)");
+ break;
+ case SFE_MAX_STR:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_max_str, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_MAX_TRAFFIC_BURST:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_max_traffic_burst, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_MIN_RTR:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_min_rtr, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_RESERVED_10:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_reserved_10, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_UL_SCHEDULING:
+ /* TODO: Find a way to get the correct service type from the TLV */
+ tlv_value = tvb_get_guint8(tvb, offset);
+ set_service_type( tlv_value );
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_ul_grant_scheduling, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_TX_POLICY:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(&tlv_info, tree, hf_sfe_req_tx_policy, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_wimax_service_flow_encodings);
+ proto_tree_add_item(tlv_tree, hf_sfe_policy_broadcast_bwr, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sfe_policy_multicast_bwr, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sfe_policy_piggyback, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sfe_policy_fragment, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sfe_policy_headers, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sfe_policy_packing, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sfe_policy_crc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_sfe_policy_rsvd1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case SFE_TOLERATED_JITTER:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_jitter, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_MAX_LATENCY:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_max_latency, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_FIXED_LEN_SDU:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_fixed_len_sdu, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_SDU_SIZE:
+ /* save the SDU size */
+ mac_sdu_length = tvb_get_guint8(tvb, offset);
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_sdu_size, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_TARGET_SAID:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_target_said, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_ARQ_ENABLE:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_arq_enable, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_ARQ_WINDOW_SIZE:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_arq_window_size, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_ARQ_TRANSMITTER_DELAY:
+ if (include_cor2_changes)
+ {
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_arq_transmitter_delay_cor2, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_arq_transmitter_delay, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ }
+ break;
+ case SFE_ARQ_RECEIVER_DELAY:
+ if (include_cor2_changes)
+ {
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_arq_receiver_delay_cor2, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_arq_receiver_delay, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ }
+ break;
+ case SFE_ARQ_BLOCK_LIFETIME:
+ if (include_cor2_changes)
+ {
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_arq_block_lifetime_cor2, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_arq_block_lifetime, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ }
+ break;
+ case SFE_ARQ_SYNC_LOSS_TIMEOUT:
+ if (include_cor2_changes)
+ {
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_arq_sync_loss_timeout_cor2, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_arq_sync_loss_timeout, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ }
+ break;
+ case SFE_ARQ_DELIVER_IN_ORDER:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_arq_deliver_in_order, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_ARQ_RX_PURGE_TIMEOUT:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_arq_rx_purge_timeout, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_ARQ_BLOCK_SIZE:
+ if (include_cor2_changes)
+ {
+ tlv_item = add_tlv_subtree(&tlv_info, tree, hf_sfe_arq_block_size_cor2, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ /* add TLV subtree */
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_wimax_service_flow_encodings);
+ value = tvb_get_guint8(tvb, offset);
+ tlv_item = proto_tree_add_item(tlv_tree, hf_sfe_arq_min_block_size, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* Size is 2^((value & 0x0F) + 4)) */
+ proto_item_append_text(tlv_item, " ( %d bytes )", 0x10 << (value & 0x0F));
+ tlv_item = proto_tree_add_item(tlv_tree, hf_sfe_arq_max_block_size, tvb, offset, 1, ENC_BIG_ENDIAN);
+ if (value & 0xF0)
+ /* Size is 2^(((value & 0xF0) >> 4) + 4)) */
+ proto_item_append_text(tlv_item, " ( %d bytes )", 0x10 << ((value & 0xF0) >> 4));
+ }
+ else
+ {
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_arq_block_size, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ }
+ break;
+ case SFE_CS_SPECIFICATION:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_cs_specification, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_TYPE_OF_DATA_DELIVERY_SERVICES:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_type_of_data_delivery_services, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_SDU_INTER_ARRIVAL_INTERVAL:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_sdu_inter_arrival_interval, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_TIME_BASE:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_time_base, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_PAGING_PREFERENCE:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_paging_preference, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_MBS_ZONE_IDENTIFIER_ASSIGNMENT:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_mbs_zone_identifier_assignment, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_RESERVED_34:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_reserved_34, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_GLOBAL_SERVICE_CLASS_NAME:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_global_service_class_name, tvb, offset-tlv_value_offset, ENC_ASCII|ENC_NA);
+ break;
+/* 36 reserved */
+ case SFE_RESERVED_36:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_reserved_36, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+
+ case SFE_SN_FEEDBACK_ENABLED:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_sn_feedback_enabled, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_FSN_SIZE:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_fsn_size, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_CID_ALLOCATION_FOR_ACTIVE_BS:
+ tlv_item = add_tlv_subtree(&tlv_info, tree, hf_sfe_cid_alloc_for_active_bs_cid, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_wimax_service_flow_encodings);
+ for(i = 0; i < tlv_len; i+=2)
+ proto_tree_add_item(tlv_tree, hf_sfe_cid_alloc_for_active_bs_cid, tvb, (offset+i), 2, ENC_BIG_ENDIAN);
+ break;
+ case SFE_UNSOLICITED_GRANT_INTERVAL:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_unsolicited_grant_interval, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_UNSOLOCITED_POLLING_INTERVAL:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_unsolicited_polling_interval, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_PDU_SN_EXT_SUBHEADER_HARQ_REORDER:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_pdu_sn_ext_subheader_reorder, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_MBS_CONTENTS_ID:
+ tlv_item = add_tlv_subtree(&tlv_info, tree, hf_sfe_mbs_contents_ids, tvb, offset-tlv_value_offset, ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_wimax_service_flow_encodings);
+ for(i = 0; i < tlv_len; i+=2)
+ proto_tree_add_item(tlv_tree, hf_sfe_mbs_contents_ids_id, tvb, (offset+i), 2, ENC_BIG_ENDIAN);
+ break;
+ case SFE_HARQ_SERVICE_FLOWS:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_harq_service_flows, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case SFE_AUTHORIZATION_TOKEN:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_authorization_token, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case SFE_HARQ_CHANNEL_MAPPING:
+ tlv_item = add_tlv_subtree(&tlv_info, tree, hf_sfe_harq_channel_mapping_index, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_wimax_service_flow_encodings);
+ for(i = 0; i < tlv_len; i++)
+ proto_tree_add_item(tlv_tree, hf_sfe_harq_channel_mapping_index, tvb, (offset+i), 1, ENC_BIG_ENDIAN);
+ break;
+/* 99 - 111 CS parameter encodings */
+ case SFE_CSPER_ATM:
+ case SFE_CSPER_PACKET_IPV4:
+ case SFE_CSPER_PACKET_IPV6:
+ case SFE_CSPER_PACKET_802_3:
+ case SFE_CSPER_PACKET_802_1Q:
+ case SFE_CSPER_PACKET_IPV4_802_3:
+ case SFE_CSPER_PACKET_IPV6_802_3:
+ case SFE_CSPER_PACKET_IPV4_802_1Q:
+ case SFE_CSPER_PACKET_IPV6_802_1Q:
+ case SFE_CSPER_PACKET_IP_ROCH_COMPRESSION:
+ case SFE_CSPER_PACKET_IP_ECRTP_COMPRESSION:
+ case SFE_CSPER_PACKET_IP_802_3_ROCH_COMPRESSION:
+ case SFE_CSPER_PACKET_IP_802_3_ECRTP_COMPRESSION:
+ /* call CS Parameter Encoding Rules handling function */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_wimax_service_flow_encodings, tree, proto_wimax_utility_decoders, tvb, offset-tlv_value_offset, tlv_len, "CS Parameter Encoding Rules");
+ wimax_convengence_service_parameter_encoding_rules_decoder(tlv_type, tvb_new_subset_length(tvb, offset, tlv_len), pinfo, tlv_tree);
+ break;
+ default:
+ add_tlv_subtree(&tlv_info, tree, hf_sfe_unknown_type, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ } /* end of switch */
+ offset += tlv_len;
+ } /* end of while loop */
+}
+
+/**************************************************************/
+/* wimax_hmac_tuple_decoder() */
+/* decode and display the WiMax HMAC Tuple (Table 348) */
+/* parameter: */
+/* tree - pointer of Wireshark display tree */
+/* tvb - pointer of the tvb which contains the HMAC Tuple */
+/* offset - the HMAC Tuple offset in the tvb */
+/* length - length of the HMAC Tuple */
+/**************************************************************/
+void wimax_hmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, guint offset, guint length)
+{
+ guint hmac_offset;
+ proto_item *hmac_item = NULL;
+ proto_tree *hmac_tree = NULL;
+
+ /* display decoder info (length should be 21 bytes) */
+ hmac_item = proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, length, "HMAC Tuple (%u bytes)", length);
+ /* add HMAC subtree */
+ hmac_tree = proto_item_add_subtree(hmac_item, ett_wimax_hmac_tuple);
+ /* init the local offset */
+ hmac_offset = offset;
+ /* decode and display HMAC Tuple */
+ proto_tree_add_item(hmac_tree, hf_xmac_tuple_rsvd, tvb, hmac_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(hmac_tree, hf_xmac_tuple_key_seq_num, tvb, hmac_offset, 1, ENC_BIG_ENDIAN);
+ hmac_offset++;
+ proto_tree_add_item(hmac_tree, hf_hmac_tuple_hmac_digest, tvb, hmac_offset, (length-1), ENC_NA);
+}
+
+/**************************************************************/
+/* wimax_cmac_tuple_decoder() */
+/* decode and display the WiMax CMAC Tuple (Table 348b) */
+/* parameter: */
+/* tree - pointer of Wireshark display tree */
+/* tvb - pointer of the tvb which contains the CMAC Tuple */
+/* offset - the CMAC Tuple offset in the tvb */
+/* length - length of the CMAC Tuple */
+/**************************************************************/
+void wimax_cmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, guint offset, guint length)
+{
+ guint cmac_offset;
+ proto_item *cmac_item = NULL;
+ proto_tree *cmac_tree = NULL;
+
+ /* display decoder info (length should be 13 or 19 bytes) */
+ cmac_item = proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, length, "CMAC Tuple (%u bytes)", length);
+ /* add CMAC subtree */
+ cmac_tree = proto_item_add_subtree(cmac_item, ett_wimax_cmac_tuple);
+ /* init the local offset */
+ cmac_offset = offset;
+ /* decode and display CMAC Tuple */
+ proto_tree_add_item(cmac_tree, hf_xmac_tuple_rsvd, tvb, cmac_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(cmac_tree, hf_xmac_tuple_key_seq_num, tvb, cmac_offset, 1, ENC_BIG_ENDIAN);
+ cmac_offset++;
+ if(length > 13)
+ {
+ proto_tree_add_item(cmac_tree, hf_cmac_tuple_bsid, tvb, cmac_offset, 6, ENC_NA);
+ cmac_offset += 6;
+ }
+ proto_tree_add_item(cmac_tree, hf_packet_number_counter, tvb, cmac_offset, 4, ENC_BIG_ENDIAN);
+ cmac_offset += 4;
+ proto_tree_add_item(cmac_tree, hf_cmac_tuple_cmac_value, tvb, cmac_offset, 8, ENC_NA);
+}
+
+/******************************************************************/
+/* wimax_short_hmac_tuple_decoder() */
+/* decode and display the WiMax Short-HMAC Tuple (Table 348d) */
+/* parameter: */
+/* tree - pointer of Wireshark display tree */
+/* tvb - pointer of the tvb which contains the Short-HMAC Tuple */
+/* offset - the Short-HMAC Tuple offset in the tvb */
+/* length - length of the Short-HMAC Tuple */
+/******************************************************************/
+void wimax_short_hmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, guint offset, guint length)
+{
+ guint hmac_offset;
+ proto_item *hmac_item = NULL;
+ proto_tree *hmac_tree = NULL;
+
+ /* display decoder info (length should be at least 13 bytes ???) */
+ hmac_item = proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, length, "Short-HMAC Tuple (%u bytes)", length);
+ /* add Short-HMAC subtree */
+ hmac_tree = proto_item_add_subtree(hmac_item, ett_wimax_short_hmac_tuple);
+ /* init the local offset */
+ hmac_offset = offset;
+ /* decode and display Short-HMAC Tuple */
+ proto_tree_add_item(hmac_tree, hf_xmac_tuple_rsvd, tvb, hmac_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(hmac_tree, hf_xmac_tuple_key_seq_num, tvb, hmac_offset, 1, ENC_BIG_ENDIAN);
+ hmac_offset++;
+ proto_tree_add_item(hmac_tree, hf_packet_number_counter, tvb, hmac_offset, 4, ENC_BIG_ENDIAN);
+ hmac_offset += 4;
+ proto_tree_add_item(hmac_tree, hf_hmac_tuple_hmac_digest, tvb, hmac_offset, length - offset - 3, ENC_NA);
+}
+
+/******************************************************************/
+/* wimax_security_negotiation_parameters_decoder() */
+/* decode and display the WiMax Security Negotiation Parameters */
+/* parameter: */
+/* tvb - pointer of the tvb of service flow encodings */
+/* tree - pointer of Wireshark display tree */
+/* pinfo - pointer of Wireshark packet information structure */
+/******************************************************************/
+void wimax_security_negotiation_parameters_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ guint offset;
+ guint tvb_len, tlv_len, tlv_value_offset;
+ gint tlv_type;
+ proto_tree *tlv_tree;
+ proto_item *tlv_item;
+ tlv_info_t tlv_info;
+
+ /* get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* do nothing if the TLV fields is not exist */
+ if(!tvb_len)
+ return;
+ /* report error if the packet size is less than 2 bytes (type+length) */
+ if(tvb_len < 2)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Invalid Security Negotiation Parameters");
+ return;
+ }
+ /* process Security Negotiation Parameter TLVs */
+ for(offset = 0; offset < tvb_len; )
+ {
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Security Negotiation Params TLV error");
+ proto_tree_add_item(tree, hf_cst_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, (tlv_len + tlv_value_offset), "Security Negotiation Parameters Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, (tlv_len + tlv_value_offset), offset, tvb_len);
+#endif
+ /* update the offset */
+ offset += tlv_value_offset;
+ /* parse Security Negotiation Parameters TLVs */
+ switch (tlv_type)
+ {
+ case PKM_ATTR_SECURITY_NEGOTIATION_PARAMETER_SUB_PKM_VERSION_SUPPORT:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(&tlv_info, tree, hf_snp_pkm_version_support, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_security_negotiation_parameters);
+ proto_tree_add_item(tlv_tree, hf_snp_pkm_version_support_bit0, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_snp_pkm_version_support_bit1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_snp_pkm_version_support_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_SECURITY_NEGOTIATION_PARAMETER_SUB_AUTHORIZATION_POLICY_SUPPORT:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(&tlv_info, tree, hf_snp_auth_policy_support, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_security_negotiation_parameters);
+ proto_tree_add_item(tlv_tree, hf_snp_auth_policy_support_bit0, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_snp_auth_policy_support_bit1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_snp_auth_policy_support_bit2, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_snp_auth_policy_support_bit3, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_snp_auth_policy_support_bit4, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_snp_auth_policy_support_bit5, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_snp_auth_policy_support_bit6, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_snp_auth_policy_support_bit7, tvb, offset, 1, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_SECURITY_NEGOTIATION_PARAMETER_SUB_MESSAGE_AUTHENTICATION_CODE:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(&tlv_info, tree, hf_snp_mac_mode, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_security_negotiation_parameters);
+ proto_tree_add_item(tlv_tree, hf_snp_mac_mode_bit0, tvb, offset, 1, ENC_BIG_ENDIAN);
+ if (include_cor2_changes)
+ {
+ proto_tree_add_item(tlv_tree, hf_snp_mac_mode_bit1_rsvd, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tlv_tree, hf_snp_mac_mode_bit1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ proto_tree_add_item(tlv_tree, hf_snp_mac_mode_bit2, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_snp_mac_mode_bit3, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_snp_mac_mode_bit4, tvb, offset, 1, ENC_BIG_ENDIAN);
+ if (include_cor2_changes)
+ {
+ proto_tree_add_item(tlv_tree, hf_snp_mac_mode_bit5, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_snp_mac_mode_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item(tlv_tree, hf_snp_mac_mode_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
+ break;
+ case PKM_ATTR_SECURITY_NEGOTIATION_PARAMETER_SUB_PN_WINDOW_SIZE:
+ add_tlv_subtree(&tlv_info, tree, hf_snp_pn_window_size, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_SECURITY_NEGOTIATION_PARAMETER_SUB_PKM_FLOW_CONTROL:
+ add_tlv_subtree(&tlv_info, tree, hf_snp_max_conc_transactions, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_SECURITY_NEGOTIATION_PARAMETER_SUB_MAX_SUPPT_SECURITY_ASSNS:
+ add_tlv_subtree(&tlv_info, tree, hf_snp_max_suppt_sec_assns, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ default:
+ add_tlv_subtree(&tlv_info, tree, hf_snp_unknown_type, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ }
+ offset += tlv_len;
+ }
+}
+
+/******************************************************************/
+/* wimax_cryptographic_suite_list_decoder() */
+/* decode and display the WiMax Cryptographic Suite List */
+/* parameter: */
+/* tvb - pointer of the tvb of service flow encodings */
+/* tree - pointer of Wireshark display tree */
+/* pinfo - pointer of Wireshark packet information structure */
+/******************************************************************/
+void wimax_cryptographic_suite_list_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ guint offset;
+ guint tvb_len, tlv_len, tlv_value_offset;
+ gint tlv_type;
+ proto_tree *tlv_tree;
+ proto_item *tlv_item;
+ tlv_info_t tlv_info;
+
+ /* get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* do nothing if the TLV fields is not exist */
+ if(!tvb_len)
+ return;
+ /* report error if the packet size is less than 2 bytes (type+length) */
+ if(tvb_len < 2)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Invalid Crypto Suite List");
+ return;
+ }
+ /* process Cryptographic Suite List (11.9.15) */
+ for(offset = 0; offset < tvb_len; )
+ { /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Crypto Suite List TLV error");
+ proto_tree_add_item(tree, hf_cst_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, (tlv_len + tlv_value_offset), "Cryptographic Suite List TLV Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, (tlv_len + tlv_value_offset), offset, tvb_len);
+#endif
+ /* update the offset for the TLV value */
+ offset += tlv_value_offset;
+ /* parse Cryptographic Suite List */
+ switch (tlv_type)
+ {
+ case PKM_ATTR_CRYPTO_SUITE:
+ /* add subtree */
+ tlv_item = add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_crypto_suite, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_cryptographic_suite_list_decoder);
+ proto_tree_add_item(tlv_tree, hf_pkm_msg_crypto_suite_msb, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_pkm_msg_crypto_suite_middle, tvb, offset+1, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_pkm_msg_crypto_suite_lsb, tvb, offset+2, 1, ENC_BIG_ENDIAN);
+ break;
+ default:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_unknown_type, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ }
+ offset += tlv_len;
+ } /* end of TLV process while loop */
+}
+
+/******************************************************************/
+/* wimax_pkm_tlv_encoded_attributes_decoder() */
+/* decode and display the WiMax PKM message TLV Encoded Attributes*/
+/* parameter: */
+/* tvb - pointer of the tvb of service flow encodings */
+/* tree - pointer of Wireshark display tree */
+/* pinfo - pointer of Wireshark packet information structure */
+/******************************************************************/
+void wimax_pkm_tlv_encoded_attributes_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ guint offset;
+ guint tvb_len, tlv_len, tlv_value_offset;
+ gint tlv_type;
+ proto_tree *tlv_tree;
+ proto_item *tlv_item;
+ tlv_info_t tlv_info;
+
+ /* get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* do nothing if the TLV fields is not exist */
+ if(!tvb_len)
+ return;
+ /* report error if the packet size is less than 2 bytes (type+length) */
+ if(tvb_len < 2)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Invalid PKM TLV");
+ return;
+ }
+ /* process PKM message TLV Encoded Attributes (11.9) */
+ for(offset = 0; offset < tvb_len; )
+ {
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "PKM TLV error");
+ proto_tree_add_item(tree, hf_cst_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, (tlv_len + tlv_value_offset), "PKM TLV Encoded Attributes TLV Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, (tlv_len + tlv_value_offset), offset, tvb_len);
+#endif
+ /* update the offset for the TLV value */
+ offset += tlv_value_offset;
+ /* parse PKM TLV Encoded Attributes (table 370) */
+ switch (tlv_type)
+ {
+ case PKM_ATTR_DISPLAY_STRING:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_attr_display, tvb, offset-tlv_value_offset, ENC_ASCII|ENC_NA);
+ break;
+ case PKM_ATTR_AUTH_KEY:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_attr_auth_key, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case PKM_ATTR_TEK:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_attr_tek, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case PKM_ATTR_KEY_LIFE_TIME:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_attr_key_life_time, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_KEY_SEQ_NUM:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_attr_key_seq_num, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_HMAC_DIGEST:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_attr_hmac_digest, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case PKM_ATTR_SAID:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_attr_said, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_TEK_PARAM:
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_pkm_tlv_encoded_attributes_decoder, tree, proto_wimax_utility_decoders, tvb, offset-tlv_value_offset, tlv_len, "TEK Parameters");
+ /* add subtree */
+ wimax_tek_parameters_decoder(tvb_new_subset_length(tvb, offset, tlv_len), pinfo, tlv_tree);
+ break;
+ case PKM_ATTR_CBC_IV:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_attr_cbc_iv, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case PKM_ATTR_ERROR_CODE:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_attr_error_code, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_CA_CERTIFICATE:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_attr_ca_certificate, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case PKM_ATTR_SS_CERTIFICATE:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_attr_ss_certificate, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case PKM_ATTR_SECURITY_CAPABILITIES:
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_pkm_tlv_encoded_attributes_decoder, tree, proto_wimax_utility_decoders, tvb, offset-tlv_value_offset, tlv_len, "Security Capabilities");
+ /* add subtree */
+ wimax_security_capabilities_decoder(tvb_new_subset_length(tvb, offset, tlv_len), pinfo, tlv_tree);
+ break;
+ case PKM_ATTR_CRYPTO_SUITE:
+ /* add subtree */
+ tlv_item = add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_crypto_suite, tvb, offset-tlv_value_offset, ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_pkm_tlv_encoded_attributes_decoder);
+ proto_tree_add_item(tlv_tree, hf_pkm_msg_crypto_suite_msb, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_pkm_msg_crypto_suite_middle, tvb, offset+1, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_pkm_msg_crypto_suite_lsb, tvb, offset+2, 1, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_CRYPTO_LIST:
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_pkm_tlv_encoded_attributes_decoder, tree, proto_wimax_utility_decoders, tvb, offset-tlv_value_offset, tlv_len, "Cryptographic-Suite List");
+ /* add subtree */
+ wimax_cryptographic_suite_list_decoder(tvb_new_subset_length(tvb, offset, tlv_len), pinfo, tlv_tree);
+ break;
+#if 0 /* rserved by IEE 802.16E */
+ case PKM_ATTR_VERSION:
+ proto_tree_add_item(tree, hf_pkm_msg_version, tvb, offset, tlv_len, ENC_BIG_ENDIAN);
+ break;
+#endif
+ case PKM_ATTR_SA_DESCRIPTOR:
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_pkm_tlv_encoded_attributes_decoder, tree, proto_wimax_utility_decoders, tvb, offset-tlv_value_offset, tlv_len, "SA-Descriptor");
+ /* add subtree */
+ wimax_sa_descriptor_decoder(tvb_new_subset_length(tvb, offset, tlv_len), pinfo, tlv_tree);
+ break;
+ case PKM_ATTR_SA_TYPE:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_sa_type, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_SECURITY_NEGOTIATION_PARAMETERS:
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_pkm_tlv_encoded_attributes_decoder, tree, proto_wimax_utility_decoders, tvb, offset-tlv_value_offset, tlv_len, "Security Negotiation Parameters");
+ /* add subtree */
+ wimax_security_negotiation_parameters_decoder(tvb_new_subset_length(tvb, offset, tlv_len), pinfo, tlv_tree);
+ break;
+ case PKM_ATTR_PKM_CONFIG_SETTINGS:
+ /* add subtree */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_pkm_tlv_encoded_attributes_decoder, tree, proto_wimax_utility_decoders, tvb, offset-tlv_value_offset, tlv_len, "PKM Configuration Settings");
+ wimax_pkm_configuration_settings_decoder(tvb_new_subset_length(tvb, offset, tlv_len), pinfo, tlv_tree);
+ break;
+ case PKM_ATTR_PKM_EAP_PAYLOAD:
+ tlv_item = add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_eap_payload, tvb, offset-tlv_value_offset, ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_pkm_tlv_encoded_attributes_decoder);
+ if (eap_handle)
+ call_dissector(eap_handle, tvb_new_subset_length(tvb, offset, tlv_len), pinfo, tlv_tree);
+ break;
+ case PKM_ATTR_PKM_NONCE:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_nonce, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case PKM_ATTR_AUTH_RESULT_CODE:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_auth_result_code, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_SA_SERVICE_TYPE:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_sa_service_type, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_FRAME_NUMBER:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_frame_number, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_SS_RANDOM:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_ss_random, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case PKM_ATTR_BS_RANDOM:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_bs_random, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case PKM_ATTR_PRE_PAK:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_pre_pak, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case PKM_ATTR_BS_CERTIFICATE:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_bs_certificate, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case PKM_ATTR_SIG_BS:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_sig_bs, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case PKM_ATTR_MS_MAC_ADDRESS:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_ms_mac_address, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case PKM_ATTR_CMAC_DIGEST:
+ /* add TLV subtree */
+ tlv_item = add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_cmac_digest, tvb, offset-tlv_value_offset, ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_pkm_tlv_encoded_attributes_decoder);
+ proto_tree_add_item(tlv_tree, hf_pkm_attr_cmac_digest_pn, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_pkm_attr_cmac_digest_value, tvb, (offset + 4), 8, ENC_NA);
+ break;
+ case PKM_ATTR_KEY_PUSH_MODES:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_push_modes, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_KEY_PUSH_COUNTER:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_key_push_counter, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_GKEK:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_gkek, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case PKM_ATTR_SIG_SS:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_sig_ss, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case PKM_ATTR_AKID:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_akid, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ default:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_unknown_type, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ }
+ offset += tlv_len;
+ } /* end of TLV process while loop */
+}
+
+/******************************************************************/
+/* wimax_tek_parameters_decoder() */
+/* decode and display the WiMax TEK Parameters subattributes */
+/* parameter: */
+/* tvb - pointer of the tvb of service flow encodings */
+/* tree - pointer of Wireshark display tree */
+/* pinfo - pointer of Wireshark packet information structure */
+/******************************************************************/
+void wimax_tek_parameters_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ guint offset;
+ guint tvb_len, tlv_len, tlv_value_offset;
+ gint tlv_type;
+ tlv_info_t tlv_info;
+
+ /* get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* do nothing if the TLV fields is not exist */
+ if(!tvb_len)
+ return;
+ /* report error if the packet size is less than 2 bytes (type+length) */
+ if(tvb_len < 2)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Invalid TEK Params");
+ return;
+ }
+ /* process PKM Message TEK Parameters (11.9.8) */
+ for(offset = 0; offset < tvb_len; )
+ {
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "TEK Param TLV error");
+ proto_tree_add_item(tree, hf_cst_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, (tlv_len + tlv_value_offset), "TEK Parameters Subattributes TLV Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, (tlv_len + tlv_value_offset), offset, tvb_len);
+#endif
+ /* parse TEK Parameters Subattributes (table 372) */
+ switch (tlv_type)
+ {
+ case PKM_ATTR_TEK:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_attr_tek, tvb, offset, ENC_NA);
+ break;
+ case PKM_ATTR_KEY_LIFE_TIME:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_attr_key_life_time, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_KEY_SEQ_NUM:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_attr_key_seq_num, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_CBC_IV:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_attr_cbc_iv, tvb, offset, ENC_NA);
+ break;
+ case PKM_ATTR_ASSOCIATED_GKEK_SEQ_NUM:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_associated_gkek_seq_number, tvb, offset, ENC_NA);
+ break;
+ default:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_unknown_type, tvb, offset, ENC_NA);
+ break;
+ }
+ offset += (tlv_len+tlv_value_offset);
+ } /* end of TLV process while loop */
+}
+
+/******************************************************************/
+/* wimax_pkm_configuration_settings_decoder() */
+/* decode and display the WiMax PKM Configuration Settings */
+/* parameter: */
+/* tvb - pointer of the tvb of service flow encodings */
+/* tree - pointer of Wireshark display tree */
+/* pinfo - pointer of Wireshark packet information structure */
+/******************************************************************/
+void wimax_pkm_configuration_settings_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ guint offset;
+ guint tvb_len, tlv_len, tlv_value_offset;
+ gint tlv_type;
+ tlv_info_t tlv_info;
+
+ /* get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* do nothing if the TLV fields is not exist */
+ if(!tvb_len)
+ return;
+ /* report error if the packet size is less than 2 bytes (type+length) */
+ if(tvb_len < 2)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Invalid PKM Config Settings");
+ return;
+ }
+ /* process PKM Configuration Settings (11.9.19) */
+ for(offset = 0; offset < tvb_len; )
+ {
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "PKM Config Settings TLV error");
+ proto_tree_add_item(tree, hf_cst_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, (tlv_len + tlv_value_offset), "PKM Configuration Settings TLV Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, (tlv_len + tlv_value_offset), offset, tvb_len);
+#endif
+ /* parse PKM Configuration Settings (11.9.19.1 - 11.9.19.7 */
+ switch (tlv_type)
+ {
+ case PKM_ATTR_PKM_CONFIG_SETTINGS_AUTHORIZE_WAIT_TIMEOUT:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_config_settings_authorize_waitout, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_PKM_CONFIG_SETTINGS_REAUTHORIZE_WAIT_TIMEOUT:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_config_settings_reauthorize_waitout, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_PKM_CONFIG_SETTINGS_AUTHORIZATION_GRACE_TIME:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_config_settings_grace_time, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_PKM_CONFIG_SETTINGS_OPERATIONAL_WAIT_TIMEOUT:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_config_settings_operational_waittime, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_PKM_CONFIG_SETTINGS_REKEY_WAIT_TIMEOUT:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_config_settings_rekey_wait_timeout, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_PKM_CONFIG_SETTINGS_TEK_GRACE_TIME:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_config_settings_tek_grace_time, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_PKM_CONFIG_SETTINGS_AUTHORIZE_REJECT_WAIT_TIMEOUT:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_config_settings_authorize_reject_wait_timeout, tvb, offset, ENC_BIG_ENDIAN);
+ break;
+ default:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_unknown_type, tvb, offset, ENC_NA);
+ break;
+ }
+ offset += (tlv_len+tlv_value_offset);
+ } /* end of TLV process while loop */
+}
+
+/******************************************************************/
+/* wimax_sa_descriptor_decoder() */
+/* decode and display the WiMax PKM message SA-Descriptor */
+/* parameter: */
+/* tvb - pointer of the tvb of service flow encodings */
+/* tree - pointer of Wireshark display tree */
+/* pinfo - pointer of Wireshark packet information structure */
+/******************************************************************/
+void wimax_sa_descriptor_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ guint offset;
+ guint tvb_len, tlv_len, tlv_value_offset;
+ gint tlv_type;
+ proto_tree *tlv_tree;
+ proto_item *tlv_item;
+ tlv_info_t tlv_info;
+
+ /* get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* do nothing if the TLV fields is not exist */
+ if(!tvb_len)
+ return;
+ /* report error if the packet size is less than 2 bytes (type+length) */
+ if(tvb_len < 2)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Invalid SA-Descriptor");
+ return;
+ }
+ /* process SA-Descriptor (11.9.17) */
+ for(offset = 0; offset < tvb_len; )
+ {
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "SA-Descriptor TLV error");
+ proto_tree_add_item(tree, hf_cst_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, (tlv_len + tlv_value_offset), "SA-Descriptor TLV Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, (tlv_len + tlv_value_offset), offset, tvb_len);
+#endif
+ /* update the offset for the TLV value */
+ offset += tlv_value_offset;
+ /* parse SA-Descriptor (table 380) */
+ switch (tlv_type)
+ {
+ case PKM_ATTR_SAID:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_attr_said, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_SA_TYPE:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_sa_type, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_SA_SERVICE_TYPE:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_attr_sa_service_type, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case PKM_ATTR_CRYPTO_SUITE:
+ /* add subtree */
+ tlv_item = add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_crypto_suite, tvb, offset-tlv_value_offset, ENC_NA);
+ tlv_tree = proto_item_add_subtree(tlv_item, ett_sa_descriptor_decoder);
+ proto_tree_add_item(tlv_tree, hf_pkm_msg_crypto_suite_msb, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_pkm_msg_crypto_suite_middle, tvb, offset+1, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_pkm_msg_crypto_suite_lsb, tvb, offset+2, 1, ENC_BIG_ENDIAN);
+ break;
+ default:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_unknown_type, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ }
+ offset += tlv_len;
+ } /* end of TLV process while loop */
+}
+
+/******************************************************************/
+/* wimax_security_capabilities_decoder() */
+/* decode and display the WiMax Security Capabilities */
+/* parameter: */
+/* tvb - pointer of the tvb of service flow encodings */
+/* tree - pointer of Wireshark display tree */
+/* pinfo - pointer of Wireshark packet information structure */
+/******************************************************************/
+void wimax_security_capabilities_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ guint offset;
+ guint tvb_len, tlv_len, tlv_value_offset;
+ gint tlv_type;
+ proto_tree *tlv_tree = NULL;
+ tlv_info_t tlv_info;
+
+ /* get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* do nothing if the TLV fields is not exist */
+ if(!tvb_len)
+ return;
+ /* report error if the packet size is less than 2 bytes (type+length) */
+ if(tvb_len < 2)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Invalid Security Capabilities");
+ return;
+ }
+ /* process Security Capabilities (11.9.13) */
+ for(offset = 0; offset < tvb_len; )
+ {
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Security Capabilities TLV error");
+ proto_tree_add_item(tree, hf_cst_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, (tlv_len + tlv_value_offset), "Security Capabilities TLV Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, (tlv_len + tlv_value_offset), offset, tvb_len);
+#endif
+ /* parse Security Capabilities (table 374) */
+ switch (tlv_type)
+ {
+ case PKM_ATTR_CRYPTO_LIST:
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_security_capabilities_decoder, tree, proto_wimax_utility_decoders, tvb, offset, tlv_len, "Cryptographic-Suite List");
+ /* add subtree */
+ wimax_cryptographic_suite_list_decoder(tvb_new_subset_length(tvb, offset, tlv_len), pinfo, tlv_tree);
+ break;
+ default:
+ add_tlv_subtree(&tlv_info, tree, hf_pkm_msg_unknown_type, tvb, offset, ENC_NA);
+ break;
+ }
+ offset += (tlv_len+tlv_value_offset);
+ } /* end of TLV process while loop */
+}
+
+/******************************************************************/
+/* wimax_vendor_specific_information_decoder() */
+/* decode and display the WiMax Vendor-Specific Information */
+/* parameter: */
+/* tvb - pointer of the tvb of service flow encodings */
+/* tree - pointer of Wireshark display tree */
+/* pinfo - pointer of Wireshark packet information structure */
+/******************************************************************/
+void wimax_vendor_specific_information_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ guint offset;
+ guint tvb_len, tlv_len, tlv_value_offset;
+ gint tlv_type;
+ tlv_info_t tlv_info;
+
+ /* get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* do nothing if the TLV fields is not exist */
+ if(!tvb_len)
+ return;
+ /* report error if the packet size is less than 2 bytes (type+length) */
+ if(tvb_len < 2)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Invalid Vendor Specific Info");
+ proto_tree_add_expert(tree, pinfo, &ei_common_tlv_info, tvb, 0, tvb_len);
+ return;
+ }
+ /* process Vendor Specific Information (11.1.6) */
+ for(offset = 0; offset < tvb_len; )
+ {
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Vendor Specific Info TLV error");
+ proto_tree_add_item(tree, hf_cst_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, (tlv_len + tlv_value_offset), "Vendor Specific Info TLV Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, (tlv_len + tlv_value_offset), offset, tvb_len);
+#endif
+ /* parse Vendor Specific Information (11.1.6) */
+ if(tlv_type == VENDOR_ID_ENCODING)
+ {
+ /* decode and display the Vendor ID Encoding */
+ add_tlv_subtree(&tlv_info, tree, hf_common_tlv_vendor_id, tvb, offset, ENC_NA);
+ }
+ else
+ {
+ /* decode and display the Vendor Specific Info */
+ proto_tree_add_item(tree, hf_common_tlv_vendor_specific_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ if(get_tlv_length_type(&tlv_info) == 0)
+ { /* single byte TLV length */
+ proto_tree_add_item(tree, hf_common_tlv_vendor_specific_length, tvb, (offset + 1), 1, ENC_BIG_ENDIAN);
+ }
+ else
+ { /* multiple bytes TLV length */
+ /* display the length of the TLV length with MSB */
+ proto_tree_add_item(tree, hf_common_tlv_vendor_specific_length_size, tvb, (offset + 1), 1, ENC_BIG_ENDIAN);
+ if(get_tlv_size_of_length(&tlv_info))
+ { /* display the multiple byte TLV length */
+ proto_tree_add_uint(tree, hf_common_tlv_vendor_specific_length, tvb, (offset + 2), 1, get_tlv_size_of_length(&tlv_info));
+ }
+ else
+ { /* length = 0 */
+ continue;
+ }
+ }
+ proto_tree_add_item(tree, hf_common_tlv_vendor_specific_value, tvb, (offset + tlv_value_offset), tlv_len, ENC_NA);
+ }
+ /* update the offset */
+ offset += tlv_value_offset + tlv_len;
+ }
+}
+
+/******************************************************************/
+/* wimax_common_tlv_encoding_decoder() */
+/* decode and display the WiMax Common TLV Encoding (Table 346) */
+/* parameter: */
+/* tvb - pointer of the tvb of service flow encodings */
+/* tree - pointer of Wireshark display tree */
+/* pinfo - pointer of Wireshark packet information structure */
+/******************************************************************/
+guint wimax_common_tlv_encoding_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ guint offset, value;
+ guint tvb_len, tlv_len, tlv_value_offset;
+ gint tlv_type;
+ proto_tree *tlv_tree = NULL;
+ tlv_info_t tlv_info;
+ gfloat current_power;
+
+ /* get the tvb reported length */
+ tvb_len = tvb_reported_length(tvb);
+ /* do nothing if the TLV fields is not exist */
+ if(!tvb_len)
+ return 0;
+ /* report error if the packet size is less than 2 bytes (type+length) */
+ if(tvb_len < 2)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Invalid Common TLV encoding");
+ proto_tree_add_item(tree, hf_cst_invalid_tlv, tvb, 0, tvb_len, ENC_NA);
+ return 0;
+ }
+ /* process Common TLV Encoding (11.1) */
+ for(offset = 0; offset < tvb_len; )
+ {
+ /* get the TLV information */
+ init_tlv_info(&tlv_info, tvb, offset);
+ /* get the TLV type */
+ tlv_type = get_tlv_type(&tlv_info);
+ /* get the TLV length */
+ tlv_len = get_tlv_length(&tlv_info);
+ if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1)
+ { /* invalid tlv info */
+ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Common TLV encoding TLV error");
+ proto_tree_add_item(tree, hf_cst_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA);
+ break;
+ }
+ /* get the TLV value offset */
+ tlv_value_offset = get_tlv_value_offset(&tlv_info);
+#ifdef DEBUG /* for debug only */
+ proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, (tlv_len + tlv_value_offset), "Common TLV Encoding TLV Type: %u (%u bytes, offset=%u, tvb_len=%u)", tlv_type, (tlv_len + tlv_value_offset), offset, tvb_len);
+#endif
+ /* update the offset for the TLV value */
+ offset += tlv_value_offset;
+ /* parse Common TLV Encoding (table 346) */
+ switch (tlv_type)
+ {
+ case VENDOR_SPECIFIC_INFO:
+ /* display Vendor-Specific Information */
+ /* add subtree */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_vendor_specific_info_decoder, tree, proto_wimax_utility_decoders, tvb, offset-tlv_value_offset, tlv_len, "Vendor-Specific Information");
+ /* decode and display the Vendor-Specific Information */
+ wimax_vendor_specific_information_decoder(tvb_new_subset_length(tvb, offset, tlv_len), pinfo, tlv_tree);
+ break;
+ case VENDOR_ID_ENCODING:
+ add_tlv_subtree(&tlv_info, tree, hf_common_tlv_vendor_id, tvb, offset-tlv_value_offset, ENC_NA);
+ break;
+ case DSx_UPLINK_FLOW:
+ /* display Uplink Service Flow Encodings info */
+ /* add subtree */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_ul_service_flow_decoder, tree, proto_wimax_utility_decoders, tvb, offset-tlv_value_offset, tlv_len, "Uplink Service Flow Encodings");
+ /* decode and display the UL Service Flow Encodings */
+ wimax_service_flow_encodings_decoder(tvb_new_subset_length(tvb, offset, tlv_len), pinfo, tlv_tree);
+ break;
+ case DSx_DOWNLINK_FLOW:
+ /* display Downlink Service Flow Encodings info */
+ /* add subtree */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_dl_service_flow_decoder, tree, proto_wimax_utility_decoders, tvb, offset-tlv_value_offset, tlv_len, "Downlink Service Flow Encodings");
+ /* decode and display the DL Service Flow Encodings */
+ wimax_service_flow_encodings_decoder(tvb_new_subset_length(tvb,offset, tlv_len), pinfo, tlv_tree);
+ break;
+ case CURRENT_TX_POWER:
+ tlv_tree = add_tlv_subtree_no_item(&tlv_info, tree, hf_common_current_transmitted_power, tvb, offset-tlv_value_offset);
+ value = tvb_get_guint8(tvb, offset);
+ current_power = (gfloat)((value - 128) / 2.0);
+ proto_tree_add_float_format_value(tlv_tree, hf_common_current_transmitted_power, tvb, offset, tvb_len, current_power, "%.2f dBm (Value: 0x%x)", current_power, value);
+ break;
+ case MAC_VERSION_ENCODING:
+ add_tlv_subtree(&tlv_info, tree, hf_common_tlv_mac_version, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
+ break;
+ case HMAC_TUPLE: /* Table 348d */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_vendor_specific_info_decoder, tree, proto_wimax_utility_decoders, tvb, offset-tlv_value_offset, tlv_len, "HMAC Tuple");
+ /* decode and display the HMAC Tuple */
+ wimax_hmac_tuple_decoder(tlv_tree, tvb, offset, tlv_len);
+ break;
+ case CMAC_TUPLE: /* Table 348b */
+ tlv_tree = add_protocol_subtree(&tlv_info, ett_vendor_specific_info_decoder, tree, proto_wimax_utility_decoders, tvb, offset-tlv_value_offset, tlv_len, "CMAC Tuple");
+ /* decode and display the CMAC Tuple */
+ wimax_cmac_tuple_decoder(tlv_tree, tvb, offset, tlv_len);
+ break;
+ default:
+ /* Back to calling routine to finish decoding. */
+ return offset - tlv_value_offset; /* Ret amount decoded. */
+ break;
+ }
+ offset += tlv_len;
+ } /* end of while loop */
+ return offset;
+}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/plugins/epan/wimax/wimax_utils.h b/plugins/epan/wimax/wimax_utils.h
new file mode 100644
index 0000000000..32bb7b0921
--- /dev/null
+++ b/plugins/epan/wimax/wimax_utils.h
@@ -0,0 +1,70 @@
+/* wimax_utils.h
+ * Header file of WiMax Utility Decoders
+ *
+ * Copyright (c) 2007 by Intel Corporation.
+ *
+ * Author: Lu Pan <lu.pan@intel.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef WIMAX_UTILS_H
+#define WIMAX_UTILS_H
+
+#include <epan/packet.h>
+
+extern void dissect_extended_tlv(proto_tree *reg_req_tree, gint tlv_type, tvbuff_t *tvb, guint tlv_offset, guint tlv_len, packet_info *pinfo, guint offset, gint proto_registry);
+extern void dissect_power_saving_class(proto_tree *rng_req_tree, gint tlv_type, tvbuff_t *tvb, guint compound_tlv_len, packet_info *pinfo, guint offset);
+extern gint dissect_ulmap_ie(proto_tree *ie_tree, packet_info* pinfo, gint offset, gint length, tvbuff_t *tvb);
+extern guint get_service_type(void);
+extern void init_wimax_globals(void); /* defined in msg_ulmap.c */
+extern gboolean is_down_link(packet_info *pinfo);
+extern gint RCID_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb, gint RCID_Type);
+extern void wimax_service_flow_encodings_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+extern void wimax_convengence_service_parameter_encoding_rules_decoder(guint sfe_type, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+extern gint wimax_decode_ulmapc(proto_tree *base_tree, packet_info* pinfo, gint offset, gint length, tvbuff_t *tvb);
+extern gint wimax_decode_ulmap_reduced_aas(proto_tree *ie_tree, gint offset, gint length, tvbuff_t *tvb);
+extern gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdu_tree);
+extern gint wimax_decode_dlmap_reduced_aas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree);
+extern void wimax_error_parameter_set_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+extern void wimax_hmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, guint offset, guint length);
+extern void wimax_cmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, guint offset, guint length);
+extern void wimax_short_hmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, guint offset, guint length);
+extern void wimax_security_negotiation_parameters_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+extern void wimax_tek_parameters_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+extern void wimax_pkm_configuration_settings_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+extern void wimax_sa_descriptor_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+extern void wimax_pkm_tlv_encoded_attributes_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+extern void wimax_cryptographic_suite_list_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+extern void wimax_security_capabilities_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+extern void wimax_vendor_specific_information_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+extern guint wimax_common_tlv_encoding_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+
+//Windows can't handle plugins using globals from epan, so copies are necessary
+extern const unit_name_string wimax_units_byte_bytes;
+extern const unit_name_string wimax_units_bit_sec;
+extern const unit_name_string wimax_units_db;
+extern const unit_name_string wimax_units_dbm;
+extern const unit_name_string wimax_units_frame_frames;
+extern const unit_name_string wimax_units_frame_offset;
+extern const unit_name_string wimax_units_hz;
+extern const unit_name_string wimax_units_khz;
+extern const unit_name_string wimax_units_ms;
+extern const unit_name_string wimax_units_ps;
+
+#endif /* WIMAX_UTILS_H */