summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
77d0a7c)
We want to reference the servers from their active transactions, so make sure
they stay around as long as the transaction does.
This file is part of systemd.
Copyright 2014 Lennart Poettering
This file is part of systemd.
Copyright 2014 Lennart Poettering
- Copyright 2014 Tom Gundersen
systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct Link Link;
+#include "in-addr-util.h"
-#include "networkd-wait-online.h"
+typedef struct DnsServer DnsServer;
+typedef enum DnsServerSource DnsServerSource;
+typedef enum DnsServerType {
+ DNS_SERVER_SYSTEM,
+ DNS_SERVER_FALLBACK,
+ DNS_SERVER_LINK,
+} DnsServerType;
+
+#include "resolved-link.h"
+
+struct DnsServer {
- int ifindex;
- char *ifname;
- unsigned flags;
+ unsigned n_ref;
+
+ DnsServerType type;
+
+ Link *link;
- char *operational_state;
- char *state;
+ int family;
+ union in_addr_union address;
+
+ bool marked:1;
+
+ LIST_FIELDS(DnsServer, servers);
-int link_new(Manager *m, Link **ret, int ifindex, const char *ifname);
-Link *link_free(Link *l);
-int link_update_rtnl(Link *l, sd_netlink_message *m);
-int link_update_monitor(Link *l);
-bool link_relevant(Link *l);
+int dns_server_new(
+ Manager *m,
+ DnsServer **s,
+ DnsServerType type,
+ Link *l,
+ int family,
+ const union in_addr_union *address);
+
+DnsServer* dns_server_ref(DnsServer *s);
+DnsServer* dns_server_unref(DnsServer *s);
-DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_free);
+extern const struct hash_ops dns_server_hash_ops;