aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_dnsparser_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-27 11:18:54 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-27 11:18:54 +0000
commit74e96c6a5a09d2c4c9f71f3a4eeef33240a1e90e (patch)
treee32c2de71f1a3c02c840cc4ddf3f8612ebca7c20 /src/include/gnunet_dnsparser_lib.h
parent7155b976e6bd1c0fab11786a5a0d789f537f3697 (diff)
downloadgnunet-74e96c6a5a09d2c4c9f71f3a4eeef33240a1e90e.tar.gz
gnunet-74e96c6a5a09d2c4c9f71f3a4eeef33240a1e90e.zip
-fixing the schanzenbug
Diffstat (limited to 'src/include/gnunet_dnsparser_lib.h')
-rw-r--r--src/include/gnunet_dnsparser_lib.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/include/gnunet_dnsparser_lib.h b/src/include/gnunet_dnsparser_lib.h
index a36996432..a3a77edf2 100644
--- a/src/include/gnunet_dnsparser_lib.h
+++ b/src/include/gnunet_dnsparser_lib.h
@@ -79,6 +79,7 @@
79 */ 79 */
80struct GNUNET_DNSPARSER_Flags 80struct GNUNET_DNSPARSER_Flags
81{ 81{
82#if __BYTE_ORDER == __LITTLE_ENDIAN
82 /** 83 /**
83 * Set to 1 if recursion is desired (client -> server) 84 * Set to 1 if recursion is desired (client -> server)
84 */ 85 */
@@ -128,6 +129,61 @@ struct GNUNET_DNSPARSER_Flags
128 * Set to 1 if recursion is available (server -> client) 129 * Set to 1 if recursion is available (server -> client)
129 */ 130 */
130 unsigned int recursion_available : 1 GNUNET_PACKED; 131 unsigned int recursion_available : 1 GNUNET_PACKED;
132#elif __BYTE_ORDER == __BIG_ENDIAN
133
134 /**
135 * See GNUNET_DNSPARSER_RETURN_CODE_ defines.
136 */
137 unsigned int return_code : 4 GNUNET_PACKED;
138
139 /**
140 * See RFC 4035.
141 */
142 unsigned int checking_disabled : 1 GNUNET_PACKED;
143
144 /**
145 * Response has been cryptographically verified, RFC 4035.
146 */
147 unsigned int authenticated_data : 1 GNUNET_PACKED;
148
149 /**
150 * Always zero.
151 */
152 unsigned int zero : 1 GNUNET_PACKED;
153
154 /**
155 * Set to 1 if recursion is available (server -> client)
156 */
157 unsigned int recursion_available : 1 GNUNET_PACKED;
158
159 /**
160 * Set to 1 if recursion is desired (client -> server)
161 */
162 unsigned int recursion_desired : 1 GNUNET_PACKED;
163
164 /**
165 * Set to 1 if message is truncated
166 */
167 unsigned int message_truncated : 1 GNUNET_PACKED;
168
169 /**
170 * Set to 1 if this is an authoritative answer
171 */
172 unsigned int authoritative_answer : 1 GNUNET_PACKED;
173
174 /**
175 * See GNUNET_DNSPARSER_OPCODE_ defines.
176 */
177 unsigned int opcode : 4 GNUNET_PACKED;
178
179 /**
180 * query:0, response:1
181 */
182 unsigned int query_or_response : 1 GNUNET_PACKED;
183
184#else
185 #error byteorder undefined
186#endif
131 187
132} GNUNET_GCC_STRUCT_LAYOUT; 188} GNUNET_GCC_STRUCT_LAYOUT;
133 189