resolved-manager.h revision 3e684349c2cead2e6fd2f816c34eb17daba23a49
/*-*- 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-network.h"
#include "sd-rtnl.h"
#include "util.h"
#include "list.h"
#include "in-addr-util.h"
#include "hashmap.h"
enum Support {
_SUPPORT_INVALID = -1
};
#include "resolved-dns-query.h"
#include "resolved-dns-server.h"
#include "resolved-dns-scope.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 */
int dns_ipv4_fd;
int dns_ipv6_fd;
bool read_resolv_conf;
/* 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 *hostname;
/* Watch the system hostname */
int hostname_fd;
/* Watch for system suspends */
};
/* Manager */
int manager_start(Manager *m);
int manager_read_resolv_conf(Manager *m);
int manager_write_resolv_conf(Manager *m);
void manager_next_dns_server(Manager *m);
int manager_send(Manager *m, int fd, int ifindex, int family, const union in_addr_union *addr, uint16_t port, DnsPacket *p);
int manager_dns_ipv4_fd(Manager *m);
int manager_dns_ipv6_fd(Manager *m);
int manager_llmnr_ipv4_udp_fd(Manager *m);
int manager_llmnr_ipv6_udp_fd(Manager *m);
int manager_llmnr_ipv4_tcp_fd(Manager *m);
int manager_llmnr_ipv6_tcp_fd(Manager *m);
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_;