summaryrefslogtreecommitdiff
path: root/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private
diff options
context:
space:
mode:
authorFlorent Duchon2012-12-26 17:36:00 +0100
committerFlorent Duchon2013-02-13 21:21:12 +0100
commitb24866225a6301d3a663f874725e83c012dc25d3 (patch)
treeca527a2aab9abcdfbaf244c53ca63f0c531892b0 /digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private
parent2ba279f4eb2f23fa08a7c13465d16ae6ba5d0f96 (diff)
digital/beacon: add bitcloud stack into common directory digital/zigbit
Diffstat (limited to 'digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private')
-rw-r--r--digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcAuthenticHandler.h67
-rw-r--r--digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcDeviceTableCtrlHandler.h46
-rw-r--r--digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcKeyEstablishHandler.h82
-rw-r--r--digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcKeyUpdateHandler.h60
-rw-r--r--digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcMem.h116
-rw-r--r--digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcRemoveHandler.h77
-rw-r--r--digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcTaskManager.h81
7 files changed, 529 insertions, 0 deletions
diff --git a/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcAuthenticHandler.h b/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcAuthenticHandler.h
new file mode 100644
index 00000000..290f0764
--- /dev/null
+++ b/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcAuthenticHandler.h
@@ -0,0 +1,67 @@
+/**************************************************************************//**
+ \file tcAuthenticHandler.h
+
+ \brief Trust Centre authentic routine header file.
+
+ \author
+ Atmel Corporation: http://www.atmel.com \n
+ Support email: avr@atmel.com
+
+ Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
+ Licensed under Atmel's Limited License Agreement (BitCloudTM).
+
+ \internal
+ History:
+ 2007.12 - ALuzhetsky created.
+******************************************************************************/
+#ifndef _TCAUTHENTICHANDLERH
+#define _TCAUTHENTICHANDLERH
+
+/******************************************************************************
+ Includes section.
+******************************************************************************/
+#include <aps.h>
+#include <types.h>
+#include <tcAuthentic.h>
+
+/******************************************************************************
+ Types section.
+******************************************************************************/
+/**************************************************************************//**
+ \brief TBD.
+
+ TBD
+******************************************************************************/
+typedef struct
+{
+ TC_AuthenticObj_t *authenticObj;
+ uint8_t maxRequests;
+} TcAuthenticHandlerMem_t;
+
+/******************************************************************************
+ Functions prototypes section.
+******************************************************************************/
+
+/******************************************************************************
+ Functions prototypes section.
+******************************************************************************/
+/**************************************************************************//**
+ \brief TBD.
+
+ \param TBD.
+ \return TBD.
+******************************************************************************/
+void tcUpdateDeviceIndToAuthenticHandler(APS_UpdateDeviceInd_t *indParam);
+
+
+/**************************************************************************//**
+ \brief TBD.
+
+ \param TBD.
+ \return TBD.
+******************************************************************************/
+void tcResetAuthenticHandler(void);
+
+#endif //_TCAUTHENTICHANDLERH
+
+// eof tcAuthenticHandler.h
diff --git a/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcDeviceTableCtrlHandler.h b/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcDeviceTableCtrlHandler.h
new file mode 100644
index 00000000..8d67c9eb
--- /dev/null
+++ b/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcDeviceTableCtrlHandler.h
@@ -0,0 +1,46 @@
+/**************************************************************************//**
+ \file tcDeviceTableCtrlHandler.h
+
+ \brief Security Trust Centre devices' permission table control header file.
+
+ \author
+ Atmel Corporation: http://www.atmel.com \n
+ Support email: avr@atmel.com
+
+ Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
+ Licensed under Atmel's Limited License Agreement (BitCloudTM).
+
+ \internal
+ History:
+ 2008.03 - ALuzhetsky created.
+******************************************************************************/
+#ifndef _TCDEVICETABLECTRLHANDLERH
+#define _TCDEVICETABLECTRLHANDLERH
+
+/******************************************************************************
+ Includes section.
+******************************************************************************/
+#include <types.h>
+#ifdef _TC_PERMISSION_TABLE_
+/******************************************************************************
+ Functions prototypes section.
+******************************************************************************/
+/**************************************************************************//**
+ \brief Initializes Trust Centre device permission table.
+
+ \param none.
+ \return none.
+******************************************************************************/
+void tcResetDevicePermissionTable(void);
+
+/**************************************************************************//**
+ \brief Finds device in Trust Centre device permission table.
+
+ \param none.
+ \return true if device presents, false - otherwise.
+******************************************************************************/
+bool tcFindDeviceInPermissionTable(ExtAddr_t *extAddr);
+#endif
+#endif // _TCDEVICETABLECTRLHANDLERH
+// eof tcDeviceTableCtrlHandler.h
+
diff --git a/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcKeyEstablishHandler.h b/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcKeyEstablishHandler.h
new file mode 100644
index 00000000..975e38f4
--- /dev/null
+++ b/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcKeyEstablishHandler.h
@@ -0,0 +1,82 @@
+/**************************************************************************//**
+ \file tcKeyEstablishHandler.h
+
+ \brief Trust Centre end to end key establishment routine header file.
+
+ \author
+ Atmel Corporation: http://www.atmel.com \n
+ Support email: avr@atmel.com
+
+ Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
+ Licensed under Atmel's Limited License Agreement (BitCloudTM).
+
+ \internal
+ History:
+ 2008.01.17 - ALuzhetsky created.
+******************************************************************************/
+#ifndef _TCKEYESTABLISHHANDLERH
+#define _TCKEYESTABLISHHANDLERH
+
+#ifdef _LINK_SECURITY_
+/******************************************************************************
+ Includes section.
+******************************************************************************/
+#include <aps.h>
+#include <types.h>
+#include <tcKeyEstablish.h>
+
+/******************************************************************************
+ Definitions section.
+******************************************************************************/
+
+
+/******************************************************************************
+ Types section.
+******************************************************************************/
+/**************************************************************************//**
+ \brief TBD.
+
+ TBD
+******************************************************************************/
+typedef enum
+{
+ TC_KEY_ESTABLISH_OBJ_STATE_IDLE,
+ TC_KEY_ESTABLISH_OBJ_STATE_TRANSPORT_KEY_POSTED,
+ TC_KEY_ESTABLISH_OBJ_STATE_FIRST_TRANSPORT_KEY_EXECUTING,
+ TC_KEY_ESTABLISH_OBJ_STATE_SECOND_TRANSPORT_KEY_EXECUTING,
+} TcKeyEstablishHandlerObjState_t;
+
+/**************************************************************************//**
+ \brief TBD.
+
+ TBD
+******************************************************************************/
+typedef struct
+{
+ TC_KeyEstablishObj_t *keyEstablishObj;
+ uint8_t maxRequests;
+} TcKeyEstablishHandlerMem_t;
+
+/******************************************************************************
+ Functions prototypes section.
+******************************************************************************/
+/**************************************************************************//**
+ \brief TBD.
+
+ \param TBD.
+ \return TBD.
+******************************************************************************/
+void tcKeyEstablishTaskHandler(void);
+
+/**************************************************************************//**
+ \brief TBD.
+
+ \param TBD.
+ \return TBD.
+******************************************************************************/
+void tcResetKeyEstablishHandler(void);
+
+#endif // _LINK_SECURITY_
+
+#endif //_TCKEYESTABLISHHANDLERH
+// eof tcKeyEstablishHandler.h
diff --git a/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcKeyUpdateHandler.h b/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcKeyUpdateHandler.h
new file mode 100644
index 00000000..652dd3ec
--- /dev/null
+++ b/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcKeyUpdateHandler.h
@@ -0,0 +1,60 @@
+/**************************************************************************//**
+ \file tcKeyUpdateHandler.h
+
+ \brief Trust Centre key update routine header file.
+
+ \author
+ Atmel Corporation: http://www.atmel.com \n
+ Support email: avr@atmel.com
+
+ Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
+ Licensed under Atmel's Limited License Agreement (BitCloudTM).
+
+ \internal
+ History:
+ 2008.01.11 - ALuzhetsky created.
+******************************************************************************/
+#ifndef _TCKEYUPDATEHANDLERH
+#define _TCKEYUPDATEHANDLERH
+
+/******************************************************************************
+ Includes section.
+******************************************************************************/
+#include <queue.h>
+#include <appTimer.h>
+#include <aps.h>
+
+typedef struct
+{
+ QueueDescriptor_t reqQueueDescr;
+ APS_KeyHandle_t keyHandle;
+ void *currentReq;
+ union
+ {
+ APS_TransportKeyReq_t transportKeyReq;
+ APS_SwitchKeyReq_t switchKeyReq;
+ HAL_AppTimer_t keyUpdateTimer;
+ };
+} TcKeyUpdateHandlerMem_t;
+
+/******************************************************************************
+ Functions prototypes section.
+******************************************************************************/
+/**************************************************************************//**
+ \brief TBD.
+
+ \param TBD.
+ \return TBD.
+******************************************************************************/
+void tcKeyUpdateTaskHandler(void);
+
+/**************************************************************************//**
+ \brief TBD.
+
+ \param TBD.
+ \return TBD.
+******************************************************************************/
+void tcResetKeyUpdateHandler(void);
+
+#endif //_TCKEYUPDATEHANDLERH
+// eof tcKeyUpdateHandler.h
diff --git a/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcMem.h b/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcMem.h
new file mode 100644
index 00000000..78bc08b9
--- /dev/null
+++ b/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcMem.h
@@ -0,0 +1,116 @@
+/**************************************************************************//**
+ \file tcMem.h
+
+ \brief Security Trust Centre memory manager header file.
+
+ \author
+ Atmel Corporation: http://www.atmel.com \n
+ Support email: avr@atmel.com
+
+ Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
+ Licensed under Atmel's Limited License Agreement (BitCloudTM).
+
+ \internal
+ History:
+ 2007.12.25 - ALuzhetsky created.
+******************************************************************************/
+#ifndef _TCMEM_H
+#define _TCMEM_H
+
+/******************************************************************************
+ Includes section.
+******************************************************************************/
+#include <queue.h>
+#include <tcTaskManager.h>
+#include <tcAuthenticHandler.h>
+#include <tcKeyUpdateHandler.h>
+#include <tcKeyEstablishHandler.h>
+#include <tcRemoveHandler.h>
+
+/******************************************************************************
+ Types section.
+******************************************************************************/
+/**************************************************************************//**
+ \brief TBD.
+
+ TBD
+******************************************************************************/
+typedef struct
+{
+ TcTaskManagerMem_t taskManagerMem;
+ TcAuthenticHandlerMem_t authenticHandlerMem;
+ TcKeyUpdateHandlerMem_t keyUpdateHandlerMem;
+#ifdef _LINK_SECURITY_
+ TcKeyEstablishHandlerMem_t keyEstablishHandlerMem;
+#endif // _LINK_SECURITY_
+ TcRemoveHandlerMem_t removeHandlerMem;
+} TcMem_t;
+
+/******************************************************************************
+ External variables.
+******************************************************************************/
+extern TcMem_t tcMem;
+
+/******************************************************************************
+ Inline functions prototypes section.
+******************************************************************************/
+/**************************************************************************//**
+ \brief TBD.
+
+ \param TBD.
+ \return TBD.
+******************************************************************************/
+INLINE TcTaskManagerMem_t* tcGetTaskManagerMem(void)
+{
+ return &tcMem.taskManagerMem;
+}
+
+/**************************************************************************//**
+ \brief TBD.
+
+ \param TBD.
+ \return TBD.
+******************************************************************************/
+INLINE TcAuthenticHandlerMem_t* tcGetAuthenticHandlerMem(void)
+{
+ return &tcMem.authenticHandlerMem;
+}
+
+/**************************************************************************//**
+ \brief TBD.
+
+ \param TBD.
+ \return TBD.
+******************************************************************************/
+INLINE TcKeyUpdateHandlerMem_t* tcGetKeyUpdateHandlerMem(void)
+{
+ return &tcMem.keyUpdateHandlerMem;
+}
+
+/**************************************************************************//**
+ \brief TBD.
+
+ \param TBD.
+ \return TBD.
+******************************************************************************/
+#ifdef _LINK_SECURITY_
+INLINE TcKeyEstablishHandlerMem_t* tcGetKeyEstablishHandlerMem(void)
+{
+ return &tcMem.keyEstablishHandlerMem;
+}
+#endif // _LINK_SECURITY_
+
+/**************************************************************************//**
+ \brief TBD.
+
+ \param TBD.
+ \return TBD.
+******************************************************************************/
+INLINE TcRemoveHandlerMem_t* tcGetRemoveHandlerMem(void)
+{
+ return &tcMem.removeHandlerMem;
+}
+
+#endif //_TCMEM_H
+
+// eof tcMem.h
diff --git a/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcRemoveHandler.h b/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcRemoveHandler.h
new file mode 100644
index 00000000..84bcac00
--- /dev/null
+++ b/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcRemoveHandler.h
@@ -0,0 +1,77 @@
+/**************************************************************************//**
+ \file tcRemoveHandler.h
+
+ \brief Trust Centre device remove routine header file.
+
+ \author
+ Atmel Corporation: http://www.atmel.com \n
+ Support email: avr@atmel.com
+
+ Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
+ Licensed under Atmel's Limited License Agreement (BitCloudTM).
+
+ \internal
+ History:
+ 2008.01.20 - ALuzhetsky created.
+******************************************************************************/
+#ifndef _TCREMOVEHANDLERH
+#define _TCREMOVEHANDLERH
+
+/******************************************************************************
+ Includes section.
+******************************************************************************/
+#include <queue.h>
+#include <aps.h>
+#include <types.h>
+#include <tcRemove.h>
+
+
+/******************************************************************************
+ Definition section.
+******************************************************************************/
+/******************************************************************************
+ Types section.
+******************************************************************************/
+/**************************************************************************//**
+ \brief TBD.
+
+ TBD
+******************************************************************************/
+typedef struct
+{
+ QueueDescriptor_t reqQueueDescr;
+ APS_RemoveDeviceReq_t removeDeviceReq;
+ TC_RemoveDeviceReq_t *currentReq;
+} TcRemoveHandlerMem_t;
+
+/******************************************************************************
+ Functions prototypes section.
+******************************************************************************/
+/**************************************************************************//**
+ \brief TBD.
+
+ \param TBD.
+ \return TBD.
+******************************************************************************/
+void tcUpdateDeviceIndToRemoveHandler(APS_UpdateDeviceInd_t *indParam);
+
+/**************************************************************************//**
+ \brief TBD.
+
+ \param TBD.
+ \return TBD.
+******************************************************************************/
+void tcRemoveTaskHandler(void);
+
+/**************************************************************************//**
+ \brief TBD.
+
+ \param TBD.
+ \return TBD.
+******************************************************************************/
+void tcResetRemoveHandler(void);
+
+
+#endif //_TCREMOVEHANDLERH
+
+// eof tcRemoveHandler.h
diff --git a/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcTaskManager.h b/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcTaskManager.h
new file mode 100644
index 00000000..6753472e
--- /dev/null
+++ b/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/private/tcTaskManager.h
@@ -0,0 +1,81 @@
+/**************************************************************************//**
+ \file tcTaskManager.h
+
+ \brief Security Trust Centre task manager header file.
+
+ \author
+ Atmel Corporation: http://www.atmel.com \n
+ Support email: avr@atmel.com
+
+ Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
+ Licensed under Atmel's Limited License Agreement (BitCloudTM).
+
+ \internal
+ History:
+ 2007.12.25 - ALuzhetsky created.
+******************************************************************************/
+#ifndef _TCTASKMANAGER_H
+#define _TCTASKMANAGER_H
+
+/******************************************************************************
+ Includes section.
+******************************************************************************/
+#include <types.h>
+
+/******************************************************************************
+ Types section.
+******************************************************************************/
+/**************************************************************************//**
+ \brief TBD.
+
+ TBD
+******************************************************************************/
+typedef enum
+{
+ //TC_TASK_RESET,
+ TC_TASK_KEY_UPDATE,
+#ifdef _LINK_SECURITY_
+ TC_TASK_KEY_ESTABLISH,
+#endif // _LINK_SECURITY_
+ TC_TASK_REMOVE,
+} tcTaskID_t;
+
+/**************************************************************************//**
+ \brief TBD.
+
+ TBD
+******************************************************************************/
+typedef uint8_t TcTaskBitMask_t;
+
+/**************************************************************************//**
+ \brief TBD.
+
+ TBD
+******************************************************************************/
+typedef struct
+{
+ TcTaskBitMask_t taskBitMask;
+} TcTaskManagerMem_t;
+
+/******************************************************************************
+ Functions prototypes section.
+******************************************************************************/
+/**************************************************************************//**
+ \brief TBD.
+
+ \param TBD.
+ \return TBD.
+******************************************************************************/
+void tcPostTask(tcTaskID_t taskID);
+
+/**************************************************************************//**
+ \brief TBD.
+
+ \param TBD.
+ \return TBD.
+******************************************************************************/
+void tcResetTaskManager(void);
+
+#endif // _TCTASKMANAGER_H
+
+// eof tcTaskManager.h