Repository navigation
Expand file tree
/
Copy pathKconfig
More file actions
310 lines (263 loc) · 8.25 KB
/
Copy pathKconfig
File metadata and controls
310 lines (263 loc) · 8.25 KB
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
# zephyr/Kconfig for libcoap
#
# Copyright (C) 2023-2026 Jon Shallow <supjps-libcoap@jpshallow.com>
#
# SPDX-License-Identifier: BSD-2-Clause
#
# This file is part of the CoAP library libcoap. Please see README for terms
# of use.
#
###############################################################################
menu "libcoap Settings"
config LIBCOAP
bool "Enable libcoap"
help
This option enables libcoap as a Zephyr module.
endmenu
if LIBCOAP
config LIBCOAP_IPV4_SUPPORT
bool "Enable IPv4 support within CoAP"
default y
help
Enable IPv4 functionality for CoAP.
If this option is disabled, redundant CoAP IPv4 code is removed.
config LIBCOAP_IPV6_SUPPORT
bool "Enable IPv6 support within CoAP"
default y
help
Enable IPv6 functionality for CoAP.
If this option is disabled, redundant CoAP IPv6 code is removed.
config LIBCOAP_TCP_SUPPORT
bool "Enable TCP support within CoAP"
default n
help
Enable TCP functionality for CoAP. This is required if TLS sessions
are to be used. Note that RIOT TCP support also needs to be enabled.
If this option is disabled, redundant CoAP TCP code is removed.
config LIBCOAP_OSCORE_SUPPORT
bool "Enable OSCORE support within CoAP"
default n
help
Enable OSCORE functionality for CoAP.
If this option is disabled, redundant CoAP OSCORE code is removed.
config LIBCOAP_OBSERVE_PERSIST
bool "Enable Observe persist support within CoAP"
default n
help
Enable Observe persist functionality for CoAP.
If this option is disabled, redundant CoAP Observe persist code is removed.
config LIBCOAP_WS_SOCKET
bool "Enable WebSocket support within CoAP"
default n
help
Enable WebSocket functionality for CoAP.
If this option is disabled, redundant CoAP WebSocket code is removed.
config LIBCOAP_Q_BLOCK_SUPPORT
bool "Enable Q-Block (RFC9177) support within CoAP"
default n
help
Enable Q-Block (RFC9177) functionality for CoAP.
If this option is disabled, redundant CoAP Q-Block code is removed.
config LIBCOAP_ASYNC_SUPPORT
bool "Enable separate responses support within CoAP"
default y
help
Enable async separate responses functionality for CoAP.
If this option is disabled, redundant CoAP async separate responses code is removed.
config LIBCOAP_THREAD_SAFE_SUPPORT
bool "Enable thread safe support within CoAP"
default y
help
Enable thread safe support functionality for CoAP.
If this option is disabled, multi-thread safe use of libcoap is not available.
config LIBCOAP_THREAD_RECURSIVE_CHECK
bool "Enable thread-safe recursion checking support within CoAP"
depends on LIBCOAP_THREAD_SAFE_SUPPORT
default n
help
Enable thread-safe recursion checking support for CoAP.
config LIBCOAP_ENABLE_THREAD_NUM_LOGGING
bool "Enable building with thread number logging support"
depends on LIBCOAP_THREAD_SAFE_SUPPORT
default y
help
Enable logging including thread number.
If this option is disabled, the thread number is not reported.
config LIBCOAP_CLIENT_SUPPORT
bool "Enable Client functionality within CoAP"
default n
help
Enable client functionality (ability to make requests and receive
responses) for CoAP. If the server is going to act as a proxy, then
this needs to be enabled to support the ongoing session going to
the next hop.
If this option is disabled, redundant CoAP client only code is
removed.
If both this option and LIBCOAP_SERVER_SUPPORT are disabled, then
both are automatically enabled for backwards compatibility.
config LIBCOAP_SERVER_SUPPORT
bool "Enable Server functionality within CoAP"
default n
help
Enable server functionality (ability to receive requests and send
responses) for CoAP.
If this option is disabled, redundant CoAP server only code is
removed.
If both this option and LIBCOAP_CLIENT_SUPPORT are disabled, then
both are automatically enabled for backwards compatibility.
config LIBCOAP_DEBUGGING
bool "Enable CoAP debugging"
default y
help
Enable CoAP debugging functions at compile time for the example code.
If this option is enabled, call coap_set_log_level()
at runtime in order to enable CoAP debug output.
choice LIBCOAP_DEBUGGING_LEVEL
bool "Set CoAP debugging level"
depends on LIBCOAP_DEBUGGING
default LIBCOAP_LOG_DEBUG
help
Set CoAP debugging level
Note: reducing the logging level also reduces the code size.
config LIBCOAP_LOG_EMERG
bool "Emergency"
config LIBCOAP_LOG_ALERT
bool "Alert"
config LIBCOAP_LOG_CRIT
bool "Critical"
config LIBCOAP_LOG_ERROR
bool "Error"
config LIBCOAP_LOG_WARNING
bool "Warning"
config LIBCOAP_LOG_NOTICE
bool "Notice"
config LIBCOAP_LOG_INFO
bool "Info"
config LIBCOAP_LOG_DEBUG
bool "Debug"
config LIBCOAP_LOG_OSCORE
bool "OSCORE"
endchoice
config LIBCOAP_LOG_DEFAULT_LEVEL
int
default 0 if !LIBCOAP_DEBUGGING
default 0 if LIBCOAP_LOG_EMERG
default 1 if LIBCOAP_LOG_ALERT
default 2 if LIBCOAP_LOG_CRIT
default 3 if LIBCOAP_LOG_ERROR
default 4 if LIBCOAP_LOG_WARNING
default 5 if LIBCOAP_LOG_NOTICE
default 6 if LIBCOAP_LOG_INFO
default 7 if LIBCOAP_LOG_DEBUG
default 8 if LIBCOAP_LOG_OSCORE
config LIBCOAP_DEFAULT_MAX_PDU_RX_SIZE
int "Default max PDU RX size in bytes"
default 1152
help
Maximum size of incoming CoAP PDU. RFC7252 4.6 suggests 1152.
Increase for larger block-wise transfers (e.g. 1024-4096).
config LIBCOAP_RXBUFFER_SIZE
int "Receive buffer size in bytes"
default 1472
help
Size of the socket receive buffer for incoming CoAP/UDP packets.
Should be at least as large as the largest expected PDU (e.g. 1472
for typical Ethernet MTU minus headers).
config LIBCOAP_DEFAULT_MTU
int "Default MTU in bytes"
default 1152
help
Default path/session MTU used for CoAP (RFC7252 4.6 suggests 1152).
Used for session MTU and PDU sizing; increase for larger block-wise
transfers.
config LIBCOAP_OBS_MAX_NON
int "Observe: max NON notifications before CON"
default 5
range 1 255
help
Number of NON notifications before sending a CON (RFC7641 4.5).
config LIBCOAP_DEFAULT_MAX_LATENCY
int "Default max latency in seconds"
default 100
help
Maximum network latency used by CoAP timeout calculations.
RFC7252 Section 4.8.2 specifies a default of 100 seconds.
config LIBCOAP_DEFAULT_SESSION_TIMEOUT
int "Default session timeout"
default 300
help
This setting refers to the COAP_DEFAULT_SESSION_TIMEOUT, which defines server session's timeout.
if MBEDTLS
config MBEDTLS_OSCORE
bool "Set if OSCORE only"
default n
config MBEDTLS_CIPHER_CCM_ENABLED
bool
default y
config MBEDTLS_DEBUG
bool
default y
config MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
bool
default y
config MBEDTLS_ENTROPY_ENABLED
bool
default y
config MBEDTLS_ZEPHYR_ENTROPY
bool
default y
config MBEDTLS_SSL_PROTO_TLS1_2
bool
default y
config MBEDTLS_KEY_EXCHANGE_ALL_ENABLED
bool
default y
config MBEDTLS_CIPHER_ALL_ENABLED
bool
default n
config MBEDTLS_ECP_ALL_ENABLED
bool
default n
config MBEDTLS_MAC_ALL_ENABLED
bool
default y
config MBEDTLS_GENPRIME_ENABLED
bool
default y
config MBEDTLS_ECDH_C
bool
default y
config MBEDTLS_ECDSA_C
bool
default y
config MBEDTLS_ECJPAKE_C
bool
default y
config MBEDTLS_ECP_C
bool
default y
if ! MBEDTLS_OSCORE
config MBEDTLS_SERVER_NAME_INDICATION
bool
default y
config MBEDTLS_SSL_PROTO_DTLS
bool
default y
config MBEDTLS_SSL_DTLS_CONNECTION_ID
bool
default y
config MBEDTLS_PEM_CERTIFICATE_FORMAT
bool
default y
config MBEDTLS_SSL_EXTENDED_MASTER_SECRET
bool
default y
endif # ! MBEDTLS_OSCORE
config MBEDTLS_HAVE_TIME_DATE
bool
default y
endif # MBEDTLS
module = LIBCOAP
module-str = libcoap
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
endif # LIBCOAP