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

📄 ap_wpa.h

📁 Linux下的RT系列无线网卡驱动,可以直接在x86平台上编译
💻 H
字号:
/* ************************************************************************* * Ralink Tech Inc. * 4F, No. 2 Technology 5th Rd. * Science-based Industrial Park * Hsin-chu, Taiwan, R.O.C. * * (c) Copyright 2002-2007, Ralink Technology, Inc. * * 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.             *  *                                                                       *  *************************************************************************     Module Name:    ap_wpa.h    Abstract:    Revision History:    Who         When            What    --------    ----------      ----------------------------------------------    Name        Date            Modification logs*/#ifndef __AP_WPA_H__#define __AP_WPA_H__#define PEER_MSG1_RETRY_EXEC_INTV           1024        // 1024 ms = 1 sec#define PEER_MSG3_RETRY_EXEC_INTV           5120        // 5120 ms = 5 sec#define GROUP_KEY_UPDATE_EXEC_INTV          10240// Retry timer counter initial value#define PEER_MSG1_RETRY_TIMER_CTR           0#define PEER_MSG3_RETRY_TIMER_CTR           10#define GROUP_MSG1_RETRY_TIMER_CTR          20#define PAIRWISEKEY                         1#define GROUPKEY                            0//EAP Packet Type#define EAPPacket                           0#define EAPOLStart                          1#define EAPOLLogoff                         2#define EAPOLKey                            3#define EAPOLASFAlert                       4#define EAPTtypeMax                         5//EPA VERSION#define EAPOL_VER                           1#define DESC_TYPE_TKIP                      1#define DESC_TYPE_AES                       2#define WPA1_KEY_DESC                       0xfe#define WPA2_KEY_DESC                       0x02#define LEN_MSG1_2WAY                       0x7f#define MAX_LEN_OF_EAP_HS                   256// group rekey interval#define TIME_REKEY                          0#define PKT_REKEY                           1#define DISABLE_REKEY                       2#define MAX_REKEY                           2#define MAX_REKEY_INTER                     0x3fffffftypedef struct PACKED _KEY_ENCAP {    UCHAR       Type;    UCHAR       Length;    UCHAR       OUI[4];} KEY_ENCAP, *PKEY_ENCAP;//typedef struct PACKED _KEY_INFO//{//    UCHAR   KeyMic:1;//    UCHAR   Secure:1;//    UCHAR   Error:1;//    UCHAR   Request:1;//    UCHAR   EKD_DL:1;     // EKD for AP; DL for STA//    UCHAR   Rsvd:3;//    UCHAR   KeyDescVer:3;//    UCHAR   KeyType:1;//    UCHAR   KeyIndex:2;//    UCHAR   Install:1;//    UCHAR   KeyAck:1;//} KEY_INFO, *PKEY_INFO;typedef struct PACKED _AP_KEY_DESCRIPTER {    UCHAR       Type;    KEY_INFO    Keyinfo;    UCHAR       KeyLength[2];    UCHAR       RCounter[LEN_KEY_DESC_REPLAY];    UCHAR       Nonce[LEN_KEY_DESC_NONCE];    UCHAR       IV[LEN_KEY_DESC_IV];    UCHAR       RSC[LEN_KEY_DESC_RSC];    UCHAR       ID[LEN_KEY_DESC_ID];    UCHAR       MIC[LEN_KEY_DESC_MIC];    UCHAR       DataLen[2];        UCHAR       Data[AP_MAX_LEN_OF_RSNIE];} AP_KEY_DESCRIPTER, *PAP_KEY_DESCRIPTER;typedef struct PACKED _AP_EAPOL_PACKET {    UCHAR    ProVer;    UCHAR    ProType;    UCHAR    Body_Len[2];    AP_KEY_DESCRIPTER      KeyDesc;} AP_EAPOL_PACKET, *PAP_EAPOL_PACKET;typedef struct PACKED _RSNIE {    UCHAR   oui[4];    USHORT  version;    UCHAR   mcast[4];    USHORT  ucount;    struct{        UCHAR oui[4];    }ucast[1];} RSNIE, *PRSNIE;typedef struct PACKED _RSNIE2 {    USHORT  version;    UCHAR   mcast[4];    USHORT  ucount;    struct{        UCHAR oui[4];    }ucast[1];} RSNIE2, *PRSNIE2;typedef struct PACKED _RSNIE_AUTH {    USHORT acount;    struct{        UCHAR oui[4];    }auth[1];} RSNIE_AUTH,*PRSNIE_AUTH;typedef union   _RSN_CAPABILITIES   {#ifdef BIG_ENDIAN    struct  {        USHORT      Pre_Auth:1;        USHORT      No_Pairwise:1;        USHORT      PTKSA_R_Counter:2;        USHORT      GTKSA_R_Counter:2;        USHORT      Rsvd:10;    }   field;#else    struct  {        USHORT      Rsvd:10;        USHORT      GTKSA_R_Counter:2;        USHORT      PTKSA_R_Counter:2;        USHORT      No_Pairwise:1;        USHORT      Pre_Auth:1;    }   field;#endif    USHORT          word;}   RSN_CAPABILITIES, *PRSN_CAPABILITIES;#endif

⌨️ 快捷键说明

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