conditions.h
1 /*
2  * Copyright (C) 2019 Koen Zandberg
3  * 2019 Kaspar Schleiser <kaspar@schleiser.de>
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
21 #ifndef SUIT_CONDITIONS_H
22 #define SUIT_CONDITIONS_H
23 
24 #include <stddef.h>
25 #include <stdint.h>
26 
27 #include "uuid.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
39 #ifndef SUIT_VENDOR_DOMAIN
40 #define SUIT_VENDOR_DOMAIN "riot-os.org"
41 #endif
42 
48 #ifndef SUIT_CLASS_ID
49 #define SUIT_CLASS_ID RIOT_BOARD
50 #endif
51 
55 enum {
56  SUIT_COND_VENDOR_ID = 1,
57  SUIT_COND_CLASS_ID = 2,
58  SUIT_COND_DEV_ID = 3,
59  SUIT_COND_BEST_BEFORE = 4,
60 };
61 
65 typedef struct {
67  uuid_t class;
70 
81 void suit_init_conditions(void);
82 
89 
96 
103 
104 #ifdef __cplusplus
105 }
106 #endif
107 
108 #endif /* SUIT_CONDITIONS_H */
109 
uuid_t * suit_get_vendor_id(void)
Retrieve the generated vendor ID.
RFC 4122 UUID functions
uuid_t vendor
Vendor url as UUID.
Definition: conditions.h:66
SUIT condition parameters.
Definition: conditions.h:65
uuid_t * suit_get_device_id(void)
Retrieve the generated device ID.
UUID layout.
Definition: uuid.h:64
uuid_t * suit_get_class_id(void)
Retrieve the generated class ID.
void suit_init_conditions(void)
Initialize boot-time conditions for SUIT manifests.
uuid_t device
Device specific information as UUID.
Definition: conditions.h:68