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

Martine Lenders notifications at github.com
Thu Sep 2 13:00:00 CEST 2021


@miri64 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):

If you want to have an example how to have this interact with `pexpect`/`testutils`, have a look at the [`emcute` test](https://github.com/RIOT-OS/RIOT/blob/master/examples/bindist/README.md) where I also used it to emulate an MQTT-SN broker.

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


More information about the notifications mailing list