1# IP stack config 2 3# Copyright (c) 2016 Intel Corporation. 4# Copyright (c) 2021 Nordic Semiconductor 5# SPDX-License-Identifier: Apache-2.0 6 7menu "IP stack" 8 9config NET_NATIVE 10 bool "Enable native IP stack" 11 default y 12 help 13 Enables Zephyr native IP stack. If you disable this, then 14 you need to enable the offloading support if you want to 15 have IP connectivity. 16 17# Hidden options for enabling native IPv6/IPv4. Using these options 18# avoids having "defined(CONFIG_NET_IPV6) && defined(CONFIG_NET_NATIVE)" 19# in the code as we can have "defined(CONFIG_NET_NATIVE_IPV6)" instead. 20config NET_NATIVE_IPV6 21 bool 22 depends on NET_NATIVE 23 default y if NET_IPV6 24 25config NET_NATIVE_IPV4 26 bool 27 depends on NET_NATIVE 28 default y if NET_IPV4 29 30config NET_NATIVE_TCP 31 bool 32 depends on NET_NATIVE 33 default y if NET_TCP 34 35config NET_NATIVE_UDP 36 bool 37 depends on NET_NATIVE 38 default y if NET_UDP 39 40config NET_OFFLOAD 41 bool "Offload IP stack [EXPERIMENTAL]" 42 help 43 Enables TCP/IP stack to be offload to a co-processor. 44 45if NET_OFFLOAD 46module = NET_OFFLOAD 47module-dep = NET_LOG 48module-str = Log level for offload layer 49module-help = Enables offload layer to output debug messages. 50source "subsys/net/Kconfig.template.log_config.net" 51endif # NET_OFFLOAD 52 53config NET_RAW_MODE 54 bool 55 help 56 This is a very specific option used to built only the very minimal 57 part of the net stack in order to get network drivers working without 58 any net stack above: core, L2 etc... Basically this will build only 59 net_pkt part. It is currently used only by IEEE 802.15.4 drivers, 60 though any type of net drivers could use it. 61 62if !NET_RAW_MODE 63 64choice 65 prompt "Qemu networking" 66 default NET_QEMU_PPP if NET_PPP 67 default NET_QEMU_SLIP 68 depends on QEMU_TARGET 69 help 70 Can be used to select how the network connectivity is established 71 from inside qemu to host system. This can be done either via 72 serial connection (SLIP) or via Qemu ethernet driver. 73 74config NET_QEMU_SLIP 75 bool "SLIP" 76 help 77 Connect to host or to another Qemu via SLIP. 78 79config NET_QEMU_PPP 80 bool "PPP" 81 help 82 Connect to host via PPP. 83 84config NET_QEMU_ETHERNET 85 bool "Ethernet" 86 help 87 Connect to host system via Qemu ethernet driver support. One such 88 driver that Zephyr supports is Intel e1000 ethernet driver. 89 90config NET_QEMU_USER 91 bool "SLIRP" 92 help 93 Connect to host system via Qemu's built-in User Networking support. This 94 is implemented using "slirp", which provides a full TCP/IP stack within 95 QEMU and uses that stack to implement a virtual NAT'd network. 96 97endchoice 98 99config NET_QEMU_USER_EXTRA_ARGS 100 string "Qemu User Networking Args" 101 depends on NET_QEMU_USER 102 default "" 103 help 104 Extra arguments passed to QEMU when User Networking is enabled. This may 105 include host / guest port forwarding, device id, Network address 106 information etc. This string is appended to the QEMU "-net user" option. 107 108config NET_INIT_PRIO 109 int 110 default 90 111 help 112 Network initialization priority level. This number tells how 113 early in the boot the network stack is initialized. 114 115source "subsys/net/ip/Kconfig.ipv6" 116 117source "subsys/net/ip/Kconfig.ipv4" 118 119config NET_SHELL 120 bool "Enable network shell utilities" 121 select SHELL 122 help 123 Activate shell module that provides network commands like 124 ping to the console. 125 126config NET_SHELL_DYN_CMD_COMPLETION 127 bool "Enable network shell dynamic command completion" 128 depends on NET_SHELL 129 default y 130 help 131 Enable various net-shell command to support dynamic command 132 completion. This means that for example the nbr command can 133 automatically complete the neighboring IPv6 address and user 134 does not need to type it manually. 135 Please note that this uses more memory in order to save the 136 dynamic command strings. For example for nbr command the 137 increase is 320 bytes (8 neighbors * 40 bytes for IPv6 address 138 length) by default. Other dynamic completion commands in 139 net-shell require also some smaller amount of memory. 140 141config NET_TC_TX_COUNT 142 int "How many Tx traffic classes to have for each network device" 143 default 1 if USERSPACE || USB_DEVICE_NETWORK 144 default 0 145 range 1 NET_TC_NUM_PRIORITIES if NET_TC_NUM_PRIORITIES<=8 && USERSPACE 146 range 0 NET_TC_NUM_PRIORITIES if NET_TC_NUM_PRIORITIES<=8 147 range 1 8 if USERSPACE 148 range 0 8 149 help 150 Define how many Tx traffic classes (queues) the system should have 151 when sending a network packet. The network packet priority can then 152 be mapped to this traffic class so that higher prioritized packets 153 can be processed before lower prioritized ones. Each queue is handled 154 by a separate thread which will need RAM for stack space. 155 Only increase the value from 1 if you really need this feature. 156 The default value is 1 which means that all the network traffic is 157 handled equally. In this implementation, the higher traffic class 158 value corresponds to lower thread priority. 159 If you select 0 here, then it means that all the network traffic 160 is pushed to the driver directly without any queues. 161 Note that if USERSPACE support is enabled, then currently we need to 162 enable at least 1 TX thread. 163 164config NET_TC_RX_COUNT 165 int "How many Rx traffic classes to have for each network device" 166 default 1 167 range 1 NET_TC_NUM_PRIORITIES if NET_TC_NUM_PRIORITIES<=8 && USERSPACE 168 range 0 NET_TC_NUM_PRIORITIES if NET_TC_NUM_PRIORITIES<=8 169 range 1 8 if USERSPACE 170 range 0 8 171 help 172 Define how many Rx traffic classes (queues) the system should have 173 when receiving a network packet. The network packet priority can then 174 be mapped to this traffic class so that higher prioritized packets 175 can be processed before lower prioritized ones. Each queue is handled 176 by a separate thread which will need RAM for stack space. 177 Only increase the value from 1 if you really need this feature. 178 The default value is 1 which means that all the network traffic is 179 handled equally. In this implementation, the higher traffic class 180 value corresponds to lower thread priority. 181 If you select 0 here, then it means that all the network traffic 182 is pushed from the driver to application thread without any 183 intermediate RX queue. There is always a receive socket queue between 184 device driver and application. Disabling RX thread means that the 185 network device driver, that is typically running in IRQ context, will 186 handle the packet all the way to the application. This might cause 187 other incoming packets to be lost if the RX processing takes long 188 time. 189 Note that if USERSPACE support is enabled, then currently we need to 190 enable at least 1 RX thread. 191 192config NET_TC_SKIP_FOR_HIGH_PRIO 193 bool "Push high priority packets directly to network driver" 194 help 195 If this is set, then high priority (NET_PRIORITY_CA) net_pkt will be 196 pushed directly to network driver and will skip the traffic class 197 queues. This is currently not enabled by default. 198 199choice NET_TC_THREAD_TYPE 200 prompt "How the network RX/TX threads should work" 201 help 202 Please select the RX/TX threads to be either pre-emptive or 203 co-operative. 204 205config NET_TC_THREAD_COOPERATIVE 206 bool "Use co-operative TX/RX threads" 207 depends on COOP_ENABLED 208 help 209 With co-operative threads, the thread cannot be pre-empted. 210 211config NET_TC_THREAD_PREEMPTIVE 212 bool "Use pre-emptive TX/RX threads [EXPERIMENTAL]" 213 depends on PREEMPT_ENABLED 214 help 215 With pre-emptive threads, the thread can be pre-empted. 216 217endchoice 218 219config NET_TC_NUM_PRIORITIES 220 int 221 default NUM_COOP_PRIORITIES if NET_TC_THREAD_COOPERATIVE 222 default NUM_PREEMPT_PRIORITIES if NET_TC_THREAD_PREEMPTIVE 223 224choice 225 prompt "Priority to traffic class mapping" 226 help 227 Select mapping to use to map network packet priorities to traffic 228 classes. 229 230config NET_TC_MAPPING_STRICT 231 bool "Strict priority mapping" 232 help 233 This is the recommended default priority to traffic class mapping. 234 Use it for implementations that do not support the credit-based 235 shaper transmission selection algorithm. 236 See 802.1Q, chapter 8.6.6 for more information. 237 238config NET_TC_MAPPING_SR_CLASS_A_AND_B 239 bool "SR class A and class B mapping" 240 depends on NET_TC_TX_COUNT >= 2 241 depends on NET_TC_RX_COUNT >= 2 242 help 243 This is the recommended priority to traffic class mapping for a 244 system that supports SR (Stream Reservation) class A and SR class B. 245 See 802.1Q, chapter 34.5 for more information. 246 247config NET_TC_MAPPING_SR_CLASS_B_ONLY 248 bool "SR class B only mapping" 249 depends on NET_TC_TX_COUNT >= 2 250 depends on NET_TC_RX_COUNT >= 2 251 help 252 This is the recommended priority to traffic class mapping for a 253 system that supports SR (Stream Reservation) class B only. 254 See 802.1Q, chapter 34.5 for more information. 255endchoice 256 257config NET_TX_DEFAULT_PRIORITY 258 int "Default network TX packet priority if none have been set" 259 default 1 260 range 0 7 261 help 262 What is the default network packet priority if user has not specified 263 one. The value 0 means lowest priority and 7 is the highest. 264 265config NET_RX_DEFAULT_PRIORITY 266 int "Default network RX packet priority if none have been set" 267 default 0 268 range 0 7 269 help 270 What is the default network RX packet priority if user has not set 271 one. The value 0 means lowest priority and 7 is the highest. 272 273config NET_IP_ADDR_CHECK 274 bool "Check IP address validity before sending IP packet" 275 default y 276 help 277 Check that either the source or destination address is 278 correct before sending either IPv4 or IPv6 network packet. 279 280config NET_MAX_ROUTERS 281 int "How many routers are supported" 282 default 2 if NET_IPV4 && NET_IPV6 283 default 1 if NET_IPV4 && !NET_IPV6 284 default 1 if !NET_IPV4 && NET_IPV6 285 range 1 254 286 help 287 The value depends on your network needs. 288 289# Normally the route support is enabled by RPL or similar technology 290# that needs to use the routing infrastructure. 291config NET_ROUTE 292 bool 293 depends on NET_IPV6_NBR_CACHE 294 default y if NET_IPV6_NBR_CACHE 295 296# Temporarily hide the routing option as we do not have RPL in the system 297# that used to populate the routing table. 298config NET_ROUTING 299 bool 300 depends on NET_ROUTE 301 help 302 Allow IPv6 routing between different network interfaces and 303 technologies. Currently this has limited use as some entity 304 would need to populate the routing table. RPL used to do that 305 earlier but currently there is no RPL support in Zephyr. 306 307config NET_MAX_ROUTES 308 int "Max number of routing entries stored." 309 default NET_IPV6_MAX_NEIGHBORS 310 depends on NET_ROUTE 311 help 312 This determines how many entries can be stored in routing table. 313 314config NET_MAX_NEXTHOPS 315 int "Max number of next hop entries stored." 316 default NET_MAX_ROUTES 317 depends on NET_ROUTE 318 help 319 This determines how many entries can be stored in nexthop table. 320 321config NET_ROUTE_MCAST 322 bool "Enable Multicast Routing / Forwarding" 323 depends on NET_ROUTE 324 help 325 Activates multicast routing/forwarding 326 327config NET_MAX_MCAST_ROUTES 328 int "Max number of multicast routing entries stored." 329 default 1 330 depends on NET_ROUTE_MCAST 331 help 332 This determines how many entries can be stored in multicast 333 routing table. 334 335config NET_TCP 336 bool "Enable TCP" 337 help 338 The value depends on your network needs. 339 340config NET_TCP_CHECKSUM 341 bool "Check TCP checksum" 342 default y 343 depends on NET_TCP 344 help 345 Enables TCP handler to check TCP checksum. If the checksum is invalid, 346 then the packet is discarded. 347 348if NET_TCP 349module = NET_TCP 350module-dep = NET_LOG 351module-str = Log level for TCP 352module-help = Enables TCP handler output debug messages 353source "subsys/net/Kconfig.template.log_config.net" 354endif # NET_TCP 355 356config NET_TCP_BACKLOG_SIZE 357 int "Number of simultaneous incoming TCP connections" 358 depends on NET_TCP 359 default 1 360 range 1 128 361 help 362 The number of simultaneous TCP connection attempts, i.e. outstanding 363 TCP connections waiting for initial ACK. 364 365config NET_TCP_TIME_WAIT_DELAY 366 int "How long to wait in TIME_WAIT state (in milliseconds)" 367 depends on NET_TCP 368 default 250 369 help 370 To avoid a (low-probability) issue when delayed packets from 371 previous connection get delivered to next connection reusing 372 the same local/remote ports, RFC 793 (TCP) suggests to keep 373 an old, closed connection in a special "TIME_WAIT" state for 374 the duration of 2*MSL (Maximum Segment Lifetime). The RFC 375 suggests to use MSL of 2 minutes, but notes "This is an 376 engineering choice, and may be changed if experience indicates 377 it is desirable to do so." For low-resource systems, having 378 large MSL may lead to quick resource exhaustion (and related 379 DoS attacks). At the same time, the issue of packet misdelivery 380 is largely alleviated in the modern TCP stacks by using random, 381 non-repeating port numbers and initial sequence numbers. Due 382 to this, Zephyr uses much lower value of 250ms by default. 383 Value of 0 disables TIME_WAIT state completely. 384 385config NET_TCP_ACK_TIMEOUT 386 int "How long to wait for ACK (in milliseconds)" 387 depends on NET_TCP 388 default 1000 389 range 1 2147483647 390 help 391 This value affects the timeout when waiting ACK to arrive in 392 various TCP states. The value is in milliseconds. Note that 393 having a very low value here could prevent connectivity. 394 395config NET_TCP_INIT_RETRANSMISSION_TIMEOUT 396 int "Initial value of Retransmission Timeout (RTO) (in milliseconds)" 397 depends on NET_TCP 398 default 200 399 range 100 60000 400 help 401 This value affects the timeout between initial retransmission 402 of TCP data packets. The value is in milliseconds. 403 404config NET_TCP_RETRY_COUNT 405 int "Maximum number of TCP segment retransmissions" 406 depends on NET_TCP 407 default 9 408 help 409 The following formula can be used to determine the time (in ms) 410 that a segment will be be buffered awaiting retransmission: 411 n=NET_TCP_RETRY_COUNT 412 Sum((1<<n) * NET_TCP_INIT_RETRANSMISSION_TIMEOUT) 413 n=0 414 With the default value of 9, the IP stack will try to 415 retransmit for up to 1:42 minutes. This is as close as possible 416 to the minimum value recommended by RFC1122 (1:40 minutes). 417 Only 5 bits are dedicated for the retransmission count, so accepted 418 values are in the 0-31 range. It's highly recommended to not go 419 below 9, though. 420 Should a retransmission timeout occur, the receive callback is 421 called with -ECONNRESET error code and the context is dereferenced. 422 423config NET_TCP_MAX_SEND_WINDOW_SIZE 424 int "Maximum sending window size to use" 425 depends on NET_TCP2 426 default 0 427 range 0 65535 428 help 429 This value affects how the TCP selects the maximum sending window 430 size. The default value 0 lets the TCP stack select the value 431 according to amount of network buffers configured in the system. 432 433config NET_TCP_RECV_QUEUE_TIMEOUT 434 int "How long to queue received data (in ms)" 435 depends on NET_TCP2 436 default 100 437 range 0 10000 438 help 439 If we receive out-of-order TCP data, we queue it. This value tells 440 how long the data is kept before it is discarded if we have not been 441 able to pass the data to the application. If set to 0, then receive 442 queing is not enabled. The value is in milliseconds. 443 Note that we only queue data sequentially in current version i.e., 444 there should be no holes in the queue. For example, if we receive 445 SEQs 5,4,3,6 and are waiting SEQ 2, the data in segments 3,4,5,6 is 446 queued (in this order), and then given to application when we receive 447 SEQ 2. But if we receive SEQs 5,4,3,7 then the SEQ 7 is discarded 448 because the list would not be sequential as number 6 is be missing. 449 450config NET_TCP_WORKQ_STACK_SIZE 451 int "TCP work queue thread stack size" 452 default 1024 453 depends on NET_TCP 454 help 455 Set the TCP work queue thread stack size in bytes. 456 457config NET_TCP_ISN_RFC6528 458 bool "Use ISN algorithm from RFC 6528" 459 default y 460 depends on NET_TCP 461 select MBEDTLS 462 select MBEDTLS_MD 463 select MBEDTLS_MAC_MD5_ENABLED 464 help 465 Implement Initial Sequence Number calculation as described in 466 RFC 6528 chapter 3. https://tools.ietf.org/html/rfc6528 467 If this is not set, then sys_rand32_get() is used for ISN value. 468 469config NET_TCP2 470 bool 471 default y 472 depends on NET_TCP 473 474config NET_TEST_PROTOCOL 475 bool "Enable JSON based test protocol (UDP)" 476 help 477 Enable JSON based test protocol (UDP). 478 479config NET_UDP 480 bool "Enable UDP" 481 default y 482 help 483 The value depends on your network needs. 484 485config NET_UDP_CHECKSUM 486 bool "Check UDP checksum" 487 default y 488 depends on NET_UDP 489 help 490 Enables UDP handler to check UDP checksum. If the checksum is invalid, 491 then the packet is discarded. 492 493config NET_UDP_MISSING_CHECKSUM 494 bool "Accept missing checksum (IPv4 only)" 495 depends on NET_UDP && NET_IPV4 496 help 497 RFC 768 states the possibility to have a missing checksum, for 498 debugging purposes for instance. That feature is however valid only 499 for IPv4 and on reception only, since Zephyr will always compute the 500 UDP checksum in transmission path. 501 502if NET_UDP 503module = NET_UDP 504module-dep = NET_LOG 505module-str = Log level for UDP 506module-help = Enables UDP handler output debug messages 507source "subsys/net/Kconfig.template.log_config.net" 508endif # NET_UDP 509 510config NET_MAX_CONN 511 int "How many network connections are supported" 512 depends on NET_UDP || NET_TCP || NET_SOCKETS_PACKET || NET_SOCKETS_CAN 513 default 8 if NET_IPV6 && NET_IPV4 514 default 4 515 help 516 The value depends on your network needs. The value 517 should include both UDP and TCP connections. 518 519config NET_MAX_CONTEXTS 520 int "Number of network contexts to allocate" 521 default 6 522 help 523 Each network context is used to describe a network 5-tuple that 524 is used when listening or sending network traffic. This is very 525 similar as one could call a network socket in some other systems. 526 527config NET_CONTEXT_NET_PKT_POOL 528 bool "Enable net_buf TX pool / context" 529 default y if NET_TCP && NET_6LO 530 help 531 If enabled, then it is possible to fine-tune network packet pool 532 for each context when sending network data. If this setting is 533 enabled, then you should define the context pools in your application 534 using NET_PKT_TX_POOL_DEFINE() and NET_PKT_DATA_POOL_DEFINE() 535 macros and tie these pools to desired context using the 536 net_context_setup_pools() function. 537 538config NET_CONTEXT_SYNC_RECV 539 bool "Support synchronous functionality in net_context_recv() API" 540 default y 541 help 542 You can disable sync support to save some memory if you are calling 543 net_context_recv() in async way only when timeout is set to 0. 544 545config NET_CONTEXT_CHECK 546 bool "Check options when calling various net_context functions" 547 default y 548 help 549 If you know that the options passed to net_context...() functions 550 are ok, then you can disable the checks to save some memory. 551 552config NET_CONTEXT_PRIORITY 553 bool "Add priority support to net_context" 554 help 555 It is possible to prioritize network traffic. This requires 556 also traffic class support to work as expected. 557 558config NET_CONTEXT_TXTIME 559 bool "Add TXTIME support to net_context" 560 select NET_PKT_TXTIME 561 help 562 It is possible to add information when the outgoing network packet 563 should be sent. The TX time information should be placed into 564 ancillary data field in sendmsg call. 565 566config NET_CONTEXT_RCVTIMEO 567 bool "Add RCVTIMEO support to net_context" 568 help 569 It is possible to time out receiving a network packet. The timeout 570 time is configurable run-time in the application code. For network 571 sockets timeout is configured per socket with 572 setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, ...) function. 573 574config NET_CONTEXT_SNDTIMEO 575 bool "Add SNDTIMEO support to net_context" 576 help 577 It is possible to time out sending a network packet. The timeout 578 time is configurable run-time in the application code. For network 579 sockets timeout is configured per socket with 580 setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, ...) function. 581 582config NET_TEST 583 bool "Network Testing" 584 help 585 Used for self-contained networking tests that do not require a 586 network device. 587 588config NET_SLIP_TAP 589 bool "TAP SLIP driver" 590 depends on NET_QEMU_SLIP 591 depends on NET_NATIVE 592 select SLIP 593 select UART_PIPE 594 select UART_INTERRUPT_DRIVEN 595 select SLIP_TAP 596 default y if (QEMU_TARGET && !NET_TEST && !NET_L2_BT) 597 help 598 SLIP TAP support is necessary when testing with QEMU. The host 599 needs to have tunslip6 with TAP support running in order to 600 communicate via the SLIP driver. See net-tools project at 601 https://github.com/zephyrproject-rtos/net-tools for more details. 602 603config NET_TRICKLE 604 bool "Enable Trickle library" 605 help 606 Normally this is enabled automatically if needed, 607 so say 'n' if unsure. 608 609if NET_TRICKLE 610module = NET_TRICKLE 611module-dep = NET_LOG 612module-str = Log level for Trickle algorithm 613module-help = Enables Trickle library output debug messages 614source "subsys/net/Kconfig.template.log_config.net" 615endif # NET_TRICKLE 616 617endif # NET_RAW_MODE 618 619config NET_PKT_RX_COUNT 620 int "How many packet receives can be pending at the same time" 621 default 14 if NET_L2_ETHERNET 622 default 4 623 help 624 Each RX buffer will occupy smallish amount of memory. 625 See include/net/net_pkt.h and the sizeof(struct net_pkt) 626 627config NET_PKT_TX_COUNT 628 int "How many packet sends can be pending at the same time" 629 default 14 if NET_L2_ETHERNET 630 default 4 631 help 632 Each TX buffer will occupy smallish amount of memory. 633 See include/net/net_pkt.h and the sizeof(struct net_pkt) 634 635config NET_BUF_RX_COUNT 636 int "How many network buffers are allocated for receiving data" 637 default 36 if NET_L2_ETHERNET 638 default 16 639 help 640 Each data buffer will occupy CONFIG_NET_BUF_DATA_SIZE + smallish 641 header (sizeof(struct net_buf)) amount of data. 642 643config NET_BUF_TX_COUNT 644 int "How many network buffers are allocated for sending data" 645 default 36 if NET_L2_ETHERNET 646 default 16 647 help 648 Each data buffer will occupy CONFIG_NET_BUF_DATA_SIZE + smallish 649 header (sizeof(struct net_buf)) amount of data. 650 651choice 652 prompt "Network packet data allocator type" 653 default NET_BUF_FIXED_DATA_SIZE 654 help 655 Select the memory allocator for the network buffers that hold the 656 packet data. 657 658config NET_BUF_FIXED_DATA_SIZE 659 bool "Fixed data size buffer" 660 help 661 Each buffer comes with a built time configured size. If runtime 662 requested is bigger than that, it will allocate as many net_buf 663 as necessary to reach that request. 664 665config NET_BUF_VARIABLE_DATA_SIZE 666 bool "Variable data size buffer [EXPERIMENTAL]" 667 help 668 The buffer is dynamically allocated from runtime requested size. 669 670endchoice 671 672config NET_BUF_DATA_SIZE 673 int "Size of each network data fragment" 674 default 128 675 depends on NET_BUF_FIXED_DATA_SIZE 676 help 677 This value tells what is the fixed size of each network buffer. 678 679config NET_BUF_DATA_POOL_SIZE 680 int "Size of the memory pool where buffers are allocated from" 681 default 4096 if NET_L2_ETHERNET 682 default 2048 683 depends on NET_BUF_VARIABLE_DATA_SIZE 684 help 685 This value tell what is the size of the memory pool where each 686 network buffer is allocated from. 687 688config NET_HEADERS_ALWAYS_CONTIGUOUS 689 bool 690 help 691 This a hidden option, which one should use with a lot of care. 692 NO bug reports will be accepted if that option is enabled! 693 You are warned. 694 If you are 100% sure the headers memory space is always in a 695 contiguous space, this will save stack usage and ROM in net core. 696 This is a possible case when using IPv4 only, with 697 NET_BUF_FIXED_DATA_SIZE enabled and NET_BUF_DATA_SIZE of 128 for 698 instance. 699 700choice 701 prompt "Default Network Interface" 702 default NET_DEFAULT_IF_FIRST 703 help 704 If system has multiple interfaces enabled, then user shall be able 705 to choose default interface. Otherwise first interface will be the 706 default interface. 707 708config NET_DEFAULT_IF_FIRST 709 bool "First available interface" 710 711config NET_DEFAULT_IF_ETHERNET 712 bool "Ethernet" 713 depends on NET_L2_ETHERNET 714 715config NET_DEFAULT_IF_BLUETOOTH 716 bool "Bluetooth" 717 depends on NET_L2_BT 718 719config NET_DEFAULT_IF_IEEE802154 720 bool "IEEE 802.15.4" 721 depends on NET_L2_IEEE802154 722 723config NET_DEFAULT_IF_OFFLOAD 724 bool "Offloaded interface" 725 depends on NET_OFFLOAD 726 727config NET_DEFAULT_IF_DUMMY 728 bool "Dummy testing interface" 729 depends on NET_L2_DUMMY 730 731config NET_DEFAULT_IF_CANBUS 732 bool "6LoCAN (IPv6 over CAN) interface" 733 depends on NET_L2_CANBUS 734 735config NET_DEFAULT_IF_CANBUS_RAW 736 bool "Socket CAN interface" 737 depends on NET_L2_CANBUS_RAW 738 739config NET_DEFAULT_IF_PPP 740 bool "PPP interface" 741 depends on NET_L2_PPP 742 743endchoice 744 745config NET_PKT_TIMESTAMP 746 bool "Enable network packet timestamp support" 747 help 748 Enable network packet timestamp support. This is needed for 749 example in gPTP which needs to know how long it takes to send 750 a network packet. 751 752config NET_PKT_TIMESTAMP_THREAD 753 bool "Create TX timestamp thread" 754 default y if NET_GPTP 755 depends on NET_PKT_TIMESTAMP 756 help 757 Create a TX timestamp thread that will pass the timestamped network 758 packets to some other module like gPTP for further processing. 759 If you just want to timestamp network packets and get information 760 how long the network packets flow in the system, you can disable 761 the thread support. 762 763config NET_PKT_TIMESTAMP_STACK_SIZE 764 int "Timestamp thread stack size" 765 default 1024 766 depends on NET_PKT_TIMESTAMP_THREAD 767 help 768 Set the timestamp thread stack size in bytes. The timestamp 769 thread waits for timestamped TX frames and calls registered 770 callbacks. 771 772config NET_PKT_TXTIME 773 bool "Enable network packet TX time support" 774 help 775 Enable network packet TX time support. This is needed for 776 when the application wants to set the exact time when the network 777 packet should be sent. 778 779config NET_PKT_RXTIME_STATS 780 bool "Enable network packet RX time statistics" 781 select NET_PKT_TIMESTAMP 782 select NET_STATISTICS 783 depends on (NET_UDP || NET_TCP || NET_SOCKETS_PACKET) && NET_NATIVE 784 help 785 Enable network packet RX time statistics support. This is used to 786 calculate how long on average it takes for a packet to travel from 787 device driver to just before it is given to application. The RX 788 timing information can then be seen in network interface statistics 789 in net-shell. 790 The RX statistics are only calculated for UDP and TCP packets. 791 792config NET_PKT_RXTIME_STATS_DETAIL 793 bool "Get extra receive detail statistics in RX path" 794 depends on NET_PKT_RXTIME_STATS 795 help 796 Store receive statistics detail information in certain key points 797 in RX path. This is very special configuration and will increase 798 the size of net_pkt so in typical cases you should not enable it. 799 The extra statistics can be seen in net-shell using "net stats" 800 command. 801 802config NET_PKT_TXTIME_STATS 803 bool "Enable network packet TX time statistics" 804 select NET_PKT_TIMESTAMP 805 select NET_STATISTICS 806 depends on (NET_UDP || NET_TCP || NET_SOCKETS_PACKET) && NET_NATIVE 807 help 808 Enable network packet TX time statistics support. This is used to 809 calculate how long on average it takes for a packet to travel from 810 application to just before it is sent to network. The TX timing 811 information can then be seen in network interface statistics in 812 net-shell. 813 The RX calculation is done only for UDP, TCP or RAW packets, 814 but for TX we do not know the protocol so the TX packet timing is 815 done for all network protocol packets. 816 817config NET_PKT_TXTIME_STATS_DETAIL 818 bool "Get extra transmit detail statistics in TX path" 819 depends on NET_PKT_TXTIME_STATS 820 help 821 Store receive statistics detail information in certain key points 822 in TX path. This is very special configuration and will increase 823 the size of net_pkt so in typical cases you should not enable it. 824 The extra statistics can be seen in net-shell using "net stats" 825 command. 826 827config NET_PROMISCUOUS_MODE 828 bool "Enable promiscuous mode support [EXPERIMENTAL]" 829 select NET_MGMT 830 select NET_MGMT_EVENT 831 select NET_L2_ETHERNET_MGMT if NET_L2_ETHERNET 832 help 833 Enable promiscuous mode support. This only works if the network 834 device driver supports promiscuous mode. The user application 835 also needs to read the promiscuous mode data. 836 837if NET_PROMISCUOUS_MODE 838module = NET_PROMISC 839module-dep = NET_LOG 840module-str = Log level for promiscuous mode 841module-help = Enables promiscuous mode to output debug messages. 842source "subsys/net/Kconfig.template.log_config.net" 843endif # NET_PROMISCUOUS_MODE 844 845config NET_DISABLE_ICMP_DESTINATION_UNREACHABLE 846 bool "Disable destination unreachable ICMP errors" 847 help 848 Suppress the generation of ICMP destination unreachable errors 849 when ports that are not in a listening state receive packets. 850 851source "subsys/net/ip/Kconfig.stack" 852 853source "subsys/net/ip/Kconfig.mgmt" 854 855source "subsys/net/ip/Kconfig.stats" 856 857source "subsys/net/ip/Kconfig.debug" 858 859endmenu 860