From d9be29318d2ee9455c9e7d87944ee6d330b6c8b5 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 20 Jul 2021 15:30:34 +0200 Subject: [PATCH] gnrc_dhcpv6_client_mud_url: rename to dhcpv6_client_mud_url There is no real reason for that pseudo-module to use the `gnrc_` prefix. Neither does it need GNRC-components (except, but optionally, as a network stack of course), nor is it implemented with in the GNRC network stack. --- makefiles/pseudomodules.inc.mk | 2 +- sys/include/net/dhcpv6/client.h | 4 ++-- sys/net/application_layer/dhcpv6/Kconfig | 6 +++--- sys/net/application_layer/dhcpv6/client.c | 4 ++-- tests/gnrc_dhcpv6_client_6lbr/Makefile | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/makefiles/pseudomodules.inc.mk b/makefiles/pseudomodules.inc.mk index 3cbceaa961..9994f5edf7 100644 --- a/makefiles/pseudomodules.inc.mk +++ b/makefiles/pseudomodules.inc.mk @@ -25,6 +25,7 @@ PSEUDOMODULES += dbgpin PSEUDOMODULES += devfs_% PSEUDOMODULES += dhcpv6_% PSEUDOMODULES += dhcpv6_client_dns +PSEUDOMODULES += dhcpv6_client_mud_url PSEUDOMODULES += ecc_% PSEUDOMODULES += event_% PSEUDOMODULES += event_timeout_ztimer @@ -33,7 +34,6 @@ PSEUDOMODULES += evtimer_on_ztimer PSEUDOMODULES += fmt_% PSEUDOMODULES += gcoap_dtls PSEUDOMODULES += gnrc_dhcpv6_% -PSEUDOMODULES += gnrc_dhcpv6_client_mud_url PSEUDOMODULES += gnrc_ipv6_default PSEUDOMODULES += gnrc_ipv6_ext_frag_stats PSEUDOMODULES += gnrc_ipv6_router diff --git a/sys/include/net/dhcpv6/client.h b/sys/include/net/dhcpv6/client.h index f727fc3ac3..9d00eb2679 100644 --- a/sys/include/net/dhcpv6/client.h +++ b/sys/include/net/dhcpv6/client.h @@ -186,9 +186,9 @@ uint32_t dhcpv6_client_prefix_valid_until(unsigned netif, /** * @brief Length for the send buffer if a MUD URL is included in the DHCP client's packets * - * @note Only (re)defined by the `gnrc_dhcpv6_client_mud_url` pseudo-module. + * @note Only (re)defined by the `dhcpv6_client_mud_url` pseudo-module. */ -#if defined(MODULE_GNRC_DHCPV6_CLIENT_MUD_URL) || defined(DOXYGEN) +#if defined(MODULE_DHCPV6_CLIENT_MUD_URL) || defined(DOXYGEN) #define DHCPV6_CLIENT_SEND_BUFLEN (DHCPV6_CLIENT_BUFLEN + 256) #else #define DHCPV6_CLIENT_SEND_BUFLEN (DHCPV6_CLIENT_BUFLEN) diff --git a/sys/net/application_layer/dhcpv6/Kconfig b/sys/net/application_layer/dhcpv6/Kconfig index 23a4db8adf..0ab324af0f 100644 --- a/sys/net/application_layer/dhcpv6/Kconfig +++ b/sys/net/application_layer/dhcpv6/Kconfig @@ -16,7 +16,7 @@ config DHCPV6_CLIENT_PFX_LEASE_MAX int "Maximum number of prefix leases to be stored" default 1 -menuconfig KCONFIG_USEMODULE_GNRC_DHCPV6_CLIENT_MUD_URL +menuconfig KCONFIG_USEMODULE_DHCPV6_CLIENT_MUD_URL bool "Enable DHCPv6 Client MUD URL" help Enable the inclusion of a MUD URL in DHCPv6 packets @@ -25,10 +25,10 @@ menuconfig KCONFIG_USEMODULE_GNRC_DHCPV6_CLIENT_MUD_URL with a description of the device and its suggested network behavior. The URL must use the "https" scheme. -if KCONFIG_USEMODULE_GNRC_DHCPV6_CLIENT_MUD_URL +if KCONFIG_USEMODULE_DHCPV6_CLIENT_MUD_URL config DHCPV6_CLIENT_MUD_URL string "URL pointing to a Manufacturer Usage Description file" -endif # KCONFIG_USEMODULE_GNRC_DHCPV6_CLIENT_MUD_URL +endif # KCONFIG_USEMODULE_DHCPV6_CLIENT_MUD_URL endif # KCONFIG_USEMODULE_DHCPv6 diff --git a/sys/net/application_layer/dhcpv6/client.c b/sys/net/application_layer/dhcpv6/client.c index bab8b14e71..d4e0bbb612 100644 --- a/sys/net/application_layer/dhcpv6/client.c +++ b/sys/net/application_layer/dhcpv6/client.c @@ -129,7 +129,7 @@ static void *_thread(void *args) void dhcpv6_client_init(event_queue_t *eq, uint16_t netif) { assert(eq->waiter != NULL); - if (IS_USED(MODULE_GNRC_DHCPV6_CLIENT_MUD_URL)) { + if (IS_USED(MODULE_DHCPV6_CLIENT_MUD_URL)) { assert(strlen(mud_url) <= MAX_MUD_URL_LENGTH); assert(strncmp(mud_url, "https://", 8) == 0); } @@ -256,7 +256,7 @@ static inline size_t _compose_elapsed_time_opt(dhcpv6_opt_elapsed_time_t *time) static inline size_t _compose_mud_url_opt(dhcpv6_opt_mud_url_t *mud_url_opt, size_t len_max) { - if (!IS_USED(MODULE_GNRC_DHCPV6_CLIENT_MUD_URL)) { + if (!IS_USED(MODULE_DHCPV6_CLIENT_MUD_URL)) { return 0; } uint16_t len = strlen(mud_url); diff --git a/tests/gnrc_dhcpv6_client_6lbr/Makefile b/tests/gnrc_dhcpv6_client_6lbr/Makefile index 5a2439872a..35e485745d 100644 --- a/tests/gnrc_dhcpv6_client_6lbr/Makefile +++ b/tests/gnrc_dhcpv6_client_6lbr/Makefile @@ -4,8 +4,8 @@ include $(CURDIR)/../Makefile.tests_common export TAP ?= tap0 USEMODULE += auto_init_gnrc_netif +USEMODULE += dhcpv6_client_mud_url USEMODULE += gnrc_dhcpv6_client_6lbr -USEMODULE += gnrc_dhcpv6_client_mud_url USEMODULE += gnrc_netdev_default USEMODULE += gnrc_pktdump USEMODULE += gnrc_sixlowpan_border_router_default