resolved.h revision 1716f6dcf54d4c181c2e2558e3d5414f54c8d9ca
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
#pragma once
/***
This file is part of systemd.
Copyright 2013 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"
#include "resolved-dns-query.h"
#include "resolved-dns-server.h"
#include "resolved-dns-scope.h"
struct Manager {
bool use_llmnr:1;
/* Network */
/* DNS query management */
unsigned n_dns_queries;
/* Unicast dns */
int dns_ipv4_fd;
int dns_ipv6_fd;
/* LLMNR */
int llmnr_ipv4_udp_fd;
int llmnr_ipv6_udp_fd;
/* int llmnr_ipv4_tcp_fd; */
/* int llmnr_ipv6_tcp_fd; */
/* dbus */
};
/* Manager */
int manager_parse_config_file(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, unsigned char family, 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_connect_bus(Manager *m);
int config_parse_dnsv(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);