blob: 290d1ff0054abc80e0e92e88aaf03d332410851c (
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
|
/*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at https://mozilla.org/MPL/2.0/.
*/
#ifndef SRC_SETTINGS_H
#define SRC_SETTINGS_H
#include <stddef.h>
#include <zephyr/data/json.h>
#define IPV6_STRLEN_MAX 39 // excluding '\0'
struct settings_syslog_target {
char ip_array[IPV6_STRLEN_MAX];
char *ip; /* Zephyr's JSON lib does not work with arrays directly */
};
struct settings_syslog {
struct settings_syslog_target target;
};
struct settings {
struct settings_syslog syslog;
};
int settings_to_json(void *buffer, size_t data);
#endif // !SRC_SETTINGS_H
|