summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-query.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-31 17:46:40 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-31 17:47:19 +0200
commitec2c5e4398f9d65e5dfe61530f2556224733d1e6 (patch)
tree396107863c59c3e949f69f4a8050185c360b7f70 /src/resolve/resolved-dns-query.h
parentb5df2eabf3fdd3e1663bc4c948812472084f3e96 (diff)
resolved: implement LLMNR uniqueness verification
Diffstat (limited to 'src/resolve/resolved-dns-query.h')
-rw-r--r--src/resolve/resolved-dns-query.h55
1 files changed, 2 insertions, 53 deletions
diff --git a/src/resolve/resolved-dns-query.h b/src/resolve/resolved-dns-query.h
index 67fe7f6e8f..7fc11dfbf4 100644
--- a/src/resolve/resolved-dns-query.h
+++ b/src/resolve/resolved-dns-query.h
@@ -28,63 +28,20 @@
#include "set.h"
typedef struct DnsQuery DnsQuery;
-typedef struct DnsQueryTransaction DnsQueryTransaction;
#include "resolved.h"
#include "resolved-dns-scope.h"
#include "resolved-dns-rr.h"
-#include "resolved-dns-packet.h"
#include "resolved-dns-question.h"
#include "resolved-dns-answer.h"
#include "resolved-dns-stream.h"
-
-typedef enum DnsQueryState {
- DNS_QUERY_NULL,
- 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_ABORTED,
- _DNS_QUERY_STATE_MAX,
- _DNS_QUERY_STATE_INVALID = -1
-} DnsQueryState;
-
-struct DnsQueryTransaction {
- DnsScope *scope;
-
- DnsQuestion *question;
-
- DnsQueryState state;
- uint16_t id;
-
- DnsPacket *sent, *received;
- DnsAnswer *cached;
- int cached_rcode;
-
- sd_event_source *timeout_event_source;
- unsigned n_attempts;
-
- /* TCP connection logic, if we need it */
- DnsStream *stream;
-
- /* Queries this transaction is referenced by and that shall by
- * notified about this specific transaction completing. */
- Set *queries;
-
- unsigned block_gc;
-
- LIST_FIELDS(DnsQueryTransaction, transactions_by_scope);
-};
+#include "resolved-dns-transaction.h"
struct DnsQuery {
Manager *manager;
DnsQuestion *question;
- DnsQueryState state;
+ DnsTransactionState state;
unsigned n_cname_redirects;
sd_event_source *timeout_event_source;
@@ -109,11 +66,6 @@ struct DnsQuery {
LIST_FIELDS(DnsQuery, queries);
};
-DnsQueryTransaction* dns_query_transaction_free(DnsQueryTransaction *t);
-void dns_query_transaction_complete(DnsQueryTransaction *t, DnsQueryState state);
-
-void dns_query_transaction_process_reply(DnsQueryTransaction *t, DnsPacket *p);
-
int dns_query_new(Manager *m, DnsQuery **q, DnsQuestion *question);
DnsQuery *dns_query_free(DnsQuery *q);
@@ -122,7 +74,4 @@ void dns_query_ready(DnsQuery *q);
int dns_query_cname_redirect(DnsQuery *q, const char *name);
-const char* dns_query_state_to_string(DnsQueryState p) _const_;
-DnsQueryState dns_query_state_from_string(const char *s) _pure_;
-
DEFINE_TRIVIAL_CLEANUP_FUNC(DnsQuery*, dns_query_free);