Kconfig 12.8 KB
Newer Older
1 2 3
menu "Network"

menu "Socket abstraction layer"
4

5 6
config RT_USING_SAL
    bool "Enable socket abstraction layer"
7 8
    select RT_USING_NETDEV
    select RT_USING_SYSTEM_WORKQUEUE
9 10 11 12
    default n

    if RT_USING_SAL

13 14 15 16 17 18
        config SAL_INTERNET_CHECK
            bool "Enable the ability that check internet status"
            default y
            help
                The ability that check internet status is provided by RT-Thread.

19
        if RT_USING_LWIP || AT_USING_SOCKET
20

21 22 23 24 25 26 27 28 29 30 31
            menu "protocol stack implement"

                config SAL_USING_LWIP
                    bool "Support lwIP stack"
                    default y
                    depends on RT_USING_LWIP

                config SAL_USING_AT
                    bool "Support AT Commands stack"
                    default y
                    depends on AT_USING_SOCKET
32

33 34 35 36
                config SAL_USING_TLS
                    bool "Support MbedTLS protocol"
                    default y
                    depends on PKG_USING_MBEDTLS
37
            endmenu
38

39
        endif
40 41 42

        config SAL_USING_POSIX
            bool "Enable BSD socket operated by file system API"
43
            default n
mysterywolf's avatar
mysterywolf 已提交
44 45
            select RT_USING_LIBC
            select RT_USING_POSIX
46
            select RT_USING_POSIX_SELECT
47 48
            help
                Let BSD socket operated by file system API, such as read/write and involveed in select/poll POSIX APIs.
49

50
        if !SAL_USING_POSIX
51

52 53 54
            config SAL_SOCKETS_NUM
                int "the maximum number of sockets"
                default 16
55

56
        endif
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76

    endif

endmenu

menu "Network interface device"

config RT_USING_NETDEV
    bool "Enable network interface device"
    default n

    if RT_USING_NETDEV

        config NETDEV_USING_IFCONFIG
            bool "Enable ifconfig features"
            default y

        config NETDEV_USING_PING
            bool "Enable ping features"
            default y
77

78 79 80
        config NETDEV_USING_NETSTAT
            bool "Enable netstat features"
            default y
81

82 83 84
        config NETDEV_USING_AUTO_DEFAULT
            bool "Enable default netdev automatic change features"
            default y
85 86

        config NETDEV_USING_IPV6
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
            bool "Enable IPV6 protocol support"
            default n

        config NETDEV_IPV4
            int
            default 1

        config NETDEV_IPV6
            int
            default 1 if NETDEV_USING_IPV6
            default 0 if !NETDEV_USING_IPV6

        config NETDEV_IPV6_SCOPES
            bool
            help
                Defined to synchronize the ip6_addr structure state
103
            default n
104 105 106
    endif

endmenu
B
bernard 已提交
107

B
Bernard Xiong 已提交
108
menu "light weight TCP/IP stack"
B
bernard 已提交
109
config RT_USING_LWIP
B
bernard 已提交
110
    bool "Enable lwIP stack"
B
BernardXiong 已提交
111
    select RT_USING_DEVICE
B
bernard 已提交
112 113 114
    default n

    if RT_USING_LWIP
115
        choice
B
bernard 已提交
116
            prompt "lwIP version"
117
            default RT_USING_LWIP203
118
            help
B
bernard 已提交
119 120 121 122 123 124 125
                Select the lwIP version

            config RT_USING_LWIP141
                bool "lwIP v1.4.1"

            config RT_USING_LWIP202
                bool "lwIP v2.0.2"
126

L
liuxianliang 已提交
127 128 129 130
            config RT_USING_LWIP203
                bool "lwIP v2.0.3"

            config RT_USING_LWIP212
131 132
                bool "lwIP v2.1.2"

B
bernard 已提交
133 134
        endchoice

L
liuxianliang 已提交
135
        if (RT_USING_LWIP202 || RT_USING_LWIP212 || RT_USING_LWIP203)
136 137 138 139
            config RT_USING_LWIP_IPV6
                bool "IPV6 protocol"
                default n
                select NETDEV_USING_IPV6
L
liuxianliang 已提交
140
                select NETDEV_IPV6_SCOPES if RT_USING_LWIP212
141 142
        endif

B
bigmagic 已提交
143 144 145 146
        config RT_LWIP_MEM_ALIGNMENT
            int "Memory alignment"
            default 4

B
bernard 已提交
147 148
        config RT_LWIP_IGMP
            bool "IGMP protocol"
wuyangyong's avatar
wuyangyong 已提交
149
            default y
B
bernard 已提交
150 151 152 153 154 155 156

        config RT_LWIP_ICMP
            bool "ICMP protocol"
            default y

        config RT_LWIP_SNMP
            bool "SNMP protocol"
157
            select RT_LWIP_STATS
B
bernard 已提交
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
            default n

        config RT_LWIP_DNS
            bool "Enble DNS for name resolution"
            select RT_LWIP_UDP
            default y

        config RT_LWIP_DHCP
            bool "Enable alloc ip address through DHCP"
            select RT_LWIP_UDP
            default y

            if RT_LWIP_DHCP
                config IP_SOF_BROADCAST
                    int "SOF broadcast"
                    default 1
174

B
bernard 已提交
175 176 177 178 179
                config IP_SOF_BROADCAST_RECV
                    int "SOF broadcast recv"
                    default 1
            endif

180
        menu "Static IPv4 Address"
B
bernard 已提交
181 182 183 184 185 186 187
                config RT_LWIP_IPADDR
                    string "IPv4: IP address"
                    default 192.168.1.30

                config RT_LWIP_GWADDR
                    string "IPv4: Gateway address"
                    default 192.168.1.1
188

B
bernard 已提交
189 190 191
                config RT_LWIP_MSKADDR
                    string "IPv4: Mask address"
                    default 255.255.255.0
192
        endmenu
B
bernard 已提交
193

B
bernard 已提交
194 195 196 197 198 199 200
        config RT_LWIP_UDP
            bool "UDP protocol"
            default y

        config RT_LWIP_TCP
            bool "TCP protocol"
            default y
201

202 203 204
        config RT_LWIP_RAW
            bool "RAW protocol"
            default n
B
bernard 已提交
205 206 207 208 209

        config RT_LWIP_PPP
            bool "PPP protocol"
            default n

B
Bernard Xiong 已提交
210 211 212 213
        if RT_LWIP_PPP
            config RT_LWIP_PPPOE
                bool "PPPoE protocol"
                default n
S
SummerGift 已提交
214

B
Bernard Xiong 已提交
215 216 217 218
            config RT_LWIP_PPPOS
                bool "PPPoS protocol"
                default n
        endif
S
SummerGift 已提交
219

220 221 222
        config RT_MEMP_NUM_NETCONN
            int "the number of struct netconns"
            default 8
B
bernard 已提交
223 224 225 226 227 228 229 230 231 232 233

        config RT_LWIP_PBUF_NUM
            int "the number of PBUF"
            default 16

        config RT_LWIP_RAW_PCB_NUM
            int "the number of raw connection"
            default 4

        config RT_LWIP_UDP_PCB_NUM
            int "the number of UDP socket"
S
SummerGift 已提交
234
            default 8 if RT_USING_DFS_NFS
B
bernard 已提交
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266
            default 4

        if RT_LWIP_TCP
        config RT_LWIP_TCP_PCB_NUM
            int "the number of TCP socket"
            default 4

        config RT_LWIP_TCP_SEG_NUM
            int "the number of TCP segment"
            default 40

        config RT_LWIP_TCP_SND_BUF
            int "the size of send buffer"
            default 8196

        config RT_LWIP_TCP_WND
            int "the size of TCP send window"
            default 8196
        endif

        config RT_LWIP_TCPTHREAD_PRIORITY
            int "the priority level value of lwIP thread"
            default 10

        config RT_LWIP_TCPTHREAD_MBOX_SIZE
            int "the number of mail in the lwIP thread mailbox"
            default 8

        config RT_LWIP_TCPTHREAD_STACKSIZE
            int "the stack size of lwIP thread"
            default 1024

267 268 269 270 271 272 273 274
        config LWIP_NO_RX_THREAD
            bool "Not use Rx thread"
            default n

        config LWIP_NO_TX_THREAD
            bool "Not use Tx thread"
            default n

B
bernard 已提交
275 276 277
        config RT_LWIP_ETHTHREAD_PRIORITY
            int "the priority level value of ethernet thread"
            default 12
278

B
bernard 已提交
279 280 281
        config RT_LWIP_ETHTHREAD_STACKSIZE
            int "the stack size of ethernet thread"
            default 1024
282

B
bernard 已提交
283 284 285 286 287 288 289 290 291
        config RT_LWIP_ETHTHREAD_MBOX_SIZE
            int "the number of mail in the ethernet thread mailbox"
            default 8

        config RT_LWIP_REASSEMBLY_FRAG
            bool "Enable IP reassembly and frag"
            default n

        config LWIP_NETIF_STATUS_CALLBACK
292 293
            int "Enable netif status callback"
            default 1
294

295 296
        config LWIP_NETIF_LINK_CALLBACK
            int "Enable netif link status callback"
B
bernard 已提交
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313
            default 1

        config SO_REUSE
            int "Enable SO_REUSEADDR option"
            default 1

        config LWIP_SO_RCVTIMEO
            int "Enable receive timeout for sockets/netconns and SO_RCVTIMEO processing."
            default 1

        config LWIP_SO_SNDTIMEO
            int "Enable send timeout for sockets/netconns and SO_SNDTIMEO processing."
            default 1

        config LWIP_SO_RCVBUF
            int "Enable SO_RCVBUF processing"
            default 1
杭州_燕十三's avatar
杭州_燕十三 已提交
314

315 316 317 318
        config LWIP_SO_LINGER
            int "Enable SO_LINGER processing"
            default 0

杭州_燕十三's avatar
杭州_燕十三 已提交
319 320 321 322 323
        config RT_LWIP_NETIF_LOOPBACK
            bool "Enable netif loopback"
            default n

        config LWIP_NETIF_LOOPBACK
还_没_想_好's avatar
还_没_想_好 已提交
324 325 326 327 328 329 330
            int
            default 1 if RT_LWIP_NETIF_LOOPBACK
            default 0 if !RT_LWIP_NETIF_LOOPBACK

        config RT_LWIP_STATS
            bool "Enable lwIP statistics"
            default n
331

332 333 334
        config RT_LWIP_USING_HW_CHECKSUM
            bool "Enable hardware checksum"
            default n
335

336 337 338 339 340 341
        config RT_LWIP_USING_PING
            bool "Enable ping features"
            default y
            select NETDEV_USING_PING
            select RT_LWIP_ICMP
            select RT_LWIP_RAW
342

343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462
        menuconfig RT_LWIP_DEBUG
            bool "Enable lwIP Debugging Options"
            default n

        if RT_LWIP_DEBUG

            config RT_LWIP_SYS_DEBUG
                bool "Enable Debugging of sys.c"
                default n

            config RT_LWIP_ETHARP_DEBUG
                bool "Enable Debugging of etharp.c"
                default n

            config RT_LWIP_PPP_DEBUG
                bool "Enable Debugging of PPP"
                default n

            config RT_LWIP_MEM_DEBUG
                bool "Enable Debugging of mem.c"
                default n

            config RT_LWIP_MEMP_DEBUG
                bool "Enable Debugging of memp.c"
                default n

            config RT_LWIP_PBUF_DEBUG
                bool "Enable Debugging of pbuf.c"
                default n

            config RT_LWIP_API_LIB_DEBUG
                bool "Enable Debugging of api_lib.c"
                default n

            config RT_LWIP_API_MSG_DEBUG
                bool "Enable Debugging of api_msg.c"
                default n

            config RT_LWIP_TCPIP_DEBUG
                bool "Enable Debugging of tcpip.c"
                default n

            config RT_LWIP_NETIF_DEBUG
                bool "Enable Debugging of netif.c"
                default n

            config RT_LWIP_SOCKETS_DEBUG
                bool "Enable Debugging of sockets.c"
                default n

            config RT_LWIP_DNS_DEBUG
                bool "Enable Debugging of DNS"
                default n

            config RT_LWIP_AUTOIP_DEBUG
                bool "Enable Debugging of autoip.c"
                default n

            config RT_LWIP_DHCP_DEBUG
                bool "Enable Debugging of dhcp.c"
                default n

            config RT_LWIP_IP_DEBUG
                bool "Enable Debugging of IP"
                default n

            config RT_LWIP_IP_REASS_DEBUG
                bool "Enable debugging in ip_frag.c for both frag & reass"
                default n

            config RT_LWIP_ICMP_DEBUG
                bool "Enable Debugging of icmp.c"
                default n

            config RT_LWIP_IGMP_DEBUG
                bool "Enable Debugging of igmp.c"
                default n

            config RT_LWIP_UDP_DEBUG
                bool "Enable Debugging of UDP"
                default n

            config RT_LWIP_TCP_DEBUG
                bool "Enable Debugging of TCP"
                default n

            config RT_LWIP_TCP_INPUT_DEBUG
                bool "Enable Debugging of tcp_in.c"
                default n

            config RT_LWIP_TCP_OUTPUT_DEBUG
                bool "Enable Debugging of tcp_out.c"
                default n

            config RT_LWIP_TCP_RTO_DEBUG
                bool "Enable debugging in TCP for retransmit"
                default n

            config RT_LWIP_TCP_CWND_DEBUG
                bool "Enable debugging for TCP congestion window"
                default n

            config RT_LWIP_TCP_WND_DEBUG
                bool "Enable debugging in tcp_in.c for window updating"
                default n

            config RT_LWIP_TCP_FR_DEBUG
                bool "Enable debugging in tcp_in.c for fast retransmit"
                default n

            config RT_LWIP_TCP_QLEN_DEBUG
                bool "Enable debugging for TCP queue lengths"
                default n

            config RT_LWIP_TCP_RST_DEBUG
                bool "Enable debugging for TCP with the RST message"
                default n

        endif

B
bernard 已提交
463
    endif
B
bernard 已提交
464 465 466

endmenu

Lawlieta's avatar
Lawlieta 已提交
467 468
source "$RTT_DIR/components/net/at/Kconfig"

B
Bernard Xiong 已提交
469
if RT_USING_LWIP
B
Bernard Xiong 已提交
470 471 472 473 474

config LWIP_USING_DHCPD
    bool "Enable DHCP server"
    default n

475
    if LWIP_USING_DHCPD
476 477 478 479
        config DHCPD_SERVER_IP
            string "DHCPD SERVER IP address"
            default 192.168.169.1

480 481 482
        config DHCPD_USING_ROUTER
            bool "alloc gateway ip for router"
            default y
483 484 485 486 487 488 489 490 491

        config LWIP_USING_CUSTOMER_DNS_SERVER
            bool "Enable customer DNS server config"
            default n
        if LWIP_USING_CUSTOMER_DNS_SERVER
            config DHCP_DNS_SERVER_IP
                string "Custom DNS server IP address"
                default 1.1.1.1
        endif
492
    endif
493

494
endif
B
Bernard Xiong 已提交
495

B
bernard 已提交
496
endmenu