blob: 9d618625facb1ef914ac0120de43ca8f7207b624 [file] [log] [blame]
Jerome Forissiere86aa9f2024-10-16 12:04:02 +02001/* SPDX-License-Identifier: GPL-2.0+ */
2
3/* Copyright (C) 2023 Linaro Ltd. <maxim.uvarov@linaro.org> */
4
5#ifndef LWIP_UBOOT_LWIPOPTS_H
6#define LWIP_UBOOT_LWIPOPTS_H
7
8#if defined(CONFIG_LWIP_DEBUG)
9#define LWIP_DEBUG 1
10#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL
11#define LWIP_DBG_TYPES_ON LWIP_DBG_ON
12#define ETHARP_DEBUG LWIP_DBG_ON
13#define NETIF_DEBUG LWIP_DBG_ON
14#define PBUF_DEBUG LWIP_DBG_OFF
15#define API_LIB_DEBUG LWIP_DBG_ON
16#define API_MSG_DEBUG LWIP_DBG_OFF
17#define SOCKETS_DEBUG LWIP_DBG_OFF
18#define ICMP_DEBUG LWIP_DBG_OFF
19#define IGMP_DEBUG LWIP_DBG_OFF
20#define INET_DEBUG LWIP_DBG_OFF
21#define IP_DEBUG LWIP_DBG_ON
22#define IP_REASS_DEBUG LWIP_DBG_OFF
23#define RAW_DEBUG LWIP_DBG_OFF
24#define MEM_DEBUG LWIP_DBG_OFF
25#define MEMP_DEBUG LWIP_DBG_OFF
26#define SYS_DEBUG LWIP_DBG_OFF
27#define TIMERS_DEBUG LWIP_DBG_ON
28#define TCP_DEBUG LWIP_DBG_OFF
29#define TCP_INPUT_DEBUG LWIP_DBG_OFF
30#define TCP_FR_DEBUG LWIP_DBG_OFF
31#define TCP_RTO_DEBUG LWIP_DBG_OFF
32#define TCP_CWND_DEBUG LWIP_DBG_OFF
33#define TCP_WND_DEBUG LWIP_DBG_OFF
34#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
35#define TCP_RST_DEBUG LWIP_DBG_OFF
36#define TCP_QLEN_DEBUG LWIP_DBG_OFF
37#define UDP_DEBUG LWIP_DBG_OFF
38#define TCPIP_DEBUG LWIP_DBG_OFF
39#define SLIP_DEBUG LWIP_DBG_OFF
40#define DHCP_DEBUG LWIP_DBG_ON
41#define AUTOIP_DEBUG LWIP_DBG_ON
42#define DNS_DEBUG LWIP_DBG_ON
43#define IP6_DEBUG LWIP_DBG_OFF
44#define DHCP6_DEBUG LWIP_DBG_OFF
45#endif
46
47#define LWIP_TESTMODE 0
48
49#if !defined(CONFIG_LWIP_ASSERT)
50#define LWIP_NOASSERT 1
51#define LWIP_ASSERT(message, assertion)
52#endif
53
54#include "lwip/debug.h"
55
56#define SYS_LIGHTWEIGHT_PROT 0
57#define NO_SYS 1
58
59#define LWIP_IPV4 1
60#define LWIP_IPV6 0
61
62#define MEM_ALIGNMENT 8
63
64#define MEMP_NUM_TCP_SEG 16
65#define PBUF_POOL_SIZE 8
66
67#define LWIP_ARP 1
68#define ARP_TABLE_SIZE 4
69#define ARP_QUEUEING 1
70
71#define IP_FORWARD 0
72#define IP_OPTIONS_ALLOWED 1
73#define IP_REASSEMBLY 0
74#define IP_FRAG 0
75#define IP_REASS_MAXAGE 3
76#define IP_REASS_MAX_PBUFS 4
77#define IP_FRAG_USES_STATIC_BUF 0
78
79#define IP_DEFAULT_TTL 255
80
81#define LWIP_ICMP 0
82
83#if defined(CONFIG_PROT_RAW_LWIP)
84#define LWIP_RAW 1
85#else
86#define LWIP_RAW 0
87#endif
88
89#if defined(CONFIG_PROT_DHCP_LWIP)
90#define LWIP_DHCP 1
91#define LWIP_DHCP_BOOTP_FILE 1
92#else
93#define LWIP_DHCP 0
94#endif
95
96#define LWIP_DHCP_DOES_ACD_CHECK 0
97
98#define LWIP_AUTOIP 0
99
100#define LWIP_SNMP 0
101
102#define LWIP_IGMP 0
103
104#if defined(CONFIG_PROT_DNS_LWIP)
105#define LWIP_DNS 1
106#define DNS_TABLE_SIZE 1
107#else
108#define LWIP_DNS 0
109#endif
110
111#if defined(CONFIG_PROT_UDP_LWIP)
112#define LWIP_UDP 1
113#else
114#define LWIP_UDP 0
115#endif
116
117#if defined(CONFIG_PROT_TCP_LWIP)
118#define LWIP_TCP 1
119#define TCP_MSS 1460
120#define TCP_WND CONFIG_LWIP_TCP_WND
121#define LWIP_WND_SCALE 1
122#define TCP_RCV_SCALE 0x7
123#define TCP_SND_BUF (2 * TCP_MSS)
124#ifdef CONFIG_PROT_TCP_SACK_LWIP
125#define LWIP_TCP_SACK_OUT 1
126#endif
127#else
128#define LWIP_TCP 0
129#endif
130
131#define LWIP_LISTEN_BACKLOG 0
132
133#define PBUF_LINK_HLEN 14
134#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS + 40 + PBUF_LINK_HLEN)
135
136#define LWIP_HAVE_LOOPIF 0
137
138#define LWIP_NETCONN 0
139#define LWIP_DISABLE_MEMP_SANITY_CHECKS 1
140
141#define LWIP_SOCKET 0
142#define SO_REUSE 0
143
144#define LWIP_STATS 0
145
146#define PPP_SUPPORT 0
147
148#define LWIP_TCPIP_CORE_LOCKING 0
149
150#define LWIP_NETIF_LOOPBACK 0
151
152/* use malloc instead of pool */
153#define MEMP_MEM_MALLOC 1
154#define MEMP_MEM_INIT 1
155#define MEM_LIBC_MALLOC 1
156
157#endif /* LWIP_UBOOT_LWIPOPTS_H */