1menuconfig RT_USING_LWIP
2    bool "LwIP: light weight TCP/IP stack"
3    select RT_USING_DEVICE
4    select RT_USING_DEVICE_IPC
5    select SAL_USING_LWIP if RT_USING_SAL
6    default n
7
8if RT_USING_LWIP
9    config RT_USING_LWIP_LOCAL_VERSION
10        bool "Use LwIP local version only"
11        default n
12        help
13            If don't select this option, both local version and upstream
14            version can be selected. If select this option, only local version
15            can be selected.
16    choice
17        prompt "lwIP version"
18        default RT_USING_LWIP203
19        help
20            Select the lwIP version
21
22        config RT_USING_LWIP141
23            bool "lwIP v1.4.1"
24
25        config RT_USING_LWIP203
26            bool "lwIP v2.0.3"
27
28        config RT_USING_LWIP212
29            bool "lwIP v2.1.2"
30
31        # online version
32        if !RT_USING_LWIP_LOCAL_VERSION
33            config RT_USING_LWIP_LATEST
34                bool "lwIP latest"
35                select PKG_USING_LWIP
36        endif
37    endchoice
38
39    config RT_USING_LWIP_VER_NUM
40        hex
41        default 0x99999    if RT_USING_LWIP_LATEST
42        default 0x20102    if RT_USING_LWIP212
43        default 0x20003    if RT_USING_LWIP203
44        default 0x10401    if RT_USING_LWIP141
45
46    if (RT_USING_LWIP_VER_NUM >= 0x20000)
47        config RT_USING_LWIP_IPV6
48            bool "IPV6 protocol"
49            default n
50            select NETDEV_USING_IPV6
51            select NETDEV_IPV6_SCOPES if RT_USING_LWIP212
52    endif
53
54    config RT_LWIP_MEM_ALIGNMENT
55        int "Memory alignment"
56        default 8 if ARCH_CPU_64BIT
57        default 4
58
59    config RT_LWIP_IGMP
60        bool "IGMP protocol"
61        default y
62
63    config RT_LWIP_ICMP
64        bool "ICMP protocol"
65        default y
66
67    config RT_LWIP_SNMP
68        bool "SNMP protocol"
69        select RT_LWIP_STATS
70        default n
71
72    config RT_LWIP_DNS
73        bool "Enble DNS for name resolution"
74        select RT_LWIP_UDP
75        default y
76
77    config RT_LWIP_DHCP
78        bool "Enable alloc ip address through DHCP"
79        select RT_LWIP_UDP
80        default y
81
82        if RT_LWIP_DHCP
83            config IP_SOF_BROADCAST
84                int "SOF broadcast"
85                default 1
86
87            config IP_SOF_BROADCAST_RECV
88                int "SOF broadcast recv"
89                default 1
90        endif
91
92    menu "Static IPv4 Address"
93            config RT_LWIP_IPADDR
94                string "IPv4: IP address"
95                default "192.168.1.30"
96
97            config RT_LWIP_GWADDR
98                string "IPv4: Gateway address"
99                default "192.168.1.1"
100
101            config RT_LWIP_MSKADDR
102                string "IPv4: Mask address"
103                default "255.255.255.0"
104    endmenu
105
106    config RT_LWIP_UDP
107        bool "UDP protocol"
108        default y
109
110    config RT_LWIP_TCP
111        bool "TCP protocol"
112        default y
113
114    config RT_LWIP_RAW
115        bool "RAW protocol"
116        default n
117
118    config RT_LWIP_PPP
119        bool "PPP protocol"
120        default n
121
122    if RT_LWIP_PPP
123        config RT_LWIP_PPPOE
124            bool "PPPoE protocol"
125            default n
126
127        config RT_LWIP_PPPOS
128            bool "PPPoS protocol"
129            default n
130    endif
131
132    config RT_MEMP_NUM_NETCONN
133        int "the number of struct netconns"
134        default 8
135
136    config RT_LWIP_PBUF_NUM
137        int "the number of PBUF"
138        default 16
139
140    config RT_LWIP_RAW_PCB_NUM
141        int "the number of raw connection"
142        default 4
143
144    config RT_LWIP_UDP_PCB_NUM
145        int "the number of UDP socket"
146        default 8 if RT_USING_DFS_NFS
147        default 4
148
149    if RT_LWIP_TCP
150    config RT_LWIP_TCP_PCB_NUM
151        int "the number of TCP socket"
152        default 4
153
154    config RT_LWIP_TCP_SEG_NUM
155        int "the number of TCP segment"
156        default 40
157
158    config RT_LWIP_TCP_SND_BUF
159        int "the size of send buffer"
160        default 8196
161
162    config RT_LWIP_TCP_WND
163        int "the size of TCP send window"
164        default 8196
165    endif
166
167    config RT_LWIP_TCPTHREAD_PRIORITY
168        int "the priority level value of lwIP thread"
169        default 10
170
171    config RT_LWIP_TCPTHREAD_MBOX_SIZE
172        int "the number of mail in the lwIP thread mailbox"
173        default 8
174
175    config RT_LWIP_TCPTHREAD_STACKSIZE
176        int "the stack size of lwIP thread"
177        default 2048 if ARCH_CPU_64BIT
178        default 1024
179
180    config LWIP_NO_RX_THREAD
181        bool "Not use Rx thread"
182        default n
183
184    config LWIP_NO_TX_THREAD
185        bool "Not use Tx thread"
186        default n
187
188    config RT_LWIP_ETHTHREAD_PRIORITY
189        int "the priority level value of ethernet thread"
190        default 12
191
192    config RT_LWIP_ETHTHREAD_STACKSIZE
193        int "the stack size of ethernet thread"
194        default 2048 if ARCH_CPU_64BIT
195        default 1024
196
197    config RT_LWIP_ETHTHREAD_MBOX_SIZE
198        int "the number of mail in the ethernet thread mailbox"
199        default 8
200
201    config RT_LWIP_REASSEMBLY_FRAG
202        bool "Enable IP reassembly and frag"
203        default n
204
205    config LWIP_NETIF_STATUS_CALLBACK
206        int "Enable netif status callback"
207        default 1
208
209    config LWIP_NETIF_LINK_CALLBACK
210        int "Enable netif link status callback"
211        default 1
212
213    config RT_LWIP_NETIF_NAMESIZE
214        int "netif name length"
215        default 6
216
217    config SO_REUSE
218        int "Enable SO_REUSEADDR option"
219        default 1
220
221    config LWIP_SO_RCVTIMEO
222        int "Enable receive timeout for sockets/netconns and SO_RCVTIMEO processing."
223        default 1
224
225    config LWIP_SO_SNDTIMEO
226        int "Enable send timeout for sockets/netconns and SO_SNDTIMEO processing."
227        default 1
228
229    config LWIP_SO_RCVBUF
230        int "Enable SO_RCVBUF processing"
231        default 1
232
233    config LWIP_SO_LINGER
234        int "Enable SO_LINGER processing"
235        default 0
236
237    config RT_LWIP_NETIF_LOOPBACK
238        bool "Enable netif loopback"
239        default n
240
241    config LWIP_NETIF_LOOPBACK
242        int
243        default 1 if RT_LWIP_NETIF_LOOPBACK
244        default 0 if !RT_LWIP_NETIF_LOOPBACK
245
246    config RT_LWIP_STATS
247        bool "Enable lwIP statistics"
248        default n
249
250    config RT_LWIP_USING_HW_CHECKSUM
251        bool "Enable hardware checksum"
252        default n
253
254    config RT_LWIP_USING_PING
255        bool "Enable ping features"
256        default y
257        select NETDEV_USING_PING
258        select RT_LWIP_ICMP
259        select RT_LWIP_RAW
260
261    config LWIP_USING_DHCPD
262        bool "Enable DHCP server"
263        default n
264
265    if LWIP_USING_DHCPD
266        config DHCPD_SERVER_IP
267            string "DHCPD SERVER IP address"
268            default "192.168.169.1"
269
270        config DHCPD_USING_ROUTER
271            bool "alloc gateway ip for router"
272            default y
273
274        config LWIP_USING_CUSTOMER_DNS_SERVER
275            bool "Enable customer DNS server config"
276            default n
277        if LWIP_USING_CUSTOMER_DNS_SERVER
278            config DHCP_DNS_SERVER_IP
279                string "Custom DNS server IP address"
280                default "1.1.1.1"
281        endif
282    endif
283
284    config RT_LWIP_ENABLE_USER_HOOKS
285        bool "Enable user-defined LWIP hooks"
286        default n
287
288    menuconfig RT_LWIP_DEBUG
289        bool "Enable lwIP Debugging Options"
290        default n
291
292    if RT_LWIP_DEBUG
293
294        config RT_LWIP_SYS_DEBUG
295            bool "Enable Debugging of sys.c"
296            default n
297
298        config RT_LWIP_ETHARP_DEBUG
299            bool "Enable Debugging of etharp.c"
300            default n
301
302        config RT_LWIP_PPP_DEBUG
303            bool "Enable Debugging of PPP"
304            default n
305
306        config RT_LWIP_MEM_DEBUG
307            bool "Enable Debugging of mem.c"
308            default n
309
310        config RT_LWIP_MEMP_DEBUG
311            bool "Enable Debugging of memp.c"
312            default n
313
314        config RT_LWIP_PBUF_DEBUG
315            bool "Enable Debugging of pbuf.c"
316            default n
317
318        config RT_LWIP_API_LIB_DEBUG
319            bool "Enable Debugging of api_lib.c"
320            default n
321
322        config RT_LWIP_API_MSG_DEBUG
323            bool "Enable Debugging of api_msg.c"
324            default n
325
326        config RT_LWIP_TCPIP_DEBUG
327            bool "Enable Debugging of tcpip.c"
328            default n
329
330        config RT_LWIP_NETIF_DEBUG
331            bool "Enable Debugging of netif.c"
332            default n
333
334        config RT_LWIP_SOCKETS_DEBUG
335            bool "Enable Debugging of sockets.c"
336            default n
337
338        config RT_LWIP_DNS_DEBUG
339            bool "Enable Debugging of DNS"
340            default n
341
342        config RT_LWIP_AUTOIP_DEBUG
343            bool "Enable Debugging of autoip.c"
344            default n
345
346        config RT_LWIP_DHCP_DEBUG
347            bool "Enable Debugging of dhcp.c"
348            default n
349
350        config RT_LWIP_IP_DEBUG
351            bool "Enable Debugging of IP"
352            default n
353
354        config RT_LWIP_IP_REASS_DEBUG
355            bool "Enable debugging in ip_frag.c for both frag & reass"
356            default n
357
358        config RT_LWIP_ICMP_DEBUG
359            bool "Enable Debugging of icmp.c"
360            default n
361
362        config RT_LWIP_IGMP_DEBUG
363            bool "Enable Debugging of igmp.c"
364            default n
365
366        config RT_LWIP_UDP_DEBUG
367            bool "Enable Debugging of UDP"
368            default n
369
370        config RT_LWIP_TCP_DEBUG
371            bool "Enable Debugging of TCP"
372            default n
373
374        config RT_LWIP_TCP_INPUT_DEBUG
375            bool "Enable Debugging of tcp_in.c"
376            default n
377
378        config RT_LWIP_TCP_OUTPUT_DEBUG
379            bool "Enable Debugging of tcp_out.c"
380            default n
381
382        config RT_LWIP_TCP_RTO_DEBUG
383            bool "Enable debugging in TCP for retransmit"
384            default n
385
386        config RT_LWIP_TCP_CWND_DEBUG
387            bool "Enable debugging for TCP congestion window"
388            default n
389
390        config RT_LWIP_TCP_WND_DEBUG
391            bool "Enable debugging in tcp_in.c for window updating"
392            default n
393
394        config RT_LWIP_TCP_FR_DEBUG
395            bool "Enable debugging in tcp_in.c for fast retransmit"
396            default n
397
398        config RT_LWIP_TCP_QLEN_DEBUG
399            bool "Enable debugging for TCP queue lengths"
400            default n
401
402        config RT_LWIP_TCP_RST_DEBUG
403            bool "Enable debugging for TCP with the RST message"
404            default n
405
406    endif
407
408endif
409