1/* 2 * keyParserWep.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 keyParserWep.h 35 * \brief WEP Key PArser Header file 36 * 37 * \see keyParser.h 38 */ 39 40 41/***************************************************************************/ 42/* */ 43/* MODULE: keyParserWep.h */ 44/* PURPOSE: WEP key parser */ 45/* */ 46/***************************************************************************/ 47 48#ifndef _KEY_PARSER_WEP_H 49#define _KEY_PARSER_WEP_H 50 51#include "fsm.h" 52#include "keyParser.h" 53 54/* Constants */ 55#define MAX_WEP_KEY_DATA_LENGTH 32 56 57#define WEP_KEY_TRANSMIT_MASK 0x80000000 /*< bit 31 of key index field */ 58#define WEP_KEY_PER_CLIENT_MASK 0x40000000 /*< bit 30 of key index field */ 59#define WEP_KEY_REMAIN_BITS_MASK 0x3FFFFF00 /*< bits 8-29 of key index field */ 60 61 62 63#define WEP_KEY_LEN_40 5 /* 40 bit (5 byte) key */ 64#define WEP_KEY_LEN_104 13 /* 104 bit (13 byte) key */ 65#define WEP_KEY_LEN_232 29 /* 232 bit (29 byte) key */ 66 67 68/* Enumerations */ 69 70/* Typedefs */ 71 72/* External data definitions */ 73 74/* External functions definitions */ 75 76/* Function prototypes */ 77 78TI_STATUS keyParserWep_config(struct _keyParser_t *pKeyParser); 79 80TI_STATUS keyParserWep_recv(struct _keyParser_t *pKeyParser, 81 TI_UINT8 *pPacket, TI_UINT32 packetLen); 82 83TI_STATUS keyParserWep_remove(struct _keyParser_t *pKeyParser, TI_UINT8 *pKeyData, TI_UINT32 keyDataLen); 84 85#endif /*_KEY_PARSER_WEP_H*/ 86 87