• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * coap_config.h.riot -- RIOT configuration for libcoap
3 *
4 * Copyright (C) 2021-2023 Olaf Bergmann <bergmann@tzi.org> and others
5 *
6 * SPDX-License-Identifier: BSD-2-Clause
7 *
8 * This file is part of the CoAP library libcoap. Please see README for terms
9 * of use.
10 */
11
12#ifndef COAP_CONFIG_H_
13#define COAP_CONFIG_H_
14
15#define WITH_POSIX 1
16
17#ifndef COAP_CONSTRAINED_STACK
18#define COAP_CONSTRAINED_STACK 1
19#endif
20
21#ifdef CONFIG_LIBCOAP_MAX_LOGGING_LEVEL
22#ifndef COAP_MAX_LOGGING_LEVEL
23/* Define to 1 to build without TCP support. */
24#define COAP_MAX_LOGGING_LEVEL CONFIG_LIBCOAP_MAX_LOGGING_LEVEL
25#endif /* COAP_MAX_LOGGING_LEVEL */
26#endif /* CONFIG_LIBCOAP_MAX_LOGGING_LEVEL */
27
28#ifdef CONFIG_LIBCOAP_IPV4_SUPPORT
29#ifndef COAP_IPV4_SUPPORT
30/* Define to 1 to build with IPv4 support. */
31#define COAP_IPV4_SUPPORT 1
32#endif /* COAP_IPV4_SUPPORT */
33#endif /* CONFIG_LIBCOAP_IPV4_SUPPORT */
34
35#ifdef CONFIG_LIBCOAP_IPV6_SUPPORT
36#ifndef COAP_IPV6_SUPPORT
37/* Define to 1 to build with IPv6 support. */
38#define COAP_IPV6_SUPPORT 1
39#endif /* COAP_IPV6_SUPPORT */
40#endif /* CONFIG_LIBCOAP_IPV6_SUPPORT */
41
42#ifdef CONFIG_LIBCOAP_AF_UNIX_SUPPORT
43#ifndef COAP_AF_UNIX_SUPPORT
44/* Define to 1 to build with Unix socket support. */
45#define COAP_AF_UNIX_SUPPORT 1
46#endif /* COAP_AF_UNIX_SUPPORT */
47#endif /* CONFIG_LIBCOAP_AF_UNIX_SUPPORT */
48
49#ifdef CONFIG_LIBCOAP_TCP_SUPPORT
50#ifndef COAP_DISABLE_TCP
51/* Define to 1 to build without TCP support. */
52#define COAP_DISABLE_TCP 0
53#endif /* COAP_DISABLE_TCP */
54#endif /* CONFIG_LIBCOAP_TCP_SUPPORT */
55
56#ifdef CONFIG_LIBCOAP_OSCORE_SUPPORT
57#ifndef COAP_OSCORE_SUPPORT
58/* Define to 1 if the library has OSCORE support. */
59#define COAP_OSCORE_SUPPORT 1
60#endif /* COAP_OSCORE_SUPPORT */
61#endif /* CONFIG_LIBCOAP_OSCORE_SUPPORT */
62
63#ifdef CONFIG_LIBCOAP_WITH_OBSERVE_PERSIST
64#ifndef COAP_WITH_OBSERVE_PERSIST
65/* Define to 1 if the library has Observe persist support. */
66#define COAP_WITH_OBSERVE_PERSIST 0
67#endif /* COAP_WITH_OBSERVE_PERSIST */
68#endif /* CONFIG_LIBCOAP_WITH_OBSERVE_PERSIST */
69
70#ifdef CONFIG_LIBCOAP_WS_SUPPORT
71#ifndef COAP_WS_SUPPORT
72/* Define to 1 if the library has WebSockets support. */
73#define COAP_WS_SUPPORT 0
74#endif /* COAP_WS_SUPPORT */
75#endif /* CONFIG_LIBCOAP_WS_SUPPORT */
76
77#ifdef CONFIG_LIBCOAP_Q_BLOCK_SUPPORT
78#ifndef COAP_Q_BLOCK_SUPPORT
79/* Define to 1 to build with Q-Block (RFC9177) support. */
80#define COAP_Q_BLOCK_SUPPORT 0
81#endif /* COAP_Q_BLOCK_SUPPORT */
82#endif /* CONFIG_LIBCOAP_Q_BLOCK_SUPPORT */
83
84#ifdef CONFIG_LIBCOAP_CLIENT_SUPPORT
85#ifndef COAP_CLIENT_SUPPORT
86/* Define to 1 if the library has client support. */
87#define COAP_CLIENT_SUPPORT 1
88#endif /* COAP_CLIENT_SUPPORT */
89#endif /* CONFIG_LIBCOAP_CLIENT_SUPPORT */
90
91#ifdef CONFIG_LIBCOAP_SERVER_SUPPORT
92#ifndef COAP_SERVER_SUPPORT
93/* Define to 1 if the library has server support. */
94#define COAP_SERVER_SUPPORT 1
95#endif /* COAP_SERVER_SUPPORT */
96#endif /* CONFIG_LIBCOAP_SERVER_SUPPORT */
97
98#ifdef CONFIG_LIBCOAP_ASYNC_SUPPORT
99#ifndef COAP_ASYNC_SUPPORT
100/* Define to 1 to build with support for async separate responses. */
101#define COAP_ASYNC_SUPPORT 1
102#endif /* COAP_ASYNC_SUPPORT */
103#endif /* CONFIG_LIBCOAP_ASYNC_SUPPORT */
104
105#ifdef CONFIG_LIBCOAP_MAX_STRING_SIZE
106#ifndef COAP_MAX_STRING_SIZE
107#define COAP_MAX_STRING_SIZE CONFIG_LIBCOAP_MAX_STRING_SIZE
108#endif /* COAP_MAX_STRING_SIZE */
109#endif /* CONFIG_LIBCOAP_OSCORE_SUPPORT */
110
111#ifdef CONFIG_LIBCOAP_MAX_ENDPOINTS
112#ifndef COAP_MAX_ENDPOINTS
113#define COAP_MAX_ENDPOINTS CONFIG_LIBCOAP_MAX_ENDPOINTS
114#endif /* COAP_MAX_ENDPOINTS */
115#endif /* CONFIG_LIBCOAP_MAX_ENDPOINTS */
116
117#ifdef CONFIG_LIBCOAP_MAX_RESOURCES
118#ifndef COAP_MAX_RESOURCES
119#define COAP_MAX_RESOURCES CONFIG_LIBCOAP_MAX_RESOURCES
120#endif /* COAP_MAX_RESOURCES */
121#endif /* CONFIG_LIBCOAP_MAX_RESOURCES */
122
123#ifdef CONFIG_LIBCOAP_MAX_ATTRIBUTE_SIZE
124#ifndef COAP_MAX_ATTRIBUTE_SIZE
125#define COAP_MAX_ATTRIBUTE_SIZE CONFIG_LIBCOAP_MAX_ATTRIBUTE_SIZE
126#endif /* COAP_MAX_ATTRIBUTE_SIZE */
127#endif /* CONFIG_LIBCOAP_MAX_ATTRIBUTE_SIZE */
128
129#ifdef CONFIG_LIBCOAP_MAX_ATTRIBUTES
130#ifndef COAP_MAX_ATTRIBUTES
131#define COAP_MAX_ATTRIBUTES CONFIG_LIBCOAP_MAX_ATTRIBUTES
132#endif /* COAP_MAX_ATTRIBUTES */
133#endif /* CONFIG_LIBCOAP_MAX_ATTRIBUTES */
134
135#ifdef CONFIG_LIBCOAP_MAX_PACKETS
136#ifndef COAP_MAX_PACKETS
137#define COAP_MAX_PACKETS CONFIG_LIBCOAP_MAX_PACKETS
138#endif /* COAP_MAX_PACKETS */
139#endif /* CONFIG_LIBCOAP_MAX_PACKETS */
140
141#ifdef CONFIG_LIBCOAP_MAX_NODES
142#ifndef COAP_MAX_NODES
143#define COAP_MAX_NODES CONFIG_LIBCOAP_MAX_NODES
144#endif /* COAP_MAX_NODES */
145#endif /* CONFIG_LIBCOAP_MAX_NODES */
146
147#ifdef CONFIG_LIBCOAP_MAX_CONTEXTS
148#ifndef COAP_MAX_CONTEXTS
149#define COAP_MAX_CONTEXTS CONFIG_LIBCOAP_MAX_CONTEXTS
150#endif /* COAP_MAX_CONTEXTS */
151#endif /* CONFIG_LIBCOAP_MAX_CONTEXTS */
152
153#ifdef CONFIG_LIBCOAP_MAX_PDUS
154#ifndef COAP_MAX_PDUS
155#define COAP_MAX_PDUS CONFIG_LIBCOAP_MAX_PDUS
156#endif /* COAP_MAX_PDUS */
157#endif /* CONFIG_LIBCOAP_MAX_PDUS */
158
159#ifdef CONFIG_LIBCOAP_MAX_DTLS_SESSIONS
160#ifndef COAP_MAX_DTLS_SESSIONS
161#define COAP_MAX_DTLS_SESSIONS CONFIG_LIBCOAP_MAX_DTLS_SESSIONS
162#endif /* COAP_MAX_DTLS_SESSIONS */
163#endif /* CONFIG_LIBCOAP_MAX_DTLS_SESSIONS */
164
165#ifdef CONFIG_LIBCOAP_MAX_SESSIONS
166#ifndef COAP_MAX_SESSIONS
167#define COAP_MAX_SESSIONS CONFIG_LIBCOAP_MAX_SESSIONS
168#endif /* COAP_MAX_SESSIONS */
169#endif /* CONFIG_LIBCOAP_MAX_SESSIONS */
170
171#ifdef CONFIG_LIBCOAP_MAX_OPTION_SIZE
172#ifndef COAP_MAX_OPTION_SIZE
173#define COAP_MAX_OPTION_SIZE CONFIG_LIBCOAP_MAX_OPTION_SIZE
174#endif /* COAP_MAX_OPTION_SIZE */
175#endif /* CONFIG_LIBCOAP_MAX_OPTION_SIZE */
176
177#ifdef CONFIG_LIBCOAP_MAX_OPTIONS
178#ifndef COAP_MAX_OPTIONS
179#define COAP_MAX_OPTIONS CONFIG_LIBCOAP_MAX_OPTIONS
180#endif /* COAP_MAX_OPTIONS */
181#endif /* CONFIG_LIBCOAP_MAX_OPTIONS */
182
183#ifdef CONFIG_LIBCOAP_MAX_CACHE_KEYS
184#ifndef COAP_MAX_CACHE_KEYS
185#define COAP_MAX_CACHE_KEYS CONFIG_LIBCOAP_MAX_CACHE_KEYS
186#endif /* COAP_MAX_CACHE_KEYS */
187#endif /* CONFIG_LIBCOAP_MAX_CACHE_KEYS */
188
189#ifdef CONFIG_LIBCOAP_MAX_CACHE_ENTRIES
190#ifndef COAP_MAX_CACHE_ENTRIES
191#define COAP_MAX_CACHE_ENTRIES CONFIG_LIBCOAP_MAX_CACHE_ENTRIES
192#endif /* COAP_MAX_CACHE_ENTRIES */
193#endif /* CONFIG_LIBCOAP_MAX_CACHE_ENTRIES */
194
195#ifdef CONFIG_LIBCOAP_MAX_LG_CRCVS
196#ifndef COAP_MAX_LG_CRCVS
197#define COAP_MAX_LG_CRCVS CONFIG_LIBCOAP_MAX_LG_CRCVS
198#endif /* COAP_MAX_LG_CRCVS */
199#endif /* CONFIG_LIBCOAP_MAX_LG_CRCVS */
200
201#ifdef CONFIG_LIBCOAP_MAX_LG_SRCVS
202#ifndef COAP_MAX_LG_SRCVS
203#define COAP_MAX_LG_SRCVS CONFIG_LIBCOAP_MAX_LG_SRCVS
204#endif /* COAP_MAX_LG_SRCVS */
205#endif /* CONFIG_LIBCOAP_MAX_LG_SRCVS */
206
207#ifdef CONFIG_LIBCOAP_MAX_LG_XMITS
208#ifndef COAP_MAX_LG_XMITS
209#define COAP_MAX_LG_XMITS CONFIG_LIBCOAP_MAX_LG_XMITS
210#endif /* COAP_MAX_LG_XMITS */
211#endif /* CONFIG_LIBCOAP_MAX_LG_XMITS */
212
213#ifndef COAP_DISABLE_TCP
214#if MODULE_SOCK_TCP
215#define COAP_DISABLE_TCP 0
216#else /* ! MODULE_SOCK_TCP */
217#define COAP_DISABLE_TCP 1
218#endif /* ! MODULE_SOCK_TCP */
219#endif /* COAP_DISABLE_TCP */
220
221#ifdef MODULE_TINYDTLS
222#ifndef COAP_WITH_LIBTINYDTLS
223#define COAP_WITH_LIBTINYDTLS 1
224#endif /* ! COAP_WITH_LIBTINYDTLS */
225#endif /* MODULE_TINYDTLS */
226
227/* Define if building universal (internal helper macro) */
228/* #undef AC_APPLE_UNIVERSAL_BUILD */
229
230/* Define to 1 if you have the <arpa/inet.h> header file. */
231#define HAVE_ARPA_INET_H 1
232
233/* Define to 1 if you have the <assert.h> header file. */
234#define HAVE_ASSERT_H 1
235
236/* Define to 1 if you have the `getaddrinfo' function. */
237/* #undef HAVE_GETADDRINFO */
238
239/* Define to 1 if you have the <inttypes.h> header file. */
240#define HAVE_INTTYPES_H 1
241
242/* Define to 1 if you have the <limits.h> header file. */
243/* #undef HAVE_LIMITS_H */
244
245/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
246   to 0 otherwise. */
247#undef HAVE_MALLOC
248
249/* Define to 1 if you have the <memory.h> header file. */
250/* #undef HAVE_MEMORY_H */
251
252/* Define to 1 if you have the `memset' function. */
253#define HAVE_MEMSET 1
254
255/* Define to 1 if you have the <netdb.h> header file. */
256/* #undef HAVE_NETDB_H */
257
258/* Define to 1 if you have the <netinet/in.h> header file. */
259#define HAVE_NETINET_IN_H 1
260
261/* Define to 1 if you have the `select' function. */
262/* #undef HAVE_SELECT */
263
264/* Define to 1 if you have the `socket' function. */
265#define HAVE_SOCKET 1
266
267/* Define to 1 if you have the <stdint.h> header file. */
268#define HAVE_STDINT_H 1
269
270/* Define to 1 if you have the <stdlib.h> header file. */
271#define HAVE_STDLIB_H 1
272
273/* Define to 1 if you have the `strcasecmp' function. */
274#define HAVE_STRCASECMP 1
275
276/* Define to 1 if you have the <strings.h> header file. */
277#define HAVE_STRINGS_H 1
278
279/* Define to 1 if you have the <string.h> header file. */
280#define HAVE_STRING_H 1
281
282/* Define to 1 if you have the `strnlen' function. */
283#define HAVE_STRNLEN 1
284
285/* Define to 1 if you have the `strrchr' function. */
286#define HAVE_STRRCHR 1
287
288/* Define to 1 if you have the <sys/socket.h> header file. */
289#define HAVE_SYS_SOCKET_H 1
290
291/* Define to 1 if you have the <sys/stat.h> header file. */
292/* #undef HAVE_SYS_STAT_H */
293
294/* Define to 1 if you have the <sys/time.h> header file. */
295#define HAVE_SYS_TIME_H 1
296
297/* Define to 1 if you have the <sys/types.h> header file. */
298#define HAVE_SYS_TYPES_H 1
299
300/* Define to 1 if you have the <sys/unistd.h> header file. */
301#define HAVE_SYS_UNISTD_H 1
302
303/* Define to 1 if you have the <time.h> header file. */
304#define HAVE_TIME_H 1
305
306/* Define to 1 if you have the <unistd.h> header file. */
307#define HAVE_UNISTD_H 1
308
309/* Define to the address where bug reports for this package should be sent. */
310#define PACKAGE_BUGREPORT "libcoap-developers@lists.sourceforge.net"
311
312/* Define to the full name of this package. */
313#define PACKAGE_NAME "libcoap"
314
315/* Define to the version of this package. */
316#define PACKAGE_VERSION "4.3.4"
317
318/* Define to the full name and version of this package. */
319#define PACKAGE_STRING "libcoap 4.3.4"
320
321/* Define to 1 if you have the ANSI C header files. */
322#define STDC_HEADERS 1
323
324/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
325   significant byte first (like Motorola and SPARC, unlike Intel). */
326#if defined AC_APPLE_UNIVERSAL_BUILD
327# if defined __BIG_ENDIAN__
328#  define WORDS_BIGENDIAN 1
329# endif
330#else
331# ifndef WORDS_BIGENDIAN
332/* #  undef WORDS_BIGENDIAN */
333# endif
334#endif
335
336/* Define to rpl_malloc if the replacement function should be used. */
337/* #undef malloc */
338
339/* Define to `unsigned int' if <sys/types.h> does not define. */
340/* #undef size_t */
341
342/* Define to `int' if <sys/types.h> does not define. */
343/* #undef ssize_t */
344
345#endif /* COAP_CONFIG_H_ */
346