kdriveExpress SDK 23.2.0
kdrive_express_keyring.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2002-2023 WEINZIERL ENGINEERING GmbH
3 // All rights reserved.
4 //
5 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
6 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
7 // FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
8 // SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY,
9 // WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
10 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
11 //
12 
13 #ifndef __KDRIVE_EXPRESS_KEYRING_H__
14 #define __KDRIVE_EXPRESS_KEYRING_H__
15 
16 #include "kdrive_express_config.h"
17 #include "kdrive_express_defs.h"
18 
26 #if KDRIVE_EXPRESS_SECURITY_ENABLED == 1
27 
28 #ifdef __cplusplus
29 extern "C"
30 {
31 #endif
32 
33 /*******************************
34 ** Keyring
35 ********************************/
36 
44 
53  const char* password, int32_t* keyring);
54 
63 
73 
83  char creator[], uint32_t* creator_length);
84 
85 typedef struct keyring_dev_t
86 {
95 
104 
113 
114 typedef struct keyring_tun_t
115 {
124 
133 
142 
150 
160  uint16_t group_addr,
161  const uint8_t key[KDRIVE_SEC_KEY_LEN]);
162 
171  uint16_t group_addr,
173 
181 
182 #ifdef __cplusplus
183 }
184 #endif
185 
186 #endif /* KDRIVE_EXPRESS_SECURITY_ENABLED */
187 
188 #endif /* __KDRIVE_EXPRESS_KEYRING_H__ */
kdriveExpress_API int32_t kdrive_keyring_create(const char *name)
Create a new keyring.
kdriveExpress_API error_t kdrive_keyring_remove_group_addr(int32_t keyring, uint16_t group_addr)
Removes a group address with it's key from the keyring.
kdriveExpress_API bool_t kdrive_keyring_remove(int32_t keyring)
Removes a keyring project Returns true if successfully released false otherwise (i....
kdriveExpress_API error_t kdrive_keyring_get_proj_creator(int32_t keyring, char creator[], uint32_t *creator_length)
Gets keyring project creator (e.g.
kdriveExpress_API error_t kdrive_keyring_set_group_addr(int32_t keyring, uint16_t group_addr, const uint8_t key[KDRIVE_SEC_KEY_LEN])
Set a group address with it's key to the keyring.
kdriveExpress_API error_t kdrive_keyring_get_device(int32_t keyring, keyring_dev_t *device)
Get a device from the keyring.
kdriveExpress_API error_t kdrive_keyring_get_tunnel(int32_t keyring, keyring_tun_t *tunnel)
Get a tunneling interface from the keyring.
kdriveExpress_API error_t kdrive_keyring_set_tunnel(int32_t keyring, const keyring_tun_t *tunnel)
Set a tunneling interface to the keyring.
kdriveExpress_API error_t kdrive_keyring_import_knxkeys(const char *filename, const char *password, int32_t *keyring)
Imports an ETS keyring project file (*.knxkeys)
kdriveExpress_API error_t kdrive_keyring_remove_device_tunnel(int32_t keyring, uint16_t address)
Removes a device or tunneling interface chosen by it's individual address from the keyring.
kdriveExpress_API error_t kdrive_keyring_get_group_addr(int32_t keyring, uint16_t group_addr, uint8_t key[KDRIVE_SEC_KEY_LEN])
Get the key for a group address from the keyring.
kdriveExpress_API error_t kdrive_keyring_get_proj_name(int32_t keyring, char name[], uint32_t *name_length)
Gets keyring project name Null-terminated string in utf8 encoding.
kdriveExpress_API error_t kdrive_keyring_set_device(int32_t keyring, const keyring_dev_t *device)
Set a device to the keyring.
#define kdriveExpress_API
Definition: kdrive_express_config.h:89
unsigned short uint16_t
16 bit unsigned char
Definition: kdrive_express_config.h:31
bool bool_t
Definition: kdrive_express_config.h:58
int int32_t
32 bit signed int
Definition: kdrive_express_config.h:35
unsigned int uint32_t
32 bit unsigned char
Definition: kdrive_express_config.h:32
int32_t error_t
Definition: kdrive_express_config.h:47
unsigned char uint8_t
8 bit unsigned char
Definition: kdrive_express_config.h:30
kdriveExpress Defines
#define KDRIVE_MAX_SEC_PASSWORD_LEN
The Maximum Length of a Security Password with Null-termination.
Definition: kdrive_express_defs.h:38
#define KDRIVE_SEC_KEY_LEN
The Length of a security backbone key.
Definition: kdrive_express_defs.h:37
struct keyring_dev_t keyring_dev_t
struct keyring_tun_t keyring_tun_t
Definition: kdrive_express_keyring.h:86
char auth_password[KDRIVE_MAX_SEC_PASSWORD_LEN]
Authentication password (as null terminated string)
Definition: kdrive_express_keyring.h:92
bool_t has_auth_password
The device has a Authentication password.
Definition: kdrive_express_keyring.h:93
bool_t has_mgmt_password
The device has a Management password.
Definition: kdrive_express_keyring.h:91
uint16_t ind_addr
KNX individual address.
Definition: kdrive_express_keyring.h:87
uint8_t tool_key[KDRIVE_SEC_KEY_LEN]
Tool key.
Definition: kdrive_express_keyring.h:88
bool_t has_tool_key
The device has a Tool key.
Definition: kdrive_express_keyring.h:89
char password[KDRIVE_MAX_SEC_PASSWORD_LEN]
Management password (as null terminated string)
Definition: kdrive_express_keyring.h:90
Definition: kdrive_express_keyring.h:115
char auth_password[KDRIVE_MAX_SEC_PASSWORD_LEN]
Authentication password (as null terminated string)
Definition: kdrive_express_keyring.h:121
char password[KDRIVE_MAX_SEC_PASSWORD_LEN]
The user password (as null terminated string)
Definition: kdrive_express_keyring.h:119
uint8_t user_id
The user Id of the connection.
Definition: kdrive_express_keyring.h:118
uint16_t ind_addr
KNX individual address.
Definition: kdrive_express_keyring.h:117
uint32_t has_user_credentials
The Tunnel has a user and password.
Definition: kdrive_express_keyring.h:120
uint32_t has_auth_password
The Tunnel has a authentication password.
Definition: kdrive_express_keyring.h:122
uint16_t host_ind_addr
KNX individual address of the host.
Definition: kdrive_express_keyring.h:116