1# IPv4 Options
2
3# Copyright (c) 2016 Intel Corporation.
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig NET_IPV4
7	bool "IPv4"
8	help
9	  Enable IPv4 support. If this is enabled then the device is
10	  able to send and receive IPv4 network packets.
11
12if NET_IPV4
13
14config NET_IF_MAX_IPV4_COUNT
15	int "Max number of IPv4 network interfaces in the system"
16	default NET_VLAN_COUNT if NET_VLAN
17	default 2 if NET_LOOPBACK
18	default 1
19	help
20	  This tells how many network interfaces there will be in the system
21	  that will have IPv4 enabled.
22
23config NET_IF_UNICAST_IPV4_ADDR_COUNT
24	int "Max number of unicast IPv4 addresses per network interface"
25	default 2 if NET_IPV4_AUTO
26	default 2 if NET_LOOPBACK
27	default 1
28
29config NET_IF_MCAST_IPV4_ADDR_COUNT
30	int "Max number of multicast IPv4 addresses per network interface"
31	default 2 if NET_IPV4_IGMP
32	default 1
33
34config NET_IPV4_DEFAULT_NETMASK
35	int "The default netmask length for registered IPv4 addresses"
36	range 1 32
37	default 24
38	help
39	  The default netmask length for the registered IPv4 addresses.
40	  The application can set a custom netmask with
41	  net_if_ipv4_set_netmask_by_addr() API if needed.
42
43if NET_NATIVE_IPV4
44
45config NET_INITIAL_TTL
46	int "Initial IPv4 time to live value for unicast packets"
47	default 64
48	range 0 $(UINT8_MAX)
49	help
50	  The value should normally be > 0. The device receiving the IPv4
51	  packet will decrement the value and will drop the packet if the TTL
52	  value is 0. When sending, the packet is dropped before transmitting
53	  to network if TTL is 0.
54
55config NET_INITIAL_MCAST_TTL
56	int "Initial IPv4 time to live value for multicast packets"
57	default 1
58	range 0 $(UINT8_MAX)
59	help
60	  The value should normally be > 0. The device receiving the IPv4
61	  packet will decrement the value and will drop the packet if the TTL
62	  value is 0. When sending, the packet is dropped before transmitting
63	  to network if TTL is 0.
64	  The default is 1 (same as in Linux) which means that multicast packets
65	  don't leave the local network unless the application explicitly
66	  requests it.
67
68config NET_IF_MCAST_IPV4_SOURCE_COUNT
69	int "Max number of IPv4 sources per mcast address to be included or excluded"
70	default 1
71
72config NET_ICMPV4_ACCEPT_BROADCAST
73	bool "Accept broadcast ICMPv4 echo-request"
74	help
75	  If set, then respond to ICMPv4 echo-request that is sent to
76	  broadcast address.
77
78config NET_IPV4_ACCEPT_ZERO_BROADCAST
79	bool "Accept 0.0.0.0 broadcast destination address"
80	help
81	  If set, then accept UDP packets destined to non-standard
82	  0.0.0.0 broadcast address as described in RFC 1122 ch. 3.3.6
83
84config NET_IPV4_IGMP
85	bool "Internet Group Management Protocol (IGMPv2) support"
86	select NET_IPV4_HDR_OPTIONS
87	help
88	  The value depends on your network needs. IGMP should normally be
89	  enabled if IPv4 multicast support is needed. Currently we support
90	  IGMPv2 and earlier versions. This requires IPv4 header support
91	  because IP Router Alert option must be sent.
92	  See RFC 2236 for details.
93
94config NET_IPV4_IGMPV3
95	bool "Internet Group Management Protocol version 3 (IGMPv3) support"
96	depends on NET_IPV4_IGMP
97	help
98	  Use IGMPv3 for managing the multicast groups.
99
100config NET_IPV4_ACD
101	bool "Activate IPv4 address conflict detection (RFC 5227)"
102	depends on NET_ARP
103	help
104	  Activate IPv4 address conflict detection specified in RFC 5227.
105	  The conflict detection is based on ARP probes/announcements.
106
107config NET_IPV4_AUTO
108	bool "IPv4 autoconfiguration [EXPERIMENTAL]"
109	depends on NET_ARP
110	select EXPERIMENTAL
111	select NET_IPV4_ACD
112	select NET_MGMT
113	select NET_MGMT_EVENT
114	select NET_MGMT_EVENT_INFO
115	help
116	  Enables IPv4 auto IP address configuration (see RFC 3927)
117
118config NET_IPV4_HDR_OPTIONS
119	bool "IPv4 Header options support"
120	help
121	  Enables IPv4 header options support. Current support for only
122	  ICMPv4 Echo request. Only RecordRoute and Timestamp are handled.
123
124config NET_IPV4_FRAGMENT
125	bool "Support IPv4 fragmentation"
126	help
127	  IPv4 fragmentation is disabled by default. This limits incoming and
128	  outgoing packets to the MTU (1500 bytes for Ethernet). If you enable
129	  fragmentation support, please increase amount of RX data buffers so
130	  that larger packets can be received.
131
132config NET_IPV4_FRAGMENT_MAX_COUNT
133	int "How many packets to reassemble at a time"
134	range 1 16
135	default 1
136	depends on NET_IPV4_FRAGMENT
137	help
138	  How many fragmented IPv4 packets can be waiting reassembly
139	  simultaneously. You may need to increase the network buffer
140	  count.
141
142config NET_IPV4_FRAGMENT_MAX_PKT
143	int "How many fragments can be handled to reassemble a packet"
144	default 2
145	depends on NET_IPV4_FRAGMENT
146	help
147	  Incoming fragments are stored in per-packet queue before being
148	  reassembled. This value defines the number of fragments that
149	  can be handled at the same time to reassemble a single packet.
150
151	  You can increase this value if you expect packets with more
152	  than two fragments.
153
154config NET_IPV4_FRAGMENT_TIMEOUT
155	int "How long to wait for fragments to be received"
156	range 1 60
157	default 5
158	depends on NET_IPV4_FRAGMENT
159	help
160	  How long to wait for IPv4 fragment to arrive before the reassembly
161	  will timeout. This value is in seconds.
162
163config NET_IPV4_PMTU
164	bool "IPv4 Path MTU Discovery"
165	help
166	  Enables IPv4 Path MTU Discovery (see RFC 1191)
167
168config NET_IPV4_PMTU_DESTINATION_CACHE_ENTRIES
169	int "Number of IPv4 PMTU destination cache entries"
170	default 3
171	depends on NET_IPV4_PMTU
172	help
173	  How many PMTU entries we can track for each destination address.
174
175module = NET_IPV4
176module-dep = NET_LOG
177module-str = Log level for core IPv4
178module-help = Enables core IPv4 code to output debug messages.
179source "subsys/net/Kconfig.template.log_config.net"
180
181module = NET_ICMPV4
182module-dep = NET_LOG
183module-str = Log level for ICMPv4
184module-help = Enables ICMPv4 code to output debug messages.
185source "subsys/net/Kconfig.template.log_config.net"
186
187#if NET_IPV4_ACD
188module = NET_IPV4_ACD
189module-dep = NET_LOG
190module-str = Log level for IPv4 address conflict detection
191module-help = Enables IPv4 address conflict detection debug messages.
192source "subsys/net/Kconfig.template.log_config.net"
193#endif
194
195if NET_IPV4_AUTO
196module = NET_IPV4_AUTO
197module-dep = NET_LOG
198module-str = Log level for IPv4 autoconf client
199module-help = Enable debug diagnostic from IPv4 autoconf client.
200source "subsys/net/Kconfig.template.log_config.net"
201endif # NET_IPV4_AUTO
202
203endif # NET_NATIVE_IPV4
204endif # NET_IPV4
205