[riot-notifications] [RIOT-OS/RIOT] Add MUD URL option to DHCPv6 client (#15508)

Jan Romann notifications at github.com
Sun Nov 29 01:51:59 CET 2020


@JKRhb commented on this pull request.

In the latest fixups I tried to add documentation to the new definitions created in the `client.h` header file. I hope I did this the correct way – feedback is highly appreciated!

> +
+/**
+ * @brief   MUD URL (must use the https:// scheme)
+ * For more info, see the [definitions](@ref net_dhcpv6_mud_url_option) below
+ */
+#ifndef CONFIG_DHCPV6_CLIENT_MUD_URL
+#define CONFIG_DHCPV6_CLIENT_MUD_URL "https://example.org"
+#endif
+

I tried to document this as a new config parameter.

> +/**
+ * @name DHCPv6 Manufacturer Usage Description (MUD) URL option definitions
+ * @see [RFC 8520, section 10](https://tools.ietf.org/html/rfc8520#section-10)
+ * @anchor  net_dhcpv6_mud_url_option
+ * @{
+ */
+
+/**
+ * @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.
+ */
+#if defined(MODULE_GNRC_DHCPV6_CLIENT_MUD_URL)
+#define DHCPV6_CLIENT_SEND_BUFLEN        (DHCPV6_CLIENT_BUFLEN)
+#else
+#define DHCPV6_CLIENT_SEND_BUFLEN        (DHCPV6_CLIENT_BUFLEN + 256)
+#endif
+
+/**
+ * @brief   Maximal length of a MUD URL
+ */
+#define MAX_MUD_URL_LENGTH (0xFF - sizeof(dhcpv6_opt_mud_url_t))
+
+/** @} */
+

I created a new section for the MUD specific definitions.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15508#pullrequestreview-540426577
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201128/a3c6cada/attachment.htm>


More information about the notifications mailing list