Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / src / lwip / cc13x2_26x2 / lwipopts.h
1 /*
2  *
3  *    Copyright (c) 2020 Project CHIP Authors
4  *    Copyright (c) 2018 Nest Labs, Inc.
5  *
6  *    Licensed under the Apache License, Version 2.0 (the "License");
7  *    you may not use this file except in compliance with the License.
8  *    You may obtain a copy of the License at
9  *
10  *        http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *    Unless required by applicable law or agreed to in writing, software
13  *    distributed under the License is distributed on an "AS IS" BASIS,
14  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *    See the License for the specific language governing permissions and
16  *    limitations under the License.
17  */
18
19 #ifndef __LWIPOPTS_H__
20 #define __LWIPOPTS_H__
21
22 #if CHIP_HAVE_CONFIG_H
23 #include <lwip/lwip_buildconfig.h>
24 #endif
25
26 #include <stdlib.h>
27
28 // disable static tasks because the call to `xTaskCreateStatic` in
29 // `src/lwip/freertos/sys_arch.c` is wrong and passes a NULL for the TCB area
30 #define LWIP_FREERTOS_USE_STATIC_TCPIP_TASK 0
31
32 #define NO_SYS 0
33 #define MEM_ALIGNMENT (4)
34 #define MEMP_NUM_TCP_SEG (TCP_SND_QUEUELEN + 1)
35 #define LWIP_TIMEVAL_PRIVATE (0)
36 #define MEM_LIBC_MALLOC (0)
37 #define LWIP_COMPAT_MUTEX (0)
38 #define SYS_LIGHTWEIGHT_PROT (1)
39 #define LWIP_AUTOIP (0)
40 #define LWIP_DHCP_AUTOIP_COOP (0)
41 #define LWIP_SOCKET_SET_ERRNO 0
42 #define IP_REASS_MAX_PBUFS 0
43 #define IP_REASSEMBLY 0
44 #define MEMP_NUM_REASSDATA 0
45 #define LWIP_SO_RCVTIMEO 0
46 #define SO_REUSE (1)
47 #define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS (1)
48 #define LWIP_STATS (0)
49 #define LWIP_TCPIP_CORE_LOCKING 1
50 #define TCP_QUEUE_OOSEQ 0
51 #define ARP_QUEUEING (0)
52 #define TCPIP_THREAD_NAME "LWIP"
53
54 #define LWIP_SOCKET 0
55
56 #define LWIP_RAW 1
57 #define MEMP_NUM_RAW_PCB (5)
58
59 #define MEMP_NUM_UDP_PCB (7)
60
61 #define LWIP_HAVE_LOOPIF (0)
62
63 #define LWIP_NETIF_LOOPBACK (0)
64
65 #define MEMP_NUM_NETCONN (0)
66
67 #define LWIP_IPV4 0
68 #define LWIP_IPV6 1
69 #define LWIP_ARP (0)
70 #define LWIP_DNS (0)
71 #define LWIP_ICMP (0)
72 #define LWIP_IGMP (0)
73 #define LWIP_DHCP (0)
74 #define LWIP_IPV6_REASS (0)
75 #define LWIP_IPV6_DHCP6 0
76 #define LWIP_IPV6_AUTOCONFIG (0)
77 #define LWIP_IPV6_ROUTER_SUPPORT 0
78 #define LWIP_ND6_LISTEN_RA 0
79
80 #define LWIP_ND6_NUM_NEIGHBORS (0)
81 #define LWIP_ND6_NUM_DESTINATIONS (0)
82 #define LWIP_ND6_NUM_PREFIXES (0)
83 #define LWIP_ND6_NUM_ROUTERS (0)
84 #define LWIP_ND6_MAX_MULTICAST_SOLICIT (0)
85 #define LWIP_ND6_MAX_UNICAST_SOLICIT (0)
86 #define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT (0)
87 #define LWIP_ND6_TCP_REACHABILITY_HINTS (0)
88
89 #define MEMP_SEPARATE_POOLS (1)
90 #define LWIP_PBUF_FROM_CUSTOM_POOLS (0)
91 #define MEMP_USE_CUSTOM_POOLS (0)
92 #define PBUF_POOL_SIZE (4)
93 #define PBUF_POOL_BUFSIZE (1500)
94 #define PBUF_POOL_SIZE_LARGE (1)
95 #define PBUF_POOL_SIZE_MEDIUM (2)
96 #define PBUF_POOL_SIZE_SMALL (2)
97 #define PBUF_POOL_BUFSIZE_LARGE (1280)
98 #define PBUF_POOL_BUFSIZE_MEDIUM (640)
99 #define PBUF_POOL_BUFSIZE_SMALL (256)
100 #define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL)
101 #define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE)
102
103 #define TCP_MSS (1152)
104 #define TCP_SND_BUF (2 * TCP_MSS)
105 #define TCP_LISTEN_BACKLOG (1)
106
107 #define ETH_PAD_SIZE (0)
108 #define SUB_ETHERNET_HEADER_SPACE (0)
109 #define PBUF_LINK_HLEN (0)
110
111 // 2 k byte stack
112 #define TCPIP_THREAD_STACKSIZE (0x800) // uint32_t
113 #define TCPIP_THREAD_PRIO (2)
114
115 #define NETIF_MAX_HWADDR_LEN 8U
116
117 #define LWIP_IPV6_NUM_ADDRESSES 5
118
119 #define LWIP_IPV6_ND 0
120 #define LWIP_ND6_QUEUEING 0
121
122 #define LWIP_MULTICAST_PING 0
123
124 #define TCPIP_MBOX_SIZE 6
125 #define DEFAULT_RAW_RECVMBOX_SIZE 6
126 #define DEFAULT_UDP_RECVMBOX_SIZE 6
127 #define DEFAULT_TCP_RECVMBOX_SIZE 6
128
129 // TODO: make LWIP_DEBUG conditional on build type
130
131 #ifndef LWIP_DEBUG
132 #define LWIP_DEBUG 1
133 #endif
134
135 #define MEMP_OVERFLOW_CHECK (0)
136 #define MEMP_SANITY_CHECK (0)
137 #define MEM_DEBUG (LWIP_DBG_OFF)
138 #define MEMP_DEBUG (LWIP_DBG_OFF)
139 #define PBUF_DEBUG (LWIP_DBG_OFF)
140 #define API_LIB_DEBUG (LWIP_DBG_OFF)
141 #define API_MSG_DEBUG (LWIP_DBG_OFF)
142 #define TCPIP_DEBUG (LWIP_DBG_OFF)
143 #define NETIF_DEBUG (LWIP_DBG_OFF)
144 #define SOCKETS_DEBUG (LWIP_DBG_OFF)
145 #define DEMO_DEBUG (LWIP_DBG_OFF)
146 #define DHCP_DEBUG (LWIP_DBG_OFF)
147 #define AUTOIP_DEBUG (LWIP_DBG_OFF)
148 #define ETHARP_DEBUG (LWIP_DBG_OFF)
149 #define IP_DEBUG (LWIP_DBG_OFF)
150 #define IP_REASS_DEBUG (LWIP_DBG_OFF)
151 #define IP6_DEBUG (LWIP_DBG_OFF)
152 #define RAW_DEBUG (LWIP_DBG_OFF)
153 #define ICMP_DEBUG (LWIP_DBG_OFF)
154 #define UDP_DEBUG (LWIP_DBG_OFF)
155 #define TCP_DEBUG (LWIP_DBG_OFF)
156 #define TCP_INPUT_DEBUG (LWIP_DBG_OFF)
157 #define TCP_OUTPUT_DEBUG (LWIP_DBG_OFF)
158 #define TCP_RTO_DEBUG (LWIP_DBG_OFF)
159 #define TCP_CWND_DEBUG (LWIP_DBG_OFF)
160 #define TCP_WND_DEBUG (LWIP_DBG_OFF)
161 #define TCP_FR_DEBUG (LWIP_DBG_OFF)
162 #define TCP_QLEN_DEBUG (LWIP_DBG_OFF)
163 #define TCP_RST_DEBUG (LWIP_DBG_OFF)
164 #define PPP_DEBUG (LWIP_DBG_OFF)
165
166 #define LWIP_DBG_TYPES_ON                                                                                                          \
167     (LWIP_DBG_ON | LWIP_DBG_TRACE) /* (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT) */
168
169 #endif /* __LWIPOPTS_H__ */