diff options
Diffstat (limited to 'src/vpn/gnunet-service-dns-p.h')
-rw-r--r-- | src/vpn/gnunet-service-dns-p.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/vpn/gnunet-service-dns-p.h b/src/vpn/gnunet-service-dns-p.h index dd564f434..a25b7fd3f 100644 --- a/src/vpn/gnunet-service-dns-p.h +++ b/src/vpn/gnunet-service-dns-p.h | |||
@@ -44,7 +44,13 @@ enum GNUNET_DNS_ANSWER_Subtype { | |||
44 | * Answers of this type contain an incomplete dns-packet as answer to a | 44 | * Answers of this type contain an incomplete dns-packet as answer to a |
45 | * PTR-Query. The resolved name is not allocated. The addroffset points to it. | 45 | * PTR-Query. The resolved name is not allocated. The addroffset points to it. |
46 | */ | 46 | */ |
47 | GNUNET_DNS_ANSWER_TYPE_REV | 47 | GNUNET_DNS_ANSWER_TYPE_REV, |
48 | |||
49 | /** | ||
50 | * Answers of this type contains an IP-Address but traffic to this IP should | ||
51 | * be routed through the GNUNet. | ||
52 | */ | ||
53 | GNUNET_DNS_ANSWER_TYPE_REMOTE | ||
48 | }; | 54 | }; |
49 | 55 | ||
50 | struct GNUNET_vpn_service_descriptor { | 56 | struct GNUNET_vpn_service_descriptor { |
@@ -55,19 +61,30 @@ struct GNUNET_vpn_service_descriptor { | |||
55 | }; | 61 | }; |
56 | 62 | ||
57 | struct answer_packet { | 63 | struct answer_packet { |
64 | /* General data */ | ||
58 | struct GNUNET_MessageHeader hdr; | 65 | struct GNUNET_MessageHeader hdr; |
59 | enum GNUNET_DNS_ANSWER_Subtype subtype GNUNET_PACKED; | 66 | enum GNUNET_DNS_ANSWER_Subtype subtype GNUNET_PACKED; |
60 | 67 | ||
61 | unsigned from:32 GNUNET_PACKED; | 68 | unsigned from:32 GNUNET_PACKED; |
62 | unsigned to:32 GNUNET_PACKED; | 69 | unsigned to:32 GNUNET_PACKED; |
63 | unsigned dst_port:16 GNUNET_PACKED; | 70 | unsigned dst_port:16 GNUNET_PACKED; |
71 | /* -- */ | ||
64 | 72 | ||
65 | /* Only sensible when subtype == GNUNET_DNS_ANSWER_TYPE_SERVICE */ | 73 | /* Data for GNUNET_DNS_ANSWER_TYPE_SERVICE */ |
66 | struct GNUNET_vpn_service_descriptor service_descr; | 74 | struct GNUNET_vpn_service_descriptor service_descr; |
75 | /* -- */ | ||
67 | 76 | ||
77 | /* Data for GNUNET_DNS_ANSWER_TYPE_REV */ | ||
68 | /* The offsett in octets from the beginning of the struct to the field | 78 | /* The offsett in octets from the beginning of the struct to the field |
69 | * in data where the IP-Address has to go. */ | 79 | * in data where the IP-Address has to go. */ |
70 | unsigned addroffset:16 GNUNET_PACKED; | 80 | uint16_t addroffset GNUNET_PACKED; |
81 | /* -- */ | ||
82 | |||
83 | /* Data for GNUNET_DNS_ANSWER_TYPE_REMOTE */ | ||
84 | /* either 4 or 16 */ | ||
85 | char addrsize; | ||
86 | unsigned char addr[16]; | ||
87 | /* -- */ | ||
71 | 88 | ||
72 | unsigned char data[1]; | 89 | unsigned char data[1]; |
73 | }; | 90 | }; |