diff options
-rw-r--r-- | src/dns/dnsparser.c | 8 | ||||
-rw-r--r-- | src/dns/gnunet-dns-monitor.c | 4 | ||||
-rw-r--r-- | src/gns/gnunet-dns2gns.c | 6 | ||||
-rw-r--r-- | src/gns/gnunet-service-gns_interceptor.c | 4 | ||||
-rw-r--r-- | src/gns/gnunet-service-gns_resolver.c | 2 | ||||
-rw-r--r-- | src/include/gnunet_dnsparser_lib.h | 4 | ||||
-rw-r--r-- | src/include/gnunet_namestore_service.h | 2 | ||||
-rw-r--r-- | src/include/gnunet_network_lib.h | 2 | ||||
-rw-r--r-- | src/include/gnunet_tun_lib.h | 4 | ||||
-rw-r--r-- | src/namestore/namestore_api_common.c | 4 |
10 files changed, 21 insertions, 19 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, |
diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c index 8bbf22c46..a6d57f3a9 100644 --- a/src/gns/gnunet-dns2gns.c +++ b/src/gns/gnunet-dns2gns.c | |||
@@ -324,7 +324,7 @@ result_processor (void *cls, | |||
324 | case GNUNET_DNSPARSER_TYPE_A: | 324 | case GNUNET_DNSPARSER_TYPE_A: |
325 | GNUNET_assert (sizeof (struct in_addr) == rd[i].data_size); | 325 | GNUNET_assert (sizeof (struct in_addr) == rd[i].data_size); |
326 | rec.name = GNUNET_strdup (packet->queries[0].name); | 326 | rec.name = GNUNET_strdup (packet->queries[0].name); |
327 | rec.class = GNUNET_TUN_DNS_CLASS_INTERNET; | 327 | rec.dns_traffic_class = GNUNET_TUN_DNS_CLASS_INTERNET; |
328 | rec.type = GNUNET_DNSPARSER_TYPE_A; | 328 | rec.type = GNUNET_DNSPARSER_TYPE_A; |
329 | rec.data.raw.data = GNUNET_new (struct in_addr); | 329 | rec.data.raw.data = GNUNET_new (struct in_addr); |
330 | memcpy (rec.data.raw.data, | 330 | memcpy (rec.data.raw.data, |
@@ -339,7 +339,7 @@ result_processor (void *cls, | |||
339 | GNUNET_assert (sizeof (struct in6_addr) == rd[i].data_size); | 339 | GNUNET_assert (sizeof (struct in6_addr) == rd[i].data_size); |
340 | rec.name = GNUNET_strdup (packet->queries[0].name); | 340 | rec.name = GNUNET_strdup (packet->queries[0].name); |
341 | rec.data.raw.data = GNUNET_malloc (sizeof (struct in6_addr)); | 341 | rec.data.raw.data = GNUNET_malloc (sizeof (struct in6_addr)); |
342 | rec.class = GNUNET_TUN_DNS_CLASS_INTERNET; | 342 | rec.dns_traffic_class = GNUNET_TUN_DNS_CLASS_INTERNET; |
343 | rec.type = GNUNET_DNSPARSER_TYPE_AAAA; | 343 | rec.type = GNUNET_DNSPARSER_TYPE_AAAA; |
344 | memcpy (rec.data.raw.data, | 344 | memcpy (rec.data.raw.data, |
345 | rd[i].data, | 345 | rd[i].data, |
@@ -352,7 +352,7 @@ result_processor (void *cls, | |||
352 | case GNUNET_DNSPARSER_TYPE_CNAME: | 352 | case GNUNET_DNSPARSER_TYPE_CNAME: |
353 | rec.name = GNUNET_strdup (packet->queries[0].name); | 353 | rec.name = GNUNET_strdup (packet->queries[0].name); |
354 | rec.data.hostname = strdup (rd[i].data); | 354 | rec.data.hostname = strdup (rd[i].data); |
355 | rec.class = GNUNET_TUN_DNS_CLASS_INTERNET; | 355 | rec.dns_traffic_class = GNUNET_TUN_DNS_CLASS_INTERNET; |
356 | rec.type = GNUNET_DNSPARSER_TYPE_CNAME; | 356 | rec.type = GNUNET_DNSPARSER_TYPE_CNAME; |
357 | memcpy (rec.data.hostname, | 357 | memcpy (rec.data.hostname, |
358 | rd[i].data, | 358 | rd[i].data, |
diff --git a/src/gns/gnunet-service-gns_interceptor.c b/src/gns/gnunet-service-gns_interceptor.c index 3f4c0664f..be7a46f51 100644 --- a/src/gns/gnunet-service-gns_interceptor.c +++ b/src/gns/gnunet-service-gns_interceptor.c | |||
@@ -185,7 +185,7 @@ reply_to_dns (void *cls, uint32_t rd_count, | |||
185 | } | 185 | } |
186 | GNUNET_break (0 == (rd[i - skip_answers].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION)); | 186 | GNUNET_break (0 == (rd[i - skip_answers].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION)); |
187 | answer_records[i - skip_answers].expiration_time.abs_value_us = rd[i].expiration_time; | 187 | answer_records[i - skip_answers].expiration_time.abs_value_us = rd[i].expiration_time; |
188 | answer_records[i - skip_answers].class = GNUNET_TUN_DNS_CLASS_INTERNET; | 188 | answer_records[i - skip_answers].dns_traffic_class = GNUNET_TUN_DNS_CLASS_INTERNET; |
189 | } | 189 | } |
190 | else | 190 | else |
191 | { | 191 | { |
@@ -242,7 +242,7 @@ reply_to_dns (void *cls, uint32_t rd_count, | |||
242 | } | 242 | } |
243 | GNUNET_break (0 == (rd[i - skip_additional].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION)); | 243 | GNUNET_break (0 == (rd[i - skip_additional].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION)); |
244 | additional_records[i - skip_additional].expiration_time.abs_value_us = rd[i].expiration_time; | 244 | additional_records[i - skip_additional].expiration_time.abs_value_us = rd[i].expiration_time; |
245 | additional_records[i - skip_additional].class = GNUNET_TUN_DNS_CLASS_INTERNET; | 245 | additional_records[i - skip_additional].dns_traffic_class = GNUNET_TUN_DNS_CLASS_INTERNET; |
246 | } | 246 | } |
247 | } | 247 | } |
248 | packet->num_answers = num_answers - skip_answers; | 248 | packet->num_answers = num_answers - skip_answers; |
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 75a49a575..a145c1bfb 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -920,7 +920,7 @@ recursive_dns_resolution (struct GNS_ResolverHandle *rh) | |||
920 | query = GNUNET_new (struct GNUNET_DNSPARSER_Query); | 920 | query = GNUNET_new (struct GNUNET_DNSPARSER_Query); |
921 | query->name = GNUNET_strdup (ac->label); | 921 | query->name = GNUNET_strdup (ac->label); |
922 | query->type = rh->record_type; | 922 | query->type = rh->record_type; |
923 | query->class = GNUNET_TUN_DNS_CLASS_INTERNET; | 923 | query->dns_traffic_class = GNUNET_TUN_DNS_CLASS_INTERNET; |
924 | p = GNUNET_new (struct GNUNET_DNSPARSER_Packet); | 924 | p = GNUNET_new (struct GNUNET_DNSPARSER_Packet); |
925 | p->queries = query; | 925 | p->queries = query; |
926 | p->num_queries = 1; | 926 | p->num_queries = 1; |
diff --git a/src/include/gnunet_dnsparser_lib.h b/src/include/gnunet_dnsparser_lib.h index fb0ab1149..c4b4546c8 100644 --- a/src/include/gnunet_dnsparser_lib.h +++ b/src/include/gnunet_dnsparser_lib.h | |||
@@ -79,7 +79,7 @@ struct GNUNET_DNSPARSER_Query | |||
79 | /** | 79 | /** |
80 | * See GNUNET_TUN_DNS_CLASS_*. | 80 | * See GNUNET_TUN_DNS_CLASS_*. |
81 | */ | 81 | */ |
82 | uint16_t class; | 82 | uint16_t dns_traffic_class; |
83 | 83 | ||
84 | }; | 84 | }; |
85 | 85 | ||
@@ -318,7 +318,7 @@ struct GNUNET_DNSPARSER_Record | |||
318 | /** | 318 | /** |
319 | * See GNUNET_TUN_DNS_CLASS_*. | 319 | * See GNUNET_TUN_DNS_CLASS_*. |
320 | */ | 320 | */ |
321 | uint16_t class; | 321 | uint16_t dns_traffic_class; |
322 | 322 | ||
323 | }; | 323 | }; |
324 | 324 | ||
diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h index fbb3a285c..ad98f745d 100644 --- a/src/include/gnunet_namestore_service.h +++ b/src/include/gnunet_namestore_service.h | |||
@@ -563,7 +563,7 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type, | |||
563 | * @return corresponding number, UINT32_MAX on error | 563 | * @return corresponding number, UINT32_MAX on error |
564 | */ | 564 | */ |
565 | uint32_t | 565 | uint32_t |
566 | GNUNET_NAMESTORE_typename_to_number (const char *typename); | 566 | GNUNET_NAMESTORE_typename_to_number (const char *dns_typename); |
567 | 567 | ||
568 | 568 | ||
569 | /** | 569 | /** |
diff --git a/src/include/gnunet_network_lib.h b/src/include/gnunet_network_lib.h index e2ebd450e..d728414e7 100644 --- a/src/include/gnunet_network_lib.h +++ b/src/include/gnunet_network_lib.h | |||
@@ -27,6 +27,8 @@ | |||
27 | #ifndef GNUNET_NETWORK_LIB_H | 27 | #ifndef GNUNET_NETWORK_LIB_H |
28 | #define GNUNET_NETWORK_LIB_H | 28 | #define GNUNET_NETWORK_LIB_H |
29 | 29 | ||
30 | #include "platform.h" | ||
31 | |||
30 | #ifdef __cplusplus | 32 | #ifdef __cplusplus |
31 | extern "C" | 33 | extern "C" |
32 | { | 34 | { |
diff --git a/src/include/gnunet_tun_lib.h b/src/include/gnunet_tun_lib.h index 8383da0c3..ff24cb542 100644 --- a/src/include/gnunet_tun_lib.h +++ b/src/include/gnunet_tun_lib.h | |||
@@ -601,7 +601,7 @@ struct GNUNET_TUN_DnsQueryLine | |||
601 | /** | 601 | /** |
602 | * Desired class (usually GNUNET_TUN_DNS_CLASS_INTERNET). (NBO) | 602 | * Desired class (usually GNUNET_TUN_DNS_CLASS_INTERNET). (NBO) |
603 | */ | 603 | */ |
604 | uint16_t class GNUNET_PACKED; | 604 | uint16_t dns_traffic_class GNUNET_PACKED; |
605 | }; | 605 | }; |
606 | 606 | ||
607 | 607 | ||
@@ -618,7 +618,7 @@ struct GNUNET_TUN_DnsRecordLine | |||
618 | /** | 618 | /** |
619 | * Record class (usually GNUNET_TUN_DNS_CLASS_INTERNET). (NBO) | 619 | * Record class (usually GNUNET_TUN_DNS_CLASS_INTERNET). (NBO) |
620 | */ | 620 | */ |
621 | uint16_t class GNUNET_PACKED; | 621 | uint16_t dns_traffic_class GNUNET_PACKED; |
622 | 622 | ||
623 | /** | 623 | /** |
624 | * Expiration for the record (in seconds). (NBO) | 624 | * Expiration for the record (in seconds). (NBO) |
diff --git a/src/namestore/namestore_api_common.c b/src/namestore/namestore_api_common.c index b5a777083..55c9055ff 100644 --- a/src/namestore/namestore_api_common.c +++ b/src/namestore/namestore_api_common.c | |||
@@ -1069,13 +1069,13 @@ static struct { | |||
1069 | * @return corresponding number, UINT32_MAX on error | 1069 | * @return corresponding number, UINT32_MAX on error |
1070 | */ | 1070 | */ |
1071 | uint32_t | 1071 | uint32_t |
1072 | GNUNET_NAMESTORE_typename_to_number (const char *typename) | 1072 | GNUNET_NAMESTORE_typename_to_number (const char *dns_typename) |
1073 | { | 1073 | { |
1074 | unsigned int i; | 1074 | unsigned int i; |
1075 | 1075 | ||
1076 | i=0; | 1076 | i=0; |
1077 | while ( (name_map[i].name != NULL) && | 1077 | while ( (name_map[i].name != NULL) && |
1078 | (0 != strcasecmp (typename, name_map[i].name)) ) | 1078 | (0 != strcasecmp (dns_typename, name_map[i].name)) ) |
1079 | i++; | 1079 | i++; |
1080 | return name_map[i].number; | 1080 | return name_map[i].number; |
1081 | } | 1081 | } |