Virgil IoT KIT
info-structs.h
Go to the documentation of this file.
1 // Copyright (C) 2015-2020 Virgil Security, Inc.
2 //
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // (1) Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 //
12 // (2) Redistributions in binary form must reproduce the above copyright
13 // notice, this list of conditions and the following disclaimer in
14 // the documentation and/or other materials provided with the
15 // distribution.
16 //
17 // (3) Neither the name of the copyright holder nor the names of its
18 // contributors may be used to endorse or promote products derived from
19 // this software without specific prior written permission.
20 //
21 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR
22 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 // DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
25 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
30 // IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 // POSSIBILITY OF SUCH DAMAGE.
32 //
33 // Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com>
34 
41 #ifndef VS_SECURITY_SDK_SNAP_SERVICES_INFO_STRUCTS_H
42 #define VS_SECURITY_SDK_SNAP_SERVICES_INFO_STRUCTS_H
43 
49 
50 #ifdef __cplusplus
51 namespace VirgilIoTKit {
52 extern "C" {
53 #endif
54 
59 typedef struct {
60  uint32_t device_roles;
61  uint8_t mac[ETH_ADDR_LEN];
63 
69 typedef struct {
70  uint8_t major;
71  uint8_t minor;
72  uint8_t patch;
73  uint32_t build;
74  uint32_t timestamp;
76 
81 typedef struct {
82  uint8_t manufacture_id[VS_DEVICE_MANUFACTURE_ID_SIZE];
83  uint8_t device_type[VS_DEVICE_TYPE_SIZE];
84  uint8_t default_netif_mac[ETH_ADDR_LEN];
85  uint32_t device_roles;
89 
94 typedef struct {
95  uint32_t sent;
96  uint32_t received;
97  uint8_t default_netif_mac[ETH_ADDR_LEN];
99 
104 typedef enum {
106  HTONL_IN_COMPILE_TIME(0x0001),
109 
110 #ifdef __cplusplus
111 } // extern "C"
112 } // namespace VirgilIoTKit
113 #endif
114 
115 #endif // VS_SECURITY_SDK_SNAP_SERVICES_INFO_STRUCTS_H
VS_SNAP_INFO_STATISTICS
@ VS_SNAP_INFO_STATISTICS
Device statistic vs_info_statistics_t will be sent.
Definition: info-structs.h:107
vs_snap_info_device_t
Device information.
Definition: info-structs.h:59
vs_snap_info_device_t::device_roles
uint32_t device_roles
Mask based on vs_snap_device_role_e elements.
Definition: info-structs.h:60
vs_info_general_t::tl_ver
vs_file_version_unpacked_t tl_ver
Trust List version.
Definition: info-structs.h:87
vs_snap_info_element_mask_e
vs_snap_info_element_mask_e
Device statistics.
Definition: info-structs.h:104
ETH_ADDR_LEN
#define ETH_ADDR_LEN
Definition: snap-structs.h:234
tl_structs.h
Trust List structures.
VS_DEVICE_MANUFACTURE_ID_SIZE
#define VS_DEVICE_MANUFACTURE_ID_SIZE
Manufacture ID size.
Definition: provision-structs.h:111
VS_DEVICE_TYPE_SIZE
#define VS_DEVICE_TYPE_SIZE
Device type size.
Definition: provision-structs.h:114
snap.h
SNAP network interface calls.
vs_file_version_unpacked_t
File version.
Definition: info-structs.h:69
vs_file_version_unpacked_t::patch
uint8_t patch
Patch number.
Definition: info-structs.h:72
status_code.h
Status codes and macroses.
snap-structs.h
SNAP structures.
vs_file_version_unpacked_t::minor
uint8_t minor
Minor version number.
Definition: info-structs.h:71
vs_file_version_unpacked_t::build
uint32_t build
Build number.
Definition: info-structs.h:73
HTONL_IN_COMPILE_TIME
#define HTONL_IN_COMPILE_TIME(val)
Definition: provision-structs.h:87
vs_info_general_t::fw_ver
vs_file_version_unpacked_t fw_ver
Firmware version.
Definition: info-structs.h:86
vs_info_statistics_t
Device statistics.
Definition: info-structs.h:94
vs_info_general_t::device_roles
uint32_t device_roles
Mask based on vs_snap_device_role_e elements.
Definition: info-structs.h:85
vs_file_version_unpacked_t::major
uint8_t major
Major version number.
Definition: info-structs.h:70
vs_info_statistics_t::received
uint32_t received
Definition: info-structs.h:96
vs_info_general_t
Device general information.
Definition: info-structs.h:81
trust_list.h
Trust List module.
VS_SNAP_INFO_GENERAL
@ VS_SNAP_INFO_GENERAL
General device information vs_info_general_t will be sent.
Definition: info-structs.h:105
vs_info_statistics_t::sent
uint32_t sent
Definition: info-structs.h:95
vs_file_version_unpacked_t::timestamp
uint32_t timestamp
The number of seconds since VS_START_EPOCH.
Definition: info-structs.h:74