[riot-notifications] [RIOT-OS/RIOT] tools/zep_dispatch: add support for advanced topologies (#15773)

benpicco notifications at github.com
Tue Jul 6 18:08:27 CEST 2021


@benpicco commented on this pull request.



> +                   (memcmp(super->b->mac, mac_src, mac_src_len) == 0)) {
+            /* packet loss */
+            if (random() > super->weight_b_a * INT_MAX) {
+                return;
+            }
+            zep_set_lqi(buffer, super->weight_b_a * 0xFF);
+            sendto(sock, buffer, len, 0, (struct sockaddr*)&super->a->addr, sizeof(super->a->addr));
+        }
+    }
+}
+
+bool topology_add(topology_t *t, const uint8_t *mac, uint8_t mac_len,
+                  struct sockaddr_in6 *addr)
+{
+    struct node *empty = NULL;
+    char addr_str[3 * HW_ADDR_MAX_LEN];

Each address byte gets turned into `12:` or `12\0` 

-- 
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/15773#discussion_r664693182
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210706/4cee5079/attachment.htm>


More information about the notifications mailing list