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