From 4f222e97fec909eb6d3ff137befba3eb946a3bbc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philipp=20T=C3=B6lke?= Date: Sun, 10 Apr 2011 13:19:32 +0000 Subject: [PATCH] FIXMEs --- src/vpn/gnunet-service-dns.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/vpn/gnunet-service-dns.c b/src/vpn/gnunet-service-dns.c index a2bf13674..ee596fd0d 100644 --- a/src/vpn/gnunet-service-dns.c +++ b/src/vpn/gnunet-service-dns.c @@ -245,7 +245,12 @@ send_rev_query(void * cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { struct dns_record_line *drec_data = (struct dns_record_line*)(dpkt->data+(query_states[id].namelen)+sizeof(struct dns_query_line)+2); drec_data->type = htons(12); /* AAAA */ drec_data->class = htons(1); /* IN */ - drec_data->ttl = htonl(3600); /* FIXME: read from block */ + /* FIXME: read the TTL from block: + * GNUNET_TIME_absolute_get_remaining(rec->expiration_time) + * + * But how to get the seconds out of this? + */ + drec_data->ttl = htonl(3600); /* Calculate at which offset in the packet the length of the name and the * name, it is filled in by the daemon-vpn */ @@ -350,7 +355,13 @@ receive_dht(void *cls, struct dns_record_line *drec_data = (struct dns_record_line*)(dpkt->data+(query_states[id].namelen)+sizeof(struct dns_query_line)+2); drec_data->type = htons(28); /* AAAA */ drec_data->class = htons(1); /* IN */ - drec_data->ttl = htonl(3600); /* FIXME: read from block */ + + /* FIXME: read the TTL from block: + * GNUNET_TIME_absolute_get_remaining(rec->expiration_time) + * + * But how to get the seconds out of this? + */ + drec_data->ttl = htonl(3600); drec_data->data_len = htons(16); /* Calculate at which offset in the packet the IPv6-Address belongs, it is -- 2.25.1