]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/resolve/resolved-dns-scope.h
639c4b4e86c0e54fdf4da977601888c30b8495d2
1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
6 This file is part of systemd.
8 Copyright 2014 Lennart Poettering
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.
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.
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/>.
26 typedef struct DnsScope DnsScope
;
29 #include "resolved-link.h"
30 #include "resolved-dns-server.h"
31 #include "resolved-dns-packet.h"
32 #include "resolved-dns-query.h"
33 #include "resolved-dns-cache.h"
34 #include "resolved-dns-zone.h"
35 #include "resolved-dns-stream.h"
37 typedef enum DnsScopeMatch
{
42 _DNS_SCOPE_INVALID
= -1
58 LIST_HEAD(DnsQueryTransaction
, transactions
);
60 LIST_FIELDS(DnsScope
, scopes
);
63 int dns_scope_new(Manager
*m
, DnsScope
**ret
, Link
*l
, DnsProtocol p
, int family
);
64 DnsScope
* dns_scope_free(DnsScope
*s
);
66 int dns_scope_send(DnsScope
*s
, DnsPacket
*p
);
67 int dns_scope_tcp_socket(DnsScope
*s
, int family
, const union in_addr_union
*address
, uint16_t port
);
69 DnsScopeMatch
dns_scope_good_domain(DnsScope
*s
, const char *domain
);
70 int dns_scope_good_key(DnsScope
*s
, DnsResourceKey
*key
);
71 int dns_scope_good_dns_server(DnsScope
*s
, int family
, const union in_addr_union
*address
);
73 DnsServer
*dns_scope_get_server(DnsScope
*s
);
74 void dns_scope_next_dns_server(DnsScope
*s
);
76 int dns_scope_llmnr_membership(DnsScope
*s
, bool b
);
78 void dns_scope_process_query(DnsScope
*s
, DnsStream
*stream
, DnsPacket
*p
);