1c87c5fbaSopenharmony_ci# Copyright (c) 2019 HAW Hamburg
2c87c5fbaSopenharmony_ci#
3c87c5fbaSopenharmony_ci# This file is subject to the terms and conditions of the GNU Lesser
4c87c5fbaSopenharmony_ci# General Public License v2.1. See the file LICENSE in the top level
5c87c5fbaSopenharmony_ci# directory for more details.
6c87c5fbaSopenharmony_ci#
7c87c5fbaSopenharmony_cimenuconfig KCONFIG_USEPKG_LIBCOAP
8c87c5fbaSopenharmony_ci    bool "Configure libcoap"
9c87c5fbaSopenharmony_ci    depends on USEPKG_LIBCOAP
10c87c5fbaSopenharmony_ci    help
11c87c5fbaSopenharmony_ci        Configure libcoap package via Kconfig.
12c87c5fbaSopenharmony_ci
13c87c5fbaSopenharmony_ciif KCONFIG_USEPKG_LIBCOAP
14c87c5fbaSopenharmony_ci
15c87c5fbaSopenharmony_cichoice LIBCOAP_DEBUG_LEVEL
16c87c5fbaSopenharmony_ci    bool "Set CoAP debugging level"
17c87c5fbaSopenharmony_ci    default LIBCOAP_LOG_DEBUG
18c87c5fbaSopenharmony_ci    help
19c87c5fbaSopenharmony_ci        Set CoAP debugging level
20c87c5fbaSopenharmony_ci
21c87c5fbaSopenharmony_ci    config LIBCOAP_LOG_EMERG
22c87c5fbaSopenharmony_ci        bool "Emergency"
23c87c5fbaSopenharmony_ci    config LIBCOAP_LOG_ALERT
24c87c5fbaSopenharmony_ci        bool "Alert"
25c87c5fbaSopenharmony_ci    config LIBCOAP_LOG_CRIT
26c87c5fbaSopenharmony_ci        bool "Critical"
27c87c5fbaSopenharmony_ci    config LIBCOAP_LOG_ERROR
28c87c5fbaSopenharmony_ci        bool "Error"
29c87c5fbaSopenharmony_ci    config LIBCOAP_LOG_WARNING
30c87c5fbaSopenharmony_ci        bool "Warning"
31c87c5fbaSopenharmony_ci    config LIBCOAP_LOG_NOTICE
32c87c5fbaSopenharmony_ci        bool "Notice"
33c87c5fbaSopenharmony_ci    config LIBCOAP_LOG_INFO
34c87c5fbaSopenharmony_ci        bool "Info"
35c87c5fbaSopenharmony_ci    config LIBCOAP_LOG_DEBUG
36c87c5fbaSopenharmony_ci        bool "Debug"
37c87c5fbaSopenharmony_ci    config LIBCOAP_LOG_OSCORE
38c87c5fbaSopenharmony_ci        bool "OSCORE"
39c87c5fbaSopenharmony_ciendchoice
40c87c5fbaSopenharmony_ci
41c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_LOGGING_LEVEL
42c87c5fbaSopenharmony_ci    int
43c87c5fbaSopenharmony_ci    default 0 if LIBCOAP_LOG_EMERG
44c87c5fbaSopenharmony_ci    default 1 if LIBCOAP_LOG_ALERT
45c87c5fbaSopenharmony_ci    default 2 if LIBCOAP_LOG_CRIT
46c87c5fbaSopenharmony_ci    default 3 if LIBCOAP_LOG_ERROR
47c87c5fbaSopenharmony_ci    default 4 if LIBCOAP_LOG_WARNING
48c87c5fbaSopenharmony_ci    default 5 if LIBCOAP_LOG_NOTICE
49c87c5fbaSopenharmony_ci    default 6 if LIBCOAP_LOG_INFO
50c87c5fbaSopenharmony_ci    default 7 if LIBCOAP_LOG_DEBUG
51c87c5fbaSopenharmony_ci    default 8 if LIBCOAP_LOG_OSCORE
52c87c5fbaSopenharmony_ci
53c87c5fbaSopenharmony_ciconfig LIBCOAP_IPV4_SUPPORT
54c87c5fbaSopenharmony_ci    bool "Enable IPv4 support within CoAP"
55c87c5fbaSopenharmony_ci    default n
56c87c5fbaSopenharmony_ci    help
57c87c5fbaSopenharmony_ci        Enable IPv4 functionality for CoAP.
58c87c5fbaSopenharmony_ci
59c87c5fbaSopenharmony_ci        If this option is disabled, redundant CoAP IPv4 code is removed.
60c87c5fbaSopenharmony_ci
61c87c5fbaSopenharmony_ciconfig LIBCOAP_IPV6_SUPPORT
62c87c5fbaSopenharmony_ci    bool "Enable IPv6 support within CoAP"
63c87c5fbaSopenharmony_ci    default y
64c87c5fbaSopenharmony_ci    help
65c87c5fbaSopenharmony_ci        Enable IPv6 functionality for CoAP.
66c87c5fbaSopenharmony_ci
67c87c5fbaSopenharmony_ci        If this option is disabled, redundant CoAP IPv6 code is removed.
68c87c5fbaSopenharmony_ci
69c87c5fbaSopenharmony_ciconfig LIBCOAP_TCP_SUPPORT
70c87c5fbaSopenharmony_ci    bool "Enable TCP support within CoAP"
71c87c5fbaSopenharmony_ci    default n
72c87c5fbaSopenharmony_ci    help
73c87c5fbaSopenharmony_ci        Enable TCP functionality for CoAP. This is required if TLS sessions
74c87c5fbaSopenharmony_ci        are to be used. Note that RIOT TCP support also needs to be enabled.
75c87c5fbaSopenharmony_ci
76c87c5fbaSopenharmony_ci        If this option is disabled, redundant CoAP TCP code is removed.
77c87c5fbaSopenharmony_ci
78c87c5fbaSopenharmony_ciconfig LIBCOAP_OSCORE_SUPPORT
79c87c5fbaSopenharmony_ci    bool "Enable OSCORE support within CoAP"
80c87c5fbaSopenharmony_ci    default n
81c87c5fbaSopenharmony_ci    help
82c87c5fbaSopenharmony_ci        Enable OSCORE functionality for CoAP.
83c87c5fbaSopenharmony_ci
84c87c5fbaSopenharmony_ci        If this option is disabled, redundant CoAP OSCORE code is removed.
85c87c5fbaSopenharmony_ci
86c87c5fbaSopenharmony_ciconfig LIBCOAP_OBSERVE_PERSIST
87c87c5fbaSopenharmony_ci    bool "Enable Observe persist support within CoAP"
88c87c5fbaSopenharmony_ci    default n
89c87c5fbaSopenharmony_ci    help
90c87c5fbaSopenharmony_ci        Enable Observe persist functionality for CoAP.
91c87c5fbaSopenharmony_ci
92c87c5fbaSopenharmony_ci        If this option is disabled, redundant CoAP Observe persist code is removed.
93c87c5fbaSopenharmony_ci
94c87c5fbaSopenharmony_ciconfig LIBCOAP_WS_SOCKET
95c87c5fbaSopenharmony_ci    bool "Enable WebSocket support within CoAP"
96c87c5fbaSopenharmony_ci    default n
97c87c5fbaSopenharmony_ci    help
98c87c5fbaSopenharmony_ci        Enable WebSocket functionality for CoAP.
99c87c5fbaSopenharmony_ci
100c87c5fbaSopenharmony_ci        If this option is disabled, redundant CoAP WebSocket code is removed.
101c87c5fbaSopenharmony_ci
102c87c5fbaSopenharmony_ciconfig LIBCOAP_Q_BLOCK_SUPPORT
103c87c5fbaSopenharmony_ci    bool "Enable Q-Block (RFC9177) support within CoAP"
104c87c5fbaSopenharmony_ci    default n
105c87c5fbaSopenharmony_ci    help
106c87c5fbaSopenharmony_ci        Enable Q-Block (RFC9177) functionality for CoAP.
107c87c5fbaSopenharmony_ci
108c87c5fbaSopenharmony_ci        If this option is disabled, redundant CoAP Q-Block code is removed.
109c87c5fbaSopenharmony_ci
110c87c5fbaSopenharmony_ciconfig LIBCOAP_ASYNC_SUPPORT
111c87c5fbaSopenharmony_ci    bool "Enable separate responses support within CoAP"
112c87c5fbaSopenharmony_ci    default y
113c87c5fbaSopenharmony_ci    help
114c87c5fbaSopenharmony_ci        Enable async separate responses functionality for CoAP.
115c87c5fbaSopenharmony_ci
116c87c5fbaSopenharmony_ci        If this option is disabled, redundent CoAP async separate responses code is removed.
117c87c5fbaSopenharmony_ci
118c87c5fbaSopenharmony_ciconfig LIBCOAP_CLIENT_SUPPORT
119c87c5fbaSopenharmony_ci    bool "Enable Client functionality within CoAP"
120c87c5fbaSopenharmony_ci    default n
121c87c5fbaSopenharmony_ci    help
122c87c5fbaSopenharmony_ci        Enable client functionality (ability to make requests and receive
123c87c5fbaSopenharmony_ci        responses) for CoAP. If the server is going to act as a proxy, then
124c87c5fbaSopenharmony_ci        this needs to be enabled to support the ongoing session going to
125c87c5fbaSopenharmony_ci        the next hop.
126c87c5fbaSopenharmony_ci
127c87c5fbaSopenharmony_ci        If this option is disabled, redundant CoAP client only code is
128c87c5fbaSopenharmony_ci        removed.
129c87c5fbaSopenharmony_ci        If both this option and LIBCOAP_SERVER_SUPPORT are disabled, then
130c87c5fbaSopenharmony_ci        both are automatically enabled for backwards compatability.
131c87c5fbaSopenharmony_ci
132c87c5fbaSopenharmony_ciconfig LIBCOAP_SERVER_SUPPORT
133c87c5fbaSopenharmony_ci    bool "Enable Server functionality within CoAP"
134c87c5fbaSopenharmony_ci    default n
135c87c5fbaSopenharmony_ci    help
136c87c5fbaSopenharmony_ci        Enable server functionality (ability to receive requests and send
137c87c5fbaSopenharmony_ci        responses) for CoAP.
138c87c5fbaSopenharmony_ci
139c87c5fbaSopenharmony_ci        If this option is disabled, redundant CoAP server only code is
140c87c5fbaSopenharmony_ci        removed.
141c87c5fbaSopenharmony_ci        If both this option and LIBCOAP_CLIENT_SUPPORT are disabled, then
142c87c5fbaSopenharmony_ci        both are automatically enabled for backwards compatability.
143c87c5fbaSopenharmony_ci
144c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_STRING_SIZE
145c87c5fbaSopenharmony_ci    int "Max size of string memory allocation"
146c87c5fbaSopenharmony_ci    default 64
147c87c5fbaSopenharmony_ci    help
148c87c5fbaSopenharmony_ci        The maximum size of a supported string.
149c87c5fbaSopenharmony_ci
150c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_STRINGS
151c87c5fbaSopenharmony_ci    int "Max number of strings supported"
152c87c5fbaSopenharmony_ci    default 16
153c87c5fbaSopenharmony_ci    help
154c87c5fbaSopenharmony_ci        The maximum number of supported strings.
155c87c5fbaSopenharmony_ci
156c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_ENDPOINTS
157c87c5fbaSopenharmony_ci    int "Max number of endpoints supported"
158c87c5fbaSopenharmony_ci    default 4
159c87c5fbaSopenharmony_ci    help
160c87c5fbaSopenharmony_ci        The maximum number of supported endpoints.
161c87c5fbaSopenharmony_ci
162c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_RESOURCES
163c87c5fbaSopenharmony_ci    int "Max number of resources supported"
164c87c5fbaSopenharmony_ci    default 8
165c87c5fbaSopenharmony_ci    help
166c87c5fbaSopenharmony_ci        The maximum number of supported resources.
167c87c5fbaSopenharmony_ci
168c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_ATTRIBUTE_SIZE
169c87c5fbaSopenharmony_ci    int "Max size of attribute memory allocation"
170c87c5fbaSopenharmony_ci    default 16
171c87c5fbaSopenharmony_ci    help
172c87c5fbaSopenharmony_ci        The maximum size of a supported attribute.
173c87c5fbaSopenharmony_ci
174c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_ATTRIBUTES
175c87c5fbaSopenharmony_ci    int "Max number of resource attributes supported"
176c87c5fbaSopenharmony_ci    default 32
177c87c5fbaSopenharmony_ci    help
178c87c5fbaSopenharmony_ci        The maximum number of supported resource attributes.
179c87c5fbaSopenharmony_ci
180c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_PACKETS
181c87c5fbaSopenharmony_ci    int "Max number of packets supported"
182c87c5fbaSopenharmony_ci    default 4
183c87c5fbaSopenharmony_ci    help
184c87c5fbaSopenharmony_ci        The maximum number of supported packets.
185c87c5fbaSopenharmony_ci
186c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_NODES
187c87c5fbaSopenharmony_ci    int "Max number of nodes supported"
188c87c5fbaSopenharmony_ci    default 16
189c87c5fbaSopenharmony_ci    help
190c87c5fbaSopenharmony_ci        The maximum number of supported nodes.
191c87c5fbaSopenharmony_ci
192c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_CONTEXTS
193c87c5fbaSopenharmony_ci    int "Max number of contexts supported"
194c87c5fbaSopenharmony_ci    default 1
195c87c5fbaSopenharmony_ci    help
196c87c5fbaSopenharmony_ci        The maximum number of supported contexts.
197c87c5fbaSopenharmony_ci
198c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_PDUS
199c87c5fbaSopenharmony_ci    int "Max number of PDUs supported"
200c87c5fbaSopenharmony_ci    default 16
201c87c5fbaSopenharmony_ci    help
202c87c5fbaSopenharmony_ci        The maximum number of supported PDUs.
203c87c5fbaSopenharmony_ci
204c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_DTLS_SESSIONS
205c87c5fbaSopenharmony_ci    int "Max number of DTLS sessions supported"
206c87c5fbaSopenharmony_ci    default 2
207c87c5fbaSopenharmony_ci    help
208c87c5fbaSopenharmony_ci        The maximum number of supported DTLS sessions.
209c87c5fbaSopenharmony_ci
210c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_SESSIONS
211c87c5fbaSopenharmony_ci    int "Max number of sessions supported"
212c87c5fbaSopenharmony_ci    default 4
213c87c5fbaSopenharmony_ci    help
214c87c5fbaSopenharmony_ci        The maximum number of supported sessions.
215c87c5fbaSopenharmony_ci
216c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_OPTION_SIZE
217c87c5fbaSopenharmony_ci    int "Max size of option memory allocation"
218c87c5fbaSopenharmony_ci    default 16
219c87c5fbaSopenharmony_ci    help
220c87c5fbaSopenharmony_ci        The maximum size of a supported options.
221c87c5fbaSopenharmony_ci
222c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_OPTIONS
223c87c5fbaSopenharmony_ci    int "Max number of options supported"
224c87c5fbaSopenharmony_ci    default 16
225c87c5fbaSopenharmony_ci    help
226c87c5fbaSopenharmony_ci        The maximum number of supported options.
227c87c5fbaSopenharmony_ci
228c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_CACHE_KEYS
229c87c5fbaSopenharmony_ci    int "Max number of cache keys supported"
230c87c5fbaSopenharmony_ci    default 2
231c87c5fbaSopenharmony_ci    help
232c87c5fbaSopenharmony_ci        The maximum number of supported cache keys.
233c87c5fbaSopenharmony_ci
234c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_CACHE_ENTRIES
235c87c5fbaSopenharmony_ci    int "Max number of cache entries supported"
236c87c5fbaSopenharmony_ci    default 2
237c87c5fbaSopenharmony_ci    help
238c87c5fbaSopenharmony_ci        The maximum number of supported cache entries.
239c87c5fbaSopenharmony_ci
240c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_LG_CRCVS
241c87c5fbaSopenharmony_ci    int "Max number of client large receives supported"
242c87c5fbaSopenharmony_ci    default 1
243c87c5fbaSopenharmony_ci    help
244c87c5fbaSopenharmony_ci        The maximum number of supported client large receives.
245c87c5fbaSopenharmony_ci
246c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_LG_SRCVS
247c87c5fbaSopenharmony_ci    int "Max number of server large receives supported"
248c87c5fbaSopenharmony_ci    default 2
249c87c5fbaSopenharmony_ci    help
250c87c5fbaSopenharmony_ci        The maximum number of supported server large receives.
251c87c5fbaSopenharmony_ci
252c87c5fbaSopenharmony_ciconfig LIBCOAP_MAX_LG_XMITS
253c87c5fbaSopenharmony_ci    int "Max number of large transmits supported"
254c87c5fbaSopenharmony_ci    default 2
255c87c5fbaSopenharmony_ci    help
256c87c5fbaSopenharmony_ci        The maximum number of supported large trqnsmits.
257c87c5fbaSopenharmony_ci
258c87c5fbaSopenharmony_ciendif # KCONFIG_USEPKG_LIBCOAP
259