resolved-dns-scope.h revision 011696f76233486bc56c266b18a328924f70269c
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering This file is part of systemd.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering Copyright 2014 Lennart Poettering
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering systemd is free software; you can redistribute it and/or modify it
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering under the terms of the GNU Lesser General Public License as published by
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering (at your option) any later version.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering systemd is distributed in the hope that it will be useful, but
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering Lesser General Public License for more details.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering You should have received a copy of the GNU Lesser General Public License
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
71d35b6b5563817dfbe757ab9e3b9f018b2db491Thomas Hindoe Paaboel Andersen#include "resolved-dns-packet.h"
71d35b6b5563817dfbe757ab9e3b9f018b2db491Thomas Hindoe Paaboel Andersen#include "resolved-dns-server.h"
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering LIST_HEAD(DnsQueryCandidate, query_candidates);
f9ebb22ab4758bc5bbaaf8eeead74b5b4f81d5c3Lennart Poettering /* Note that we keep track of ongoing transactions in two
f9ebb22ab4758bc5bbaaf8eeead74b5b4f81d5c3Lennart Poettering * ways: once in a hashmap, indexed by the rr key, and once in
f9ebb22ab4758bc5bbaaf8eeead74b5b4f81d5c3Lennart Poettering * a linked list. We use the hashmap to quickly find
f9ebb22ab4758bc5bbaaf8eeead74b5b4f81d5c3Lennart Poettering * transactions we can reuse for a key. But note that there
f9ebb22ab4758bc5bbaaf8eeead74b5b4f81d5c3Lennart Poettering * might be multiple transactions for the same key (because
f9ebb22ab4758bc5bbaaf8eeead74b5b4f81d5c3Lennart Poettering * the zone probing can't reuse a transaction answered from
f9ebb22ab4758bc5bbaaf8eeead74b5b4f81d5c3Lennart Poettering * the zone or the cache), and the hashmap only tracks the
f9ebb22ab4758bc5bbaaf8eeead74b5b4f81d5c3Lennart Poettering * most recent entry. */
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart Poetteringint dns_scope_new(Manager *m, DnsScope **ret, Link *l, DnsProtocol p, int family);
9df3ba6c6cb65eecec06f39dfe85a3596cedac4eTom Gundersenvoid dns_scope_packet_received(DnsScope *s, usec_t rtt);
9df3ba6c6cb65eecec06f39dfe85a3596cedac4eTom Gundersenvoid dns_scope_packet_lost(DnsScope *s, usec_t usec);
519ef04651b07a547f010d6462603669d7fde4e5Lennart Poetteringint dns_scope_emit_udp(DnsScope *s, int fd, DnsPacket *p);
519ef04651b07a547f010d6462603669d7fde4e5Lennart Poetteringint dns_scope_socket_tcp(DnsScope *s, int family, const union in_addr_union *address, DnsServer *server, uint16_t port);
519ef04651b07a547f010d6462603669d7fde4e5Lennart Poetteringint dns_scope_socket_udp(DnsScope *s, DnsServer *server, uint16_t port);
51323288fc628a5cac50914df915545d685b793eLennart PoetteringDnsScopeMatch dns_scope_good_domain(DnsScope *s, int ifindex, uint64_t flags, const char *domain);
011696f76233486bc56c266b18a328924f70269cLennart Poetteringbool dns_scope_good_key(DnsScope *s, const DnsResourceKey *key);
2c27fbca2d88214bd305272308a370a962818f1eLennart PoetteringDnsServer *dns_scope_get_dns_server(DnsScope *s);
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poetteringvoid dns_scope_next_dns_server(DnsScope *s);
1716f6dcf54d4c181c2e2558e3d5414f54c8d9caLennart Poetteringint dns_scope_llmnr_membership(DnsScope *s, bool b);
0db4c90afd7d9c7c8884bf8b3ec459edc74a03daDaniel Mackint dns_scope_mdns_membership(DnsScope *s, bool b);
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poetteringvoid dns_scope_process_query(DnsScope *s, DnsStream *stream, DnsPacket *p);
f52e61da047d7fc74e83f12dbbf87e0cbcc51c73Lennart PoetteringDnsTransaction *dns_scope_find_transaction(DnsScope *scope, DnsResourceKey *key, bool cache_ok);
a407657425a3e47fd2b559cd3bc800f791303f63Lennart Poetteringint dns_scope_notify_conflict(DnsScope *scope, DnsResourceRecord *rr);
a407657425a3e47fd2b559cd3bc800f791303f63Lennart Poetteringvoid dns_scope_check_conflicts(DnsScope *scope, DnsPacket *p);
4d506d6bb757af3b99e0876234c465e6898c5ea4Lennart Poetteringvoid dns_scope_dump(DnsScope *s, FILE *f);
a51c10485af349eb15faa4d1a63b9818bcf3e589Lennart PoetteringDnsSearchDomain *dns_scope_get_search_domains(DnsScope *s);