blob: ea066bc7bbd24e0411442843ad8b8c0df3501cfd [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.
@available(added=11)
library fuchsia.net.name;
using fuchsia.net;
using zx;
/// Provides administration controls over name resolution settings.
@discoverable
closed protocol LookupAdmin {
/// 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
/// `SocketAddress` in `servers` must be a valid unicast socket address. The list of servers
/// will be deduplicated.
/// * error Returns `ZX_ERR_INVALID_ARGS` if any of the provided addresses does not meet the
/// conditions above.
strict SetDnsServers(struct {
servers vector<fuchsia.net.SocketAddress>:MAX;
}) -> () 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.
strict GetDnsServers() -> (struct {
servers vector<fuchsia.net.SocketAddress>:MAX;
});
};