diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-07-16 20:15:47 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-07-16 20:15:47 +0200 |
commit | ad867662936a4c7ab2c7116d804c272338801231 (patch) | |
tree | a7583840a30702971f5c38b31a12fe7cb69c2fd6 /src/resolve/resolved-dns-query.h | |
parent | c73ce96b569e2f10dff64b7dc0bd271972674c2a (diff) |
resolved: support for TCP DNS queries
Diffstat (limited to 'src/resolve/resolved-dns-query.h')
-rw-r--r-- | src/resolve/resolved-dns-query.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/resolve/resolved-dns-query.h b/src/resolve/resolved-dns-query.h index a07f174706..d5bc08dc30 100644 --- a/src/resolve/resolved-dns-query.h +++ b/src/resolve/resolved-dns-query.h @@ -39,10 +39,11 @@ typedef enum DnsQueryState { DNS_QUERY_SENT, DNS_QUERY_FAILURE, DNS_QUERY_SUCCESS, - DNS_QUERY_SKIPPED, + DNS_QUERY_NO_SERVERS, DNS_QUERY_TIMEOUT, DNS_QUERY_ATTEMPTS_MAX, DNS_QUERY_INVALID_REPLY, + DNS_QUERY_RESOURCES, } DnsQueryState; struct DnsQueryTransaction { @@ -55,7 +56,13 @@ struct DnsQueryTransaction { sd_event_source *timeout_event_source; unsigned n_attempts; - DnsPacket *packet; + DnsPacket *sent, *received; + + /* TCP connection logic */ + int tcp_fd; + sd_event_source *tcp_event_source; + size_t tcp_written, tcp_read; + be16_t tcp_read_size; LIST_FIELDS(DnsQueryTransaction, transactions_by_query); LIST_FIELDS(DnsQueryTransaction, transactions_by_scope); @@ -71,8 +78,7 @@ struct DnsQuery { sd_event_source *timeout_event_source; - uint16_t rcode; - DnsPacket *packet; + DnsPacket *received; sd_bus_message *request; unsigned char request_family; @@ -92,6 +98,6 @@ void dns_query_finish(DnsQuery *q); DnsQueryTransaction* dns_query_transaction_free(DnsQueryTransaction *t); int dns_query_transaction_start(DnsQueryTransaction *t); -int dns_query_transaction_reply(DnsQueryTransaction *t, DnsPacket *p); +void dns_query_transaction_reply(DnsQueryTransaction *t, DnsPacket *p); DEFINE_TRIVIAL_CLEANUP_FUNC(DnsQuery*, dns_query_free); |