📄 plugins-wimax-msg_dlmap.c
字号:
plugins/wimax/msg_dlmap.c - Google Code Search这是 Google 取自
http://anonsvn.wireshark.org/wireshark/trunk 的 plugins/wimax/msg_dlmap.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_dlmap.c
* WiMax MAC Management DL-MAP Message decoder
*
* Copyright (c) 2007 by Intel Corporation.
*
* Author: Mike Harvey <michael.harvey@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 "moduleinfo.h"
#include <glib.h>
#include <epan/packet.h>
#include <epan/prefs.h>
#include "crc.h"
#include "wimax_bits.h"
extern gint proto_wimax;
extern gboolean include_cor2_changes;
#define MAC_MGMT_MSG_DLMAP 2
#define XBIT(var, bits, desc) \
do { \
var = BIT_BITS(bit, bufptr, bits); \
proto_tree_add_text(tree, tvb, BITHI(bit, bits), desc ": %d", var); \
bit += bits; \
} while(0)
#define VBIT(var, bits, hf) \
do { \
var = BIT_BITS(bit, bufptr, bits); \
proto_tree_add_uint(tree, hf, tvb, BITHI(bit,bits), var); \
bit += bits; \
} while(0)
#define XNIB(var, nibs, desc) \
do { \
var = NIB_NIBS(nib, bufptr, nibs); \
proto_tree_add_text(tree, tvb, NIBHI(nib, nibs), desc ": %d", 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;
extern gint man_ofdma;
/* forward reference */
void dissect_mac_mgmt_msg_dlmap_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
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;
/* 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,
};
#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
/* 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 }
};
/* 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 }
};
/* dl-map fields */
static gint hf_dlmap_message_type = -1;
static gint hf_dlmap_phy_fdur = -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_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;
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;
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;
/* DL-MAP fields display */
static hf_register_info hf[] =
{
{
&hf_dlmap_message_type,
{
"MAC Management Message Type", "wimax.macmgtmsgtype.dlmap",
FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
}
},
{
&hf_dlmap_bsid,
{
"Base Station ID", "wimax.dlmap.bsid",
FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL
}
},
{
&hf_dlmap_dcd,
{
"DCD Count", "wimax.dlmap.dcd",
FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
}
},
{
&hf_dlmap_fch_expected,
{
"FCH Expected", "wimax.dlmap.fch_expected",
FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL
}
},
{
&hf_dlmap_ie,
{
"DL-MAP IE", "wimax.dlmap.ie",
FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL
}
},
{
&hf_dlmap_ie_boosting,
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -