]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/resolve/resolved-dns-server.h
nspawn: make sure that when --network-veth is used both the host and the container...
[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
39d8db04 29#include "resolved-manager.h"
74b2466e 30#include "resolved-link.h"
74b2466e 31
4e945a6f
LP
32typedef enum DnsServerType {
33 DNS_SERVER_SYSTEM,
34 DNS_SERVER_FALLBACK,
35 DNS_SERVER_LINK,
36} DnsServerType;
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);