summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-query.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-16 22:09:00 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-16 22:51:50 +0200
commit8ba9fd9cee0eef572f7b3ed7a8c3ed31160e93d3 (patch)
treec81f979a723ea841065dbd7742c8c74558a9db54 /src/resolve/resolved-dns-query.h
parent75616a1332aff00d27db713cda3bd93c508a5b59 (diff)
resolved: add CNAME lookup support
Diffstat (limited to 'src/resolve/resolved-dns-query.h')
-rw-r--r--src/resolve/resolved-dns-query.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/resolve/resolved-dns-query.h b/src/resolve/resolved-dns-query.h
index d5bc08dc30..864036acc7 100644
--- a/src/resolve/resolved-dns-query.h
+++ b/src/resolve/resolved-dns-query.h
@@ -36,14 +36,14 @@ typedef struct DnsQueryTransaction DnsQueryTransaction;
typedef enum DnsQueryState {
DNS_QUERY_NULL,
- DNS_QUERY_SENT,
+ DNS_QUERY_PENDING,
DNS_QUERY_FAILURE,
DNS_QUERY_SUCCESS,
DNS_QUERY_NO_SERVERS,
DNS_QUERY_TIMEOUT,
DNS_QUERY_ATTEMPTS_MAX,
DNS_QUERY_INVALID_REPLY,
- DNS_QUERY_RESOURCES,
+ DNS_QUERY_RESOURCES
} DnsQueryState;
struct DnsQueryTransaction {
@@ -75,11 +75,13 @@ struct DnsQuery {
unsigned n_keys;
DnsQueryState state;
+ unsigned n_cname;
sd_event_source *timeout_event_source;
DnsPacket *received;
+ /* Bus client information */
sd_bus_message *request;
unsigned char request_family;
const char *request_hostname;
@@ -94,10 +96,12 @@ struct DnsQuery {
int dns_query_new(Manager *m, DnsQuery **q, DnsResourceKey *keys, unsigned n_keys);
DnsQuery *dns_query_free(DnsQuery *q);
int dns_query_start(DnsQuery *q);
-void dns_query_finish(DnsQuery *q);
+int dns_query_follow_cname(DnsQuery *q, const char *name);
+int dns_query_matches_rr(DnsQuery *q, DnsResourceRecord *rr);
+int dns_query_matches_cname(DnsQuery *q, DnsResourceRecord *rr);
DnsQueryTransaction* dns_query_transaction_free(DnsQueryTransaction *t);
-int dns_query_transaction_start(DnsQueryTransaction *t);
void dns_query_transaction_reply(DnsQueryTransaction *t, DnsPacket *p);
+void dns_query_finish(DnsQuery *q);
DEFINE_TRIVIAL_CLEANUP_FUNC(DnsQuery*, dns_query_free);