1/*
2 * coap_config.h.lwip -- LwIP 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#include <lwip/opt.h>
16#include <lwip/debug.h>
17#include <lwip/def.h> /* provide ntohs, htons */
18
19#define WITH_LWIP 1
20
21#if LWIP_IPV4
22#define COAP_IPV4_SUPPORT 1
23#endif /* LWIP_IPV4 */
24
25#if LWIP_IPV6
26#define COAP_IPV6_SUPPORT 1
27#endif /* LWIP_IPV6 */
28
29#ifndef COAP_CONSTRAINED_STACK
30/* Define to 1 to minimize stack usage. */
31#define COAP_CONSTRAINED_STACK 1
32#endif
33
34#ifndef COAP_DISABLE_TCP
35/* Define to 1 to build without TCP support. */
36#define COAP_DISABLE_TCP 1
37#endif
38
39#ifndef COAP_ASYNC_SUPPORT
40/* Define to 1 to build with support for async separate responses. */
41#define COAP_ASYNC_SUPPORT 1
42#endif
43
44#ifndef COAP_WITH_OBSERVE_PERSIST
45/* Define to 1 to build support for persisting observes. */
46#define COAP_WITH_OBSERVE_PERSIST 0
47#endif
48
49#ifndef COAP_WS_SUPPORT
50/* Define to 1 to build with WebSockets support. */
51#define COAP_WS_SUPPORT 0
52#endif
53
54#ifndef COAP_Q_BLOCK_SUPPORT
55/* Define to 1 to build with Q-Block (RFC9177) support. */
56#define COAP_Q_BLOCK_SUPPORT 0
57#endif
58
59#define PACKAGE_NAME "@PACKAGE_NAME@"
60#define PACKAGE_VERSION "@PACKAGE_VERSION@"
61#define PACKAGE_STRING "@PACKAGE_STRING@"
62
63#define assert(x) LWIP_ASSERT("CoAP assert failed", x)
64
65/* it's just provided by libc. i hope we don't get too many of those, as
66 * actually we'd need autotools again to find out what environment we're
67 * building in */
68#define HAVE_STRNLEN 1
69
70#define HAVE_LIMITS_H
71
72#define HAVE_NETDB_H
73
74#define HAVE_SNPRINTF
75
76#define HAVE_ERRNO_H
77
78#endif /* COAP_CONFIG_H_ */
79