summaryrefslogtreecommitdiff
path: root/digital/zigbit/bitcloud/stack/Components/Security/TrustCentre/include/tcAuthentic.h
blob: f5314499a34533945a508a59702be082a520b804 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**************************************************************************//**
  \file tcAuthentic.h

  \brief Security Trust Centre authentic primitive 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 _TCAUTHENTICH
#define _TCAUTHENTICH

/******************************************************************************
                             Include section.
******************************************************************************/
#include <aps.h>

/******************************************************************************
                             Types section.
******************************************************************************/
typedef enum _TcAuthObjState_t
{
  TC_AUTHENTIC_OBJ_STATE_IDLE,
  TC_AUTHENTIC_OBJ_STATE_TRANSPORTING_NETWORK_KEY,
  TC_AUTHENTIC_OBJ_STATE_TRANSPORTING_MASTER_KEY,
  TC_AUTHENTIC_OBJ_STATE_ESTABLISHING_KEY,
  TC_AUTHENTIC_OBJ_STATE_REMOVING_DEVICE,
} TcAuthObjState_t;

/**************************************************************************//**
  \brief Authentic handler memory object.

  This struct declares memory wichshould be reserved for the Trust Centre
  Authentication proceure.
******************************************************************************/
typedef struct
{
  union
  { //! Memory for APS_TransportKeyReq.
    APS_TransportKeyReq_t transportKey;
    //! Memory for APS_RemoveDeviceReq.
    APS_RemoveDeviceReq_t removeDevice;
#if defined _LINK_SECURITY_ && defined _HI_SECURITY_ 
    //! Memory for APS_EstablishKeyReq.
    APS_EstablishKeyReq_t establishKey;
#endif
  } buffer;
  //! Memory to store source address of APS_UpdateDeviceInd command.
  ExtAddr_t updateIndSrcAddr;
  //! Current state for Trust Centre authentic handler.
  TcAuthObjState_t state;
} TC_AuthenticObj_t;

#endif // _TCAUTHENTICH

// eof tcAuthentic.h