1 /** \file broadcastKeySM.h
2 * \brief station broadcast key SM API
4 * \see broadcastKeySM.c
6 /****************************************************************************
7 **+-----------------------------------------------------------------------+**
9 **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |**
10 **| All rights reserved. |**
12 **| Redistribution and use in source and binary forms, with or without |**
13 **| modification, are permitted provided that the following conditions |**
16 **| * Redistributions of source code must retain the above copyright |**
17 **| notice, this list of conditions and the following disclaimer. |**
18 **| * Redistributions in binary form must reproduce the above copyright |**
19 **| notice, this list of conditions and the following disclaimer in |**
20 **| the documentation and/or other materials provided with the |**
22 **| * Neither the name Texas Instruments nor the names of its |**
23 **| contributors may be used to endorse or promote products derived |**
24 **| from this software without specific prior written permission. |**
26 **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |**
27 **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |**
28 **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |**
29 **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |**
30 **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |**
31 **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |**
32 **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |**
33 **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |**
34 **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |**
35 **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |**
36 **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |**
38 **+-----------------------------------------------------------------------+**
39 ****************************************************************************/
41 /****************************************************************************
43 * MODULE: station broadcast key SM *
44 * PURPOSE: station broadcast key SM API *
46 ****************************************************************************/
48 #ifndef _BROADCAST_KEY_SM_H
49 #define _BROADCAST_KEY_SM_H
62 typedef struct _broadcastKey_t broadcastKey_t;
64 /* Main Sec SM functions */
65 typedef TI_STATUS (*broadcastKeySmStart_t)(struct _broadcastKey_t *pBroadcastKey);
66 typedef TI_STATUS (*broadcastKeySmStop_t)(struct _broadcastKey_t *pBroadcastKey);
67 typedef TI_STATUS (*broadcastKeySmRecvSuccess_t)(struct _broadcastKey_t *pBroadcastKey, encodedKeyMaterial_t *pEncodedKeyMaterial);
68 typedef TI_STATUS (*broadcastKeySmRecvFailure_t)(struct _broadcastKey_t *pBroadcastKey);
72 /* State machine associated data structures. */
75 encodedKeyMaterial_t *pEncodedKeyMaterial;
78 struct _broadcastKey_t
81 fsm_stateMachine_t *pBcastKeySm;
82 broadcastKeyData_t data;
84 struct _mainKeys_t *pParent;
85 struct _keyDerive_t *pKeyDerive;
90 broadcastKeySmStart_t start;
91 broadcastKeySmStop_t stop;
92 broadcastKeySmRecvSuccess_t recvSuccess;
93 broadcastKeySmRecvFailure_t recvFailure;
96 /* External data definitions */
98 /* External functions definitions */
100 /* Function prototypes */
102 broadcastKey_t* broadcastKey_create(TI_HANDLE hOs);
104 TI_STATUS broadcastKey_unload(broadcastKey_t *pBroadcastKey);
106 TI_STATUS broadcastKey_config(broadcastKey_t *pBroadcastKey,
107 rsn_paeConfig_t *pPaeConfig,
108 struct _mainKeys_t *pParent,
112 TI_STATUS broadcastKeySmUnexpected(struct _broadcastKey_t *pBroadcastKey);
114 TI_STATUS broadcastKeySmNop(struct _broadcastKey_t *pBroadcastKey);
116 #endif /* _BROADCAST_KEY_SM_H*/