⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plugins-wimax-wimax_compact_ulmap_ie_decoder.c

📁 Intel的WIMAX代码,主要是mac层code
💻 C
📖 第 1 页 / 共 5 页
字号:
plugins/wimax/wimax_compact_ulmap_ie_decoder.c - Google Code Search这是 
      Google 取自 
      http://anonsvn.wireshark.org/wireshark/trunk 的 
      plugins/wimax/wimax_compact_ulmap_ie_decoder.c 缓存副本

      Google 和网页作者无关,不对网页的内容负责。



http://anonsvn.wireshark.org/wireshark/trunk/plugins/wimax/
          AUTHORS
COPYING
ChangeLog
Makefile.am
Makefile.common
Makefile.nmake
README.wimax
crc.c
crc.h
crc_data.c
mac_hd_generic_decoder.c
mac_hd_type1_decoder.c
mac_hd_type2_decoder.c
mac_mgmt_msg_decoder.c
moduleinfo.h
moduleinfo.nmake
msg_aas_beam.c
msg_aas_fbck.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
packet-wmx.c
plugin.rc.in
wimax_bits.h
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_mac.h
wimax_pdu_decoder.c
wimax_phy_attributes_decoder.c
wimax_tlv.c
wimax_tlv.h
wimax_utils.c
wimax_utils.h
    /* 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>
 *
 * $Id$
 *
 * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

/* Include files */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <glib.h>
#include <epan/packet.h>
#include <epan/prefs.h>
#include "crc.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;
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;

/* 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,
};

/* 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;

/* Compact UL-MAP IE display */
static hf_register_info hf_compact_ulmap[] =
{
	{
		&hf_culmap_ul_map_type,
		{"UL-MAP Type", "wimax.compact_ulmap.ul_map_type", FT_UINT8, BASE_DEC, NULL, UL_MAP_TYPE_MASK, "", HFILL}
	},
	{
		&hf_culmap_ul_map_type_1,
		{"UL-MAP Type", "wimax.compact_ulmap.ul_map_type", FT_UINT8, BASE_DEC, NULL, UL_MAP_TYPE_MASK_1, "", HFILL}
	},
	{
		&hf_culmap_reserved,
		{"Reserved", "wimax.compact_ulmap.reserved", FT_UINT8, BASE_HEX, NULL, UL_MAP_RESERVED_MASK, "", HFILL}
	},
	{
		&hf_culmap_reserved_1,
		{"Reserved", "wimax.compact_ulmap.reserved", FT_UINT8, BASE_HEX, NULL, UL_MAP_RESERVED_MASK_1, "", HFILL}
	},
	{
		&hf_culmap_nep_code,
		{"Nep Code", "wimax.compact_ulmap.nep_code", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, "", HFILL}
	},
	{
		&hf_culmap_nep_code_1,
		{"Nep Code", "wimax.compact_ulmap.nep_code", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, "", HFILL}
	},
	{
		&hf_culmap_nsch_code,
		{"Nsch Code", "wimax.compact_ulmap.nsch_code", FT_UINT8, BASE_HEX, NULL, MSB_NIBBLE_MASK, "", HFILL}
	},
	{
		&hf_culmap_nsch_code_1,
		{"Nsch Code", "wimax.compact_ulmap.nsch_code", FT_UINT8, BASE_HEX, NULL, LSB_NIBBLE_MASK, "", HFILL}
	},
	{
		&hf_culmap_shortened_uiuc,
		{"Shortened UIUC", "wimax.compact_ulmap.shortened_uiuc", FT_UINT8, BASE_HEX, NULL, SHORTENED_UIUC_MASK, "", HFILL}
	},
	{
		&hf_culmap_companded_sc,
		{"Companded SC", "wimax.compact_ulmap.companded_sc", FT_UINT8, BASE_HEX, NULL, COMPANDED_SC_MASK, "", HFILL}
	},
	{
		&hf_culmap_shortened_uiuc_1,
		{"Shortened UIUC", "wimax.compact_ulmap.shortened_uiuc", FT_UINT16, BASE_HEX, NULL, SHORTENED_UIUC_MASK_1, "", HFILL}
	},
	{
		&hf_culmap_companded_sc_1,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -