resolved-manager.h revision b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f
#pragma once
/***
This file is part of systemd.
Copyright 2014 Tom Gundersen <teg@jklm.no>
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "sd-event.h"
#include "sd-netlink.h"
#include "sd-network.h"
#include "hashmap.h"
#include "list.h"
#include "ordered-set.h"
#include "resolve-util.h"
#include "resolved-dns-query.h"
#include "resolved-dns-search-domain.h"
#include "resolved-dns-server.h"
#include "resolved-dns-stream.h"
#include "resolved-dns-trust-anchor.h"
#include "resolved-link.h"
#define MANAGER_SEARCH_DOMAINS_MAX 32
#define MANAGER_DNS_SERVERS_MAX 32
struct Manager {
/* Network */
/* DNS query management */
unsigned n_dns_queries;
unsigned n_dns_streams;
/* Unicast dns */
unsigned n_dns_servers; /* counts both main and fallback */
unsigned n_search_domains;
bool permit_domain_search;
bool need_builtin_fallbacks:1;
bool read_resolv_conf:1;
/* LLMNR */
int llmnr_ipv4_udp_fd;
int llmnr_ipv6_udp_fd;
int llmnr_ipv4_tcp_fd;
int llmnr_ipv6_tcp_fd;
/* mDNS */
int mdns_ipv4_fd;
int mdns_ipv6_fd;
/* dbus */
/* The hostname we publish on LLMNR and mDNS */
char *llmnr_hostname;
char *mdns_hostname;
/* Watch the system hostname */
int hostname_fd;
/* Watch for system suspends */
unsigned n_transactions_total;
unsigned n_dnssec_verdict[_DNSSEC_VERDICT_MAX];
};
/* Manager */
int manager_start(Manager *m);
int manager_send(Manager *m, int fd, int ifindex, int family, const union in_addr_union *addr, uint16_t port, DnsPacket *p);
void manager_refresh_rrs(Manager *m);
int manager_next_hostname(Manager *m);
void manager_verify_all(Manager *m);
#define EXTRA_CMSG_SPACE 1024
bool manager_dnssec_supported(Manager *m);