summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-manager.h
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-11-26 23:58:45 +0100
committerTom Gundersen <teg@jklm.no>2015-11-26 23:58:45 +0100
commitc283267467db7a7fde9d15042b907884118e8fea (patch)
tree96cd17736b87a93f5d563f30c6008c6914a24981 /src/resolve/resolved-manager.h
parentf7b5b034e8758079ddc7a915394704fc2a350c37 (diff)
parent422baca0f230913158078fddf884e06c8c64a316 (diff)
Merge pull request #2031 from poettering/resolved-search-domains
resolved. Fully implement search domains for single-label names
Diffstat (limited to 'src/resolve/resolved-manager.h')
-rw-r--r--src/resolve/resolved-manager.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/resolve/resolved-manager.h b/src/resolve/resolved-manager.h
index 074ce6c63d..d00c444583 100644
--- a/src/resolve/resolved-manager.h
+++ b/src/resolve/resolved-manager.h
@@ -27,6 +27,7 @@
#include "hashmap.h"
#include "list.h"
+#include "ordered-set.h"
typedef struct Manager Manager;
typedef enum Support Support;
@@ -40,9 +41,14 @@ enum Support {
};
#include "resolved-dns-query.h"
+#include "resolved-dns-search-domain.h"
+#include "resolved-dns-server.h"
#include "resolved-dns-stream.h"
#include "resolved-link.h"
+#define MANAGER_SEARCH_DOMAINS_MAX 32
+#define MANAGER_DNS_SERVERS_MAX 32
+
struct Manager {
sd_event *event;
@@ -68,9 +74,15 @@ struct Manager {
/* Unicast dns */
LIST_HEAD(DnsServer, dns_servers);
LIST_HEAD(DnsServer, fallback_dns_servers);
+ unsigned n_dns_servers; /* counts both main and fallback */
DnsServer *current_dns_server;
- bool read_resolv_conf;
+ LIST_HEAD(DnsSearchDomain, search_domains);
+ unsigned n_search_domains;
+
+ bool need_builtin_fallbacks:1;
+
+ bool read_resolv_conf:1;
usec_t resolv_conf_mtime;
LIST_HEAD(DnsScope, dns_scopes);
@@ -113,13 +125,6 @@ int manager_new(Manager **ret);
Manager* manager_free(Manager *m);
int manager_start(Manager *m);
-int manager_read_resolv_conf(Manager *m);
-int manager_write_resolv_conf(Manager *m);
-
-DnsServer *manager_set_dns_server(Manager *m, DnsServer *s);
-DnsServer *manager_find_dns_server(Manager *m, int family, const union in_addr_union *in_addr);
-DnsServer *manager_get_dns_server(Manager *m);
-void manager_next_dns_server(Manager *m);
uint32_t manager_find_mtu(Manager *m);
@@ -138,13 +143,14 @@ DnsScope* manager_find_scope(Manager *m, DnsPacket *p);
void manager_verify_all(Manager *m);
-void manager_flush_dns_servers(Manager *m, DnsServerType t);
-
DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
#define EXTRA_CMSG_SPACE 1024
int manager_is_own_hostname(Manager *m, const char *name);
+int manager_compile_dns_servers(Manager *m, OrderedSet **servers);
+int manager_compile_search_domains(Manager *m, OrderedSet **domains);
+
const char* support_to_string(Support p) _const_;
int support_from_string(const char *s) _pure_;