1 /** @file parser.h 2 * 3 * @brief This file contains definitions of 802.11 Management Frames 4 * and Information Element Parsing 5 * 6 * Copyright (C) 2014-2017, Marvell International Ltd. 7 * 8 * This software file (the "File") is distributed by Marvell International 9 * Ltd. under the terms of the GNU General Public License Version 2, June 1991 10 * (the "License"). You may use, redistribute and/or modify this File in 11 * accordance with the terms and conditions of the License, a copy of which 12 * is available by writing to the Free Software Foundation, Inc., 13 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the 14 * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. 15 * 16 * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE 17 * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 18 * ARE EXPRESSLY DISCLAIMED. The License provides additional details about 19 * this warranty disclaimer. 20 */ 21 22 /****************************************************** 23 Change log: 24 03/07/2014: Initial version 25 ******************************************************/ 26 #ifndef _PARSER_H_ 27 #define _PARSER_H_ 28 29 #include "IEEE_types.h" 30 #include "parser_rom.h" 31 32 typedef struct { 33 IEEEtypes_HT_Capability_t *pHtCap; 34 IEEEtypes_HT_Information_t *pHtInfo; 35 IEEEtypes_20N40_BSS_Coexist_t *p2040Coexist; 36 IEEEtypes_OBSS_ScanParam_t *pHtScanParam; 37 IEEEtypes_ExtCapability_t *pHtExtCap; 38 } dot11nIEPointers_t; 39 40 #ifdef DOT11AC 41 typedef struct { 42 IEEEtypes_VHT_Capability_t *pVhtCap; 43 IEEEtypes_VHT_Operation_t *pVhtOper; 44 } dot11acIEPointers_t; 45 #endif 46 47 #ifdef TDLS 48 typedef struct { 49 IEEEtypes_MobilityDomainElement_t *pMdie; 50 IEEEtypes_FastBssTransElement_t *pFtie; 51 IEEEtypes_RSNElement_t *pRsn; 52 IEEEtypes_TimeoutIntervalElement_t *pTie[2]; 53 IEEEtypes_RICDataElement_t *pFirstRdie; 54 55 } Dot11rIePointers_t; 56 #endif 57 extern VendorSpecificIEType_e IsWMMElement(void *priv, UINT8 *pBuffer); 58 extern VendorSpecificIEType_e IsWPAElement(void *priv, UINT8 *pBuffer); 59 60 extern int ieBufValidate(UINT8 *pIe, int bufLen); 61 62 extern int GetIEPointers(void *priv, UINT8 *pIe, 63 int bufLen, IEPointers_t *pIePointers); 64 65 extern BOOLEAN parser_getAssocIEs(void *priv, UINT8 *pIe, 66 int bufLen, AssocIePointers_t *pIePointers); 67 68 extern 69 IEEEtypes_InfoElementHdr_t *parser_getSpecificIE(IEEEtypes_ElementId_e elemId, 70 UINT8 *pIe, int bufLen); 71 72 extern UINT8 parser_countNumInfoElements(UINT8 *pIe, int bufLen); 73 74 #endif // _PARSER_H_ 75