[riot-notifications] [RIOT-OS/RIOT] sys/net/dhcpv6: Add stateless DHCPv6 (#16731)

Jan Romann notifications at github.com
Thu Sep 2 12:52:25 CEST 2021


@JKRhb commented on this pull request.



> +    return sniffer
+
+
+def wait_for_dhcpv6_pkt(iface, sniffer=None, timeout=5):
+    if sniffer is None:
+        sniffer = start_sniffer(iface, "udp and dst port 547", count=3000)
+    sniffer.join(timeout=timeout)
+    if sniffer.results is None:
+        raise TimeoutError("Sniffing for DHCPv6 traffic timed out")
+    return [p for p in sniffer.results
+            # filter out packets only belonging to stop_filter if it existed
+            if sniffer.kwargs.get("stop_filter") is None or
+            sniffer.kwargs["stop_filter"](p)][-1]
+
+
+def wait_for_icmpv6_pkt(iface, sniffer=None, timeout=15):

Oh, that looks very promising! I'll try to refactor the test code using an automaton

-- 
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/16731#discussion_r700971088
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210902/e7e38b20/attachment.htm>


More information about the notifications mailing list