-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathKconfig.anjay
353 lines (287 loc) · 11.8 KB
/
Kconfig.anjay
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
# Copyright 2020-2025 AVSystem <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
menu "Anjay LwM2M library"
config ANJAY
bool "Anjay LwM2M library support"
if ANJAY
choice ANJAY_COMPAT_SECURITY
prompt "Enable support for encrypted communication"
default ANJAY_COMPAT_MBEDTLS if ANJAY_COMPAT_NET
optional
config ANJAY_COMPAT_MBEDTLS
bool "Use the Mbed TLS backend"
select MBEDTLS
select MBEDTLS_ENTROPY_ENABLED
imply MBEDTLS_ENTROPY_C
imply MBEDTLS_DTLS
imply MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
menuconfig ANJAY_COMPAT_ZEPHYR_TLS
bool "Use Zephyr TLS sockets"
select MODEM_KEY_MGMT if NRF_MODEM_LIB
select TLS_CREDENTIALS if (!NRF_MODEM_LIB)
select NET_SOCKETS_SOCKOPT_TLS if (!NRF_MODEM_LIB)
imply NET_SOCKETS_ENABLE_DTLS if (!NRF_MODEM_LIB)
config ANJAY_COMPAT_ZEPHYR_TLS_SESSION_CACHE
bool "Enable Zephyr TLS session cache."
default y
depends on ANJAY_COMPAT_ZEPHYR_TLS
config ANJAY_COMPAT_ZEPHYR_TLS_SESSION_CACHE_PURGE_ON_START
bool "Purge modem when Anjay security config is not restored from persistence."
default y
depends on ANJAY_COMPAT_ZEPHYR_TLS
depends on ANJAY_COMPAT_ZEPHYR_TLS_SESSION_CACHE
depends on NRF_MODEM_LIB
depends on MODEM_KEY_MGMT
help
When reconfiguring Anjay Client, modem can store in cache DTLS Session ID
valid for a given LwM2M Server, but not for a specific Endpoint, which
results in hard to debug successful Handshake and rejected registration
attempts. For production configuration it is advised to disable it for
data transmitted optimization.
config ANJAY_COMPAT_ZEPHYR_TLS_EPHEMERAL_SEC_TAG_BASE
int "Lowest security tag number to use for Anjay's ephemeral credentials"
default 2652900
range 0 2147483647
depends on ANJAY_COMPAT_ZEPHYR_TLS
config ANJAY_COMPAT_ZEPHYR_TLS_EPHEMERAL_SEC_TAG_COUNT
int "Numer of security tags to reserve for Anjay's ephemeral credentials"
default 100
range 1 2147483647
depends on ANJAY_COMPAT_ZEPHYR_TLS
config ANJAY_COMPAT_ZEPHYR_TLS_ASSUME_RESUMPTION_SUCCESS
bool "Assume that (D)TLS session resumption always succeeds"
depends on ANJAY_COMPAT_ZEPHYR_TLS
depends on ANJAY_COMPAT_ZEPHYR_TLS_SESSION_CACHE
depends on NRF_MODEM_LIB
default y
help
nRF sockets do not provide an API that would allow to check
whether a full (D)TLS handshake has been performed, or has a
previously existing session been resumed.
Enabling this option will prevent the LwM2M Register operation
from being performed after each handshake; however, if the session
has indeed not been resumed, messages (notifications, Send
messages) sent until the device actually re-registers may not be
properly processed by the LwM2M server.
endchoice
config ANJAY_COMPAT_NET
bool "Enable Net compatibility implementation"
config ANJAY_COMPAT_NET_LIMITED_POLL_WORKAROUND
bool "Use alternative implementation of zsock_poll() method called by Anjay's event loop, that enables the use of offloaded socket implementations which offload poll() without support for more than one socket"
default y if WIFI_ESWIFI
default n
depends on ANJAY_COMPAT_NET
config ANJAY_COMPAT_TIME
bool "Enable Time compatibility implementation"
menuconfig ANJAY_WITH_LOGS
bool "Enable logging in Anjay, avs_commons and avs_coap."
default y
depends on LOG
help
If this flag is disabled, no logging is compiled into the binary at all.
config ANJAY_WITH_TRACE_LOGS
bool "Enable TRACE-level logs in Anjay, avs_commons and avs_coap."
default n
depends on ANJAY_WITH_LOGS
config ANJAY_WITH_MICRO_LOGS
bool "Enable the \"micro logs\" feature."
default n
help
Replaces all occurrences of the <c>AVS_DISPOSABLE_LOG()</c> macro with single
space strings. This is intended to reduce the size of the compiled code, by
stripping it of almost all log string data.
Note that this setting will propagate both to avs_commons components
themselves (as all its internal logs make use of <c>AVS_DISPOSABLE_LOG()</c>)
and the user code that uses it.
depends on ANJAY_WITH_LOGS
module = ANJAY
module-dep = ANJAY_WITH_LOGS
module-str = Log level for Anjay
source "${ZEPHYR_BASE}/subsys/net/Kconfig.template.log_config.net"
config ANJAY_WITH_ACCESS_CONTROL
bool "Enable core support for Access Control mechanisms."
default y
help
Requires separate implementation of the Access Control object itself.
Either the implementation available as part of
ANJAY_WITH_MODULE_ACCESS_CONTROL, or a custom application-provided one
may be used.
config ANJAY_WITH_DOWNLOADER
bool "Enable support for the anjay_download() API."
default y
config ANJAY_WITH_COAP_DOWNLOAD
bool "Enable support for CoAP(S) downloads."
default y
depends on ANJAY_WITH_DOWNLOADER
config ANJAY_WITH_HTTP_DOWNLOAD
bool "Enable support for HTTP(S) downloads."
default n
depends on ANJAY_WITH_DOWNLOADER
config ANJAY_WITH_BOOTSTRAP
bool "Enable support for the LwM2M Bootstrap Interface."
default y
config ANJAY_WITH_DISCOVER
bool "Enable support for the LwM2M Discover operation."
default y
config ANJAY_WITH_OBSERVE
bool "Enable support for the LwM2M Information Reporting interface."
default y
help
Information Reporting interface includes Observe and Notify operations
config ANJAY_WITH_OBSERVE_PERSISTENCE
bool "Enable support for observation persistence"
default n
depends on ANJAY_WITH_OBSERVE
config ANJAY_WITH_NET_STATS
bool "Enable support for measuring amount of LwM2M traffic."
default y
config ANJAY_WITH_COMMUNICATION_TIMESTAMP_API
bool "Enable support for communication timestamp API."
default n
help
Enable anjay_get_server_last_registration_time(),
anjay_get_server_next_update_time() and
anjay_get_server_last_communication_time() functions.
config ANJAY_WITH_OBSERVATION_STATUS
bool "Enable support for the anjay_resource_observation_status() API."
default n
config ANJAY_MAX_OBSERVATION_SERVERS_REPORTED_NUMBER
int "Maximum number of listed servers that observe a given Resource."
default 0
depends on ANJAY_WITH_OBSERVATION_STATUS
help
Maximum number of servers observing a given Resource listed by
anjay_resource_observation_status() function.
config ANJAY_WITH_THREAD_SAFETY
bool "Enable guarding of all accesses to anjay_t with a mutex."
default y
config ANJAY_WITH_EVENT_LOOP
bool "Enable default implementation of the event loop."
default y
config ANJAY_WITH_LWM2M11
bool "Enable support for features new to LwM2M protocol version 1.1."
default n
config ANJAY_WITH_SEND
bool "Enable support for the LwM2M Send operation."
default n
depends on ANJAY_WITH_LWM2M11
help
Requires either SENML_JSON or CBOR format to be enabled
config ANJAY_WITH_LEGACY_CONTENT_FORMAT_SUPPORT
bool "Enable support for legacy CoAP Content-Format values"
default n
help
Enable support for legacy CoAP Content-Format numerical values 1541-1543 that
have been used before final LwM2M TS 1.0.
config ANJAY_WITH_LWM2M_JSON
bool "Enable support for JSON format as specified in LwM2M TS 1.0."
default n
config ANJAY_WITHOUT_TLV
bool "Disable support for TLV format as specified in LwM2M TS 1.0."
default n
config ANJAY_WITHOUT_PLAINTEXT
bool "Disable support for Plain Text format as specified in LwM2M TS 1.0. and 1.1"
default n
config ANJAY_WITHOUT_DEREGISTER
bool "Disable use of the Deregister message."
default n
config ANJAY_WITHOUT_IP_STICKINESS
bool "Disable support for \"IP stickiness\""
default y
help
"IP stickiness" is a preference of the same IP address when reconnecting to
a server using a domain name.
config ANJAY_WITH_SENML_JSON
bool "Enable support for SenML JSON format, as specified in LwM2M TS 1.1."
default n
depends on ANJAY_WITH_LWM2M11
config ANJAY_WITH_CBOR
bool "Enable support for CBOR and SenML CBOR formats, as specified in LwM2M TS 1.1."
default n
depends on ANJAY_WITH_LWM2M11
config ANJAY_WITH_CON_ATTR
bool "Enable support for custom \"con\" attribute that controls Confirmable notifications."
default n
depends on ANJAY_WITH_OBSERVE
config ANJAY_MAX_PK_OR_IDENTITY_SIZE
int "Maximum size of the \"Public Key or Identity\""
default 256
help
Maximum size in bytes supported for the \"Public Key or Identity\" resource
in the LwM2M Security object.
config ANJAY_MAX_SECRET_KEY_SIZE
int "Maximum size of the \"Secret Key\""
default 128
help
Maximum size in bytes supported for the \"Secret Key\" resource in the LwM2M
Security Object.
config ANJAY_MAX_DOUBLE_STRING_SIZE
int "Maximum length supported for stringified floating-point values."
default 64
help
Used when parsing plaintext and SenML JSON content formats - when parsing a
floating-point value, any string of length equal or greater than this setting
will automatically be considered invalid, even if it could in theory be
parsed as a valid number.
config ANJAY_MAX_URI_SEGMENT_SIZE
int "Maximum length supported for a single Uri-Path or Location-Path segment."
default 64
help
When handling incoming CoAP messages, any Uri-Path or Location-Path option of
length equal or greater than this setting will be considered invalid.
config ANJAY_MAX_URI_QUERY_SEGMENT_SIZE
int "Maximum length supported for a single Uri-Query segment."
default 64
help
When handling incoming CoAP messages, any Uri-Query option of length equal or
greater than this setting will be considered invalid.
config ANJAY_DTLS_SESSION_BUFFER_SIZE
int "DTLS buffer size"
default 1024
help
Size of buffer allocated for storing DTLS session state when connection is
not in use (e.g. during queue mode operation).
config ANJAY_WITH_ATTR_STORAGE
bool "Enable attr_storage module"
default y
config ANJAY_WITH_MODULE_ACCESS_CONTROL
bool "Enable access control module"
default y
depends on ANJAY_WITH_ACCESS_CONTROL
config ANJAY_WITH_MODULE_SECURITY
bool "Enable security module"
default y
config ANJAY_WITH_MODULE_SERVER
bool "Enable server module"
default y
config ANJAY_WITH_MODULE_FW_UPDATE
bool "Enable fw_update module"
default y
depends on ANJAY_WITH_DOWNLOADER
config ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE
bool "Enable advanced_fw_update module"
default n
depends on ANJAY_WITH_DOWNLOADER
config ANJAY_WITH_MODULE_IPSO_OBJECTS
bool "Enable IPSO objects implementation"
default y
config ANJAY_WITH_MODULE_IPSO_OBJECTS_V2
bool "(experimental feature) Enable IPSO V2 objects implementation"
default n
config ANJAY_WITH_MODULE_FACTORY_PROVISIONING
bool "Enable factory provisioning module"
default n
depends on ANJAY_WITH_CBOR
endif
endmenu