X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fresolve%2Fresolved-dns-scope.h;h=cfbde1343f49641234e6aa6764d5750f2409fb2b;hb=32a568fb90bf0a22a3007fa670305403a5d0bb72;hp=6c93fa80be3a1c4ec3399a6f0ecc263c8f877e07;hpb=0dd25fb9f005d8ab7ac4bc10a609d00569f8c56a;p=elogind.git diff --git a/src/resolve/resolved-dns-scope.h b/src/resolve/resolved-dns-scope.h index 6c93fa80b..cfbde1343 100644 --- a/src/resolve/resolved-dns-scope.h +++ b/src/resolve/resolved-dns-scope.h @@ -25,12 +25,11 @@ typedef struct DnsScope DnsScope; -#include "resolved.h" -#include "resolved-link.h" #include "resolved-dns-server.h" #include "resolved-dns-packet.h" -#include "resolved-dns-query.h" #include "resolved-dns-cache.h" +#include "resolved-dns-zone.h" +#include "resolved-link.h" typedef enum DnsScopeMatch { DNS_SCOPE_NO, @@ -51,8 +50,14 @@ struct DnsScope { char **domains; DnsCache cache; + DnsZone zone; + + OrderedHashmap *conflict_queue; + sd_event_source *conflict_event_source; + + RateLimit ratelimit; - LIST_HEAD(DnsQueryTransaction, transactions); + LIST_HEAD(DnsTransaction, transactions); LIST_FIELDS(DnsScope, scopes); }; @@ -60,13 +65,21 @@ struct DnsScope { int dns_scope_new(Manager *m, DnsScope **ret, Link *l, DnsProtocol p, int family); DnsScope* dns_scope_free(DnsScope *s); -int dns_scope_send(DnsScope *s, DnsPacket *p); -int dns_scope_tcp_socket(DnsScope *s); +int dns_scope_emit(DnsScope *s, DnsPacket *p); +int dns_scope_tcp_socket(DnsScope *s, int family, const union in_addr_union *address, uint16_t port); -DnsScopeMatch dns_scope_good_domain(DnsScope *s, const char *domain); +DnsScopeMatch dns_scope_good_domain(DnsScope *s, int ifindex, uint64_t flags, const char *domain); int dns_scope_good_key(DnsScope *s, DnsResourceKey *key); +int dns_scope_good_dns_server(DnsScope *s, int family, const union in_addr_union *address); -DnsServer *dns_scope_get_server(DnsScope *s); +DnsServer *dns_scope_get_dns_server(DnsScope *s); void dns_scope_next_dns_server(DnsScope *s); int dns_scope_llmnr_membership(DnsScope *s, bool b); + +void dns_scope_process_query(DnsScope *s, DnsStream *stream, DnsPacket *p); + +DnsTransaction *dns_scope_find_transaction(DnsScope *scope, DnsQuestion *question, bool cache_ok); + +int dns_scope_notify_conflict(DnsScope *scope, DnsResourceRecord *rr); +void dns_scope_check_conflicts(DnsScope *scope, DnsPacket *p);