# DHCPv4 server implementation for Zephyr

# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: Apache-2.0


# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: Apache-2.0

config NET_DHCPV6
	bool "DHCPv6 client"
	select NET_MGMT
	select NET_MGMT_EVENT
	depends on NET_IPV6 && NET_UDP

config NET_DHCPV6_DUID_MAX_LEN
	int "The maximum DUID length (not including a type code)"
	range 1 128
	default 22
	help
	  This will set the available number of bytes for the DUID.

config NET_DHCPV6_OPTION_DNS_ADDRESS
	bool "Use DNS Recursive Name Server option to configure DNS resolver"
	default y
	depends on DNS_RESOLVER
	help
	  If enabled, the DHCPv6 client will request DNS Recursive Name Server
	  option from the server, and if available, use obtained information
	  to configure DNS resolver.

config NET_DHCPV6_DNS_SERVER_VIA_INTERFACE
	bool "Make DNS servers specific to the network interface"
	depends on NET_DHCPV6_OPTION_DNS_ADDRESS
	default y
	help
	  If this is set, then if the system has multiple network interfaces
	  and each has DHCP enabled, then assign DNS servers received from that
	  network interface, to that specific interface.
	  If this option is not set, then any interface can be used for all
	  the configured DNS server addresses when doing DNS queries.
	  Example: We receive DNS server 2001:db8::1:53 DHCPv6 option from Wi-Fi
	  interface and DNS server 2001:db8::2:53 from Ethernet interface.
	  When this option is set, the DNS resolver will use DNS server
	  2001:db8::1:53 when sending DNS query to the Wi-Fi interface and DNS
	  server 2001:db8::2:53 when sending DNS query to the Ethernet
	  interface.

if NET_DHCPV6
module = NET_DHCPV6
module-dep = NET_LOG
module-str = Log level for DHCPv6 client
module-help = Enables DHCPv6 client code to output debug messages.
source "subsys/net/Kconfig.template.log_config.net"
endif # NET_DHCPV6
