summaryrefslogtreecommitdiff
path: root/chromium/net/interfaces/host_resolver_service.mojom
blob: adcdca4d8a6cd16ea71b4f69c225aa1c7e1e3530 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// WARNING! Do NOT use this mojom. It is intended as a temporary interface to
// implement out-of-process proxy resolution. If you wish to use a Mojo DNS
// service, contact amistry@/sammc@ and net-dev to discuss a permanent Mojo DNS
// interface.

// Put Mojo definitions into their own namespace to avoid collisions with C++
// definitions.
// TODO(amistry): Resolve the conflict between these two sets of definitions.
module net.interfaces;

// Mirror of net::AddressFamily.
enum AddressFamily {
  UNSPECIFIED,
  IPV4,
  IPV6,
};

// Mirror of net::HostResolver::RequestInfo.
struct HostResolverRequestInfo {
  string host;
  uint16 port;
  AddressFamily address_family;
  bool is_my_ip_address;
};

// Mirror of net::IPEndPoint.
struct IPEndPoint {
  // IP address as a numeric value from most to least significant byte.
  // Will be of length 4 for IPv4 addresses and 16 for IPv6.
  array<uint8> address;
  uint16 port;
};

// Mirror of net::AddressList.
struct AddressList {
  array<IPEndPoint> addresses;
};

interface HostResolverRequestClient {
  // |error| is a value in net::Error.
  ReportResult(int32 error, AddressList result);
};