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_INITIAL_TTL
15	int "Initial IPv4 time to live value for unicast packets"
16	default 64
17	range 0 255
18	help
19	  The value should normally be > 0. The device receiving the IPv4
20	  packet will decrement the value and will drop the packet if the TTL
21	  value is 0. When sending, the packet is dropped before transmitting
22	  to network if TTL is 0.
23
24config NET_INITIAL_MCAST_TTL
25	int "Initial IPv4 time to live value for multicast packets"
26	default 1
27	range 0 255
28	help
29	  The value should normally be > 0. The device receiving the IPv4
30	  packet will decrement the value and will drop the packet if the TTL
31	  value is 0. When sending, the packet is dropped before transmitting
32	  to network if TTL is 0.
33	  The default is 1 (same as in Linux) which means that multicast packets
34	  don't leave the local network unless the application explicitly
35	  requests it.
36
37config NET_IF_MAX_IPV4_COUNT
38	int "Max number of IPv4 network interfaces in the system"
39	default NET_VLAN_COUNT if NET_VLAN
40	default 2 if NET_LOOPBACK
41	default 1
42	help
43	  This tells how many network interfaces there will be in the system
44	  that will have IPv4 enabled.
45
46config NET_IF_UNICAST_IPV4_ADDR_COUNT
47	int "Max number of unicast IPv4 addresses per network interface"
48	default 2 if NET_IPV4_AUTO
49	default 2 if NET_LOOPBACK
50	default 1
51
52config NET_IF_MCAST_IPV4_ADDR_COUNT
53	int "Max number of multicast IPv4 addresses per network interface"
54	default 2 if NET_IPV4_IGMP
55	default 1
56
57config NET_IF_MCAST_IPV4_SOURCE_COUNT
58	int "Max number of IPv4 sources per mcast address to be included or excluded"
59	default 1
60
61config NET_ICMPV4_ACCEPT_BROADCAST
62	bool "Accept broadcast ICMPv4 echo-request"
63	help
64	  If set, then respond to ICMPv4 echo-request that is sent to
65	  broadcast address.
66
67config NET_IPV4_ACCEPT_ZERO_BROADCAST
68	bool "Accept 0.0.0.0 broadcast destination address"
69	help
70	  If set, then accept UDP packets destined to non-standard
71	  0.0.0.0 broadcast address as described in RFC 1122 ch. 3.3.6
72
73config NET_IPV4_IGMP
74	bool "Internet Group Management Protocol (IGMPv2) support"
75	select NET_IPV4_HDR_OPTIONS
76	help
77	  The value depends on your network needs. IGMP should normally be
78	  enabled if IPv4 multicast support is needed. Currently we support
79	  IGMPv2 and earlier versions. This requires IPv4 header support
80	  because IP Router Alert option must be sent.
81	  See RFC 2236 for details.
82
83config NET_IPV4_IGMPV3
84	bool "Internet Group Management Protocol version 3 (IGMPv3) support"
85	depends on NET_IPV4_IGMP
86	help
87	  Use IGMPv3 for managing the multicast groups.
88
89config NET_IPV4_AUTO
90	bool "IPv4 autoconfiguration [EXPERIMENTAL]"
91	depends on NET_ARP
92	select EXPERIMENTAL
93	help
94	  Enables IPv4 auto IP address configuration (see RFC 3927)
95
96config NET_IPV4_HDR_OPTIONS
97	bool "IPv4 Header options support"
98	help
99	  Enables IPv4 header options support. Current support for only
100	  ICMPv4 Echo request. Only RecordRoute and Timestamp are handled.
101
102config NET_IPV4_FRAGMENT
103	bool "Support IPv4 fragmentation"
104	help
105	  IPv4 fragmentation is disabled by default. This limits incoming and
106	  outgoing packets to the MTU (1500 bytes for Ethernet). If you enable
107	  fragmentation support, please increase amount of RX data buffers so
108	  that larger packets can be received.
109
110config NET_IPV4_FRAGMENT_MAX_COUNT
111	int "How many packets to reassemble at a time"
112	range 1 16
113	default 1
114	depends on NET_IPV4_FRAGMENT
115	help
116	  How many fragmented IPv4 packets can be waiting reassembly
117	  simultaneously. You may need to increase the network buffer
118	  count.
119
120config NET_IPV4_FRAGMENT_MAX_PKT
121	int "How many fragments can be handled to reassemble a packet"
122	default 2
123	depends on NET_IPV4_FRAGMENT
124	help
125	  Incoming fragments are stored in per-packet queue before being
126	  reassembled. This value defines the number of fragments that
127	  can be handled at the same time to reassemble a single packet.
128
129	  You can increase this value if you expect packets with more
130	  than two fragments.
131
132config NET_IPV4_FRAGMENT_TIMEOUT
133	int "How long to wait for fragments to be received"
134	range 1 60
135	default 5
136	depends on NET_IPV4_FRAGMENT
137	help
138	  How long to wait for IPv4 fragment to arrive before the reassembly
139	  will timeout. This value is in seconds.
140
141module = NET_IPV4
142module-dep = NET_LOG
143module-str = Log level for core IPv4
144module-help = Enables core IPv4 code to output debug messages.
145source "subsys/net/Kconfig.template.log_config.net"
146
147module = NET_ICMPV4
148module-dep = NET_LOG
149module-str = Log level for ICMPv4
150module-help = Enables ICMPv4 code to output debug messages.
151source "subsys/net/Kconfig.template.log_config.net"
152
153if NET_IPV4_AUTO
154module = NET_IPV4_AUTO
155module-dep = NET_LOG
156module-str = Log level for IPv4 autoconf client
157module-help = Enable debug diagnostic from IPv4 autoconf client.
158source "subsys/net/Kconfig.template.log_config.net"
159endif # NET_IPV4_AUTO
160
161endif # NET_IPV4
162