allow the service-dns to answer not only with an unchanged dns-packet, but
[oweals/gnunet.git] / src / vpn / gnunet-service-dns-p.h
1 #ifndef GN_DNS_SERVICE_P_H
2 #define GN_DNS_SERVICE_P_H
3
4 #include "gnunet_common.h"
5
6 struct query_packet {
7         struct GNUNET_MessageHeader hdr;
8         
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;
12
13         unsigned char data[1]; /* The DNS-Packet */
14 };
15
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;
20 };
21
22 enum GNUNET_DNS_ANSWER_Subtype {
23     /**
24      * Answers of this type contain a dns-packet that just has to be transmitted
25      */
26     GNUNET_DNS_ANSWER_TYPE_IP
27 };
28
29 struct answer_packet {
30     struct GNUNET_MessageHeader hdr;
31     enum GNUNET_DNS_ANSWER_Subtype subtype GNUNET_PACKED;
32
33     unsigned from:32 GNUNET_PACKED;
34     unsigned to:32 GNUNET_PACKED;
35     unsigned dst_port:16 GNUNET_PACKED;
36
37     unsigned char data[1];
38 };
39
40 struct answer_packet_list {
41         struct answer_packet_list* next GNUNET_PACKED;
42         struct answer_packet_list* prev GNUNET_PACKED;
43         struct answer_packet pkt;
44 };
45
46 #endif