aboutsummaryrefslogtreecommitdiff
path: root/src/dns
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-28 09:58:07 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-28 09:58:07 +0000
commitae4f506a574161c3baaf071d491f8c4987bc0623 (patch)
tree6cf85f6933fdfdb562bcc85e7d4926cab0dc2d50 /src/dns
parentbc0b7fac93289d5b310a23837c55acd5ee11027b (diff)
downloadgnunet-ae4f506a574161c3baaf071d491f8c4987bc0623.tar.gz
gnunet-ae4f506a574161c3baaf071d491f8c4987bc0623.zip
Andrew Cann wrote:
This patch changes the name of a couple of variables that had c++-incompatible names and adds a header file to gnunet_network_lib.h https://canndrew.org/misc/change_cpp_incompatible_variable_names.diff
Diffstat (limited to 'src/dns')
-rw-r--r--src/dns/dnsparser.c8
-rw-r--r--src/dns/gnunet-dns-monitor.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/dns/dnsparser.c b/src/dns/dnsparser.c
index 74ca584c6..369f90215 100644
--- a/src/dns/dnsparser.c
+++ b/src/dns/dnsparser.c
@@ -373,7 +373,7 @@ GNUNET_DNSPARSER_parse_query (const char *udp_payload,
373 memcpy (&ql, &udp_payload[*off], sizeof (ql)); 373 memcpy (&ql, &udp_payload[*off], sizeof (ql));
374 *off += sizeof (ql); 374 *off += sizeof (ql);
375 q->type = ntohs (ql.type); 375 q->type = ntohs (ql.type);
376 q->class = ntohs (ql.class); 376 q->dns_traffic_class = ntohs (ql.dns_traffic_class);
377 return GNUNET_OK; 377 return GNUNET_OK;
378} 378}
379 379
@@ -582,7 +582,7 @@ GNUNET_DNSPARSER_parse_record (const char *udp_payload,
582 memcpy (&rl, &udp_payload[*off], sizeof (rl)); 582 memcpy (&rl, &udp_payload[*off], sizeof (rl));
583 (*off) += sizeof (rl); 583 (*off) += sizeof (rl);
584 r->type = ntohs (rl.type); 584 r->type = ntohs (rl.type);
585 r->class = ntohs (rl.class); 585 r->dns_traffic_class = ntohs (rl.dns_traffic_class);
586 r->expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 586 r->expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
587 ntohl (rl.ttl))); 587 ntohl (rl.ttl)));
588 data_len = ntohs (rl.data_len); 588 data_len = ntohs (rl.data_len);
@@ -865,7 +865,7 @@ GNUNET_DNSPARSER_builder_add_query (char *dst,
865 if (ret != GNUNET_OK) 865 if (ret != GNUNET_OK)
866 return ret; 866 return ret;
867 ql.type = htons (query->type); 867 ql.type = htons (query->type);
868 ql.class = htons (query->class); 868 ql.dns_traffic_class = htons (query->dns_traffic_class);
869 memcpy (&dst[*off], &ql, sizeof (ql)); 869 memcpy (&dst[*off], &ql, sizeof (ql));
870 (*off) += sizeof (ql); 870 (*off) += sizeof (ql);
871 return GNUNET_OK; 871 return GNUNET_OK;
@@ -1064,7 +1064,7 @@ add_record (char *dst,
1064 return GNUNET_NO; 1064 return GNUNET_NO;
1065 } 1065 }
1066 rl.type = htons (record->type); 1066 rl.type = htons (record->type);
1067 rl.class = htons (record->class); 1067 rl.dns_traffic_class = htons (record->dns_traffic_class);
1068 rl.ttl = htonl (GNUNET_TIME_absolute_get_remaining (record->expiration_time).rel_value_us / 1000LL / 1000LL); /* in seconds */ 1068 rl.ttl = htonl (GNUNET_TIME_absolute_get_remaining (record->expiration_time).rel_value_us / 1000LL / 1000LL); /* in seconds */
1069 rl.data_len = htons ((uint16_t) (pos - (*off + sizeof (struct GNUNET_TUN_DnsRecordLine)))); 1069 rl.data_len = htons ((uint16_t) (pos - (*off + sizeof (struct GNUNET_TUN_DnsRecordLine))));
1070 memcpy (&dst[*off], &rl, sizeof (struct GNUNET_TUN_DnsRecordLine)); 1070 memcpy (&dst[*off], &rl, sizeof (struct GNUNET_TUN_DnsRecordLine));
diff --git a/src/dns/gnunet-dns-monitor.c b/src/dns/gnunet-dns-monitor.c
index ed09d49b1..4c92009eb 100644
--- a/src/dns/gnunet-dns-monitor.c
+++ b/src/dns/gnunet-dns-monitor.c
@@ -113,7 +113,7 @@ display_query (const struct GNUNET_DNSPARSER_Query *query)
113{ 113{
114 fprintf (stdout, 114 fprintf (stdout,
115 "\t\t%s %s: %s\n", 115 "\t\t%s %s: %s\n",
116 get_class (query->class), 116 get_class (query->dns_traffic_class),
117 get_type (query->type), 117 get_type (query->type),
118 query->name); 118 query->name);
119} 119}
@@ -210,7 +210,7 @@ display_record (const struct GNUNET_DNSPARSER_Record *record)
210 } 210 }
211 fprintf (stdout, 211 fprintf (stdout,
212 "\t\t%s %s: %s = %s (%u s)\n", 212 "\t\t%s %s: %s = %s (%u s)\n",
213 get_class (record->class), 213 get_class (record->dns_traffic_class),
214 get_type (record->type), 214 get_type (record->type),
215 record->name, 215 record->name,
216 format, 216 format,