[riot-notifications] [RIOT-OS/RIOT] sys/net/dhcpv6: Add IA_NA support to the DHCPv6 client (#16228)

Jan Romann notifications at github.com
Mon Aug 9 19:41:39 CEST 2021


@JKRhb commented on this pull request.



> + * @param[in] netif     Network interface the address was for.
+ * @param[in] addr      The address to deprecate.
+ *
+ * @return  true, if the address was deprecated successfully.
+ */
+bool dhcpv6_client_deprecate_addr(unsigned netif, const ipv6_addr_t *addr);
+
+/**
+ * @brief   Removes an existing address that originated from an address lease.
+ *
+ * @param[in] netif     Network interface the address was for.
+ * @param[in] addr      The address to remove.
+ *
+ * @return  true, if the address was removed successfully.
+ */
+bool dhcpv6_client_remove_addr(unsigned netif, ipv6_addr_t *addr);

The signature of `gnrc_netif_ipv6_addr_remove` (and `gnrc_netif_ipv6_addr_add`, respectively) is 

```c
static inline int gnrc_netif_ipv6_addr_remove(const gnrc_netif_t *netif, ipv6_addr_t *addr)
```

which lead to the compiler error 

> error: passing argument 2 of ‘gnrc_netif_ipv6_addr_add’ discards ‘const’ 
> qualifier from pointer target type [-Werror=discarded-qualifiers]

This was also the reason why I used the internal functions as those actually have `const` address parameters. Is there an easy fix for this problem or would the parameters of the gnrc functions have to be made `const` for this as well?

-- 
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/16228#discussion_r685394781
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210809/53b04758/attachment.htm>


More information about the notifications mailing list