📄 plugins-wimax-msg_rep.c
字号:
plugins/wimax/msg_rep.c - Google Code Search这是 Google 取自
http://anonsvn.wireshark.org/wireshark/trunk 的 plugins/wimax/msg_rep.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
/* msg_rep.c
* WiMax MAC Management REP-REQ/RSP Messages decoders
*
* 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.
*/
/*
#define DEBUG // for debug only
*/
/* Include files */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "moduleinfo.h"
#include <glib.h>
#include <epan/packet.h>
#include <epan/prefs.h>
#include "wimax_tlv.h"
#include "wimax_mac.h"
#include "wimax_utils.h"
/* forward reference */
void proto_register_mac_mgmt_msg_rep(void);
void dissect_mac_mgmt_msg_rep_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
void dissect_mac_mgmt_msg_rep_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
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;
/* Setup protocol subtree array */
static gint *ett_rep[] =
{
&ett_mac_mgmt_msg_rep_req_decoder,
&ett_mac_mgmt_msg_rep_rsp_decoder,
};
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_req_message_type = -1;
static gint hf_rep_rsp_message_type = -1;
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_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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -