9#ifndef _DOT11DECRYPT_INT_H
10#define _DOT11DECRYPT_INT_H
17#include "ws_attributes.h"
26#define DOT11DECRYPT_TYPE_MANAGEMENT 0
27#define DOT11DECRYPT_TYPE_CONTROL 1
28#define DOT11DECRYPT_TYPE_DATA 2
31#define DOT11DECRYPT_SUBTYPE_ASSOC_REQ 0
32#define DOT11DECRYPT_SUBTYPE_ASSOC_RESP 1
33#define DOT11DECRYPT_SUBTYPE_REASSOC_REQ 2
34#define DOT11DECRYPT_SUBTYPE_REASSOC_RESP 3
35#define DOT11DECRYPT_SUBTYPE_PROBE_REQ 4
36#define DOT11DECRYPT_SUBTYPE_PROBE_RESP 5
37#define DOT11DECRYPT_SUBTYPE_MEASUREMENT_PILOT 6
38#define DOT11DECRYPT_SUBTYPE_BEACON 8
39#define DOT11DECRYPT_SUBTYPE_ATIM 9
40#define DOT11DECRYPT_SUBTYPE_DISASS 10
41#define DOT11DECRYPT_SUBTYPE_AUTHENTICATION 11
42#define DOT11DECRYPT_SUBTYPE_DEAUTHENTICATION 12
43#define DOT11DECRYPT_SUBTYPE_ACTION 13
44#define DOT11DECRYPT_SUBTYPE_ACTION_NO_ACK 14
47#define DOT11DECRYPT_CIPHER_USE_GROUP 0
48#define DOT11DECRYPT_CIPHER_WEP40 1
49#define DOT11DECRYPT_CIPHER_TKIP 2
50#define DOT11DECRYPT_CIPHER_CCMP 4
51#define DOT11DECRYPT_CIPHER_WEP104 5
52#define DOT11DECRYPT_CIPHER_BIP_CMAC 6
53#define DOT11DECRYPT_CIPHER_GROUP_NA 7
54#define DOT11DECRYPT_CIPHER_GCMP 8
55#define DOT11DECRYPT_CIPHER_GCMP256 9
56#define DOT11DECRYPT_CIPHER_CCMP256 10
57#define DOT11DECRYPT_CIPHER_BIP_GMAC 11
58#define DOT11DECRYPT_CIPHER_BIP_GMAC256 12
59#define DOT11DECRYPT_CIPHER_BIP_CMAC256 13
67#define DOT11DECRYPT_CRYPTED_DATA_MINLEN 17
69#define DOT11DECRYPT_TA_OFFSET 10
80#define DOT11DECRYPT_TYPE(FrameControl_0) (uint8_t)((FrameControl_0 >> 2) & 0x3)
81#define DOT11DECRYPT_SUBTYPE(FrameControl_0) (uint8_t)((FrameControl_0 >> 4) & 0xF)
82#define DOT11DECRYPT_DS_BITS(FrameControl_1) (uint8_t)(FrameControl_1 & 0x3)
83#define DOT11DECRYPT_TO_DS(FrameControl_1) (uint8_t)(FrameControl_1 & 0x1)
84#define DOT11DECRYPT_FROM_DS(FrameControl_1) (uint8_t)((FrameControl_1 >> 1) & 0x1)
85#define DOT11DECRYPT_WEP(FrameControl_1) (uint8_t)((FrameControl_1 >> 6) & 0x1)
90#define DOT11DECRYPT_EXTIV(KeyID) ((KeyID >> 5) & 0x1)
92#define DOT11DECRYPT_KEY_INDEX(KeyID) ((KeyID >> 6) & 0x3)
95#define DOT11DECRYPT_EAP_KEY_DESCR_VER(KeyInfo_1) ((unsigned char)(KeyInfo_1 & 0x3))
96#define DOT11DECRYPT_EAP_KEY(KeyInfo_1) ((KeyInfo_1 >> 3) & 0x1)
97#define DOT11DECRYPT_EAP_INST(KeyInfo_1) ((KeyInfo_1 >> 6) & 0x1)
98#define DOT11DECRYPT_EAP_ACK(KeyInfo_1) ((KeyInfo_1 >> 7) & 0x1)
99#define DOT11DECRYPT_EAP_MIC(KeyInfo_0) (KeyInfo_0 & 0x1)
100#define DOT11DECRYPT_EAP_SEC(KeyInfo_0) ((KeyInfo_0 >> 1) & 0x1)
103#define DOT11DECRYPT_FC1_DIR_MASK 0x03
104#define DOT11DECRYPT_FC1_DIR_DSTODS 0x03
105#define DOT11DECRYPT_FC0_SUBTYPE_QOS 0x80
106#define DOT11DECRYPT_FC0_TYPE_DATA 0x08
107#define DOT11DECRYPT_FC0_TYPE_MASK 0x0c
108#define DOT11DECRYPT_SEQ_FRAG_MASK 0x000f
109#define DOT11DECRYPT_QOS_HAS_SEQ(wh) \
111 (DOT11DECRYPT_FC0_TYPE_MASK | DOT11DECRYPT_FC0_SUBTYPE_QOS)) == \
112 (DOT11DECRYPT_FC0_TYPE_DATA | DOT11DECRYPT_FC0_SUBTYPE_QOS))
114#define DOT11DECRYPT_ADDR_COPY(dst,src) memcpy(dst, src, DOT11DECRYPT_MAC_LEN)
116#define DOT11DECRYPT_IS_4ADDRESS(wh) \
117 ((wh->fc[1] & DOT11DECRYPT_FC1_DIR_MASK) == DOT11DECRYPT_FC1_DIR_DSTODS)
118#define DOT11DECRYPT_IS_QOS_DATA(wh) DOT11DECRYPT_QOS_HAS_SEQ(wh)
139 unsigned char dur[2];
140 unsigned char addr1[DOT11DECRYPT_MAC_LEN];
141 unsigned char addr2[DOT11DECRYPT_MAC_LEN];
142 unsigned char addr3[DOT11DECRYPT_MAC_LEN];
143 unsigned char seq[2];
149 unsigned char dur[2];
150 unsigned char addr1[DOT11DECRYPT_MAC_LEN];
151 unsigned char addr2[DOT11DECRYPT_MAC_LEN];
152 unsigned char addr3[DOT11DECRYPT_MAC_LEN];
153 unsigned char seq[2];
154 unsigned char addr4[DOT11DECRYPT_MAC_LEN];
160 unsigned char dur[2];
161 unsigned char addr1[DOT11DECRYPT_MAC_LEN];
162 unsigned char addr2[DOT11DECRYPT_MAC_LEN];
163 unsigned char addr3[DOT11DECRYPT_MAC_LEN];
164 unsigned char seq[2];
165 unsigned char qos[2];
171 unsigned char dur[2];
172 unsigned char addr1[DOT11DECRYPT_MAC_LEN];
173 unsigned char addr2[DOT11DECRYPT_MAC_LEN];
174 unsigned char addr3[DOT11DECRYPT_MAC_LEN];
175 unsigned char seq[2];
176 unsigned char addr4[DOT11DECRYPT_MAC_LEN];
177 unsigned char qos[2];
186int Dot11DecryptCcmpDecrypt(
194int Dot11DecryptGcmpDecrypt(
201int Dot11DecryptTkipDecrypt(
202 unsigned char *tkip_mpdu,
204 unsigned char TA[DOT11DECRYPT_MAC_LEN],
205 unsigned char TK[DOT11DECRYPT_TK_LEN])
Definition dot11decrypt_int.h:169
Definition dot11decrypt_int.h:147
Definition dot11decrypt_int.h:158
Definition dot11decrypt_int.h:137