Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / src / lwip / k32w / lwipopts.h
1 /*
2  *
3  *    Copyright (c) 2020 Nest Labs, Inc.
4  *    All rights reserved.
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 /**
20  *    @file
21  *      Compile-time configuration for LwIP on K32W platforms using the
22  *      NXP K32W SDK.
23  *
24  */
25
26 #ifndef __LWIPOPTS_H__
27 #define __LWIPOPTS_H__
28
29 #if CHIP_HAVE_CONFIG_H
30 #include <lwip/lwip_buildconfig.h>
31 #endif
32
33 #include <stdlib.h>
34
35 #define NO_SYS 0
36 #define MEM_ALIGNMENT (4)
37 #define MEMP_NUM_TCP_SEG (TCP_SND_QUEUELEN + 1)
38 #define LWIP_TIMEVAL_PRIVATE (0)
39 #define MEM_LIBC_MALLOC (0)
40 #define LWIP_COMPAT_MUTEX (0)
41 #define SYS_LIGHTWEIGHT_PROT (1)
42 #define LWIP_AUTOIP (0)
43 #define LWIP_DHCP_AUTOIP_COOP (0)
44 #define LWIP_SOCKET_SET_ERRNO 0
45 #define IP_REASS_MAX_PBUFS 0
46 #define IP_REASSEMBLY 0
47 #define MEMP_NUM_REASSDATA 0
48 #define LWIP_SO_RCVTIMEO 0
49 #define SO_REUSE (1)
50 #define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS (1)
51 #define LWIP_STATS (0)
52 #define LWIP_TCPIP_CORE_LOCKING 1
53 #define TCP_QUEUE_OOSEQ 0
54 #define ARP_QUEUEING (0)
55
56 #define LWIP_SOCKET 0
57
58 // TODO: seems like this is unnecessary on Thread-only platforms
59 #define LWIP_RAW 1
60 #define MEMP_NUM_RAW_PCB (5)
61
62 // TODO: verify count
63 #define MEMP_NUM_UDP_PCB (7)
64
65 #define LWIP_HAVE_LOOPIF (0)
66
67 // TODO: not sure why this is disabled
68 #define LWIP_NETIF_LOOPBACK (0)
69
70 #define MEMP_NUM_NETCONN (0)
71
72 #define LWIP_IPV4 0
73 #define LWIP_IPV6 1
74 #define LWIP_ARP (0)
75 #define LWIP_DNS (0)
76 #define LWIP_ICMP (0)
77 #define LWIP_IGMP (0)
78 #define LWIP_DHCP (0)
79 #define LWIP_IPV6_REASS (0)
80 #define LWIP_IPV6_DHCP6 0
81 #define LWIP_IPV6_AUTOCONFIG (0)
82 #define LWIP_IPV6_ROUTER_SUPPORT 0
83 #define LWIP_ND6_LISTEN_RA 0
84
85 #define LWIP_ND6_NUM_NEIGHBORS (0)
86 #define LWIP_ND6_NUM_DESTINATIONS (0)
87 #define LWIP_ND6_NUM_PREFIXES (0)
88 #define LWIP_ND6_NUM_ROUTERS (0)
89 #define LWIP_ND6_MAX_MULTICAST_SOLICIT (0)
90 #define LWIP_ND6_MAX_UNICAST_SOLICIT (0)
91 #define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT (0)
92 #define LWIP_ND6_TCP_REACHABILITY_HINTS (0)
93
94 #define MEMP_SEPARATE_POOLS (1)
95 #define LWIP_PBUF_FROM_CUSTOM_POOLS (0)
96 #define MEMP_USE_CUSTOM_POOLS (0)
97 #define PBUF_POOL_SIZE (8)
98 #define PBUF_POOL_BUFSIZE (1500)
99 #define PBUF_POOL_SIZE_LARGE (3)
100 #define PBUF_POOL_SIZE_MEDIUM (4)
101 #define PBUF_POOL_SIZE_SMALL (5)
102 #define PBUF_POOL_BUFSIZE_LARGE (1280)
103 #define PBUF_POOL_BUFSIZE_MEDIUM (640)
104 #define PBUF_POOL_BUFSIZE_SMALL (256)
105 #define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL)
106 #define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE)
107
108 #define TCP_MSS (1152)
109 #define TCP_SND_BUF (2 * TCP_MSS)
110 #define TCP_LISTEN_BACKLOG (1)
111
112 #define ETH_PAD_SIZE (0)
113 #define SUB_ETHERNET_HEADER_SPACE (0)
114 #define PBUF_LINK_HLEN (0)
115
116 #define TCPIP_THREAD_STACKSIZE (4096)
117 #define TCPIP_THREAD_PRIO (2)
118
119 #define NETIF_MAX_HWADDR_LEN 8U
120
121 #define LWIP_IPV6_NUM_ADDRESSES 5
122
123 #define LWIP_IPV6_ND 0
124 #define LWIP_ND6_QUEUEING 0
125
126 #define LWIP_MULTICAST_PING 0
127
128 #define TCPIP_MBOX_SIZE 6
129 #define DEFAULT_RAW_RECVMBOX_SIZE 6
130 #define DEFAULT_UDP_RECVMBOX_SIZE 6
131 #define DEFAULT_TCP_RECVMBOX_SIZE 6
132
133 // TODO: make LWIP_DEBUG conditional on build type
134
135 #define LWIP_DEBUG 1
136 #define MEMP_OVERFLOW_CHECK (0)
137 #define MEMP_SANITY_CHECK (0)
138 #define MEM_DEBUG (LWIP_DBG_OFF)
139 #define MEMP_DEBUG (LWIP_DBG_OFF)
140 #define PBUF_DEBUG (LWIP_DBG_OFF)
141 #define API_LIB_DEBUG (LWIP_DBG_OFF)
142 #define API_MSG_DEBUG (LWIP_DBG_OFF)
143 #define TCPIP_DEBUG (LWIP_DBG_OFF)
144 #define NETIF_DEBUG (LWIP_DBG_OFF)
145 #define SOCKETS_DEBUG (LWIP_DBG_OFF)
146 #define DEMO_DEBUG (LWIP_DBG_OFF)
147 #define DHCP_DEBUG (LWIP_DBG_OFF)
148 #define AUTOIP_DEBUG (LWIP_DBG_OFF)
149 #define ETHARP_DEBUG (LWIP_DBG_OFF)
150 #define IP_DEBUG (LWIP_DBG_OFF)
151 #define IP_REASS_DEBUG (LWIP_DBG_OFF)
152 #define IP6_DEBUG (LWIP_DBG_OFF)
153 #define RAW_DEBUG (LWIP_DBG_OFF)
154 #define ICMP_DEBUG (LWIP_DBG_OFF)
155 #define UDP_DEBUG (LWIP_DBG_OFF)
156 #define TCP_DEBUG (LWIP_DBG_OFF)
157 #define TCP_INPUT_DEBUG (LWIP_DBG_OFF)
158 #define TCP_OUTPUT_DEBUG (LWIP_DBG_OFF)
159 #define TCP_RTO_DEBUG (LWIP_DBG_OFF)
160 #define TCP_CWND_DEBUG (LWIP_DBG_OFF)
161 #define TCP_WND_DEBUG (LWIP_DBG_OFF)
162 #define TCP_FR_DEBUG (LWIP_DBG_OFF)
163 #define TCP_QLEN_DEBUG (LWIP_DBG_OFF)
164 #define TCP_RST_DEBUG (LWIP_DBG_OFF)
165 #define PPP_DEBUG (LWIP_DBG_OFF)
166
167 #define LWIP_DBG_TYPES_ON                                                                                                          \
168     (LWIP_DBG_ON | LWIP_DBG_TRACE) /* (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT) */
169
170 #endif /* __LWIPOPTS_H__ */