New issue
Advanced search Search tips

Issue 922161 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 846423



Sign in to add a comment

support MDNS listener through HostResolver

Project Member Reported by ericorth@chromium.org, Jan 15

Issue description

Primary motivation is servicification.  Design doc:
https://docs.google.com/document/d/1NmADJX00oRe9TxFCJTWl8ofdfyR22pbKT8-5Ad5lBsU/edit#heading=h.7nki9mck5t64

Summary relevant to this issue:
For servicification, we decided to create a single unified mojo API to handle all host resolution (anything querying a hostname for DNS-style results), rather than mirroring the multiple inconsistent APIs previously available in the C++ API in //net/dns. General strategy is to create the new and improved API in HostResolver and mirror in mojo rather than completely diverging mojo and C++ APIs.

Specific to MDNS listener: This functionality is only used by ServiceDiscoveryClient.  As ServiceDiscoveryClient is to be migrated to a mojo API based on non-address queries through HostResolver, it would be particularly painful for MDNS listening to use a wildly different API.  Additionally, both listening and querying should be using the same underlying MdnsClient/MdnsCache.  Therefore, MDNS listening should be supported through HostResolver and the mojo HostResolver.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 18 (5 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/026776a1193b5de116274d66e528e8194593efc5

commit 026776a1193b5de116274d66e528e8194593efc5
Author: Eric Orth <ericorth@chromium.org>
Date: Fri Jan 18 00:13:28 2019

Add MDNS listener support to HostResolver

MdnsClient supports creating listener objects to receive notifications
of updates to MDNS results. Create a simple HostResolverMdnsListener
wrapper to pass that support through HostResolver, providing similar
parsing and API as HostResolver query support. Also ensures that the
same MdnsClient instance owned by HostResolver is used for listening.

Not adding exhaustive options beyond needs for ServiceDiscoveryClient,
as that is likely to be our only usage of this support.

Bug: 922161
Change-Id: I2c0fb099ce5bbf7b970831202aa6a0f9f27ddbc7
Reviewed-on: https://chromium-review.googlesource.com/c/1381255
Reviewed-by: Asanka Herath <asanka@chromium.org>
Commit-Queue: Eric Orth <ericorth@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623924}
[modify] https://crrev.com/026776a1193b5de116274d66e528e8194593efc5/net/dns/BUILD.gn
[modify] https://crrev.com/026776a1193b5de116274d66e528e8194593efc5/net/dns/host_cache.cc
[modify] https://crrev.com/026776a1193b5de116274d66e528e8194593efc5/net/dns/host_cache.h
[modify] https://crrev.com/026776a1193b5de116274d66e528e8194593efc5/net/dns/host_resolver.cc
[modify] https://crrev.com/026776a1193b5de116274d66e528e8194593efc5/net/dns/host_resolver.h
[modify] https://crrev.com/026776a1193b5de116274d66e528e8194593efc5/net/dns/host_resolver_impl.cc
[modify] https://crrev.com/026776a1193b5de116274d66e528e8194593efc5/net/dns/host_resolver_impl.h
[modify] https://crrev.com/026776a1193b5de116274d66e528e8194593efc5/net/dns/host_resolver_impl_unittest.cc
[add] https://crrev.com/026776a1193b5de116274d66e528e8194593efc5/net/dns/host_resolver_mdns_listener_impl.cc
[add] https://crrev.com/026776a1193b5de116274d66e528e8194593efc5/net/dns/host_resolver_mdns_listener_impl.h
[modify] https://crrev.com/026776a1193b5de116274d66e528e8194593efc5/net/dns/host_resolver_mdns_task.cc
[modify] https://crrev.com/026776a1193b5de116274d66e528e8194593efc5/net/dns/host_resolver_mdns_task.h
[modify] https://crrev.com/026776a1193b5de116274d66e528e8194593efc5/net/dns/mdns_client.h
[modify] https://crrev.com/026776a1193b5de116274d66e528e8194593efc5/net/dns/mdns_client_impl.h

Project Member

Comment 2 by bugdroid, Today (6 hours ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f6d0633f19765e9277a5122cce7eb76b06b978c8

commit f6d0633f19765e9277a5122cce7eb76b06b978c8
Author: Eric Orth <ericorth@chromium.org>
Date: Tue Jan 22 23:47:17 2019

MockHostResolver support for MDNS listening

Bug: 922161
Change-Id: I5af39fa27674036b2969c1cf6e83226d84fb3585
Reviewed-on: https://chromium-review.googlesource.com/c/1412505
Commit-Queue: Eric Orth <ericorth@chromium.org>
Reviewed-by: Asanka Herath <asanka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624989}
[modify] https://crrev.com/f6d0633f19765e9277a5122cce7eb76b06b978c8/net/dns/mock_host_resolver.cc
[modify] https://crrev.com/f6d0633f19765e9277a5122cce7eb76b06b978c8/net/dns/mock_host_resolver.h

Sign in to add a comment