| // Copyright 2019 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.router.config; |
| using fuchsia.net; |
| |
| /// DnsSearch is the device DNS search configuration. |
| struct DnsSearch { |
| /// List of DNS servers to consult. |
| vector<fuchsia.net.IpAddress> servers; |
| /// Domain to add to non fully qualified domain names. |
| string? domain_name; |
| }; |
| |
| /// DnsPolicy is the DNS merge policy to use. |
| enum DnsPolicy { |
| NOT_SET = 0; |
| /// Can not be replaced by dynamically learned DNS configuration, will overwrite existing configuration. |
| STATIC = 1; |
| /// Can be replaced by dynamically learned DNS configuration, will not overwrite existing configuration. |
| REPLACEABLE = 2; |
| /// Will merge with existing configuration. |
| MERGE = 3; |
| }; |
| |
| /// DnsResolverConfig is the device DNS Resolver configuration. |
| struct DnsResolverConfig { |
| Id element; |
| /// DNS search configuration. |
| DnsSearch search; |
| /// DNS configuration merge policy. |
| DnsPolicy policy; |
| }; |
| |
| /// DNSForwarderConfig is the device DNS Forwarder configuration. |
| struct DnsForwarderConfig { |
| Id element; |
| /// Upstream DNS server. |
| DnsSearch search; |
| }; |
| |
| /// DNSForwarder entry is a name - address mapping. |
| struct DnsForwarderEntry { |
| Id element; |
| fuchsia.net.Ipv4Address address; |
| vector<string> names; |
| }; |
| |
| /// DNSForwarder the device DNS Forwarder configuration. |
| struct DnsForwarder { |
| /// Forwarder configuration. |
| DnsForwarderConfig config; |
| /// Local Names. |
| vector <DnsForwarderEntry> resolver; |
| /// Interfaces where the DNS forwarder is enabled. |
| vector<Id> interfaces; |
| }; |