Add ability to broadcast/listen on IPv6 interfaces.
Modifies the SetUpMulticastSocket() function in internal_services.cc to
also function on IPv6 interfaces. Also, added helpful logging for common
Mac issue (Bonjour service running, using the mDNS multicast socket).
Change-Id: I6cd043d2621c12b2ba548ad125266551f73b5aa1
Reviewed-on: https://chromium-review.googlesource.com/c/1308577
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
diff --git a/platform/api/socket.h b/platform/api/socket.h
index 9f4f5c1..a97d1d6 100644
--- a/platform/api/socket.h
+++ b/platform/api/socket.h
@@ -20,6 +20,11 @@
UdpSocketPtr CreateUdpSocketIPv4();
UdpSocketPtr CreateUdpSocketIPv6();
+// Returns true if |socket| is not null and it belongs to the IPv4/IPv6 address
+// family.
+bool IsIPv4Socket(UdpSocketPtr socket);
+bool IsIPv6Socket(UdpSocketPtr socket);
+
// Closes the underlying platform socket and frees any allocated memory.
void DestroyUdpSocket(UdpSocketPtr socket);