aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_gnsrecord_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-06-06 11:06:15 +0000
committerChristian Grothoff <christian@grothoff.org>2014-06-06 11:06:15 +0000
commit552c240a850306b1ef4fc9cd831eedaf59995ddd (patch)
tree8610f11055354c793456753d1220c7eb83211463 /src/include/gnunet_gnsrecord_lib.h
parent2429173f65538442ae3d4fb58cc7a24a1d39f35f (diff)
downloadgnunet-552c240a850306b1ef4fc9cd831eedaf59995ddd.tar.gz
gnunet-552c240a850306b1ef4fc9cd831eedaf59995ddd.zip
-preliminary support for BOX records
Diffstat (limited to 'src/include/gnunet_gnsrecord_lib.h')
-rw-r--r--src/include/gnunet_gnsrecord_lib.h44
1 files changed, 42 insertions, 2 deletions
diff --git a/src/include/gnunet_gnsrecord_lib.h b/src/include/gnunet_gnsrecord_lib.h
index bc0a90cc2..5efaa64b7 100644
--- a/src/include/gnunet_gnsrecord_lib.h
+++ b/src/include/gnunet_gnsrecord_lib.h
@@ -71,14 +71,19 @@ extern "C"
71#define GNUNET_GNSRECORD_TYPE_GNS2DNS 65540 71#define GNUNET_GNSRECORD_TYPE_GNS2DNS 65540
72 72
73/** 73/**
74 * Record type for a boxed record (see TLSA/SRV handling in GNS).
75 */
76#define GNUNET_GNSRECORD_TYPE_BOX 65541
77
78/**
74 * Record type for a social place. 79 * Record type for a social place.
75 */ 80 */
76#define GNUNET_GNSRECORD_TYPE_PLACE 65541 81#define GNUNET_GNSRECORD_TYPE_PLACE 65542
77 82
78/** 83/**
79 * Record type for a phone (of CONVERSATION). 84 * Record type for a phone (of CONVERSATION).
80 */ 85 */
81#define GNUNET_GNSRECORD_TYPE_PHONE 65542 86#define GNUNET_GNSRECORD_TYPE_PHONE 65543
82 87
83 88
84/** 89/**
@@ -202,6 +207,41 @@ struct GNUNET_GNSRECORD_Block
202 /* followed by encrypted data */ 207 /* followed by encrypted data */
203}; 208};
204 209
210
211/**
212 * Record type used to box up SRV and TLSA records. For example, a
213 * TLSA record for "_https._tcp.foo.gnu" will be stored under
214 * "foo.gnu" as a BOX record with service 443 (https) and protocol 6
215 * (tcp) and record_type "TLSA". When a BOX record is received, GNS
216 * unboxes it if the name contained "_SERVICE._PROTO", otherwise GNS
217 * leaves it untouched. This is done to ensure that TLSA (and SRV)
218 * records do not require a separate network request, thus making TLSA
219 * records inseparable from the "main" A/AAAA/VPN/etc. records.
220 */
221struct GNUNET_GNSRECORD_BoxRecord
222{
223
224 /**
225 * Protocol of the boxed record (6 = TCP, 17 = UDP, etc.).
226 * Yes, in IP protocols are usually limited to 8 bits. In NBO.
227 */
228 uint16_t protocol GNUNET_PACKED;
229
230 /**
231 * Service of the boxed record (aka port number), in NBO.
232 */
233 uint16_t service GNUNET_PACKED;
234
235 /**
236 * GNS record type of the boxed record. In NBO.
237 */
238 uint32_t record_type GNUNET_PACKED;
239
240 /* followed by the 'original' record */
241
242};
243
244
205GNUNET_NETWORK_STRUCT_END 245GNUNET_NETWORK_STRUCT_END
206 246
207 247