[riot-notifications] [RIOT-OS/RIOT] gnrc_netif: make _get_iid() just wrapper around _iid_from_addr() (#10569)

Cenk Gündoğan notifications at github.com
Sun Jan 13 16:05:59 CET 2019


cgundogan commented on this pull request.



> +
+/**
+ * @brief   Converts an interface IID of an interface's hardware address
+ *
+ * @param[in] netif     The network interface @p iid came from
+ * @param[out] iid      The IID based on gnrc_netif_t::device_type
+ *
+ * @return  `sizeof(eui64_t)` on success.
+ * @return  -ENOTSUP, if interface has no link-layer address or if
+ *          gnrc_netif_t::device_type is not supported.
+ */
+static inline int gnrc_netif_ipv6_get_iid(gnrc_netif_t *netif, eui64_t *iid)
+{
+#if GNRC_NETIF_L2ADDR_MAXLEN > 0
+    if (netif->flags & GNRC_NETIF_FLAGS_HAS_L2ADDR) {
+        return gnrc_netif_ipv6_iid_from_addr(netif,

This can also return `-EINVAL` [1]. Maybe you add a hint to the doc of `gnrc_netif_ipv6_iid_from_addr()`?

[1] https://github.com/RIOT-OS/RIOT/blob/master/sys/net/gnrc/netif/gnrc_netif_device_type.c#L38

-- 
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/10569#pullrequestreview-191977800
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190113/a3b647c5/attachment.html>


More information about the notifications mailing list