]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/resolve/resolved-dns-server.h
machine-id-setup: don't try to read UUID from VM/container manager if we operate...
[thirdparty/systemd.git] / src / resolve / resolved-dns-server.h
CommitLineData
74b2466e
LP
1/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
3#pragma once
4
5/***
6 This file is part of systemd.
7
8 Copyright 2014 Lennart Poettering
9
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22***/
23
3c0cf502
LP
24#include "in-addr-util.h"
25
74b2466e
LP
26typedef struct DnsServer DnsServer;
27typedef enum DnsServerSource DnsServerSource;
28
4e945a6f
LP
29typedef enum DnsServerType {
30 DNS_SERVER_SYSTEM,
31 DNS_SERVER_FALLBACK,
32 DNS_SERVER_LINK,
33} DnsServerType;
34
3e684349
LP
35#include "resolved-manager.h"
36#include "resolved-link.h"
37
74b2466e
LP
38struct DnsServer {
39 Manager *manager;
74b2466e 40
4e945a6f
LP
41 DnsServerType type;
42
3c0cf502
LP
43 Link *link;
44
0dd25fb9 45 int family;
74b2466e
LP
46 union in_addr_union address;
47
3c0cf502 48 bool marked:1;
74b2466e
LP
49
50 LIST_FIELDS(DnsServer, servers);
51};
52
53int dns_server_new(
54 Manager *m,
55 DnsServer **s,
4e945a6f 56 DnsServerType type,
74b2466e 57 Link *l,
0dd25fb9 58 int family,
3c0cf502 59 const union in_addr_union *address);
74b2466e
LP
60
61DnsServer* dns_server_free(DnsServer *s);
87f5a193
LP
62
63unsigned long dns_server_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]);
64int dns_server_compare_func(const void *a, const void *b);