]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/resolve/resolved-dns-server.h
resolved: packet - ensure there is space for IP+UDP headers
[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-link.h"
36
74b2466e
LP
37struct DnsServer {
38 Manager *manager;
74b2466e 39
4e945a6f
LP
40 DnsServerType type;
41
3c0cf502
LP
42 Link *link;
43
0dd25fb9 44 int family;
74b2466e
LP
45 union in_addr_union address;
46
3c0cf502 47 bool marked:1;
74b2466e
LP
48
49 LIST_FIELDS(DnsServer, servers);
50};
51
52int dns_server_new(
53 Manager *m,
54 DnsServer **s,
4e945a6f 55 DnsServerType type,
74b2466e 56 Link *l,
0dd25fb9 57 int family,
3c0cf502 58 const union in_addr_union *address);
74b2466e
LP
59
60DnsServer* dns_server_free(DnsServer *s);
87f5a193 61
d5099efc 62extern const struct hash_ops dns_server_hash_ops;