aboutsummaryrefslogtreecommitdiff
path: root/src/dns/dns_new.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dns/dns_new.h')
-rw-r--r--src/dns/dns_new.h49
1 files changed, 8 insertions, 41 deletions
diff --git a/src/dns/dns_new.h b/src/dns/dns_new.h
index 4f3493db2..7cf3a316a 100644
--- a/src/dns/dns_new.h
+++ b/src/dns/dns_new.h
@@ -39,38 +39,16 @@ struct GNUNET_DNS_Request
39 struct GNUNET_MessageHeader header; 39 struct GNUNET_MessageHeader header;
40 40
41 /** 41 /**
42 * A DNS type (GNUNET_DNS_TYPE_*) 42 * Always zero.
43 */ 43 */
44 uint16_t dns_type GNUNET_PACKED; 44 uint32_t reserved GNUNET_PACKED;
45 45
46 /** 46 /**
47 * A DNS class (usually 1).
48 */
49 uint16_t dns_class GNUNET_PACKED;
50
51 /**
52 * Unique request ID. 47 * Unique request ID.
53 */ 48 */
54 uint64_t request_id GNUNET_PACKED; 49 uint64_t request_id GNUNET_PACKED;
55 50
56 /** 51 /* followed by original DNS request (without UDP header) */
57 * TTL if rdata is present, otherwise 0.
58 */
59 uint32_t dns_ttl GNUNET_PACKED;
60
61 /**
62 * Number of bytes of rdata that follow at the end.
63 */
64 uint16_t rdata_length GNUNET_PACKED;
65
66 /**
67 * Number of bytes of the name that follow right now (including 0-termination).
68 */
69 uint16_t name_length GNUNET_PACKED;
70
71 /* followed by char name[name_length] */
72
73 /* followed by char rdata[rdata_length] */
74 52
75}; 53};
76 54
@@ -86,27 +64,16 @@ struct GNUNET_DNS_Response
86 struct GNUNET_MessageHeader header; 64 struct GNUNET_MessageHeader header;
87 65
88 /** 66 /**
89 * TTL if rdata is present, otherwise 0. 67 * Zero to drop, 1 for no change (no payload), 2 for update (message has payload).
90 */ 68 */
91 uint32_t dns_ttl GNUNET_PACKED; 69 uint32_t drop_flag GNUNET_PACKED;
92 70
93 /** 71 /**
94 * Unique request ID, matches the original request. 72 * Unique request ID.
95 */ 73 */
96 uint64_t request_id GNUNET_PACKED; 74 uint64_t request_id GNUNET_PACKED;
97 75
98 /** 76 /* followed by original DNS request (without UDP header) */
99 * 1 to drop request, 0 to forward if there is no response
100 * or to answer if there is a response.
101 */
102 uint16_t drop_flag GNUNET_PACKED;
103
104 /**
105 * Number of bytes of rdata that follow at the end.
106 */
107 uint16_t rdata_length GNUNET_PACKED;
108
109 /* followed by char rdata[rdata_length] */
110 77
111}; 78};
112 79