summaryrefslogtreecommitdiffstats
path: root/net/dns/mdns_client.h
diff options
context:
space:
mode:
authorvitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-10 10:53:06 +0000
committervitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-10 10:53:06 +0000
commit90d321483e44d328b38b2f9f4771982634ddb546 (patch)
treeb1d437137afefc2d2693a070545be065b74a8c59 /net/dns/mdns_client.h
parentc49c636f06ca510f6cbd16087f84950f7484d827 (diff)
downloadchromium_src-90d321483e44d328b38b2f9f4771982634ddb546.zip
chromium_src-90d321483e44d328b38b2f9f4771982634ddb546.tar.gz
chromium_src-90d321483e44d328b38b2f9f4771982634ddb546.tar.bz2
Use all interfaces for mdns. Instead of one IPv4 and one IPv6 sockets mdns uses one socket per network interface and IP protocol.
Windows version enumerate network interfaces during pre-sandbox initialization in Utility process. It creates and store socket pert interface and IP protocols version. Late these sockets will be used be MDnsSocketFactory implementation. Linux version enumerates network in browser process before starting utility process. Then sockets will be sent by IPC to utility process and used by MDnsSocketFactory implementation. BUG=319068 Review URL: https://codereview.chromium.org/101083003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239751 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/dns/mdns_client.h')
-rw-r--r--net/dns/mdns_client.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/net/dns/mdns_client.h b/net/dns/mdns_client.h
index b4a1bc67..ab7916e 100644
--- a/net/dns/mdns_client.h
+++ b/net/dns/mdns_client.h
@@ -165,7 +165,20 @@ class NET_EXPORT MDnsClient {
static scoped_ptr<MDnsClient> CreateDefault();
};
-IPEndPoint NET_EXPORT GetMDnsIPEndPoint(AddressFamily address_family);
+NET_EXPORT IPEndPoint GetMDnsIPEndPoint(AddressFamily address_family);
+
+typedef std::vector<std::pair<uint32, AddressFamily> > InterfaceIndexFamilyList;
+// Returns pairs of interface and address family to bind. Current
+// implementation returns unique list of all available interfaces.
+NET_EXPORT InterfaceIndexFamilyList GetMDnsInterfacesToBind();
+
+// Create sockets, binds socket to MDns endpoint, and sets multicast interface
+// and joins multicast group on for |interface_index|.
+// Returns NULL if failed.
+NET_EXPORT scoped_ptr<DatagramServerSocket> CreateAndBindMDnsSocket(
+ AddressFamily address_family,
+ uint32 interface_index);
} // namespace net
+
#endif // NET_DNS_MDNS_CLIENT_H_