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 && NET_VLAN_COUNT > 0
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_IPV4_MTU
46	int "Initial IPv4 MTU value"
47	default 576
48	range 576 1500
49	help
50	  The value should normally be 576 which is the minimum IPv4 packet
51	  size that implementations need to support without fragmentation.
52
53config NET_INITIAL_TTL
54	int "Initial IPv4 time to live value for unicast packets"
55	default 64
56	range 0 $(UINT8_MAX)
57	help
58	  The value should normally be > 0. The device receiving the IPv4
59	  packet will decrement the value and will drop the packet if the TTL
60	  value is 0. When sending, the packet is dropped before transmitting
61	  to network if TTL is 0.
62
63config NET_INITIAL_MCAST_TTL
64	int "Initial IPv4 time to live value for multicast packets"
65	default 1
66	range 0 $(UINT8_MAX)
67	help
68	  The value should normally be > 0. The device receiving the IPv4
69	  packet will decrement the value and will drop the packet if the TTL
70	  value is 0. When sending, the packet is dropped before transmitting
71	  to network if TTL is 0.
72	  The default is 1 (same as in Linux) which means that multicast packets
73	  don't leave the local network unless the application explicitly
74	  requests it.
75
76config NET_INITIAL_IPV4_MCAST_LOOP
77	bool "Control whether the socket sees multicast packets sent by itself"
78	default y
79	help
80	Assign initial value to IPV4_MULTICAST_LOOP in socket options,
81	if not set by the user using setsockopt().
82
83config NET_IF_MCAST_IPV4_SOURCE_COUNT
84	int "Max number of IPv4 sources per mcast address to be included or excluded"
85	default 1
86
87config NET_ICMPV4_ACCEPT_BROADCAST
88	bool "Accept broadcast ICMPv4 echo-request"
89	help
90	  If set, then respond to ICMPv4 echo-request that is sent to
91	  broadcast address.
92
93config NET_IPV4_ACCEPT_ZERO_BROADCAST
94	bool "Accept 0.0.0.0 broadcast destination address"
95	help
96	  If set, then accept UDP packets destined to non-standard
97	  0.0.0.0 broadcast address as described in RFC 1122 ch. 3.3.6
98
99config NET_IPV4_IGMP
100	bool "Internet Group Management Protocol (IGMPv2) support"
101	select NET_IPV4_HDR_OPTIONS
102	help
103	  The value depends on your network needs. IGMP should normally be
104	  enabled if IPv4 multicast support is needed. Currently we support
105	  IGMPv2 and earlier versions. This requires IPv4 header support
106	  because IP Router Alert option must be sent.
107	  See RFC 2236 for details.
108
109config NET_IPV4_IGMPV3
110	bool "Internet Group Management Protocol version 3 (IGMPv3) support"
111	depends on NET_IPV4_IGMP
112	help
113	  Use IGMPv3 for managing the multicast groups.
114
115config NET_IPV4_ACD
116	bool "Activate IPv4 address conflict detection (RFC 5227)"
117	depends on NET_ARP
118	help
119	  Activate IPv4 address conflict detection specified in RFC 5227.
120	  The conflict detection is based on ARP probes/announcements.
121
122config NET_IPV4_AUTO
123	bool "IPv4 autoconfiguration [EXPERIMENTAL]"
124	depends on NET_ARP
125	select EXPERIMENTAL
126	select NET_IPV4_ACD
127	select NET_MGMT
128	select NET_MGMT_EVENT
129	select NET_MGMT_EVENT_INFO
130	help
131	  Enables IPv4 auto IP address configuration (see RFC 3927)
132
133config NET_IPV4_HDR_OPTIONS
134	bool "IPv4 Header options support"
135	help
136	  Enables IPv4 header options support. Current support for only
137	  ICMPv4 Echo request. Only RecordRoute and Timestamp are handled.
138
139config NET_IPV4_FRAGMENT
140	bool "Support IPv4 fragmentation"
141	help
142	  IPv4 fragmentation is disabled by default. This limits incoming and
143	  outgoing packets to the MTU (1500 bytes for Ethernet). If you enable
144	  fragmentation support, please increase amount of RX data buffers so
145	  that larger packets can be received.
146
147config NET_IPV4_FRAGMENT_MAX_COUNT
148	int "How many packets to reassemble at a time"
149	range 1 16
150	default 1
151	depends on NET_IPV4_FRAGMENT
152	help
153	  How many fragmented IPv4 packets can be waiting reassembly
154	  simultaneously. You may need to increase the network buffer
155	  count.
156
157config NET_IPV4_FRAGMENT_MAX_PKT
158	int "How many fragments can be handled to reassemble a packet"
159	default 2
160	depends on NET_IPV4_FRAGMENT
161	help
162	  Incoming fragments are stored in per-packet queue before being
163	  reassembled. This value defines the number of fragments that
164	  can be handled at the same time to reassemble a single packet.
165
166	  You can increase this value if you expect packets with more
167	  than two fragments.
168
169config NET_IPV4_FRAGMENT_TIMEOUT
170	int "How long to wait for fragments to be received"
171	range 1 60
172	default 5
173	depends on NET_IPV4_FRAGMENT
174	help
175	  How long to wait for IPv4 fragment to arrive before the reassembly
176	  will timeout. This value is in seconds.
177
178config NET_IPV4_PMTU
179	bool "IPv4 Path MTU Discovery"
180	help
181	  Enables IPv4 Path MTU Discovery (see RFC 1191)
182
183config NET_IPV4_PMTU_DESTINATION_CACHE_ENTRIES
184	int "Number of IPv4 PMTU destination cache entries"
185	default 3
186	depends on NET_IPV4_PMTU
187	help
188	  How many PMTU entries we can track for each destination address.
189
190module = NET_IPV4
191module-dep = NET_LOG
192module-str = Log level for core IPv4
193module-help = Enables core IPv4 code to output debug messages.
194source "subsys/net/Kconfig.template.log_config.net"
195
196module = NET_ICMPV4
197module-dep = NET_LOG
198module-str = Log level for ICMPv4
199module-help = Enables ICMPv4 code to output debug messages.
200source "subsys/net/Kconfig.template.log_config.net"
201
202#if NET_IPV4_ACD
203module = NET_IPV4_ACD
204module-dep = NET_LOG
205module-str = Log level for IPv4 address conflict detection
206module-help = Enables IPv4 address conflict detection debug messages.
207source "subsys/net/Kconfig.template.log_config.net"
208#endif
209
210if NET_IPV4_AUTO
211module = NET_IPV4_AUTO
212module-dep = NET_LOG
213module-str = Log level for IPv4 autoconf client
214module-help = Enable debug diagnostic from IPv4 autoconf client.
215source "subsys/net/Kconfig.template.log_config.net"
216endif # NET_IPV4_AUTO
217
218endif # NET_NATIVE_IPV4
219endif # NET_IPV4
220