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