blob: f9720c282b6f6f865b33f8df658e47132b6a94ee [file] [log] [blame]
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.net.name;
using fuchsia.net;
using zx;
/// Provides administration controls over name resolution settings.
[Discoverable]
protocol LookupAdmin {
/// Sets the default DNS servers to `servers`.
///
/// This method is deprecated. New implementations should use `SetDnsServers`.
///
/// + request `servers` The list of servers to use for domain name resolution, in priority
/// order. An empty list means no default servers will be used. Only valid unicast addresses
/// will be accepted. Servers obtained at runtime via DHCP or NDP will be preferred over the
/// ones specified here.
/// * error Returns `ZX_ERR_INVALID_ARGS` if any of the provided addresses does not meet the
/// conditions above.
// TODO(52055): Remove this method.
SetDefaultDnsServers(vector<fuchsia.net.IpAddress>:MAX servers) -> () error zx.status;
/// Sets the DNS servers to `servers`
///
/// + request `servers` The list of servers to use for domain name resolution, in priority
/// order. An empty list means no servers will be used and name resolution may fail. Each
/// `DnsServer` in `servers` must hold a valid unicast socket address.
/// * error Returns `ZX_ERR_INVALID_ARGS` if any of the provided addresses does not meet the
/// conditions above.
SetDnsServers(vector<DnsServer>:MAX servers) -> () error zx.status;
/// Gets the DNS servers currently in use to resolve name lookups.
/// - response `servers` The list of servers in use by `LookupAdmin`, in priority order.
GetDnsServers() -> (vector<DnsServer>:MAX servers);
};