summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-server.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-dns-server.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-dns-server.h')
-rw-r--r--src/resolve/resolved-dns-server.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/resolve/resolved-dns-server.h b/src/resolve/resolved-dns-server.h
index 10111fd6bd..3a78d4a3b5 100644
--- a/src/resolve/resolved-dns-server.h
+++ b/src/resolve/resolved-dns-server.h
@@ -24,7 +24,6 @@
#include "in-addr-util.h"
typedef struct DnsServer DnsServer;
-typedef enum DnsServerSource DnsServerSource;
typedef enum DnsServerType {
DNS_SERVER_SYSTEM,
@@ -32,6 +31,7 @@ typedef enum DnsServerType {
DNS_SERVER_LINK,
} DnsServerType;
+#include "resolved-manager.h"
#include "resolved-link.h"
struct DnsServer {
@@ -40,7 +40,6 @@ struct DnsServer {
unsigned n_ref;
DnsServerType type;
-
Link *link;
int family;
@@ -51,23 +50,40 @@ struct DnsServer {
bool marked:1;
+ /* If linked is set, then this server appears in the servers linked list */
+ bool linked:1;
LIST_FIELDS(DnsServer, servers);
};
int dns_server_new(
Manager *m,
- DnsServer **s,
+ DnsServer **ret,
DnsServerType type,
- Link *l,
+ Link *link,
int family,
const union in_addr_union *address);
DnsServer* dns_server_ref(DnsServer *s);
DnsServer* dns_server_unref(DnsServer *s);
+void dns_server_unlink(DnsServer *s);
+void dns_server_move_back_and_unmark(DnsServer *s);
+
void dns_server_packet_received(DnsServer *s, usec_t rtt);
void dns_server_packet_lost(DnsServer *s, usec_t usec);
+DnsServer *dns_server_find(DnsServer *first, int family, const union in_addr_union *in_addr);
+
+void dns_server_unlink_all(DnsServer *first);
+void dns_server_unlink_marked(DnsServer *first);
+void dns_server_mark_all(DnsServer *first);
+
+DnsServer *manager_get_first_dns_server(Manager *m, DnsServerType t);
+
+DnsServer *manager_set_dns_server(Manager *m, DnsServer *s);
+DnsServer *manager_get_dns_server(Manager *m);
+void manager_next_dns_server(Manager *m);
+
DEFINE_TRIVIAL_CLEANUP_FUNC(DnsServer*, dns_server_unref);
extern const struct hash_ops dns_server_hash_ops;