2019-11-01 13:45:29 +01:00
|
|
|
# IPv6 Options
|
2016-08-24 10:01:20 +02:00
|
|
|
|
|
|
|
# Copyright (c) 2016 Intel Corporation.
|
2017-01-19 02:01:01 +01:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2016-08-24 10:01:20 +02:00
|
|
|
|
|
|
|
menuconfig NET_IPV6
|
|
|
|
bool "IPv6"
|
|
|
|
default y
|
|
|
|
help
|
2018-02-15 14:36:16 +01:00
|
|
|
Enable IPv6 support. This should be selected by default as there
|
|
|
|
is limited set of network bearers provided that support IPv4.
|
2016-08-24 10:01:20 +02:00
|
|
|
|
|
|
|
if NET_IPV6
|
|
|
|
|
2018-01-19 18:01:23 +01:00
|
|
|
config NET_IF_MAX_IPV6_COUNT
|
|
|
|
int "Max number of IPv6 network interfaces in the system"
|
2018-01-19 11:24:33 +01:00
|
|
|
default NET_VLAN_COUNT if NET_VLAN
|
2022-10-25 13:56:02 +02:00
|
|
|
default 2 if NET_LOOPBACK
|
Kconfig: Use the first default with a satisfied condition
Up until now, Zephyr has patched Kconfig to use the last 'default' with
a satisfied condition, instead of the first one. I'm not sure why the
patch was added (it predates Kconfiglib), but I suspect it's related to
Kconfig.defconfig files.
There are at least three problems with the patch:
1. It's inconsistent with how Kconfig works in other projects, which
might confuse newcomers.
2. Due to oversights, earlier 'range' properties are still preferred,
as well as earlier 'default' properties on choices.
In addition to being inconsistent, this makes it impossible to
override 'range' properties and choice 'default' properties if the
base definition of the symbol/choice already has 'range'/'default'
properties.
I've seen errors caused by the inconsistency, and I suspect there
are more.
3. A fork of Kconfiglib that adds the patch needs to be maintained.
Get rid of the patch and go back to standard Kconfig behavior, as
follows:
1. Include the Kconfig.defconfig files first instead of last in
Kconfig.zephyr.
2. Include boards/Kconfig and arch/<arch>/Kconfig first instead of
last in arch/Kconfig.
3. Include arch/<arch>/soc/*/Kconfig first instead of last in
arch/<arch>/Kconfig.
4. Swap a few other 'source's to preserve behavior for some scattered
symbols with multiple definitions.
Swap 'source's in some no-op cases too, where it might match the
intent.
5. Reverse the defaults on symbol definitions that have more than one
default.
Skip defaults that are mutually exclusive, e.g. where each default
has an 'if <some board>' condition. They are already safe.
6. Remove the prefer-later-defaults patch from Kconfiglib.
Testing was done with a Python script that lists all Kconfig
symbols/choices with multiple defaults, along with a whitelist of fixed
symbols. The script also verifies that there are no "unreachable"
defaults hidden by defaults without conditions
As an additional test, zephyr/.config was generated before and after the
change for several samples and checked to be identical (after sorting).
This commit includes some default-related cleanups as well:
- Simplify some symbol definitions, e.g. where a default has 'if FOO'
when the symbol already has 'depends on FOO'.
- Remove some redundant 'default ""' for string symbols. This is the
implicit default.
Piggyback fixes for swapped ranges on BT_L2CAP_RX_MTU and
BT_L2CAP_TX_MTU (caused by confusing inconsistency).
Piggyback some fixes for style nits too, e.g. unindented help texts.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-30 10:57:47 +02:00
|
|
|
default 1
|
2018-01-19 18:01:23 +01:00
|
|
|
help
|
Kconfig: Use the first default with a satisfied condition
Up until now, Zephyr has patched Kconfig to use the last 'default' with
a satisfied condition, instead of the first one. I'm not sure why the
patch was added (it predates Kconfiglib), but I suspect it's related to
Kconfig.defconfig files.
There are at least three problems with the patch:
1. It's inconsistent with how Kconfig works in other projects, which
might confuse newcomers.
2. Due to oversights, earlier 'range' properties are still preferred,
as well as earlier 'default' properties on choices.
In addition to being inconsistent, this makes it impossible to
override 'range' properties and choice 'default' properties if the
base definition of the symbol/choice already has 'range'/'default'
properties.
I've seen errors caused by the inconsistency, and I suspect there
are more.
3. A fork of Kconfiglib that adds the patch needs to be maintained.
Get rid of the patch and go back to standard Kconfig behavior, as
follows:
1. Include the Kconfig.defconfig files first instead of last in
Kconfig.zephyr.
2. Include boards/Kconfig and arch/<arch>/Kconfig first instead of
last in arch/Kconfig.
3. Include arch/<arch>/soc/*/Kconfig first instead of last in
arch/<arch>/Kconfig.
4. Swap a few other 'source's to preserve behavior for some scattered
symbols with multiple definitions.
Swap 'source's in some no-op cases too, where it might match the
intent.
5. Reverse the defaults on symbol definitions that have more than one
default.
Skip defaults that are mutually exclusive, e.g. where each default
has an 'if <some board>' condition. They are already safe.
6. Remove the prefer-later-defaults patch from Kconfiglib.
Testing was done with a Python script that lists all Kconfig
symbols/choices with multiple defaults, along with a whitelist of fixed
symbols. The script also verifies that there are no "unreachable"
defaults hidden by defaults without conditions
As an additional test, zephyr/.config was generated before and after the
change for several samples and checked to be identical (after sorting).
This commit includes some default-related cleanups as well:
- Simplify some symbol definitions, e.g. where a default has 'if FOO'
when the symbol already has 'depends on FOO'.
- Remove some redundant 'default ""' for string symbols. This is the
implicit default.
Piggyback fixes for swapped ranges on BT_L2CAP_RX_MTU and
BT_L2CAP_TX_MTU (caused by confusing inconsistency).
Piggyback some fixes for style nits too, e.g. unindented help texts.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-30 10:57:47 +02:00
|
|
|
This tells how many network interfaces there will be in the system
|
|
|
|
that will have IPv6 enabled.
|
2018-01-19 18:01:23 +01:00
|
|
|
|
2016-08-24 10:01:20 +02:00
|
|
|
config NET_IF_UNICAST_IPV6_ADDR_COUNT
|
|
|
|
int "Max number of unicast IPv6 addresses per network interface"
|
2020-06-19 13:22:32 +02:00
|
|
|
default 6 if NET_L2_OPENTHREAD
|
2021-10-06 16:45:44 +02:00
|
|
|
default 3 if NET_LOOPBACK
|
2016-08-24 10:01:20 +02:00
|
|
|
default 2
|
|
|
|
|
|
|
|
config NET_IF_MCAST_IPV6_ADDR_COUNT
|
|
|
|
int "Max number of multicast IPv6 addresses per network interface"
|
2020-06-19 13:22:32 +02:00
|
|
|
default 8 if NET_L2_OPENTHREAD
|
2017-07-07 14:02:28 +02:00
|
|
|
default 3
|
2016-08-24 10:01:20 +02:00
|
|
|
|
|
|
|
config NET_IF_IPV6_PREFIX_COUNT
|
|
|
|
int "Max number of IPv6 prefixes per network interface"
|
|
|
|
default 2
|
|
|
|
|
2023-03-21 12:43:28 +01:00
|
|
|
if NET_NATIVE_IPV6
|
|
|
|
|
2024-02-09 08:37:38 +01:00
|
|
|
config NET_IPV6_MTU
|
|
|
|
int "Initial IPv6 MTU value"
|
|
|
|
default 1280
|
|
|
|
range 1280 1500
|
|
|
|
help
|
|
|
|
The value should normally be 1280 which is the minimum IPv6 packet
|
|
|
|
size that implementations need to support without fragmentation.
|
|
|
|
|
2016-08-24 10:01:20 +02:00
|
|
|
config NET_INITIAL_HOP_LIMIT
|
2023-11-28 15:41:44 +01:00
|
|
|
int "Initial IPv6 hop limit value for unicast packets"
|
2016-08-24 10:01:20 +02:00
|
|
|
default 64
|
2023-11-28 15:41:44 +01:00
|
|
|
range 0 255
|
2016-08-24 10:01:20 +02:00
|
|
|
help
|
2023-11-28 15:41:44 +01:00
|
|
|
The value should normally be > 0. The device receiving the IPv6
|
|
|
|
packet will decrement the value and will drop the packet if the hop
|
|
|
|
limit value is 0. When sending, the packet is dropped before
|
|
|
|
transmitting to network if hop limit is 0.
|
|
|
|
|
|
|
|
config NET_INITIAL_MCAST_HOP_LIMIT
|
|
|
|
int "Initial IPv6 hop limit value for multicast packets"
|
|
|
|
default 1
|
|
|
|
range 0 255
|
|
|
|
help
|
|
|
|
The value should normally be > 0. The device receiving the IPv6
|
|
|
|
packet will decrement the value and will drop the packet if the hop
|
|
|
|
limit value is 0. When sending, the packet is dropped before
|
|
|
|
transmitting to network if hop limit is 0.
|
|
|
|
The default is 1 (same as in IPv4) which means that multicast packets
|
|
|
|
don't leave the local network unless the application explicitly
|
|
|
|
requests it.
|
2016-08-24 10:01:20 +02:00
|
|
|
|
|
|
|
config NET_IPV6_MAX_NEIGHBORS
|
|
|
|
int "How many IPv6 neighbors are supported"
|
|
|
|
default 8
|
|
|
|
range 1 254
|
|
|
|
help
|
2018-02-15 14:36:16 +01:00
|
|
|
The value depends on your network needs.
|
2016-08-24 10:01:20 +02:00
|
|
|
|
2017-03-28 16:43:32 +02:00
|
|
|
config NET_IPV6_FRAGMENT
|
|
|
|
bool "Support IPv6 fragmentation"
|
|
|
|
help
|
2018-02-15 14:36:16 +01:00
|
|
|
IPv6 fragmentation is disabled by default. This saves memory and
|
|
|
|
should not cause issues normally as we support anyway the minimum
|
|
|
|
length IPv6 packets (1280 bytes). If you enable fragmentation
|
|
|
|
support, please increase amount of RX data buffers so that larger
|
|
|
|
than 1280 byte packets can be received.
|
2017-03-28 16:43:32 +02:00
|
|
|
|
|
|
|
config NET_IPV6_FRAGMENT_MAX_COUNT
|
|
|
|
int "How many packets to reassemble at a time"
|
|
|
|
range 1 16
|
|
|
|
default 1
|
|
|
|
depends on NET_IPV6_FRAGMENT
|
|
|
|
help
|
2018-02-15 14:36:16 +01:00
|
|
|
How many fragmented IPv6 packets can be waiting reassembly
|
|
|
|
simultaneously. Each fragment count might use up to 1280 bytes
|
|
|
|
of memory so you need to plan this and increase the network buffer
|
|
|
|
count.
|
2017-03-28 16:43:32 +02:00
|
|
|
|
2021-07-09 15:08:24 +02:00
|
|
|
config NET_IPV6_FRAGMENT_MAX_PKT
|
|
|
|
int "How many fragments can be handled to reassemble a packet"
|
|
|
|
default 2
|
|
|
|
depends on NET_IPV6_FRAGMENT
|
|
|
|
help
|
|
|
|
Incoming fragments are stored in per-packet queue before being
|
|
|
|
reassembled. This value defines the number of fragments that
|
|
|
|
can be handled at the same time to reassemble a single packet.
|
|
|
|
|
|
|
|
We do not have to accept IPv6 packets larger than 1500 bytes
|
|
|
|
(RFC 2460 ch 5). This means that we should receive everything
|
|
|
|
within the first two fragments. The first one being 1280 bytes and
|
|
|
|
the second one 220 bytes.
|
|
|
|
|
|
|
|
You can increase this value if you expect packets with more
|
|
|
|
than two fragments.
|
|
|
|
|
2017-03-28 16:43:32 +02:00
|
|
|
config NET_IPV6_FRAGMENT_TIMEOUT
|
|
|
|
int "How long to wait the fragments to receive"
|
|
|
|
range 1 60
|
2017-05-19 22:19:46 +02:00
|
|
|
default 5
|
2017-03-28 16:43:32 +02:00
|
|
|
depends on NET_IPV6_FRAGMENT
|
|
|
|
help
|
2018-02-15 14:36:16 +01:00
|
|
|
How long to wait for IPv6 fragment to arrive before the reassembly
|
|
|
|
will timeout. RFC 2460 chapter 4.5 tells to wait for 60 seconds but
|
|
|
|
this might be too long in memory constrained devices. This value
|
|
|
|
is in seconds.
|
2017-03-28 16:43:32 +02:00
|
|
|
|
2017-02-09 08:55:15 +01:00
|
|
|
config NET_IPV6_MLD
|
|
|
|
bool "Multicast Listener Discovery support"
|
|
|
|
default y
|
|
|
|
help
|
2018-02-15 14:36:16 +01:00
|
|
|
The value depends on your network needs. MLD should normally
|
|
|
|
be active. Currently we support only MLDv2. See RFC 3810 for
|
|
|
|
details.
|
2017-02-09 08:55:15 +01:00
|
|
|
|
2017-03-14 10:15:13 +01:00
|
|
|
config NET_IPV6_NBR_CACHE
|
|
|
|
bool "Neighbor cache"
|
|
|
|
default y
|
|
|
|
help
|
2018-02-15 14:36:16 +01:00
|
|
|
The value depends on your network needs. Neighbor cache should
|
|
|
|
normally be active.
|
2017-03-14 10:15:13 +01:00
|
|
|
|
2016-08-24 10:01:20 +02:00
|
|
|
config NET_IPV6_ND
|
|
|
|
bool "Activate neighbor discovery"
|
2017-03-14 10:15:13 +01:00
|
|
|
depends on NET_IPV6_NBR_CACHE
|
2023-12-13 19:08:48 +01:00
|
|
|
select NET_IPV6_MLD if !NET_TEST
|
2016-08-24 10:01:20 +02:00
|
|
|
default y
|
|
|
|
help
|
2018-02-15 14:36:16 +01:00
|
|
|
The value depends on your network needs. ND should normally
|
|
|
|
be active.
|
2016-08-24 10:01:20 +02:00
|
|
|
|
|
|
|
config NET_IPV6_DAD
|
|
|
|
bool "Activate duplicate address detection"
|
2017-03-14 10:15:13 +01:00
|
|
|
depends on NET_IPV6_NBR_CACHE
|
2016-08-24 10:01:20 +02:00
|
|
|
default y
|
|
|
|
help
|
2018-02-15 14:36:16 +01:00
|
|
|
The value depends on your network needs. DAD should normally
|
|
|
|
be active.
|
2016-08-24 10:01:20 +02:00
|
|
|
|
|
|
|
config NET_IPV6_RA_RDNSS
|
|
|
|
bool "Support RA RDNSS option"
|
2017-01-26 12:13:42 +01:00
|
|
|
depends on NET_IPV6_ND
|
2023-02-20 08:26:15 +01:00
|
|
|
select DNS_RESOLVER
|
2016-08-24 10:01:20 +02:00
|
|
|
default y
|
|
|
|
help
|
2018-02-15 14:36:16 +01:00
|
|
|
Support Router Advertisement Recursive DNS Server option.
|
|
|
|
See RFC 6106 for details. The value depends on your network needs.
|
2016-08-24 10:01:20 +02:00
|
|
|
|
|
|
|
config NET_6LO
|
2022-03-09 12:05:12 +01:00
|
|
|
bool "6lowpan IPv6 Compression library"
|
2017-10-06 18:15:54 +02:00
|
|
|
default y if NET_L2_IEEE802154
|
2016-08-24 10:01:20 +02:00
|
|
|
help
|
2018-02-15 14:36:16 +01:00
|
|
|
6lowpan compression and fragmentation. It is enabled by default
|
|
|
|
if 802.15.4 is present, since using IPv6 on it requires it.
|
2016-08-24 10:01:20 +02:00
|
|
|
|
2022-08-02 20:19:10 +02:00
|
|
|
You may disable this option if you wish to implement a non-IP
|
|
|
|
custom protocol on top of the 802.15.4 MAC (L2) layer.
|
|
|
|
|
2016-10-05 16:20:06 +02:00
|
|
|
config NET_6LO_CONTEXT
|
2022-03-09 12:05:12 +01:00
|
|
|
bool "6lowpan context based compression"
|
2016-10-05 16:20:06 +02:00
|
|
|
depends on NET_6LO
|
|
|
|
help
|
2018-02-15 14:36:16 +01:00
|
|
|
Enables 6lowpan context based compression based on information
|
2022-08-02 20:03:35 +02:00
|
|
|
received in Router Advertisement (RA) message.
|
2016-10-05 16:20:06 +02:00
|
|
|
|
|
|
|
config NET_MAX_6LO_CONTEXTS
|
|
|
|
int "Number of supported 6CO (6lowpan contexts options)"
|
2017-01-27 11:49:35 +01:00
|
|
|
depends on NET_6LO_CONTEXT
|
|
|
|
default 1
|
2016-10-05 16:20:06 +02:00
|
|
|
range 1 16
|
|
|
|
help
|
2018-02-15 14:36:16 +01:00
|
|
|
6lowpan context options table size. The value depends on your
|
|
|
|
network and memory consumption. More 6CO options uses more memory.
|
2016-10-05 16:20:06 +02:00
|
|
|
|
2018-07-06 10:35:07 +02:00
|
|
|
if NET_6LO
|
|
|
|
module = NET_6LO
|
|
|
|
module-dep = NET_LOG
|
|
|
|
module-str = Log level for 6LoWPAN library
|
|
|
|
module-help = Enables 6LoWPAN code to output debug messages.
|
|
|
|
source "subsys/net/Kconfig.template.log_config.net"
|
|
|
|
endif # NET_6LO
|
|
|
|
|
|
|
|
module = NET_IPV6
|
|
|
|
module-dep = NET_LOG
|
|
|
|
module-str = Log level for core IPv6
|
|
|
|
module-help = Enables core IPv6 code to output debug messages.
|
|
|
|
source "subsys/net/Kconfig.template.log_config.net"
|
|
|
|
|
2024-03-19 16:23:50 +01:00
|
|
|
module = NET_IPV6_ND
|
|
|
|
module-dep = NET_LOG
|
|
|
|
module-str = Log level for IPv6 Neighbor Discovery
|
|
|
|
module-help = Enables IPv6 Neighbor Discovery code to output debug messages.
|
|
|
|
source "subsys/net/Kconfig.template.log_config.net"
|
|
|
|
|
2018-07-06 10:35:07 +02:00
|
|
|
module = NET_ICMPV6
|
|
|
|
module-dep = NET_LOG
|
|
|
|
module-str = Log level for ICMPv6
|
|
|
|
module-help = Enables ICMPv6 code to output debug messages.
|
|
|
|
source "subsys/net/Kconfig.template.log_config.net"
|
|
|
|
|
|
|
|
module = NET_IPV6_NBR_CACHE
|
|
|
|
module-dep = NET_LOG
|
|
|
|
module-str = Log level for IPv6 neighbor cache
|
|
|
|
module-help = Enables IPv6 Neighbor Cache code to output debug messages.
|
|
|
|
source "subsys/net/Kconfig.template.log_config.net"
|
2016-08-24 10:01:20 +02:00
|
|
|
|
2023-03-21 12:43:28 +01:00
|
|
|
endif # NET_NATIVE_IPV6
|
2016-08-24 10:01:20 +02:00
|
|
|
endif # NET_IPV6
|