resolved-manager.h revision a51c10485af349eb15faa4d1a63b9818bcf3e589
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
#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"
enum Support {
_SUPPORT_INVALID = -1
};
#include "resolved-dns-query.h"
#include "resolved-dns-search-domain.h"
#include "resolved-dns-server.h"
#include "resolved-dns-stream.h"
#include "resolved-link.h"
struct Manager {
/* Network */
/* DNS query management */
unsigned n_dns_queries;
unsigned n_dns_streams;
/* Unicast dns */
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;
/* 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 */
};
/* 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
int support_from_string(const char *s) _pure_;