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

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

?? print-802_11.c

?? TCPDUMP的C語言源代碼,是在數據鏈路層的應用
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* * Copyright (c) 2001 *	Fortress Technologies, Inc.  All rights reserved. *      Charlie Lenahan (clenahan@fortresstech.com) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entirety, (2) * distributions including binary code include the above copyright notice and * this paragraph in its entirety in the documentation or other materials * provided with the distribution, and (3) all advertising materials mentioning * features or use of this software display the following acknowledgement: * ``This product includes software developed by the University of California, * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of * the University nor the names of its contributors may be used to endorse * or promote products derived from this software without specific prior * written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */#ifndef lintstatic const char rcsid[] _U_ =    "@(#) $Header: /tcpdump/master/tcpdump/print-802_11.c,v 1.47.2.2 2007-12-29 23:25:28 guy Exp $ (LBL)";#endif#ifdef HAVE_CONFIG_H#include "config.h"#endif#include <tcpdump-stdinc.h>#include <stdio.h>#include <pcap.h>#include <string.h>#include "interface.h"#include "addrtoname.h"#include "ethertype.h"#include "extract.h"#include "cpack.h"#include "ieee802_11.h"#include "ieee802_11_radio.h"#define PRINT_SSID(p) \	switch (p.ssid_status) { \	case TRUNCATED: \		return 0; \	case PRESENT: \		printf(" ("); \		fn_print(p.ssid.ssid, NULL); \		printf(")"); \		break; \	case NOT_PRESENT: \		break; \	}#define PRINT_RATE(_sep, _r, _suf) \	printf("%s%2.1f%s", _sep, (.5 * ((_r) & 0x7f)), _suf)#define PRINT_RATES(p) \	switch (p.rates_status) { \	case TRUNCATED: \		return 0; \	case PRESENT: \		do { \			int z; \			const char *sep = " ["; \			for (z = 0; z < p.rates.length ; z++) { \				PRINT_RATE(sep, p.rates.rate[z], \					(p.rates.rate[z] & 0x80 ? "*" : "")); \				sep = " "; \			} \			if (p.rates.length != 0) \				printf(" Mbit]"); \		} while (0); \		break; \	case NOT_PRESENT: \		break; \	}#define PRINT_DS_CHANNEL(p) \	switch (p.ds_status) { \	case TRUNCATED: \		return 0; \	case PRESENT: \		printf(" CH: %u", p.ds.channel); \		break; \	case NOT_PRESENT: \		break; \	} \	printf("%s", \	    CAPABILITY_PRIVACY(p.capability_info) ? ", PRIVACY" : "" );static const char *auth_alg_text[]={"Open System","Shared Key","EAP"};#define NUM_AUTH_ALGS	(sizeof auth_alg_text / sizeof auth_alg_text[0])static const char *status_text[] = {	"Succesful",  /*  0  */	"Unspecified failure",  /*  1  */	"Reserved",	  /*  2  */	"Reserved",	  /*  3  */	"Reserved",	  /*  4  */	"Reserved",	  /*  5  */	"Reserved",	  /*  6  */	"Reserved",	  /*  7  */	"Reserved",	  /*  8  */	"Reserved",	  /*  9  */	"Cannot Support all requested capabilities in the Capability Information field",	  /*  10  */	"Reassociation denied due to inability to confirm that association exists",	  /*  11  */	"Association denied due to reason outside the scope of the standard",	  /*  12  */	"Responding station does not support the specified authentication algorithm ",	  /*  13  */	"Received an Authentication frame with authentication transaction " \		"sequence number out of expected sequence",	  /*  14  */	"Authentication rejected because of challenge failure",	  /*  15 */	"Authentication rejected due to timeout waiting for next frame in sequence",	  /*  16 */	"Association denied because AP is unable to handle additional associated stations",	  /*  17 */	"Association denied due to requesting station not supporting all of the " \		"data rates in BSSBasicRateSet parameter",	  /*  18 */};#define NUM_STATUSES	(sizeof status_text / sizeof status_text[0])static const char *reason_text[] = {	"Reserved", /* 0 */	"Unspecified reason", /* 1 */	"Previous authentication no longer valid",  /* 2 */	"Deauthenticated because sending station is leaving (or has left) IBSS or ESS", /* 3 */	"Disassociated due to inactivity", /* 4 */	"Disassociated because AP is unable to handle all currently associated stations", /* 5 */	"Class 2 frame received from nonauthenticated station", /* 6 */	"Class 3 frame received from nonassociated station", /* 7 */	"Disassociated because sending station is leaving (or has left) BSS", /* 8 */	"Station requesting (re)association is not authenticated with responding station", /* 9 */};#define NUM_REASONS	(sizeof reason_text / sizeof reason_text[0])static intwep_print(const u_char *p){	u_int32_t iv;	if (!TTEST2(*p, IEEE802_11_IV_LEN + IEEE802_11_KID_LEN))		return 0;	iv = EXTRACT_LE_32BITS(p);	printf("Data IV:%3x Pad %x KeyID %x", IV_IV(iv), IV_PAD(iv),	    IV_KEYID(iv));	return 1;}static voidparse_elements(struct mgmt_body_t *pbody, const u_char *p, int offset){	/*	 * We haven't seen any elements yet.	 */	pbody->challenge_status = NOT_PRESENT;	pbody->ssid_status = NOT_PRESENT;	pbody->rates_status = NOT_PRESENT;	pbody->ds_status = NOT_PRESENT;	pbody->cf_status = NOT_PRESENT;	pbody->tim_status = NOT_PRESENT;	for (;;) {		if (!TTEST2(*(p + offset), 1))			return;		switch (*(p + offset)) {		case E_SSID:			/* Present, possibly truncated */			pbody->ssid_status = TRUNCATED;			if (!TTEST2(*(p + offset), 2))				return;			memcpy(&pbody->ssid, p + offset, 2);			offset += 2;			if (pbody->ssid.length != 0) {				if (pbody->ssid.length >				    sizeof(pbody->ssid.ssid) - 1)					return;				if (!TTEST2(*(p + offset), pbody->ssid.length))					return;				memcpy(&pbody->ssid.ssid, p + offset,				    pbody->ssid.length);				offset += pbody->ssid.length;			}			pbody->ssid.ssid[pbody->ssid.length] = '\0';			/* Present and not truncated */			pbody->ssid_status = PRESENT;			break;		case E_CHALLENGE:			/* Present, possibly truncated */			pbody->challenge_status = TRUNCATED;			if (!TTEST2(*(p + offset), 2))				return;			memcpy(&pbody->challenge, p + offset, 2);			offset += 2;			if (pbody->challenge.length != 0) {				if (pbody->challenge.length >				    sizeof(pbody->challenge.text) - 1)					return;				if (!TTEST2(*(p + offset), pbody->challenge.length))					return;				memcpy(&pbody->challenge.text, p + offset,				    pbody->challenge.length);				offset += pbody->challenge.length;			}			pbody->challenge.text[pbody->challenge.length] = '\0';			/* Present and not truncated */			pbody->challenge_status = PRESENT;			break;		case E_RATES:			/* Present, possibly truncated */			pbody->rates_status = TRUNCATED;			if (!TTEST2(*(p + offset), 2))				return;			memcpy(&(pbody->rates), p + offset, 2);			offset += 2;			if (pbody->rates.length != 0) {				if (pbody->rates.length > sizeof pbody->rates.rate)					return;				if (!TTEST2(*(p + offset), pbody->rates.length))					return;				memcpy(&pbody->rates.rate, p + offset,				    pbody->rates.length);				offset += pbody->rates.length;			}			/* Present and not truncated */			pbody->rates_status = PRESENT;			break;		case E_DS:			/* Present, possibly truncated */			pbody->ds_status = TRUNCATED;			if (!TTEST2(*(p + offset), 3))				return;			memcpy(&pbody->ds, p + offset, 3);			offset += 3;			/* Present and not truncated */			pbody->ds_status = PRESENT;			break;		case E_CF:			/* Present, possibly truncated */			pbody->cf_status = TRUNCATED;			if (!TTEST2(*(p + offset), 8))				return;			memcpy(&pbody->cf, p + offset, 8);			offset += 8;			/* Present and not truncated */			pbody->cf_status = PRESENT;			break;		case E_TIM:			/* Present, possibly truncated */			pbody->tim_status = TRUNCATED;			if (!TTEST2(*(p + offset), 2))				return;			memcpy(&pbody->tim, p + offset, 2);			offset += 2;			if (!TTEST2(*(p + offset), 3))				return;			memcpy(&pbody->tim.count, p + offset, 3);			offset += 3;			if (pbody->tim.length <= 3)				break;			if (pbody->tim.length - 3 > (int)sizeof pbody->tim.bitmap)				return;			if (!TTEST2(*(p + offset), pbody->tim.length - 3))				return;			memcpy(pbody->tim.bitmap, p + (pbody->tim.length - 3),			    (pbody->tim.length - 3));			offset += pbody->tim.length - 3;			/* Present and not truncated */			pbody->tim_status = PRESENT;			break;		default:#if 0			printf("(1) unhandled element_id (%d)  ",			    *(p + offset) );#endif			if (!TTEST2(*(p + offset), 2))				return;			if (!TTEST2(*(p + offset + 2), *(p + offset + 1)))				return;			offset += *(p + offset + 1) + 2;			break;		}	}}/********************************************************************************* * Print Handle functions for the management frame types *********************************************************************************/static inthandle_beacon(const u_char *p){	struct mgmt_body_t pbody;	int offset = 0;	memset(&pbody, 0, sizeof(pbody));	if (!TTEST2(*p, IEEE802_11_TSTAMP_LEN + IEEE802_11_BCNINT_LEN +	    IEEE802_11_CAPINFO_LEN))		return 0;	memcpy(&pbody.timestamp, p, IEEE802_11_TSTAMP_LEN);	offset += IEEE802_11_TSTAMP_LEN;	pbody.beacon_interval = EXTRACT_LE_16BITS(p+offset);	offset += IEEE802_11_BCNINT_LEN;	pbody.capability_info = EXTRACT_LE_16BITS(p+offset);	offset += IEEE802_11_CAPINFO_LEN;	parse_elements(&pbody, p, offset);	PRINT_SSID(pbody);	PRINT_RATES(pbody);	printf(" %s",	    CAPABILITY_ESS(pbody.capability_info) ? "ESS" : "IBSS");	PRINT_DS_CHANNEL(pbody);	return 1;}static inthandle_assoc_request(const u_char *p){	struct mgmt_body_t pbody;	int offset = 0;	memset(&pbody, 0, sizeof(pbody));	if (!TTEST2(*p, IEEE802_11_CAPINFO_LEN + IEEE802_11_LISTENINT_LEN))		return 0;	pbody.capability_info = EXTRACT_LE_16BITS(p);	offset += IEEE802_11_CAPINFO_LEN;	pbody.listen_interval = EXTRACT_LE_16BITS(p+offset);	offset += IEEE802_11_LISTENINT_LEN;	parse_elements(&pbody, p, offset);	PRINT_SSID(pbody);	PRINT_RATES(pbody);	return 1;}static inthandle_assoc_response(const u_char *p){	struct mgmt_body_t pbody;	int offset = 0;	memset(&pbody, 0, sizeof(pbody));	if (!TTEST2(*p, IEEE802_11_CAPINFO_LEN + IEEE802_11_STATUS_LEN +	    IEEE802_11_AID_LEN))		return 0;	pbody.capability_info = EXTRACT_LE_16BITS(p);	offset += IEEE802_11_CAPINFO_LEN;	pbody.status_code = EXTRACT_LE_16BITS(p+offset);	offset += IEEE802_11_STATUS_LEN;	pbody.aid = EXTRACT_LE_16BITS(p+offset);	offset += IEEE802_11_AID_LEN;	parse_elements(&pbody, p, offset);	printf(" AID(%x) :%s: %s", ((u_int16_t)(pbody.aid << 2 )) >> 2 ,	    CAPABILITY_PRIVACY(pbody.capability_info) ? " PRIVACY " : "",	    (pbody.status_code < NUM_STATUSES		? status_text[pbody.status_code]		: "n/a"));	return 1;}static inthandle_reassoc_request(const u_char *p){	struct mgmt_body_t pbody;	int offset = 0;	memset(&pbody, 0, sizeof(pbody));	if (!TTEST2(*p, IEEE802_11_CAPINFO_LEN + IEEE802_11_LISTENINT_LEN +	    IEEE802_11_AP_LEN))		return 0;	pbody.capability_info = EXTRACT_LE_16BITS(p);	offset += IEEE802_11_CAPINFO_LEN;	pbody.listen_interval = EXTRACT_LE_16BITS(p+offset);	offset += IEEE802_11_LISTENINT_LEN;	memcpy(&pbody.ap, p+offset, IEEE802_11_AP_LEN);	offset += IEEE802_11_AP_LEN;	parse_elements(&pbody, p, offset);	PRINT_SSID(pbody);	printf(" AP : %s", etheraddr_string( pbody.ap ));	return 1;}static inthandle_reassoc_response(const u_char *p){	/* Same as a Association Reponse */	return handle_assoc_response(p);}static inthandle_probe_request(const u_char *p){	struct mgmt_body_t  pbody;	int offset = 0;	memset(&pbody, 0, sizeof(pbody));	parse_elements(&pbody, p, offset);	PRINT_SSID(pbody);	PRINT_RATES(pbody);	return 1;}static inthandle_probe_response(const u_char *p){	struct mgmt_body_t  pbody;	int offset = 0;	memset(&pbody, 0, sizeof(pbody));	if (!TTEST2(*p, IEEE802_11_TSTAMP_LEN + IEEE802_11_BCNINT_LEN +	    IEEE802_11_CAPINFO_LEN))

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产女同性恋一区二区| 国产大陆精品国产| 久国产精品韩国三级视频| 国产成人精品影院| 91精品国产丝袜白色高跟鞋| 国产欧美一区视频| 免费观看30秒视频久久| 色婷婷精品久久二区二区蜜臀av| 欧美一级艳片视频免费观看| 亚洲欧美怡红院| 国产伦精品一区二区三区在线观看| 色综合色综合色综合 | 色婷婷亚洲精品| 久久免费电影网| 久久精品国产久精国产| 91猫先生在线| **网站欧美大片在线观看| 精品一区二区日韩| 91精品欧美福利在线观看| 一区二区三区四区在线播放 | 欧美日韩国产高清一区二区三区 | 制服丝袜在线91| 尤物视频一区二区| 91视频.com| 国产精品高潮久久久久无| 国产高清一区日本| 久久嫩草精品久久久久| 久草在线在线精品观看| 欧美一区二区三区婷婷月色| 亚洲精品日产精品乱码不卡| 9i看片成人免费高清| 久久精品视频在线免费观看 | 一区二区三区中文字幕在线观看| 懂色av一区二区三区免费看| 久久精品视频在线看| 国产在线乱码一区二区三区| 日韩一区二区免费高清| 日本伊人精品一区二区三区观看方式| 在线观看成人免费视频| 亚洲小说欧美激情另类| 欧美日韩国产成人在线91| 调教+趴+乳夹+国产+精品| 欧美日韩一区二区三区在线| 亚洲综合色自拍一区| 欧美综合色免费| 天天av天天翘天天综合网色鬼国产 | 亚洲综合丝袜美腿| 欧美日本高清视频在线观看| 丝袜美腿亚洲一区| 日韩情涩欧美日韩视频| 国产乱国产乱300精品| 中文字幕成人在线观看| 一本一道综合狠狠老| 午夜精品福利视频网站| 精品国产乱码久久久久久久久| 国产一区二区影院| 综合色天天鬼久久鬼色| 欧美体内she精高潮| 轻轻草成人在线| 国产精品午夜免费| 欧美视频在线一区| 久久福利视频一区二区| 日本一区二区电影| 欧美色国产精品| 国产乱码字幕精品高清av | 天使萌一区二区三区免费观看| 欧美一级淫片007| 成人做爰69片免费看网站| 一区二区免费在线| 久久久五月婷婷| 在线影院国内精品| 狠狠久久亚洲欧美| 亚洲免费观看高清完整版在线 | 日韩国产欧美在线播放| 国产亚洲欧美日韩日本| 欧洲一区在线观看| 国产一区二区在线免费观看| 亚洲精品va在线观看| 精品国产123| 欧洲另类一二三四区| 精品一区二区三区久久| 亚洲一区影音先锋| 国产精品三级av| 欧美一区二区三区四区久久 | 国产一区二区三区在线观看免费 | 国产精品国产自产拍高清av| 在线播放欧美女士性生活| 懂色av一区二区三区蜜臀| 日本欧美一区二区三区乱码| 亚洲色欲色欲www| 久久免费午夜影院| 91精品国产入口在线| 91女人视频在线观看| 国产一区在线看| 免费不卡在线视频| 亚洲一区二区三区不卡国产欧美| 国产丝袜在线精品| 日韩免费观看高清完整版 | 欧美大片在线观看一区| 欧美亚洲日本国产| 91在线观看污| 夫妻av一区二区| 久久国产日韩欧美精品| 偷拍亚洲欧洲综合| 亚洲国产日韩在线一区模特| 中文字幕制服丝袜成人av| 久久一二三国产| 精品国产一区二区亚洲人成毛片| 欧美日韩一区二区三区四区五区| 99久久久精品| 99久久精品免费精品国产| 国产不卡视频在线观看| 国产精品中文有码| 国产一区二区三区日韩 | 亚洲精品va在线观看| 亚洲人成精品久久久久久| 国产精品乱人伦| 国产精品久久久99| 中文字幕一区二区三中文字幕| 国产精品污www在线观看| 国产女主播一区| 中文字幕一区二区三中文字幕| 中文字幕中文字幕一区二区| 中文字幕在线一区| 国产精品久久久久久久久搜平片| 国产精品剧情在线亚洲| 最新久久zyz资源站| 夜夜精品视频一区二区| 亚洲国产婷婷综合在线精品| 三级在线观看一区二区| 免费在线观看一区二区三区| 激情欧美一区二区| 国产成人午夜片在线观看高清观看| 国产一区二区视频在线| 99视频精品免费视频| 91福利资源站| 3d动漫精品啪啪1区2区免费| 精品成人免费观看| 国产精品美女一区二区在线观看| 成人免费在线观看入口| 亚洲成va人在线观看| 久久国产尿小便嘘嘘| 国产凹凸在线观看一区二区| 97久久超碰精品国产| 欧美日韩日本视频| 久久久国产综合精品女国产盗摄| 国产精品毛片久久久久久久| 亚洲午夜久久久久久久久电影院 | 欧美久久久久久久久| 精品国产乱码久久久久久久久| 国产精品久久久久三级| 天天做天天摸天天爽国产一区| 狠狠色综合色综合网络| 在线欧美小视频| 精品黑人一区二区三区久久| 成人免费在线播放视频| 日韩电影在线免费观看| 成人精品视频.| 欧美一区二区三区免费观看视频| 国产区在线观看成人精品 | 在线观看国产日韩| 久久久www成人免费无遮挡大片| 成人欧美一区二区三区视频网页| 日本视频中文字幕一区二区三区| 高清不卡一区二区在线| 在线成人小视频| 亚洲四区在线观看| 精品午夜久久福利影院| 91黄色激情网站| 久久久电影一区二区三区| 偷拍自拍另类欧美| 91在线精品一区二区三区| 久久久久久久综合色一本| 婷婷成人激情在线网| 色香蕉久久蜜桃| 欧美国产激情一区二区三区蜜月| 视频在线观看国产精品| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 国产精品久久久久影院老司| 久久国产欧美日韩精品| 88在线观看91蜜桃国自产| 亚洲欧洲日韩av| 床上的激情91.| 久久综合久久综合九色| 免费看欧美美女黄的网站| 欧洲精品在线观看| 亚洲色图在线视频| 国产不卡视频在线播放| 久久夜色精品一区| 久久99精品久久久| 日韩欧美aaaaaa| 久久机这里只有精品| 91精品国产丝袜白色高跟鞋| 天天操天天色综合| 欧美精品成人一区二区三区四区| 亚洲尤物在线视频观看| 欧美性大战久久| 亚洲成人激情自拍| 91精品欧美综合在线观看最新| 午夜视频在线观看一区二区 |