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

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

?? ieee80211_crypto.c

?? Linux下wifi實現
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*- * Copyright (c) 2001 Atsushi Onoe * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products *    derived from this software without specific prior written permission. * * Alternatively, this software may be distributed under the terms of the * GNU General Public License ("GPL") version 2 as published by the Free * Software Foundation. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $Id: ieee80211_crypto.c 1426 2006-02-01 20:07:11Z mrenzmann $ */#ifndef EXPORT_SYMTAB#define	EXPORT_SYMTAB#endif/* * IEEE 802.11 generic crypto support. */#include <linux/config.h>#include <linux/version.h>#include <linux/module.h>#include <linux/kmod.h>#include <linux/skbuff.h>#include <linux/netdevice.h>#include <linux/random.h>#include "if_ethersubr.h"		/* XXX ETHER_HDR_LEN */#include "if_media.h"#include <net80211/ieee80211_var.h>/* * Table of registered cipher modules. */static const struct ieee80211_cipher *ciphers[IEEE80211_CIPHER_MAX];static int _ieee80211_crypto_delkey(struct ieee80211vap *,	struct ieee80211_key *, struct ieee80211_node *);/* * Default "null" key management routines. */static intnull_key_alloc(struct ieee80211vap *vap, const struct ieee80211_key *k){	return IEEE80211_KEYIX_NONE;}static intnull_key_delete(struct ieee80211vap *vap, const struct ieee80211_key *k,	struct ieee80211_node *ni){	return 1;}static intnull_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k,	const u_int8_t mac[IEEE80211_ADDR_LEN]){	return 1;}static void null_key_update(struct ieee80211vap *vap){}#ifdef ATH_SUPERG_COMPstatic voidnull_comp_set(struct ieee80211vap *vap, struct ieee80211_node *ni, 	int en){}#endif/* * Write-arounds for common operations. */static __inline voidcipher_detach(struct ieee80211_key *key){	key->wk_cipher->ic_detach(key);}static __inline void *cipher_attach(struct ieee80211vap *vap, struct ieee80211_key *key){	return key->wk_cipher->ic_attach(vap, key);}/*  * Wrappers for driver key management methods. */static __inline intdev_key_alloc(struct ieee80211vap *vap, const struct ieee80211_key *key){	return vap->iv_key_alloc(vap, key);}static __inline intdev_key_delete(struct ieee80211vap *vap,	const struct ieee80211_key *key,	struct ieee80211_node *ni){	return vap->iv_key_delete(vap, key, ni);}static __inline intdev_key_set(struct ieee80211vap *vap, const struct ieee80211_key *key,	const u_int8_t mac[IEEE80211_ADDR_LEN]){	return vap->iv_key_set(vap, key, mac);}#ifdef ATH_SUPERG_COMPstatic __inline voiddev_comp_set(struct ieee80211vap *vap, struct ieee80211_node *ni, int en){	return vap->iv_comp_set(vap, ni, en);}#endif/* * Setup crypto support for a device/shared instance. */voidieee80211_crypto_attach(struct ieee80211com *ic){	/* NB: we assume everything is pre-zero'd */	ciphers[IEEE80211_CIPHER_NONE] = &ieee80211_cipher_none;}EXPORT_SYMBOL(ieee80211_crypto_attach);/* * Teardown crypto support. */voidieee80211_crypto_detach(struct ieee80211com *ic){}EXPORT_SYMBOL(ieee80211_crypto_detach);/* * Setup crypto support for a vap. */voidieee80211_crypto_vattach(struct ieee80211vap *vap){	int i;	/* NB: we assume everything is pre-zero'd */	vap->iv_def_txkey = IEEE80211_KEYIX_NONE;	for (i = 0; i < IEEE80211_WEP_NKID; i++)		ieee80211_crypto_resetkey(vap, &vap->iv_nw_keys[i],			IEEE80211_KEYIX_NONE);	/*	 * Initialize the driver key support routines to noop entries.	 * This is useful especially for the cipher test modules.	 */	vap->iv_key_alloc = null_key_alloc;	vap->iv_key_set = null_key_set;	vap->iv_key_delete = null_key_delete;	vap->iv_key_update_begin = null_key_update;	vap->iv_key_update_end = null_key_update;#ifdef ATH_SUPERG_COMP	vap->iv_comp_set = null_comp_set;#endif}EXPORT_SYMBOL(ieee80211_crypto_vattach);/* * Teardown crypto support for a vap. */voidieee80211_crypto_vdetach(struct ieee80211vap *vap){	ieee80211_crypto_delglobalkeys(vap);}EXPORT_SYMBOL(ieee80211_crypto_vdetach);/* * Register a crypto cipher module. */voidieee80211_crypto_register(const struct ieee80211_cipher *cip){	if (cip->ic_cipher >= IEEE80211_CIPHER_MAX) {		printf("%s: cipher %s has an invalid cipher index %u\n",			__func__, cip->ic_name, cip->ic_cipher);		return;	}	if (ciphers[cip->ic_cipher] != NULL && ciphers[cip->ic_cipher] != cip) {		printf("%s: cipher %s registered with a different template\n",			__func__, cip->ic_name);		return;	}	ciphers[cip->ic_cipher] = cip;}EXPORT_SYMBOL(ieee80211_crypto_register);/* * Unregister a crypto cipher module. */voidieee80211_crypto_unregister(const struct ieee80211_cipher *cip){	if (cip->ic_cipher >= IEEE80211_CIPHER_MAX) {		printf("%s: cipher %s has an invalid cipher index %u\n",			__func__, cip->ic_name, cip->ic_cipher);		return;	}	if (ciphers[cip->ic_cipher] != NULL && ciphers[cip->ic_cipher] != cip) {		printf("%s: cipher %s registered with a different template\n",			__func__, cip->ic_name);		return;	}	/* NB: don't complain about not being registered */	/* XXX disallow if references */	ciphers[cip->ic_cipher] = NULL;}EXPORT_SYMBOL(ieee80211_crypto_unregister);intieee80211_crypto_available(u_int cipher){	return cipher < IEEE80211_CIPHER_MAX && ciphers[cipher] != NULL;}EXPORT_SYMBOL(ieee80211_crypto_available);/* XXX well-known names! */static const char *cipher_modnames[] = {	"wlan_wep",	/* IEEE80211_CIPHER_WEP */	"wlan_tkip",	/* IEEE80211_CIPHER_TKIP */	"wlan_aes_ocb",	/* IEEE80211_CIPHER_AES_OCB */	"wlan_ccmp",	/* IEEE80211_CIPHER_AES_CCM */	"wlan_ckip",	/* IEEE80211_CIPHER_CKIP */};/* * Establish a relationship between the specified key and cipher * and, if necessary, allocate a hardware index from the driver. * Note that when a fixed key index is required it must be specified * and we blindly assign it w/o consulting the driver (XXX). * * This must be the first call applied to a key; all the other key * routines assume wk_cipher is setup. * * Locking must be handled by the caller using: *	ieee80211_key_update_begin(vap); *	ieee80211_key_update_end(vap); */intieee80211_crypto_newkey(struct ieee80211vap *vap,	int cipher, int flags, struct ieee80211_key *key){#define	N(a)	(sizeof(a) / sizeof(a[0]))	const struct ieee80211_cipher *cip;	void *keyctx;	int oflags;	/*	 * Validate cipher and set reference to cipher routines.	 */	if (cipher >= IEEE80211_CIPHER_MAX) {		IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO,			"%s: invalid cipher %u\n", __func__, cipher);		vap->iv_stats.is_crypto_badcipher++;		return 0;	}	cip = ciphers[cipher];	if (cip == NULL) {		/*		 * Auto-load cipher module if we have a well-known name		 * for it.  It might be better to use string names rather		 * than numbers and craft a module name based on the cipher		 * name; e.g. wlan_cipher_<cipher-name>.		 */		if (cipher < N(cipher_modnames)) {			IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO,				"%s: unregistered cipher %u, load module %s\n",				__func__, cipher, cipher_modnames[cipher]);			ieee80211_load_module(cipher_modnames[cipher]);			/*			 * If cipher module loaded it should immediately			 * call ieee80211_crypto_register which will fill			 * in the entry in the ciphers array.			 */			cip = ciphers[cipher];		}		if (cip == NULL) {			IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO,				"%s: unable to load cipher %u, module %s\n",				__func__, cipher,				cipher < N(cipher_modnames) ?					cipher_modnames[cipher] : "<unknown>");			vap->iv_stats.is_crypto_nocipher++;			return 0;		}	}	oflags = key->wk_flags;	flags &= IEEE80211_KEY_COMMON;	/*	 * If the hardware does not support the cipher then	 * fallback to a host-based implementation.	 */	if ((vap->iv_caps & (1<<cipher)) == 0) {		IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO,		    "%s: no h/w support for cipher %s, falling back to s/w\n",		    __func__, cip->ic_name);		flags |= IEEE80211_KEY_SWCRYPT;	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品成人一区二区| 青青青爽久久午夜综合久久午夜| 亚洲一区二区在线免费看| 日韩高清在线不卡| 高清不卡一二三区| 日韩一级二级三级精品视频| 亚洲天天做日日做天天谢日日欢| 免费成人性网站| 91美女蜜桃在线| 精品av久久707| 天天操天天干天天综合网| 国产成人无遮挡在线视频| 91精品在线免费观看| 国产精品久久久久三级| 国产一区二区福利视频| 91精品欧美一区二区三区综合在| 综合电影一区二区三区| 精一区二区三区| 欧美日韩精品三区| 亚洲美女少妇撒尿| jiyouzz国产精品久久| 久久久久免费观看| 毛片一区二区三区| 6080国产精品一区二区| 久久超碰97人人做人人爱| 成人av网站在线| 久久一留热品黄| 开心九九激情九九欧美日韩精美视频电影| 99视频精品在线| 中文字幕在线一区免费| 高清成人在线观看| 国产三级三级三级精品8ⅰ区| 国产在线播放一区二区三区 | 欧美国产精品中文字幕| 麻豆精品国产91久久久久久| 欧美一级片免费看| 夜夜嗨av一区二区三区四季av| 色诱视频网站一区| 亚洲福利电影网| 欧美日韩美少妇| 日韩av网站免费在线| 这里只有精品电影| 久久se精品一区二区| 久久综合色一综合色88| 国产东北露脸精品视频| 中文字幕亚洲成人| 欧美日韩久久久久久| 亚洲曰韩产成在线| 精品视频1区2区3区| 肉肉av福利一精品导航| 欧美成人艳星乳罩| 国产成人精品一区二| ●精品国产综合乱码久久久久| 91国模大尺度私拍在线视频| 亚洲国产视频a| 日韩欧美在线不卡| 国产99久久久精品| 亚洲精品日产精品乱码不卡| 欧美日韩精品一区视频| 精品一区二区三区不卡| 一区免费观看视频| 欧美日本在线播放| 国产一区欧美二区| 日韩理论片中文av| 5566中文字幕一区二区电影| 国产一区二区三区在线观看精品 | 青青草国产成人99久久| 337p日本欧洲亚洲大胆精品 | kk眼镜猥琐国模调教系列一区二区| 中文字幕一区二区三区在线观看| 欧美偷拍一区二区| 国产美女久久久久| 性做久久久久久久免费看| 精品国产免费一区二区三区香蕉| 92国产精品观看| 另类小说综合欧美亚洲| 亚洲美女屁股眼交3| 日韩欧美第一区| 99在线视频精品| 蜜桃91丨九色丨蝌蚪91桃色| 亚洲色图一区二区| 精品久久久久av影院| 91福利国产成人精品照片| 国产乱人伦偷精品视频免下载| 亚洲综合在线视频| 国产女同性恋一区二区| 91精品国产综合久久国产大片| k8久久久一区二区三区| 激情偷乱视频一区二区三区| 亚洲福利视频一区| 自拍偷拍亚洲欧美日韩| 精品国产精品网麻豆系列| 色噜噜狠狠色综合欧洲selulu | 亚洲一区二区欧美日韩| 国产精品久久久久久久久快鸭| 日韩欧美激情四射| 精品视频资源站| 91在线观看免费视频| 波多野结衣中文一区| 狠狠色综合日日| 蜜桃一区二区三区四区| 天天综合色天天| 亚洲六月丁香色婷婷综合久久 | 三级不卡在线观看| 亚洲精品视频自拍| 最新国产精品久久精品| 国产亚洲视频系列| 久久综合av免费| 日韩精品一区二区三区中文不卡| 欧美日韩高清一区二区| 欧美视频一区二| 91福利小视频| 在线观看亚洲精品| 在线观看91视频| 91蝌蚪porny九色| 99久久精品久久久久久清纯| 国产美女在线精品| 国产精品一线二线三线精华| 国产麻豆精品一区二区| 国产一区二区在线观看免费| 国产美女一区二区| 国产美女主播视频一区| 国产福利一区二区| 国产.欧美.日韩| 成人精品一区二区三区四区| 成人h动漫精品| 91免费视频大全| 91久久精品午夜一区二区| 色系网站成人免费| 欧美影院精品一区| 777亚洲妇女| 精品成人佐山爱一区二区| 国产日韩欧美精品一区| 中文字幕五月欧美| 亚洲成a天堂v人片| 免费成人在线播放| 国产精品影视天天线| 99精品视频一区| 欧美日韩国产美女| 日韩午夜在线影院| 国产欧美va欧美不卡在线| 亚洲精品免费看| 日韩精品视频网站| 国产毛片精品一区| 色av成人天堂桃色av| 欧美一区二区视频在线观看| 国产亚洲综合在线| 一区二区三区四区国产精品| 日韩成人免费看| 成人免费av资源| 欧美日韩一区三区| 久久久久免费观看| 亚洲无人区一区| 狠狠色丁香久久婷婷综| 94-欧美-setu| 精品久久人人做人人爽| 亚洲图片欧美激情| 蜜臀av亚洲一区中文字幕| 99精品1区2区| 精品久久人人做人人爰| 亚洲乱码国产乱码精品精98午夜 | 开心九九激情九九欧美日韩精美视频电影| 国产精品影视在线观看| 欧美色成人综合| 国产视频不卡一区| 日韩电影一区二区三区四区| 成人午夜激情片| 欧美一区二区三区免费观看视频| 国产精品三级电影| 奇米四色…亚洲| 一本一本大道香蕉久在线精品| 精品福利在线导航| 亚洲成人一区二区在线观看| 成人综合在线网站| 久久久www成人免费无遮挡大片| 亚洲品质自拍视频| 国产乱码精品1区2区3区| 欧美日韩国产电影| 亚洲欧洲国产日本综合| 国产精品一级在线| 欧美福利电影网| 亚洲免费看黄网站| av电影在线观看完整版一区二区| 精品国产91乱码一区二区三区| 亚洲第一狼人社区| 日本高清不卡视频| 成人欧美一区二区三区在线播放| 国产在线播放一区| 欧美一区二区性放荡片| 午夜av电影一区| 欧美日韩视频不卡| 一二三区精品福利视频| 99精品在线免费| 国产精品女同一区二区三区| 国产成人av影院| 国产婷婷精品av在线| 国产一区91精品张津瑜| 欧美精品一区二区三区蜜臀| 激情伊人五月天久久综合| 69p69国产精品|