net/dhcpv6 : Expose to Kconfig
Expose configurations to Kconfig. Add conditional CFLAGS to avoid conflicts with Kconfig.
This commit is contained in:
parent
1c37e11c0e
commit
0413a5881f
@ -4,9 +4,11 @@ ZEP_PORT_BASE ?= 17754
|
||||
ZEP_PORT_MAX := $(shell expr $(ZEP_PORT_BASE) + $(ZEP_DEVICES) - 1)
|
||||
|
||||
CFLAGS += -DSOCKET_ZEP_MAX=$(ZEP_DEVICES)
|
||||
CFLAGS += -DCONFIG_DHCPV6_CLIENT_PFX_LEASE_MAX=$(ZEP_DEVICES)
|
||||
CFLAGS += -DASYNC_READ_NUMOF=$(shell expr $(ZEP_DEVICES) + 1)
|
||||
|
||||
# Set CFLAGS if not being set via Kconfig
|
||||
CFLAGS += $(if $(CONFIG_KCONFIG_MODULE_DHCPV6),,-DCONFIG_DHCPV6_CLIENT_PFX_LEASE_MAX=$(ZEP_DEVICES))
|
||||
|
||||
# -z [::1]:$PORT for each ZEP device
|
||||
TERMFLAGS += $(patsubst %,-z [::1]:%, $(shell seq $(ZEP_PORT_BASE) $(ZEP_PORT_MAX)))
|
||||
|
||||
|
||||
@ -13,3 +13,5 @@ rsource "gcoap/Kconfig"
|
||||
rsource "nanocoap/Kconfig"
|
||||
|
||||
endmenu # CoAP
|
||||
|
||||
rsource "dhcpv6/Kconfig"
|
||||
|
||||
19
sys/net/application_layer/dhcpv6/Kconfig
Normal file
19
sys/net/application_layer/dhcpv6/Kconfig
Normal file
@ -0,0 +1,19 @@
|
||||
# Copyright (c) 2020 Freie Universitaet Berlin
|
||||
#
|
||||
# This file is subject to the terms and conditions of the GNU Lesser
|
||||
# General Public License v2.1. See the file LICENSE in the top level
|
||||
# directory for more details.
|
||||
#
|
||||
menuconfig KCONFIG_MODULE_DHCPV6
|
||||
bool "Configure DHCPv6"
|
||||
depends on MODULE_DHCPV6
|
||||
help
|
||||
Configure DHCPv6 client using Kconfig.
|
||||
|
||||
if KCONFIG_MODULE_DHCPV6
|
||||
|
||||
config DHCPV6_CLIENT_PFX_LEASE_MAX
|
||||
int "Maximum number of prefix leases to be stored"
|
||||
default 1
|
||||
|
||||
endif # KCONFIG_MODULE_DHCPv6
|
||||
Loading…
x
Reference in New Issue
Block a user