1 /* 2 * mlmeParser.h 3 * 4 * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 11 * * Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * * Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in 15 * the documentation and/or other materials provided with the 16 * distribution. 17 * * Neither the name Texas Instruments nor the names of its 18 * contributors may be used to endorse or promote products derived 19 * from this software without specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34 /** \file mlmeBuilder.h 35 * \brief 802.11 MLME Builder 36 * 37 * \see mlmeBuilder.c 38 */ 39 40 41 /***************************************************************************/ 42 /* */ 43 /* MODULE: mlmeBuilder.h */ 44 /* PURPOSE: 802.11 MLME Builder */ 45 /* */ 46 /***************************************************************************/ 47 48 #ifndef _MLME_PARSER_H 49 #define _MLME_PARSER_H 50 51 #include "802_11Defs.h" 52 #include "paramOut.h" 53 #include "mlmeApi.h" 54 #include "mlmeSm.h" 55 56 /* Constants */ 57 58 #define FRAME_CTRL_PROTOCOL_VERSION_MASK 0x03 59 #define FRAME_CTRL_TYPE_MASK 0x0C 60 #define FRAME_CTRL_SUB_TYPE_MASK 0xF0 61 62 /* Enumerations */ 63 64 /* state machine states */ 65 66 /* Typedefs */ 67 68 /* Structures */ 69 70 /* External data definitions */ 71 72 /* External functions definitions */ 73 74 /* Function prototypes */ 75 76 TI_STATUS mlmeParser_getFrameType(mlme_t *pMlme, 77 TI_UINT16* pFrameCtrl, 78 dot11MgmtSubType_e *pType); 79 80 TI_STATUS mlmeParser_readRates(mlme_t *pMlme, 81 TI_UINT8 *pData, 82 TI_UINT32 dataLen, 83 TI_UINT32 *pReadLen, 84 dot11_RATES_t *pRates); 85 86 TI_STATUS mlmeParser_readERP(mlme_t *pMlme, 87 TI_UINT8 *pData, 88 TI_UINT32 dataLen, 89 TI_UINT32 *pReadLen, 90 TI_BOOL *useProtection, 91 EPreamble *barkerPreambleMode); 92 93 TI_STATUS mlmeParser_readSsid(mlme_t *pMlme, 94 TI_UINT8 *pData, 95 TI_UINT32 dataLen, 96 TI_UINT32 *pReadLen, 97 dot11_SSID_t *pSsid); 98 99 TI_STATUS mlmeParser_readFhParams(mlme_t *pMlme, 100 TI_UINT8 *pData, 101 TI_UINT32 dataLen, 102 TI_UINT32 *pReadLen, 103 dot11_FH_PARAMS_t *pFhParams); 104 105 TI_STATUS mlmeParser_readDsParams(mlme_t *pMlme, 106 TI_UINT8 *pData, 107 TI_UINT32 dataLen, 108 TI_UINT32 *pReadLen, 109 dot11_DS_PARAMS_t *pDsParams); 110 111 TI_STATUS mlmeParser_readCfParams(mlme_t *pMlme, 112 TI_UINT8 *pData, 113 TI_UINT32 dataLen, 114 TI_UINT32 *pReadLen, 115 dot11_CF_PARAMS_t *pCfParams); 116 117 TI_STATUS mlmeParser_readIbssParams(mlme_t *pMlme, 118 TI_UINT8 *pData, 119 TI_UINT32 dataLen, 120 TI_UINT32 *pReadLen, 121 dot11_IBSS_PARAMS_t *pIbssParams); 122 123 TI_STATUS mlmeParser_readTim(mlme_t *pMlme, 124 TI_UINT8 *pData, 125 TI_UINT32 dataLen, 126 TI_UINT32 *pReadLen, 127 dot11_TIM_t *pTim); 128 129 TI_STATUS mlmeParser_readCountry(mlme_t *pMlme, 130 TI_UINT8 *pData, 131 TI_UINT32 dataLen, 132 TI_UINT32 *pReadLen, 133 dot11_COUNTRY_t *countryIE); 134 135 TI_STATUS mlmeParser_readWMEParams(mlme_t *pMlme, 136 TI_UINT8 *pData, 137 TI_UINT32 dataLen, 138 TI_UINT32 *pReadLen, 139 dot11_WME_PARAM_t *pWMEParamIE, 140 assocRsp_t *assocRsp); 141 142 TI_STATUS mlmeParser_readPowerConstraint(mlme_t *pMlme, 143 TI_UINT8 *pData, 144 TI_UINT32 dataLen, 145 TI_UINT32 *pReadLen, 146 dot11_POWER_CONSTRAINT_t *powerConstraintIE); 147 148 TI_STATUS mlmeParser_readChannelSwitch(mlme_t *pMlme, 149 TI_UINT8 *pData, 150 TI_UINT32 dataLen, 151 TI_UINT32 *pReadLen, 152 dot11_CHANNEL_SWITCH_t *channelSwitch, 153 TI_UINT8 channel); 154 155 TI_STATUS mlmeParser_readTPCReport(mlme_t *pMlme, 156 TI_UINT8 *pData, 157 TI_UINT32 dataLen, 158 TI_UINT32 *pReadLen, 159 dot11_TPC_REPORT_t *TPCReport); 160 161 #ifdef XCC_MODULE_INCLUDED 162 TI_STATUS mlmeParser_readCellTP(mlme_t *pMlme, 163 TI_UINT8 *pData, 164 TI_UINT32 dataLen, 165 TI_UINT32 *pReadLen, 166 dot11_CELL_TP_t *cellTP); 167 #endif 168 169 TI_STATUS mlmeParser_readQuiet(mlme_t *pMlme, 170 TI_UINT8 *pData, 171 TI_UINT32 dataLen, 172 TI_UINT32 *pReadLen, 173 dot11_QUIET_t *quiet); 174 175 TI_STATUS mlmeParser_readChallange(mlme_t *pMlme, 176 TI_UINT8 *pData, 177 TI_UINT32 dataLen, 178 TI_UINT32 *pReadLen, 179 dot11_CHALLENGE_t *pChallange); 180 181 182 TI_STATUS mlmeParser_readRsnIe(mlme_t *pMlme, 183 TI_UINT8 *pData, 184 TI_UINT32 dataLen, 185 TI_UINT32 *pReadLen, 186 dot11_RSN_t *pRsnIe); 187 188 TI_STATUS mlmeParser_readQosCapabilityIE(mlme_t *pMlme, 189 TI_UINT8 *pData, 190 TI_UINT32 dataLen, 191 TI_UINT32 *pReadLen, 192 dot11_QOS_CAPABILITY_IE_t *QosCapParams); 193 194 TI_STATUS mlmeParser_readHtCapabilitiesIE (mlme_t *pMlme, 195 TI_UINT8 *pData, 196 TI_UINT32 dataLen, 197 TI_UINT32 *pReadLen, 198 Tdot11HtCapabilitiesUnparse *pHtCapabilities); 199 200 TI_STATUS mlmeParser_readHtInformationIE (mlme_t *pMlme, 201 TI_UINT8 *pData, 202 TI_UINT32 dataLen, 203 TI_UINT32 *pReadLen, 204 Tdot11HtInformationUnparse *pHtInformation); 205 206 207 #endif 208 209