⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bcmwpa.h

📁 wi-fi sources for asus wl138g v2 pci card
💻 H
字号:
/* * bcmwpa.h - interface definitions of shared WPA-related functions * * Copyright 2005-2006, Broadcom Corporation * All Rights Reserved.                 *                                      * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. * * $Id$ */#ifndef _BCMWPA_H_#define _BCMWPA_H_#include <proto/wpa.h>#ifdef BCMWPA2#include <proto/eapol.h>#endif#include <proto/802.11.h>#include <wlioctl.h>/* Field sizes for WPA key hierarchy */#define WPA_MIC_KEY_LEN		16#define WPA_ENCR_KEY_LEN	16#define WPA_TEMP_ENCR_KEY_LEN	16#define WPA_TEMP_TX_KEY_LEN	8#define WPA_TEMP_RX_KEY_LEN	8#define PMK_LEN			32#define TKIP_PTK_LEN		64#define TKIP_TK_LEN		32#define AES_PTK_LEN		48#define AES_TK_LEN		16/* limits for pre-shared key lengths */#define WPA_MIN_PSK_LEN		8#define WPA_MAX_PSK_LEN		64#define WLC_SW_KEYS(wlc) ((((wlc)->wsec_swkeys) || ((wlc)->bsscfg[0]->wsec & WSEC_SWFLAG)))#define WLC_HW_KEYS(wlc) (!WLC_SW_KEYS(wlc))#define WSEC_WEP_ENABLED(wsec)	((wsec) & WEP_ENABLED)#define WSEC_TKIP_ENABLED(wsec)	((wsec) & TKIP_ENABLED)#define WSEC_AES_ENABLED(wsec)	((wsec) & AES_ENABLED)#define WSEC_ENABLED(wsec)	((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED))#define IS_WPA_AUTH(auth)	((auth) == WPA_AUTH_NONE || \				 (auth) == WPA_AUTH_UNSPECIFIED || \				 (auth) == WPA_AUTH_PSK)#define INCLUDES_WPA_AUTH(auth)	\			((auth) & (WPA_AUTH_NONE | WPA_AUTH_UNSPECIFIED | WPA_AUTH_PSK))#define IS_WPA_AKM(akm) ((akm) == RSN_AKM_NONE || \                                 (akm) == RSN_AKM_UNSPECIFIED || \                                 (akm) == RSN_AKM_PSK)#ifdef BCMWPA2#define IS_WPA2_AUTH(auth)      ((auth) == WPA2_AUTH_UNSPECIFIED || \                                 (auth) == WPA2_AUTH_PSK)#define INCLUDES_WPA2_AUTH(auth) \                        ((auth) & (WPA2_AUTH_UNSPECIFIED | WPA2_AUTH_PSK))#define IS_WPA2_AKM(akm)        ((akm) == RSN_AKM_UNSPECIFIED || \                                 (akm) == RSN_AKM_PSK)#endif /* BCMWPA2 */#define MAX_ARRAY 1#define MIN_ARRAY 0/* convert wsec to WPA mcast cipher. algo is needed only when WEP is enabled. */#define WPA_MCAST_CIPHER(wsec, algo)	(WSEC_WEP_ENABLED(wsec) ? \		((algo) == CRYPTO_ALGO_WEP128 ? WPA_CIPHER_WEP_104 : WPA_CIPHER_WEP_40) : \			WSEC_TKIP_ENABLED(wsec) ? WPA_CIPHER_TKIP : \			WSEC_AES_ENABLED(wsec) ? WPA_CIPHER_AES_CCM : \			WPA_CIPHER_NONE)/* Return address of max or min array depending first argument. * Return first array addr in case of a draw. */extern uchar *wpa_array_cmp(int max, uint8 *x, uint8 *y, int len);/* Increment the array argument */extern void wpa_incr_array(uint8 *array, int len);/* Convert WPA IE cipher suite to locally used value */extern bool wpa_cipher(wpa_suite_t *suite, ushort *cipher, bool wep_ok);/* Look for a WPA IE; return it's address if found, NULL otherwise */extern wpa_ie_fixed_t *bcm_find_wpaie(uint8 *parse, uint len);/* Check whether pointed-to IE looks like WPA. */extern bool bcm_is_wpa_ie(uint8 *ie, uint8 **tlvs, uint *tlvs_len);extern bool bcmwpa_akm2WPAauth(uint8 *akm, uint32 *auth);extern bool bcmwpa_cipher2wsec(uint8 *cipher, uint32 *wsec);#endif	/* _BCMWPA_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -