From a54ad9edce697133a024aff096e50f7e4f389d5b Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Sun, 18 Mar 2012 12:22:02 +0100 Subject: digital/beacon: import Zigbit stack (bitcloud) & avr sources --- .../Security/ServiceProvider/include/sspCommon.h | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 digital/beacon/src/Bitcloud_stack/Components/Security/ServiceProvider/include/sspCommon.h (limited to 'digital/beacon/src/Bitcloud_stack/Components/Security/ServiceProvider/include/sspCommon.h') diff --git a/digital/beacon/src/Bitcloud_stack/Components/Security/ServiceProvider/include/sspCommon.h b/digital/beacon/src/Bitcloud_stack/Components/Security/ServiceProvider/include/sspCommon.h new file mode 100644 index 00000000..5fd2bea3 --- /dev/null +++ b/digital/beacon/src/Bitcloud_stack/Components/Security/ServiceProvider/include/sspCommon.h @@ -0,0 +1,74 @@ +/**************************************************************************//** + \file sspCommon.h + + \brief Declarations of common Security Service Provider's fields and types. + + \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: + 06/12/07 ALuzhetsky - Created. +******************************************************************************/ + +#ifndef _SSPCOMMON_H +#define _SSPCOMMON_H + +/****************************************************************************** + Includes section. +******************************************************************************/ +#include + +/****************************************************************************** + Definitions section. +******************************************************************************/ +#define SECURITY_KEY_SIZE 16U +#define SECURITY_BLOCK_SIZE 16U +#define SSP_SECURITY_CONTROL_FIELD_LENGTH 1U +#define SSP_FRAME_COUNTER_FIELD_LENGTH 4U +#define SSP_KEY_SEQ_NUMBER_FIELD_LENGTH 1U + +/****************************************************************************** + Types section. +******************************************************************************/ +/**************************************************************************//** + \brief Possible status values of different SSP primitives. +******************************************************************************/ +typedef enum +{ + SSP_SUCCESS_STATUS, + SSP_NOT_PERMITED_STATUS, + SSP_MAX_FRM_COUNTER_STATUS, + SSP_BAD_CCM_OUTPUT_STATUS, +} SSP_Status_t; + +/**************************************************************************//** + \brief Internal service fields which give an opportunity to compose requests' queue. +******************************************************************************/ +typedef struct +{ + void *next; + uint8_t requestId; +} SSP_Service_t; + + +/****************************************************************************** + Prototypes section + ******************************************************************************/ +/******************************************************************************* + Checks a security key. + Parameters: + key - valid pointer to a security key. + Return: + true - if key is not zero otherwise return false. +********************************************************************************/ +bool SSP_IsKeyValid(const uint8_t *key); + + +#endif //_SSPCOMMON_H + +// eof sspCommon.h -- cgit v1.2.3