chiark / gitweb /
Reject invalid quoted strings
[elogind.git] / src / resolve / resolved-dns-scope.h
index 32541f12ab6b86c3dd0ce955c7a82cc90713ba5d..639c4b4e86c0e54fdf4da977601888c30b8495d2 100644 (file)
@@ -31,6 +31,8 @@ typedef struct DnsScope DnsScope;
 #include "resolved-dns-packet.h"
 #include "resolved-dns-query.h"
 #include "resolved-dns-cache.h"
+#include "resolved-dns-zone.h"
+#include "resolved-dns-stream.h"
 
 typedef enum DnsScopeMatch {
         DNS_SCOPE_NO,
@@ -44,29 +46,33 @@ struct DnsScope {
         Manager *manager;
 
         DnsProtocol protocol;
-        unsigned char family;
+        int family;
 
         Link *link;
 
         char **domains;
 
         DnsCache cache;
+        DnsZone zone;
 
         LIST_HEAD(DnsQueryTransaction, transactions);
 
         LIST_FIELDS(DnsScope, scopes);
 };
 
-int dns_scope_new(Manager *m, DnsScope **ret, Link *l, DnsProtocol p, unsigned char family);
+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_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);
 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);
 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);