[riot-notifications] [RIOT-OS/RIOT] gnrc_ipv6_nib: use generated EUI-64 for ARO build and check (#10817)

Martine Lenders notifications at github.com
Fri Jan 18 16:59:29 CET 2019


miri64 commented on this pull request.



> +#endif /* defined(MODULE_CC110X) || defined(MODULE_NRFMIN) */
+
+int gnrc_netif_eui64_from_addr(const gnrc_netif_t *netif,
+                               const uint8_t *addr, size_t addr_len,
+                               eui64_t *eui64)
+{
+#if GNRC_NETIF_L2ADDR_MAXLEN > 0
+    if (netif->flags & GNRC_NETIF_FLAGS_HAS_L2ADDR) {
+        switch (netif->device_type) {
+#if defined(MODULE_NETDEV_ETH) || defined(MODULE_ESP_NOW) || \
+    defined(MODULE_NORDIC_SOFTDEVICE_BLE)
+            case NETDEV_TYPE_ETHERNET:
+            case NETDEV_TYPE_ESP_NOW:
+            case NETDEV_TYPE_BLE:
+                if (addr_len == sizeof(eui48_t)) {
+                    eui48_to_eui64(eui64, (const eui48_t *)addr);

> 2. Change the signature of `eui48_to_eui64` to handle entries aligned to one byte. (The code does so already anyway.)

I'm in favor of that fix as well, however I don't understand where the alignment issue is coming from (sorry, I really have a knowledge gap there). Can I change the definition of `eui48_t` to make it go away?

-- 
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/10817#discussion_r249094057
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190118/e3baea37/attachment.html>


More information about the notifications mailing list