亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? plugins-wimax-wimax_pdu_decoder.c

?? Intel的WIMAX代碼,主要是mac層code
?? C
字號:
plugins/wimax/wimax_pdu_decoder.c - Google Code Search這是 Google 取自 
      http://anonsvn.wireshark.org/wireshark/trunk 的 
      plugins/wimax/wimax_pdu_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_pdu_decoder.c
 * WiMax PDU Burst 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"

extern gint proto_wimax;

extern void proto_register_mac_header_generic(void);
extern void proto_register_mac_header_type_1(void);
extern void proto_register_mac_header_type_2(void);


/* MAC Header dissector prototypes */
extern void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
extern void dissect_mac_header_type_1_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
extern void dissect_mac_header_type_2_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
extern void dissector_wimax_harq_map_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
extern gboolean is_down_link(address *src_address);
extern gint wimax_decode_dlmap_reduced_aas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree);
extern gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdu_tree);

#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;

/* forward reference */
static void dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);

static gint proto_wimax_pdu_decoder = -1;
static gint ett_wimax_pdu_decoder = -1;

static int hf_wimax_value_bytes = -1;

/* PDU display */
static hf_register_info hf[] =
{
	{
		&hf_wimax_value_bytes,
		{
			"Values", "wimax.pdu.value",
			FT_BYTES, BASE_HEX, NULL, 0x0,
			"", HFILL
		}
	},
};

/* Setup protocol subtree array */
static gint *ett[] =
{
	&ett_wimax_pdu_decoder,
};

/* Register Wimax PDU Burst Protocol */
void proto_register_wimax_pdu(void)
{
	if (proto_wimax_pdu_decoder == -1)
	{
		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));

		proto_register_mac_header_generic();
		proto_register_mac_header_type_1();
		proto_register_mac_header_type_2();
	}
}

static void dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
	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, FALSE);
			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 */
			}
			dissector_wimax_harq_map_decoder(tvb_new_subset(tvb,offset,length,length), pinfo, tree);
			offset += length;
			continue;
		}
		else if((first_byte & WIMAX_MAP_TYPE_MASK) == WIMAX_COMPRESSED_DL_MAP_IND)
		{
			if(is_down_link(&pinfo->src))
			{	/* 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 */
			if (check_col(pinfo->cinfo, COL_INFO))
			{
				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, FALSE);
			break;
		}
		/* calculate the MAC header HCS */
		mac_hcs_calculated = wimax_mac_calc_crc8((guint8 *)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 */
			if (check_col(pinfo->cinfo, COL_INFO))
			{
				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, FALSE);
			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()
			 * 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: ");
				dissect_mac_header_type_2_decoder(tvb_new_subset(tvb,offset,length,length), pinfo, pdu_tree);
			}
			else
			{	/* MAC Signaling Header Type I Header */
				proto_item_append_text(pdu_item, " - Mac Type I Header: ");
				dissect_mac_header_type_1_decoder(tvb_new_subset(tvb,offset,length,length), pinfo, pdu_tree);
			}
		}
		else	/* Generic MAC Header with payload */
		{
			dissect_mac_header_generic_decoder(tvb_new_subset(tvb,offset,length,length), pinfo, pdu_tree);
		}
		offset += length;
	}
}



      取自 
      http://anonsvn.wireshark.org/wireshark/trunk 的 
      plugins/wimax/wimax_pdu_decoder.c - LGPL - C


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩毛片视频在线看| 日韩亚洲欧美一区二区三区| 欧美中文字幕一区二区三区 | 日韩一区二区在线看| 久久久一区二区三区捆绑**| 国产精品国产三级国产专播品爱网 | 亚洲欧洲综合另类| 亚洲第一av色| 国产福利精品一区| 欧美日韩一区在线| 国产欧美日韩中文久久| 亚洲综合成人在线| 国产精品综合一区二区三区| 日本丰满少妇一区二区三区| 久久无码av三级| 亚洲一区二区偷拍精品| 国产最新精品精品你懂的| 成人精品一区二区三区四区| 欧美日韩国产美| 国产精品麻豆欧美日韩ww| 日韩在线a电影| 97国产一区二区| 欧美变态tickling挠脚心| 亚洲三级在线播放| 韩国女主播一区二区三区| 在线看日韩精品电影| 久久精品亚洲乱码伦伦中文| 亚洲第一在线综合网站| 99综合影院在线| 精品88久久久久88久久久| 亚洲最新视频在线播放| 国产一区二区精品在线观看| 欧美疯狂性受xxxxx喷水图片| 国产精品区一区二区三| 精品无人区卡一卡二卡三乱码免费卡| 日本道免费精品一区二区三区| 久久日一线二线三线suv| 亚洲va韩国va欧美va| 97久久久精品综合88久久| www日韩大片| 日本vs亚洲vs韩国一区三区二区| 日本精品裸体写真集在线观看| 中文字幕av一区二区三区高| 国内精品国产成人| 欧美一级二级三级乱码| 亚洲国产另类av| 91福利国产成人精品照片| 国产精品乱人伦| 国产精品夜夜嗨| 亚洲精品一线二线三线| 日本人妖一区二区| 欧美理论电影在线| 亚洲小说欧美激情另类| 91蜜桃在线观看| 国产午夜精品美女毛片视频| 国产在线播精品第三| 精品国产一区二区三区久久影院| 日韩国产欧美视频| 欧美日韩免费观看一区二区三区 | 欧美丝袜丝交足nylons图片| 日韩理论片一区二区| 国产白丝网站精品污在线入口| 精品国产百合女同互慰| 久久er精品视频| 欧美电影免费观看高清完整版在线 | av电影一区二区| 国产亚洲一区二区三区在线观看| 精品中文字幕一区二区| 日韩精品综合一本久道在线视频| 免费观看日韩电影| 日韩午夜在线播放| 麻豆成人久久精品二区三区红| 欧美一区二区三区喷汁尤物| 亚洲一区国产视频| 欧美日韩在线播放三区四区| 日韩电影免费在线| 欧美成人女星排名| 国内久久精品视频| 久久久www免费人成精品| 国产成人免费视频精品含羞草妖精| 久久精品亚洲一区二区三区浴池 | 亚洲人成人一区二区在线观看| av一区二区不卡| 亚洲少妇30p| 欧洲在线/亚洲| 日本欧美一区二区| 欧美va在线播放| 国产成人免费在线观看| 国产精品福利av| 国产精品美女久久久久高潮| 粉嫩高潮美女一区二区三区| 亚洲色图欧洲色图婷婷| 欧美熟乱第一页| 捆绑调教一区二区三区| 久久九九99视频| 91老师片黄在线观看| 亚洲国产精品欧美一二99| 555夜色666亚洲国产免| 韩日欧美一区二区三区| 国产精品久久午夜夜伦鲁鲁| 色狠狠av一区二区三区| 视频一区二区三区在线| 久久综合色天天久久综合图片| 国产精品69久久久久水密桃 | 欧美无砖砖区免费| 日产欧产美韩系列久久99| 国产亚洲欧美日韩在线一区| av激情亚洲男人天堂| 天天操天天色综合| 欧美精品一区二区三区四区| 91小视频在线观看| 日韩av在线发布| 欧美韩日一区二区三区| 欧美三电影在线| 国产精品一区免费在线观看| 亚洲乱码一区二区三区在线观看| 欧美精品在线视频| 国产成人高清视频| 亚洲国产精品精华液网站| 精品人伦一区二区色婷婷| 99精品久久只有精品| 日本一不卡视频| 国产精品午夜电影| 69堂成人精品免费视频| 成人午夜视频免费看| 五月天久久比比资源色| 国产精品传媒视频| 欧美一区二区三区在线| www.在线欧美| 韩国视频一区二区| 亚洲高清免费在线| 国产精品日韩精品欧美在线| 欧美一级黄色录像| 色综合久久综合| 国产精品主播直播| 日韩av网站免费在线| 亚洲三级电影网站| 久久综合色综合88| 欧美日本视频在线| 成人aaaa免费全部观看| 久久99最新地址| 亚洲第一精品在线| 亚洲欧美日本韩国| 久久久久久免费| 日韩一级片网站| 欧美怡红院视频| 91同城在线观看| 成人h动漫精品一区二| 蓝色福利精品导航| 日韩高清中文字幕一区| 亚洲线精品一区二区三区八戒| 国产欧美1区2区3区| 欧美变态tickling挠脚心| 欧美乱妇一区二区三区不卡视频| aaa国产一区| 成人一区二区三区中文字幕| 狠狠色丁香婷婷综合| 美国三级日本三级久久99| 亚洲gay无套男同| 亚洲激情五月婷婷| 亚洲欧美一区二区三区孕妇| 国产精品女同互慰在线看| 久久久久久97三级| 轻轻草成人在线| 亚洲一区二区三区精品在线| 综合激情成人伊人| 中文字幕av一区 二区| 国产欧美日本一区视频| 久久女同性恋中文字幕| 精品国产免费人成在线观看| 日韩三级高清在线| 日韩一区二区在线观看| 制服丝袜av成人在线看| 欧美日韩国产综合一区二区| 欧洲av在线精品| 欧美一a一片一级一片| 欧美亚洲日本国产| 欧洲精品在线观看| 欧美亚洲动漫精品| 欧美亚洲图片小说| 欧美精品第一页| 欧美一卡二卡三卡四卡| 91精品国产91久久综合桃花| 678五月天丁香亚洲综合网| 欧美猛男超大videosgay| 欧美日本免费一区二区三区| 欧美日本视频在线| 欧美一区二区不卡视频| 日韩美一区二区三区| 久久色中文字幕| 亚洲国产精品ⅴa在线观看| 欧美极品aⅴ影院| 亚洲女人小视频在线观看| 一卡二卡三卡日韩欧美| 亚洲国产精品综合小说图片区| 日韩中文字幕不卡| 久久成人麻豆午夜电影| 国产成人精品网址| av一区二区三区四区| 91福利社在线观看|