1 #ifndef GN_DNS_SERVICE_P_H
2 #define GN_DNS_SERVICE_P_H
4 #include "gnunet_common.h"
7 struct GNUNET_MessageHeader hdr;
9 unsigned orig_to:32 GNUNET_PACKED; /* The IP-Address, this query was originally sent to */
10 unsigned orig_from:32 GNUNET_PACKED;
11 unsigned src_port:16 GNUNET_PACKED;
13 unsigned char data[1]; /* The DNS-Packet */
16 struct query_packet_list {
17 struct query_packet_list* next GNUNET_PACKED;
18 struct query_packet_list* prev GNUNET_PACKED;
19 struct query_packet pkt;
22 enum GNUNET_DNS_ANSWER_Subtype {
24 * Answers of this type contain a dns-packet that just has to be transmitted
26 GNUNET_DNS_ANSWER_TYPE_IP,
29 * Answers of this type contain an struct GNUNET_DNS_Record
31 GNUNET_DNS_ANSWER_TYPE_SERVICE
34 struct answer_packet {
35 struct GNUNET_MessageHeader hdr;
36 enum GNUNET_DNS_ANSWER_Subtype subtype GNUNET_PACKED;
38 unsigned from:32 GNUNET_PACKED;
39 unsigned to:32 GNUNET_PACKED;
40 unsigned dst_port:16 GNUNET_PACKED;
43 GNUNET_HashCode service_descriptor;
45 uint32_t service_type;
47 unsigned addroffset:16 GNUNET_PACKED;
49 unsigned char data[1];
52 struct answer_packet_list {
53 struct answer_packet_list* next GNUNET_PACKED;
54 struct answer_packet_list* prev GNUNET_PACKED;
55 struct answer_packet pkt;