Home | History | Annotate | Download | only in Auth
      1 /** \file assocSm.h
      2  *  \brief 802.11 authentication SM
      3  *
      4  *  \see assocSm.c
      5  */
      6 
      7 /****************************************************************************
      8 **+-----------------------------------------------------------------------+**
      9 **|                                                                       |**
     10 **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved.      |**
     11 **| All rights reserved.                                                  |**
     12 **|                                                                       |**
     13 **| Redistribution and use in source and binary forms, with or without    |**
     14 **| modification, are permitted provided that the following conditions    |**
     15 **| are met:                                                              |**
     16 **|                                                                       |**
     17 **|  * Redistributions of source code must retain the above copyright     |**
     18 **|    notice, this list of conditions and the following disclaimer.      |**
     19 **|  * Redistributions in binary form must reproduce the above copyright  |**
     20 **|    notice, this list of conditions and the following disclaimer in    |**
     21 **|    the documentation and/or other materials provided with the         |**
     22 **|    distribution.                                                      |**
     23 **|  * Neither the name Texas Instruments nor the names of its            |**
     24 **|    contributors may be used to endorse or promote products derived    |**
     25 **|    from this software without specific prior written permission.      |**
     26 **|                                                                       |**
     27 **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   |**
     28 **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     |**
     29 **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |**
     30 **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  |**
     31 **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |**
     32 **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      |**
     33 **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |**
     34 **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |**
     35 **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   |**
     36 **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |**
     37 **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  |**
     38 **|                                                                       |**
     39 **+-----------------------------------------------------------------------+**
     40 ****************************************************************************/
     41 
     42 /***************************************************************************/
     43 /*																		   */
     44 /*		MODULE:	assocSm.h												   */
     45 /*    PURPOSE:	802.11 authentication SM									   */
     46 /*																	 	   */
     47 /***************************************************************************/
     48 
     49 #ifndef _AUTH_SM_H
     50 #define _AUTH_SM_H
     51 
     52 #include "fsm.h"
     53 #include "mlmeApi.h"
     54 
     55 /* Constants */
     56 
     57 #define AUTH_MSG_HEADER_LEN		6
     58 #define MAX_CHALLANGE_LEN		256
     59 #define MAX_AUTH_MSG_LEN		MAX_CHALLANGE_LEN + AUTH_MSG_HEADER_LEN
     60 
     61 /* Enumerations */
     62 
     63 /* Typedefs */
     64 
     65 typedef struct
     66 {
     67 	UINT16				status;
     68 	char				*pChalange;
     69 	UINT8				challangeLen;
     70 } authData_t;
     71 
     72 typedef struct
     73 {
     74 	legacyAuthType_e	authType;
     75 	fsm_stateMachine_t	*pAuthSm;
     76 	UINT8				currentState;
     77 	UINT32				maxCount;
     78 	UINT8				retryCount;
     79 	UINT32				authRejectCount;
     80 	UINT32				authTimeoutCount;
     81 	UINT32				timeout;
     82     authData_t          authData;
     83 	TI_HANDLE			timer;
     84 	TI_HANDLE			hMlme;
     85 	TI_HANDLE			hRsn;
     86 	TI_HANDLE			hReport;
     87 	TI_HANDLE			hOs;
     88 } auth_t;
     89 
     90 /* Structures */
     91 
     92 /* External data definitions */
     93 
     94 /* External functions definitions */
     95 
     96 /* Function prototypes */
     97 
     98 TI_STATUS auth_start(TI_HANDLE hAuth);
     99 
    100 TI_STATUS auth_stop(TI_HANDLE hpAuth, BOOL sendDeAuth, mgmtStatus_e reason );
    101 
    102 TI_STATUS auth_recv(TI_HANDLE hAuth, mlmeFrameInfo_t *pFrame);
    103 
    104 void auth_smTimeout(TI_HANDLE hAssoc);
    105 
    106 TI_STATUS auth_smMsgBuild(auth_t *pCtx,
    107 					   UINT16 seq,
    108 					   UINT16 statusCode,
    109 					   UINT8* pChallange,
    110 					   UINT8 challangeLen);
    111 
    112 /* local functions */
    113 
    114 #endif
    115 
    116