};
// DNS-Stuff
-struct dns_pkt {
+struct dns_static {
unsigned short id GNUNET_PACKED;
unsigned rd:1 GNUNET_PACKED; // recursion desired (client -> server)
unsigned short ancount GNUNET_PACKED; // number of answers
unsigned short nscount GNUNET_PACKED; // number of authority-records
unsigned short arcount GNUNET_PACKED; // number of additional records
+};
+
+struct dns_pkt {
+ struct dns_static s;
unsigned char data[1];
};
+struct dns_pkt_parsed {
+ struct dns_static s;
+ struct dns_query** queries;
+ struct dns_record** answers;
+ struct dns_record** nameservers;
+ struct dns_record** additional;
+};
+
struct dns_query {
- unsigned char* name;
+ char* name;
+ unsigned char namelen;
unsigned short qtype;
unsigned short qclass;
};
struct dns_record {
- unsigned char* name;
+ char* name;
+ unsigned char namelen;
unsigned short type;
unsigned short class;
unsigned int ttl;