[riot-notifications] [RIOT-OS/RIOT] gnrc_netif2_ieee802154: drop duplicate broadcast packets (optionally) (#7577)

zhuoshuguo notifications at github.com
Thu Sep 7 12:39:53 CEST 2017


zhuoshuguo commented on this pull request.



> +    /* set broadcast flag for broadcast destination */
+    if ((dst_len == 2) && (dst[0] == 0xff) && (dst[1] == 0xff)) {
+        gnrc_netif_hdr_t *hdr = snip->data;
+        hdr->flags |= GNRC_NETIF_HDR_FLAGS_BROADCAST;
+    }
+    return snip;
+}
+
+#if MODULE_GNRC_NETIF2_DEDUP_BCAST
+static inline bool _already_received(netdev_t *dev, gnrc_netif_hdr_t *netif,
+                                     uint8_t *mhr)
+{
+    const uint8_t seq = ieee802154_get_seq(mhr);
+
+    return  (dev->last_pkt.seq == seq) &&
+            (((dev->last_pkt.was_bcast) && (netif->flags & GNRC_NETIF_HDR_FLAGS_BROADCAST)) ||

Ah, I see, and sorry for the noise. 

-- 
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/7577#discussion_r137504809
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20170907/01458881/attachment.html>


More information about the notifications mailing list