blob: 8161904e3730e7f6bb34a2b3c46c9e2de54a08dd [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;
/// Extra information about statically set DNS servers.
type StaticDnsServerSource = table {};
/// Extra information about DNS servers discovered through DHCPv4.
type DhcpDnsServerSource = table {
/// The interface index over which this server was discovered.
1: source_interface uint64;
};
/// Extra information about DNS servers discovered through NDP.
type NdpDnsServerSource = table {
/// The interface index over which this server was discovered.
1: source_interface uint64;
};
/// Extra information about DNS servers discovered through DHCPv6.
type Dhcpv6DnsServerSource = table {
/// The interface index over which this server was discovered.
1: source_interface uint64;
};
/// The configuration source for a [`fuchsia.net.name/DnsServer`].
type DnsServerSource = strict union {
/// The server is statically configured through
/// [`fuchsia.net.name/LookupAdmin.SetDefaultServers`].
1: static_source StaticDnsServerSource;
/// The server was discovered through DHCPv4.
2: dhcp DhcpDnsServerSource;
/// The server was discovered through an NDP Router Advertisement.
3: ndp NdpDnsServerSource;
/// The server was discovered through DHCPv6.
4: dhcpv6 Dhcpv6DnsServerSource;
};
/// A DNS server configuration.
type DnsServer = table {
/// The server's address, must be provided.
1: address fuchsia.net.SocketAddress;
/// The configuration source for this server. Defaults to
/// [`fuchsia.net.name/DnsServerSource.static_source`].
2: source DnsServerSource;
};