aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gnunet-dns2gns.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-08-21 15:19:21 +0000
committerChristian Grothoff <christian@grothoff.org>2013-08-21 15:19:21 +0000
commitb98e0afd91337dd69af31cc734376675e3c9a610 (patch)
tree07ce8015ba8e9287aef14c66fdd7b253c90e3669 /src/gns/gnunet-dns2gns.c
parent76613c37258a7fef8764d127a5bda9cee6d05888 (diff)
downloadgnunet-b98e0afd91337dd69af31cc734376675e3c9a610.tar.gz
gnunet-b98e0afd91337dd69af31cc734376675e3c9a610.zip
document places where SHADOW records likely need to be handled
Diffstat (limited to 'src/gns/gnunet-dns2gns.c')
-rw-r--r--src/gns/gnunet-dns2gns.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c
index 1b49c294a..967efa110 100644
--- a/src/gns/gnunet-dns2gns.c
+++ b/src/gns/gnunet-dns2gns.c
@@ -261,11 +261,10 @@ dns_result_processor (void *cls,
261 261
262 262
263/** 263/**
264 * Iterator called on obtained result for a GNS 264 * Iterator called on obtained result for a GNS lookup.
265 * lookup
266 * 265 *
267 * @param cls closure 266 * @param cls closure
268 * @param rd_count number of records 267 * @param rd_count number of records in @a rd
269 * @param rd the records in reply 268 * @param rd the records in reply
270 */ 269 */
271static void 270static void
@@ -291,6 +290,8 @@ result_processor (void *cls,
291 //packet->flags.opcode = GNUNET_TUN_DNS_OPCODE_STATUS; // ??? 290 //packet->flags.opcode = GNUNET_TUN_DNS_OPCODE_STATUS; // ???
292 for (i=0;i<rd_count;i++) 291 for (i=0;i<rd_count;i++)
293 { 292 {
293 // FIXME: do we need to hanlde #GNUNET_NAMESTORE_RF_SHADOW_RECORD
294 // here? Or should we do this in libgnunetgns?
294 rec.expiration_time.abs_value_us = rd[i].expiration_time; 295 rec.expiration_time.abs_value_us = rd[i].expiration_time;
295 switch (rd[i].record_type) 296 switch (rd[i].record_type)
296 { 297 {
@@ -299,7 +300,7 @@ result_processor (void *cls,
299 rec.name = GNUNET_strdup (packet->queries[0].name); 300 rec.name = GNUNET_strdup (packet->queries[0].name);
300 rec.class = GNUNET_TUN_DNS_CLASS_INTERNET; 301 rec.class = GNUNET_TUN_DNS_CLASS_INTERNET;
301 rec.type = GNUNET_DNSPARSER_TYPE_A; 302 rec.type = GNUNET_DNSPARSER_TYPE_A;
302 rec.data.raw.data = GNUNET_malloc (sizeof (struct in_addr)); 303 rec.data.raw.data = GNUNET_new (struct in_addr);
303 memcpy (rec.data.raw.data, 304 memcpy (rec.data.raw.data,
304 rd[i].data, 305 rd[i].data,
305 rd[i].data_size); 306 rd[i].data_size);
@@ -348,9 +349,9 @@ result_processor (void *cls,
348 * 349 *
349 * @param lsock socket to use for sending the reply 350 * @param lsock socket to use for sending the reply
350 * @param addr address to use for sending the reply 351 * @param addr address to use for sending the reply
351 * @param addr_len number of bytes in addr 352 * @param addr_len number of bytes in @a addr
352 * @param udp_msg DNS request payload 353 * @param udp_msg DNS request payload
353 * @param udp_msg_size number of bytes in udp_msg 354 * @param udp_msg_size number of bytes in @a udp_msg
354 */ 355 */
355static void 356static void
356handle_request (struct GNUNET_NETWORK_Handle *lsock, 357handle_request (struct GNUNET_NETWORK_Handle *lsock,