summaryrefslogtreecommitdiff
path: root/cesar/cp/msg/inc/cm_set_key.h
blob: e1fe6f5642e46adee318c4f42701a9fa34a6e3f5 (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
#ifndef cp_msg_inc_cm_set_key_h
#define cp_msg_inc_cm_set_key_h
/* Cesar project {{{
 *
 * Copyright (C) 2008 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    cp/msg/inc/cm_set_key.h
 * \brief   CM_SET_KEY messages.
 * \ingroup cp_msg
 */

/** CM_SET_KEY.CNF result. */
enum cp_msg_cm_set_key_cnf_result_t
{
    CP_MSG_CM_SET_KEY_CNF_RESULT_SUCCESS,
    CP_MSG_CM_SET_KEY_CNF_RESULT_FAILURE,
    CP_MSG_CM_SET_KEY_CNF_RESULT_NB
};
typedef enum cp_msg_cm_set_key_cnf_result_t cp_msg_cm_set_key_cnf_result_t;

/** Data associated with a CM_SET_KEY.REQ message. */
struct cp_msg_cm_set_key_req_t
{
    /** Key type. */
    enum cp_msg_key_type_t key_type;
    /** CCo capability. */
    u8 cco_cap;
    /** NID. */
    cp_nid_t nid;
    /** New EKS. */
    u8 new_eks;
    /** New key if present. */
    cp_key_t new_key;
};
typedef struct cp_msg_cm_set_key_req_t cp_msg_cm_set_key_req_t;

/** Data associated with a CM_SET_KEY.CNF message. */
struct cp_msg_cm_set_key_cnf_t
{
    /** Result. */
    enum cp_msg_cm_set_key_cnf_result_t result;
    /** CCo capability. */
    u8 cco_cap;
};
typedef struct cp_msg_cm_set_key_cnf_t cp_msg_cm_set_key_cnf_t;

#endif /* cp_msg_inc_cm_set_key_h */