1# IP stack config 2 3# Copyright (c) 2016 Intel Corporation. 4# Copyright (c) 2021 Nordic Semiconductor 5# Copyright (c) 2023 Arm Limited (or its affiliates). All rights reserved. 6# SPDX-License-Identifier: Apache-2.0 7 8menu "IP stack" 9 10# Hidden option enabled whenever an IP stack is available. 11config NET_IP 12 bool 13 default y if NET_IPV6 || NET_IPV4 14 15# Hidden option enabled whenever an IP fragmentation is enabled. 16config NET_IP_FRAGMENT 17 bool 18 default y if NET_IPV6_FRAGMENT || NET_IPV4_FRAGMENT 19 20# Hidden option selected by net connection based socket implementations 21# to draw in all code required for connection infrastructure. 22config NET_CONNECTION_SOCKETS 23 bool 24 25config NET_NATIVE 26 bool "Native network stack support" 27 default y 28 help 29 Enables Zephyr native IP stack. If you disable this, then 30 you need to enable the offloading support if you want to 31 have IP connectivity. 32 33# Hidden options for enabling native IPv6/IPv4. Using these options 34# avoids having "defined(CONFIG_NET_IPV6) && defined(CONFIG_NET_NATIVE)" 35# in the code as we can have "defined(CONFIG_NET_NATIVE_IPV6)" instead. 36config NET_NATIVE_IP 37 bool 38 depends on NET_NATIVE 39 default y if NET_IP 40 41config NET_NATIVE_IPV6 42 bool 43 depends on NET_NATIVE 44 default y if NET_IPV6 45 46config NET_NATIVE_IPV4 47 bool 48 depends on NET_NATIVE 49 default y if NET_IPV4 50 51config NET_PMTU 52 bool 53 select NET_MGMT 54 select NET_MGMT_EVENT 55 select NET_MGMT_EVENT_INFO 56 default y 57 depends on NET_IPV6_PMTU || NET_IPV4_PMTU 58 59if NET_PMTU 60module = NET_PMTU 61module-dep = NET_LOG 62module-str = Log level for PMTU 63module-help = Enables PMTU to output debug messages. 64source "subsys/net/Kconfig.template.log_config.net" 65endif # NET_PMTU 66 67config NET_NATIVE_TCP 68 bool 69 depends on NET_NATIVE 70 default y if NET_TCP 71 72config NET_NATIVE_UDP 73 bool 74 depends on NET_NATIVE 75 default y if NET_UDP 76 77config NET_OFFLOAD 78 bool "Offload IP stack" 79 help 80 Enables TCP/IP stack to be offload to a co-processor. 81 82config NET_OFFLOADING_SUPPORT 83 bool 84 default y if NET_OFFLOAD || NET_SOCKETS_OFFLOAD 85 help 86 Hidden option that is set if either NET_OFFLOAD or 87 NET_SOCKETS_OFFLOAD is set. This allows us to check 88 only one option instead of two. 89 90if NET_OFFLOAD 91module = NET_OFFLOAD 92module-dep = NET_LOG 93module-str = Log level for offload layer 94module-help = Enables offload layer to output debug messages. 95source "subsys/net/Kconfig.template.log_config.net" 96endif # NET_OFFLOAD 97 98config NET_RAW_MODE 99 bool 100 help 101 This is a very specific option used to built only the very minimal 102 part of the net stack in order to get network drivers working without 103 any net stack above: core, L2 etc... Basically this will build only 104 net_pkt part. It is currently used only by IEEE 802.15.4 drivers, 105 though any type of net drivers could use it. 106 107choice NET_QEMU_NETWORKING 108 prompt "Qemu networking" 109 default NET_QEMU_PPP if NET_PPP 110 default NET_QEMU_SLIP 111 depends on QEMU_TARGET 112 help 113 Can be used to select how the network connectivity is established 114 from inside qemu to host system. This can be done either via 115 serial connection (SLIP) or via Qemu ethernet driver. 116 117config NET_QEMU_SLIP 118 bool "SLIP" 119 help 120 Connect to host or to another Qemu via SLIP. 121 122config NET_QEMU_PPP 123 bool "PPP" 124 help 125 Connect to host via PPP. 126 127config NET_QEMU_ETHERNET 128 bool "Ethernet" 129 help 130 Connect to host system via Qemu ethernet driver support. One such 131 driver that Zephyr supports is Intel e1000 ethernet driver. 132 133config NET_QEMU_USER 134 bool "SLIRP" 135 help 136 Connect to host system via Qemu's built-in User Networking support. This 137 is implemented using "slirp", which provides a full TCP/IP stack within 138 QEMU and uses that stack to implement a virtual NAT'd network. 139 140endchoice 141 142config NET_QEMU_USER_EXTRA_ARGS 143 string "Qemu User Networking Args" 144 depends on NET_QEMU_USER 145 default "" 146 help 147 Extra arguments passed to QEMU when User Networking is enabled. This may 148 include host / guest port forwarding, device id, Network address 149 information etc. This string is appended to the QEMU "-net user" option. 150 151if !NET_RAW_MODE 152 153config NET_INIT_PRIO 154 int 155 default 90 156 help 157 Network initialization priority level. This number tells how 158 early in the boot the network stack is initialized. 159 160config NET_IP_DSCP_ECN 161 bool "DSCP/ECN processing at IP layer" 162 depends on NET_IP 163 default y 164 help 165 Specify whether DSCP/ECN values are processed at IP layer. The values 166 are encoded within ToS field in IPv4 and TC field in IPv6. 167 168source "subsys/net/ip/Kconfig.ipv6" 169 170source "subsys/net/ip/Kconfig.ipv4" 171 172config NET_IPV4_MAPPING_TO_IPV6 173 bool "Support IPv4 mapped on IPv6 addresses" 174 depends on NET_NATIVE_IPV6 175 help 176 Support v4-mapped-on-v6 address type. This allows IPv4 and IPv6 177 to share a local port space. When the application gets an IPv4 178 connection or packet to an IPv6 socket, its source address will 179 be mapped to IPv6. This is turned off by default which means 180 that IPV6_V6ONLY socket option is always on. If you enable this 181 option, then you can still control the behaviour of the socket 182 via the IPV6_V6ONLY option at runtime. 183 184config NET_SHELL 185 bool "Network shell utilities" 186 select SHELL 187 select NET_IPV4_IGMP if NET_NATIVE_IPV4 188 select REQUIRES_FLOAT_PRINTF 189 help 190 Activate shell module that provides network commands like 191 ping to the console. 192 193if NET_SHELL 194 195config NET_SHELL_SHOW_DISABLED_COMMANDS 196 bool "Show disabled command information" 197 default y 198 help 199 By default all the network shell commands are there and the 200 command itself will print out that it is disabled and how to 201 enable it. If you do not need this and only want to see the 202 commands that you can actively use, then you can save a little 203 bit of flash by not showing commands that cannot be used with 204 current configuration. 205 206config NET_SHELL_ETHERNET_SUPPORTED 207 bool "Ethernet related configuration" 208 default y 209 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_L2_ETHERNET 210 211config NET_SHELL_CAPTURE_SUPPORTED 212 bool "Packet capture configuration" 213 default y 214 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_CAPTURE 215 216config NET_SHELL_DHCPV4_SUPPORTED 217 bool "DHCPv4 start / stop" 218 default y 219 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_DHCPV4_SERVER || NET_DHCPV4 220 221config NET_SHELL_DHCPV6_SUPPORTED 222 bool "DHCPv6 start / stop" 223 default y 224 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_DHCPV6 225 226config NET_SHELL_DNS_RESOLVER_SUPPORTED 227 bool "DNS resolver" 228 default y 229 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || DNS_RESOLVER 230 231config NET_SHELL_EVENT_MONITOR_SUPPORTED 232 bool "Network management event monitoring configuration" 233 default y 234 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_MGMT_EVENT_MONITOR 235 236config NET_SHELL_GPTP_SUPPORTED 237 bool "gPTP monitoring" 238 default y 239 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_GPTP 240 241config NET_SHELL_HTTP_SERVER_SUPPORTED 242 bool "HTTP server status" 243 default y 244 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || HTTP_SERVER 245 246config NET_SHELL_CONNECTION_MANAGER_SUPPORTED 247 bool "Connection manager status" 248 default y 249 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_CONNECTION_MANAGER 250 251config NET_SHELL_IPV4_SUPPORTED 252 bool "IPv4 config" 253 default y 254 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || (NET_NATIVE_IPV4 && NET_IPV4) 255 256config NET_SHELL_IPV6_SUPPORTED 257 bool "IPv6 config" 258 default y 259 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || (NET_NATIVE_IPV6 && NET_IPV6) 260 261config NET_SHELL_IP_SUPPORTED 262 bool "Generic IP utilities" 263 default y 264 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_IP 265 266config NET_SHELL_PKT_ALLOC_SUPPORTED 267 bool "Packet allocation monitoring" 268 default y 269 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_DEBUG_NET_PKT_ALLOC 270 271config NET_SHELL_PMTU_SUPPORTED 272 bool "PMTU config" 273 default y 274 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_PMTU 275 276config NET_SHELL_PPP_SUPPORTED 277 bool "PPP config" 278 default y 279 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_L2_PPP 280 281config NET_SHELL_POWER_MANAGEMENT_SUPPORTED 282 bool "Network power management resume / suspend" 283 default y 284 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_POWER_MANAGEMENT 285 286config NET_SHELL_ROUTE_SUPPORTED 287 bool "IP routing config" 288 default y 289 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || (NET_ROUTE && NET_NATIVE) 290 291config NET_SHELL_SOCKETS_SERVICE_SUPPORTED 292 bool "Socket service status" 293 default y 294 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_SOCKETS_SERVICE 295 296config NET_SHELL_STATISTICS_SUPPORTED 297 bool "Network statistics monitoring" 298 default y 299 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_STATISTICS 300 301config NET_SHELL_TCP_SUPPORTED 302 bool "Send / receive TCP data" 303 default y 304 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || (NET_NATIVE_TCP && NET_TCP) 305 306config NET_SHELL_UDP_SUPPORTED 307 bool "Send / receive UDP data" 308 default y 309 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || (NET_NATIVE_UDP && NET_UDP) 310 311config NET_SHELL_VIRTUAL_SUPPORTED 312 bool "Virtual network interface management" 313 default y 314 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_L2_VIRTUAL 315 316config NET_SHELL_VLAN_SUPPORTED 317 bool "Virtual LAN config" 318 default y 319 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || NET_VLAN 320 321config NET_SHELL_WEBSOCKET_SUPPORTED 322 bool "Websocket client status" 323 default y 324 depends on NET_SHELL_SHOW_DISABLED_COMMANDS || WEBSOCKET_CLIENT 325 326config NET_SHELL_DYN_CMD_COMPLETION 327 bool "Network shell dynamic command completion" 328 default y 329 help 330 Enable various net-shell command to support dynamic command 331 completion. This means that for example the nbr command can 332 automatically complete the neighboring IPv6 address and user 333 does not need to type it manually. 334 Please note that this uses more memory in order to save the 335 dynamic command strings. For example for nbr command the 336 increase is 320 bytes (8 neighbors * 40 bytes for IPv6 address 337 length) by default. Other dynamic completion commands in 338 net-shell require also some smaller amount of memory. 339 340config NET_SHELL_REQUIRE_TX_THREAD 341 bool 342 depends on SHELL_BACKEND_TELNET || SHELL_BACKEND_MQTT 343 default y if NET_ARP 344 help 345 Hidden symbol indicating that network shell requires separate TX 346 thread due to possible deadlocks during shell/net stack operations. 347 348endif # NET_SHELL 349 350config NET_TC_TX_COUNT 351 int "How many Tx traffic classes to have for each network device" 352 default 1 if USERSPACE || USB_DEVICE_NETWORK || \ 353 NET_SHELL_REQUIRE_TX_THREAD 354 default 0 355 range 1 NET_TC_NUM_PRIORITIES if NET_TC_NUM_PRIORITIES<=8 && \ 356 (USERSPACE || NET_SHELL_REQUIRE_TX_THREAD) 357 range 0 NET_TC_NUM_PRIORITIES if NET_TC_NUM_PRIORITIES<=8 358 range 1 8 if USERSPACE || NET_SHELL_REQUIRE_TX_THREAD 359 range 0 8 360 help 361 Define how many Tx traffic classes (queues) the system should have 362 when sending a network packet. The network packet priority can then 363 be mapped to this traffic class so that higher prioritized packets 364 can be processed before lower prioritized ones. Each queue is handled 365 by a separate thread which will need RAM for stack space. 366 Only increase the value from 1 if you really need this feature. 367 The default value is 1 which means that all the network traffic is 368 handled equally. In this implementation, the higher traffic class 369 value corresponds to lower thread priority. 370 If you select 0 here, then it means that all the network traffic 371 is pushed to the driver directly without any queues. 372 Note that if USERSPACE support is enabled, then currently we need to 373 enable at least 1 TX thread. 374 375config NET_TC_RX_COUNT 376 int "How many Rx traffic classes to have for each network device" 377 default 1 378 range 1 NET_TC_NUM_PRIORITIES if NET_TC_NUM_PRIORITIES<=8 && USERSPACE 379 range 0 NET_TC_NUM_PRIORITIES if NET_TC_NUM_PRIORITIES<=8 380 range 1 8 if USERSPACE 381 range 0 8 382 help 383 Define how many Rx traffic classes (queues) the system should have 384 when receiving a network packet. The network packet priority can then 385 be mapped to this traffic class so that higher prioritized packets 386 can be processed before lower prioritized ones. Each queue is handled 387 by a separate thread which will need RAM for stack space. 388 Only increase the value from 1 if you really need this feature. 389 The default value is 1 which means that all the network traffic is 390 handled equally. In this implementation, the higher traffic class 391 value corresponds to lower thread priority. 392 If you select 0 here, then it means that all the network traffic 393 is pushed from the driver to application thread without any 394 intermediate RX queue. There is always a receive socket queue between 395 device driver and application. Disabling RX thread means that the 396 network device driver, that is typically running in IRQ context, will 397 handle the packet all the way to the application. This might cause 398 other incoming packets to be lost if the RX processing takes long 399 time. 400 Note that if USERSPACE support is enabled, then currently we need to 401 enable at least 1 RX thread. 402 403config NET_TC_SKIP_FOR_HIGH_PRIO 404 bool "Push high priority packets directly to network driver [DEPRECATED]" 405 select DEPRECATED 406 help 407 Deprecated, use NET_TC_TX_SKIP_FOR_HIGH_PRIO instead. 408 409config NET_TC_TX_SKIP_FOR_HIGH_PRIO 410 bool "Push high priority packets directly to network driver" 411 default NET_TC_SKIP_FOR_HIGH_PRIO 412 help 413 If this is set, then high priority (>= NET_PRIORITY_CA) net_pkt will 414 be pushed directly to network driver and will skip the traffic class 415 queues. This is currently not enabled by default. 416 417config NET_TC_RX_SKIP_FOR_HIGH_PRIO 418 bool "Push high priority packets directly to the application" 419 help 420 If this is set, then high priority (>= NET_PRIORITY_CA) net_pkt will 421 be pushed directly to the application and will skip the traffic class 422 queues. If you select this option, then it means that high priority 423 network traffic is pushed from the driver to the application thread 424 without any intermediate RX queue. If the network device driver is 425 running in IRQ context, it will handle the packet all the way to the 426 application. This might cause other incoming packets to be lost if 427 the RX processing takes long time. 428 This is currently not enabled by default. 429 430choice NET_TC_THREAD_TYPE 431 prompt "How the network RX/TX threads should work" 432 help 433 Please select the RX/TX threads to be either pre-emptive or 434 co-operative. 435 436config NET_TC_THREAD_COOPERATIVE 437 bool "Use co-operative TX/RX threads" 438 depends on COOP_ENABLED 439 help 440 With co-operative threads, the thread cannot be pre-empted. 441 442config NET_TC_THREAD_PREEMPTIVE 443 bool "Use pre-emptive TX/RX threads [EXPERIMENTAL]" 444 depends on PREEMPT_ENABLED 445 select EXPERIMENTAL 446 help 447 With pre-emptive threads, the thread can be pre-empted. 448 449endchoice 450 451config NET_TC_NUM_PRIORITIES 452 int 453 default NUM_COOP_PRIORITIES if NET_TC_THREAD_COOPERATIVE 454 default NUM_PREEMPT_PRIORITIES if NET_TC_THREAD_PREEMPTIVE 455 456config NET_TC_THREAD_PRIO_CUSTOM 457 bool "Customize traffic class thread priority" 458 help 459 Customise net threads priority by each. 460 461if NET_TC_THREAD_PRIO_CUSTOM 462config NET_TC_TX_THREAD_BASE_PRIO 463 int "Transmit traffic class base thread priority" 464 default 0 465 help 466 Transmit traffic class threads priority will increase/decrease 467 from this priority. 468 If NET_TC_TX_COUNT is 1, this will be transmit traffic class 469 thread priority. 470 471config NET_TC_RX_THREAD_BASE_PRIO 472 int "Receive traffic class base thread priority" 473 default 0 474 help 475 Receive traffic class threads priority will increase/decrease 476 from this priority. 477 If NET_TC_RX_COUNT is 1, this will be receive traffic class 478 thread priority. 479 480endif # NET_TC_THREAD_CUSTOM_PRIO 481 482choice 483 prompt "Priority to traffic class mapping" 484 help 485 Select mapping to use to map network packet priorities to traffic 486 classes. 487 488config NET_TC_MAPPING_STRICT 489 bool "Strict priority mapping" 490 help 491 This is the recommended default priority to traffic class mapping. 492 Use it for implementations that do not support the credit-based 493 shaper transmission selection algorithm. 494 See 802.1Q, chapter 8.6.6 for more information. 495 496config NET_TC_MAPPING_SR_CLASS_A_AND_B 497 bool "SR class A and class B mapping" 498 depends on NET_TC_TX_COUNT >= 2 499 depends on NET_TC_RX_COUNT >= 2 500 help 501 This is the recommended priority to traffic class mapping for a 502 system that supports SR (Stream Reservation) class A and SR class B. 503 See 802.1Q, chapter 34.5 for more information. 504 505config NET_TC_MAPPING_SR_CLASS_B_ONLY 506 bool "SR class B only mapping" 507 depends on NET_TC_TX_COUNT >= 2 508 depends on NET_TC_RX_COUNT >= 2 509 help 510 This is the recommended priority to traffic class mapping for a 511 system that supports SR (Stream Reservation) class B only. 512 See 802.1Q, chapter 34.5 for more information. 513endchoice 514 515config NET_TX_DEFAULT_PRIORITY 516 int "Default network TX packet priority if none have been set" 517 default 1 518 range 0 7 519 help 520 What is the default network packet priority if user has not specified 521 one. The value 0 means lowest priority and 7 is the highest. 522 523config NET_RX_DEFAULT_PRIORITY 524 int "Default network RX packet priority if none have been set" 525 default 0 526 range 0 7 527 help 528 What is the default network RX packet priority if user has not set 529 one. The value 0 means lowest priority and 7 is the highest. 530 531config NET_ALLOW_ANY_PRIORITY 532 bool "Allow any network packet priority to be used" 533 help 534 If this is set, then any user given network packet priority can be used. Otherwise 535 the network packet priorities are limited to 0-7 range. 536 537config NET_IP_ADDR_CHECK 538 bool "Check IP address validity before sending IP packet" 539 default y 540 help 541 Check that either the source or destination address is 542 correct before sending either IPv4 or IPv6 network packet. 543 544config NET_MAX_ROUTERS 545 int "How many routers are supported" 546 default 2 if NET_IPV4 && NET_IPV6 547 default 1 if NET_IPV4 && !NET_IPV6 548 default 1 if !NET_IPV4 && NET_IPV6 549 range 1 254 550 help 551 The value depends on your network needs. 552 553# Normally the route support is enabled by RPL or similar technology 554# that needs to use the routing infrastructure. 555config NET_ROUTE 556 bool 557 depends on NET_IPV6_NBR_CACHE 558 default y if NET_IPV6_NBR_CACHE 559 560# Temporarily hide the routing option as we do not have RPL in the system 561# that used to populate the routing table. 562config NET_ROUTING 563 bool 564 depends on NET_ROUTE 565 help 566 Allow IPv6 routing between different network interfaces and 567 technologies. Currently this has limited use as some entity 568 would need to populate the routing table. RPL used to do that 569 earlier but currently there is no RPL support in Zephyr. 570 571config NET_MAX_ROUTES 572 int "Max number of routing entries stored." 573 default NET_IPV6_MAX_NEIGHBORS 574 depends on NET_ROUTE 575 help 576 This determines how many entries can be stored in routing table. 577 578config NET_MAX_NEXTHOPS 579 int "Max number of next hop entries stored." 580 default NET_MAX_ROUTES 581 depends on NET_ROUTE 582 help 583 This determines how many entries can be stored in nexthop table. 584 585config NET_ROUTE_MCAST 586 bool "Multicast Routing / Forwarding" 587 depends on NET_ROUTE 588 help 589 Activates multicast routing/forwarding 590 591config NET_MAX_MCAST_ROUTES 592 int "Max number of multicast routing entries stored." 593 default 1 594 depends on NET_ROUTE_MCAST 595 help 596 This determines how many entries can be stored in multicast 597 routing table. 598 599config NET_MCAST_ROUTE_MAX_IFACES 600 int "Max number of network interfaces per multicast routing entry" 601 default 1 602 range 1 8 603 depends on NET_ROUTE_MCAST 604 help 605 Determines how many network interfaces can be assigned to a 606 single multicast route entry. 607 608config NET_MCAST_ROUTE_MLD_REPORTS 609 bool "Report multicast routes as a part of MLDv2 reports" 610 depends on NET_ROUTE_MCAST 611 depends on NET_IPV6_MLD 612 help 613 Determines whether a multicast route entry should be advertised 614 in MLDv2 reports. 615 616source "subsys/net/ip/Kconfig.tcp" 617 618config NET_TEST_PROTOCOL 619 bool "JSON based test protocol (UDP)" 620 help 621 Enable JSON based test protocol (UDP). 622 623config NET_UDP 624 bool "UDP" 625 default y 626 depends on NET_IP 627 help 628 The value depends on your network needs. 629 630config NET_UDP_CHECKSUM 631 bool "Check UDP checksum" 632 default y 633 depends on NET_UDP 634 help 635 Enables UDP handler to check UDP checksum. If the checksum is invalid, 636 then the packet is discarded. 637 638config NET_UDP_MISSING_CHECKSUM 639 bool "Accept missing checksum (IPv4 only)" 640 default y 641 depends on NET_UDP && NET_IPV4 642 help 643 RFC 768 states the possibility to have a missing checksum, for 644 debugging purposes for instance. That feature is however valid only 645 for IPv4 and on reception only, since Zephyr will always compute the 646 UDP checksum in transmission path. 647 648if NET_UDP 649module = NET_UDP 650module-dep = NET_LOG 651module-str = Log level for UDP 652module-help = Enables UDP handler output debug messages 653source "subsys/net/Kconfig.template.log_config.net" 654endif # NET_UDP 655 656config NET_MAX_CONN 657 int "How many network connections are supported" 658 depends on NET_UDP || NET_TCP || NET_SOCKETS_PACKET || NET_SOCKETS_CAN 659 default 8 if NET_IPV6 && NET_IPV4 660 default 4 661 help 662 The value depends on your network needs. The value 663 should include both UDP and TCP connections. 664 665config NET_MAX_CONTEXTS 666 int "Number of network contexts to allocate" 667 default 6 668 help 669 Each network context is used to describe a network 5-tuple that 670 is used when listening or sending network traffic. This is very 671 similar as one could call a network socket in some other systems. 672 673config NET_CONTEXT_NET_PKT_POOL 674 bool "Net_buf TX pool / context" 675 default y if NET_TCP && NET_6LO 676 help 677 If enabled, then it is possible to fine-tune network packet pool 678 for each context when sending network data. If this setting is 679 enabled, then you should define the context pools in your application 680 using NET_PKT_TX_POOL_DEFINE() and NET_PKT_DATA_POOL_DEFINE() 681 macros and tie these pools to desired context using the 682 net_context_setup_pools() function. 683 684config NET_CONTEXT_SYNC_RECV 685 bool "Support synchronous functionality in net_context_recv() API" 686 default y 687 help 688 You can disable sync support to save some memory if you are calling 689 net_context_recv() in async way only when timeout is set to 0. 690 691config NET_CONTEXT_CHECK 692 bool "Check options when calling various net_context functions" 693 default y 694 help 695 If you know that the options passed to net_context...() functions 696 are ok, then you can disable the checks to save some memory. 697 698config NET_CONTEXT_PRIORITY 699 bool "Add priority support to net_context" 700 help 701 It is possible to prioritize network traffic. This requires 702 also traffic class support to work as expected. 703 704config NET_CONTEXT_TXTIME 705 bool "Add TXTIME support to net_context" 706 select NET_PKT_TXTIME 707 help 708 It is possible to add information when the outgoing network packet 709 should be sent. The TX time information should be placed into 710 ancillary data field in sendmsg call. 711 712config NET_CONTEXT_RCVTIMEO 713 bool "Add RCVTIMEO support to net_context" 714 help 715 It is possible to time out receiving a network packet. The timeout 716 time is configurable run-time in the application code. For network 717 sockets timeout is configured per socket with 718 setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, ...) function. 719 720config NET_CONTEXT_SNDTIMEO 721 bool "Add SNDTIMEO support to net_context" 722 help 723 It is possible to time out sending a network packet. The timeout 724 time is configurable run-time in the application code. For network 725 sockets timeout is configured per socket with 726 setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, ...) function. 727 728config NET_CONTEXT_RCVBUF 729 bool "Add RCVBUF support to net_context" 730 help 731 If is possible to define the maximum socket receive buffer per socket. 732 The default value is set by CONFIG_NET_TCP_MAX_RECV_WINDOW_SIZE. For 733 TCP sockets, the rcvbuf will determine the receive window size. 734 735config NET_CONTEXT_SNDBUF 736 bool "Add SNDBUF support to net_context" 737 help 738 It is possible to define the maximum socket send buffer per socket. 739 For TCP sockets, the sndbuf will determine the total size of queued 740 data in the TCP layer. 741 742config NET_CONTEXT_DSCP_ECN 743 bool "Add support for setting DSCP/ECN IP properties on net_context" 744 depends on NET_IP_DSCP_ECN 745 default y 746 help 747 Allow to set Differentiated Services and Explicit Congestion 748 Notification values on net_context. Those values are then used in 749 IPv4/IPv6 header when sending packets over net_context. 750 751config NET_CONTEXT_REUSEADDR 752 bool "Add REUSEADDR support to net_context" 753 default y if NET_TCP || NET_UDP 754 help 755 Allow to set the SO_REUSEADDR flag on a socket. This enables multiple 756 sockets to bind to the same local IP address. 757 758config NET_CONTEXT_REUSEPORT 759 bool "Add REUSEPORT support to net_context" 760 default y if NET_TCP || NET_UDP 761 help 762 Allow to set the SO_REUSEPORT flag on a socket. This enables multiple 763 sockets to bind to the same local IP address and port combination. 764 765config NET_CONTEXT_RECV_PKTINFO 766 bool "Add receive PKTINFO support to net_context" 767 depends on NET_UDP 768 help 769 Allow to set the IP_PKTINFO or IPV6_RECVPKTINFO flags on a socket. 770 This way user can get extra information about the received data in the 771 socket. 772 773config NET_CONTEXT_TIMESTAMPING 774 bool "Add TIMESTAMPING support to net_context" 775 default y if (NET_UDP && NET_PKT_TIMESTAMP) 776 help 777 Allow to set the TIMESTAMPING option on a socket. This way timestamp for a network 778 packet will be added to the net_pkt structure. 779 780config NET_CONTEXT_CLAMP_PORT_RANGE 781 bool "Allow clamping down the global local port range for net_context" 782 depends on NET_UDP || NET_TCP 783 help 784 Set or get the per-context default local port range. This 785 option can be used to clamp down the global local UDP/TCP port 786 range for a given context. The port range is typically set by 787 IP_LOCAL_PORT_RANGE socket option. 788 789endif # NET_RAW_MODE 790 791config NET_SLIP_TAP 792 bool "TAP SLIP driver" 793 depends on NET_QEMU_SLIP 794 depends on NET_NATIVE 795 select SLIP 796 select UART_PIPE 797 select UART_INTERRUPT_DRIVEN 798 select SLIP_TAP 799 select NET_L2_ETHERNET 800 default y if (QEMU_TARGET && !NET_TEST) 801 help 802 SLIP TAP support is necessary when testing with QEMU. The host 803 needs to have tunslip6 with TAP support running in order to 804 communicate via the SLIP driver. See net-tools project at 805 https://github.com/zephyrproject-rtos/net-tools for more details. 806 807config NET_TEST 808 bool "Network Testing" 809 help 810 Used for self-contained networking tests that do not require a 811 network device. 812 813config NET_PKT_RX_COUNT 814 int "How many packet receives can be pending at the same time" 815 default 14 if NET_L2_ETHERNET 816 default 4 817 help 818 Each RX buffer will occupy smallish amount of memory. 819 See include/net/net_pkt.h and the sizeof(struct net_pkt) 820 821config NET_PKT_TX_COUNT 822 int "How many packet sends can be pending at the same time" 823 default 14 if NET_L2_ETHERNET 824 default 4 825 help 826 Each TX buffer will occupy smallish amount of memory. 827 See include/net/net_pkt.h and the sizeof(struct net_pkt) 828 829config NET_BUF_RX_COUNT 830 int "How many network buffers are allocated for receiving data" 831 default 36 if NET_L2_ETHERNET 832 default 16 833 help 834 Each data buffer will occupy CONFIG_NET_BUF_DATA_SIZE + smallish 835 header (sizeof(struct net_buf)) amount of data. 836 837config NET_BUF_TX_COUNT 838 int "How many network buffers are allocated for sending data" 839 default 36 if NET_L2_ETHERNET 840 default 16 841 help 842 Each data buffer will occupy CONFIG_NET_BUF_DATA_SIZE + smallish 843 header (sizeof(struct net_buf)) amount of data. 844 845choice NET_PKT_DATA_ALLOC_TYPE 846 prompt "Network packet data allocator type" 847 default NET_BUF_FIXED_DATA_SIZE 848 help 849 Select the memory allocator for the network buffers that hold the 850 packet data. 851 852config NET_BUF_FIXED_DATA_SIZE 853 bool "Fixed data size buffer" 854 help 855 Each buffer comes with a built time configured size. If runtime 856 requested is bigger than that, it will allocate as many net_buf 857 as necessary to reach that request. 858 859config NET_BUF_VARIABLE_DATA_SIZE 860 bool "Variable data size buffer [EXPERIMENTAL]" 861 select EXPERIMENTAL 862 help 863 The buffer is dynamically allocated from runtime requested size. 864 865endchoice 866 867config NET_BUF_DATA_SIZE 868 int "Size of each network data fragment" 869 default 128 870 depends on NET_BUF_FIXED_DATA_SIZE 871 help 872 This value tells what is the fixed size of each network buffer. 873 874config NET_PKT_BUF_RX_DATA_POOL_SIZE 875 int "Size of the RX memory pool where buffers are allocated from" 876 default 4096 if NET_L2_ETHERNET 877 default 2048 878 depends on NET_BUF_VARIABLE_DATA_SIZE 879 help 880 This value tell what is the size of the RX memory pool where each 881 network buffer is allocated from. 882 883config NET_PKT_BUF_TX_DATA_POOL_SIZE 884 int "Size of the TX memory pool where buffers are allocated from" 885 default 4096 if NET_L2_ETHERNET 886 default 2048 887 depends on NET_BUF_VARIABLE_DATA_SIZE 888 help 889 This value tell what is the size of the TX memory pool where each 890 network buffer is allocated from. 891 892config NET_PKT_BUF_USER_DATA_SIZE 893 int "Size of user_data available in rx and tx network buffers" 894 default 4 895 range 4 16 896 help 897 User data size used in rx and tx network buffers. 898 899config NET_HEADERS_ALWAYS_CONTIGUOUS 900 bool 901 help 902 This a hidden option, which one should use with a lot of care. 903 NO bug reports will be accepted if that option is enabled! 904 You are warned. 905 If you are 100% sure the headers memory space is always in a 906 contiguous space, this will save stack usage and ROM in net core. 907 This is a possible case when using IPv4 only, with 908 NET_BUF_FIXED_DATA_SIZE enabled and NET_BUF_DATA_SIZE of 128 for 909 instance. 910 911# If we are running network tests found in tests/net, then the NET_TEST is 912# set and in that case we default to Dummy L2 layer as typically the tests 913# use that by default. 914choice NET_DEFAULT_IF 915 prompt "Default Network Interface" 916 default NET_DEFAULT_IF_DUMMY if NET_TEST 917 default NET_DEFAULT_IF_FIRST 918 help 919 If system has multiple interfaces enabled, then user shall be able 920 to choose default interface. Otherwise first interface will be the 921 default interface. 922 923config NET_DEFAULT_IF_FIRST 924 bool "First available interface" 925 926config NET_DEFAULT_IF_UP 927 bool "First interface which is up" 928 929config NET_DEFAULT_IF_ETHERNET 930 bool "Ethernet" 931 depends on NET_L2_ETHERNET 932 933config NET_DEFAULT_IF_IEEE802154 934 bool "IEEE 802.15.4" 935 depends on NET_L2_IEEE802154 936 937config NET_DEFAULT_IF_OFFLOAD 938 bool "Offloaded interface" 939 depends on NET_OFFLOAD 940 941config NET_DEFAULT_IF_DUMMY 942 bool "Dummy testing interface" 943 depends on NET_L2_DUMMY 944 945config NET_DEFAULT_IF_CANBUS_RAW 946 bool "Socket CAN interface" 947 depends on NET_L2_CANBUS_RAW 948 949config NET_DEFAULT_IF_PPP 950 bool "PPP interface" 951 depends on NET_L2_PPP 952 953config NET_DEFAULT_IF_OFFLOADED_NETDEV 954 bool "Offloaded network device" 955 956config NET_DEFAULT_IF_WIFI 957 bool "WiFi interface" 958 depends on NET_L2_ETHERNET 959 960endchoice 961 962config NET_INTERFACE_NAME 963 bool "Allow setting a name to a network interface" 964 default y 965 help 966 Allow application to set a name to the network interface in order 967 to simplify network interface management. 968 969config NET_INTERFACE_NAME_LEN 970 int "Network interface max name length" 971 default 8 972 range 2 15 973 depends on NET_INTERFACE_NAME 974 help 975 Maximum length of the network interface name. 976 977config NET_PKT_TIMESTAMP 978 bool "Network packet timestamp support" 979 help 980 Enable network packet timestamp support. This is needed for 981 example in gPTP which needs to know how long it takes to send 982 a network packet or for timed radio protocols like IEEE 802.15.4 983 CSL and TSCH. 984 985config NET_PKT_TIMESTAMP_THREAD 986 bool "Create TX timestamp thread" 987 default y if NET_L2_PTP 988 depends on NET_PKT_TIMESTAMP 989 help 990 Create a TX timestamp thread that will pass the timestamped network 991 packets to some other module like gPTP for further processing. 992 If you just want to timestamp network packets and get information 993 how long the network packets flow in the system, you can disable 994 the thread support. 995 996config NET_PKT_TIMESTAMP_STACK_SIZE 997 int "Timestamp thread stack size" 998 default 1024 999 depends on NET_PKT_TIMESTAMP_THREAD 1000 help 1001 Set the timestamp thread stack size in bytes. The timestamp 1002 thread waits for timestamped TX frames and calls registered 1003 callbacks. 1004 1005config NET_PKT_TXTIME 1006 bool "Network packet TX time support" 1007 help 1008 Enable network packet TX time support. This is needed for 1009 when the application wants to set the exact time when the network 1010 packet should be sent. 1011 1012config NET_PKT_RXTIME_STATS 1013 bool "Network packet RX time statistics" 1014 select NET_PKT_TIMESTAMP 1015 select NET_STATISTICS 1016 depends on (NET_UDP || NET_TCP || NET_SOCKETS_PACKET) && NET_NATIVE 1017 help 1018 Enable network packet RX time statistics support. This is used to 1019 calculate how long on average it takes for a packet to travel from 1020 device driver to just before it is given to application. The RX 1021 timing information can then be seen in network interface statistics 1022 in net-shell. 1023 The RX statistics are only calculated for UDP and TCP packets. 1024 1025config NET_PKT_RXTIME_STATS_DETAIL 1026 bool "Get extra receive detail statistics in RX path" 1027 depends on NET_PKT_RXTIME_STATS 1028 help 1029 Store receive statistics detail information in certain key points 1030 in RX path. This is very special configuration and will increase 1031 the size of net_pkt so in typical cases you should not enable it. 1032 The extra statistics can be seen in net-shell using "net stats" 1033 command. 1034 1035config NET_PKT_TXTIME_STATS 1036 bool "Network packet TX time statistics" 1037 select NET_PKT_TIMESTAMP 1038 select NET_STATISTICS 1039 depends on (NET_UDP || NET_TCP || NET_SOCKETS_PACKET) && NET_NATIVE 1040 help 1041 Enable network packet TX time statistics support. This is used to 1042 calculate how long on average it takes for a packet to travel from 1043 application to just before it is sent to network. The TX timing 1044 information can then be seen in network interface statistics in 1045 net-shell. 1046 The RX calculation is done only for UDP, TCP or RAW packets, 1047 but for TX we do not know the protocol so the TX packet timing is 1048 done for all network protocol packets. 1049 1050config NET_PKT_TXTIME_STATS_DETAIL 1051 bool "Get extra transmit detail statistics in TX path" 1052 depends on NET_PKT_TXTIME_STATS 1053 help 1054 Store receive statistics detail information in certain key points 1055 in TX path. This is very special configuration and will increase 1056 the size of net_pkt so in typical cases you should not enable it. 1057 The extra statistics can be seen in net-shell using "net stats" 1058 command. 1059 1060config NET_PKT_ALLOC_STATS 1061 bool "Get net_pkt allocation statistics" 1062 help 1063 Collect net_pkt allocation statistics, like number of allocations, 1064 average allocation size, average allocation time in usec, for both 1065 succeeded and failed allocations. 1066 The extra statistics can be seen in net-shell using "net mem" 1067 command. 1068 1069config NET_PROMISCUOUS_MODE 1070 bool "Promiscuous mode support" 1071 select NET_MGMT 1072 select NET_MGMT_EVENT 1073 select NET_L2_ETHERNET_MGMT if NET_L2_ETHERNET 1074 help 1075 Enable promiscuous mode support. This only works if the network 1076 device driver supports promiscuous mode. The user application 1077 also needs to read the promiscuous mode data. 1078 1079if NET_PROMISCUOUS_MODE 1080module = NET_PROMISC 1081module-dep = NET_LOG 1082module-str = Log level for promiscuous mode 1083module-help = Enables promiscuous mode to output debug messages. 1084source "subsys/net/Kconfig.template.log_config.net" 1085endif # NET_PROMISCUOUS_MODE 1086 1087config NET_DISABLE_ICMP_DESTINATION_UNREACHABLE 1088 bool "Disable destination unreachable ICMP errors" 1089 help 1090 Suppress the generation of ICMP destination unreachable errors 1091 when ports that are not in a listening state receive packets. 1092 1093source "subsys/net/ip/Kconfig.stack" 1094 1095source "subsys/net/ip/Kconfig.mgmt" 1096 1097source "subsys/net/ip/Kconfig.stats" 1098 1099source "subsys/net/ip/Kconfig.debug" 1100 1101endmenu 1102