aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gnunet-service-gns_resolver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/gnunet-service-gns_resolver.c')
-rw-r--r--src/gns/gnunet-service-gns_resolver.c102
1 files changed, 51 insertions, 51 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index bd9daf56e..b01200d8e 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -296,7 +296,7 @@ process_pseu_lookup_ns (void* cls,
296 new_pkey.expiration_time = UINT64_MAX; 296 new_pkey.expiration_time = UINT64_MAX;
297 new_pkey.data_size = sizeof (struct GNUNET_CRYPTO_ShortHashCode); 297 new_pkey.data_size = sizeof (struct GNUNET_CRYPTO_ShortHashCode);
298 new_pkey.data = &gph->auth->zone; 298 new_pkey.data = &gph->auth->zone;
299 new_pkey.record_type = GNUNET_GNS_RECORD_PKEY; 299 new_pkey.record_type = GNUNET_NAMESTORE_TYPE_PKEY;
300 new_pkey.flags = GNUNET_NAMESTORE_RF_AUTHORITY 300 new_pkey.flags = GNUNET_NAMESTORE_RF_AUTHORITY
301 | GNUNET_NAMESTORE_RF_PRIVATE 301 | GNUNET_NAMESTORE_RF_PRIVATE
302 | GNUNET_NAMESTORE_RF_PENDING; 302 | GNUNET_NAMESTORE_RF_PENDING;
@@ -436,7 +436,7 @@ process_auth_discovery_dht_result (void* cls,
436 for (i=0; i < num_records; i++) 436 for (i=0; i < num_records; i++)
437 { 437 {
438 if ((strcmp (name, GNUNET_GNS_MASTERZONE_STR) == 0) && 438 if ((strcmp (name, GNUNET_GNS_MASTERZONE_STR) == 0) &&
439 (rd[i].record_type == GNUNET_GNS_RECORD_PSEU)) 439 (rd[i].record_type == GNUNET_NAMESTORE_TYPE_PSEU))
440 { 440 {
441 /* found pseu */ 441 /* found pseu */
442 process_pseu_result (gph, (char*)rd[i].data); 442 process_pseu_result (gph, (char*)rd[i].data);
@@ -489,7 +489,7 @@ process_auth_discovery_ns_result (void* cls,
489 gph->timeout = GNUNET_SCHEDULER_add_delayed (DHT_LOOKUP_TIMEOUT, 489 gph->timeout = GNUNET_SCHEDULER_add_delayed (DHT_LOOKUP_TIMEOUT,
490 &handle_auth_discovery_timeout, gph); 490 &handle_auth_discovery_timeout, gph);
491 491
492 xquery = htonl (GNUNET_GNS_RECORD_PSEU); 492 xquery = htonl (GNUNET_NAMESTORE_TYPE_PSEU);
493 493
494 GNUNET_assert (gph->get_handle == NULL); 494 GNUNET_assert (gph->get_handle == NULL);
495 495
@@ -510,7 +510,7 @@ process_auth_discovery_ns_result (void* cls,
510 if (0 != (strcmp (name, GNUNET_GNS_TLD_PLUS))) 510 if (0 != (strcmp (name, GNUNET_GNS_TLD_PLUS)))
511 continue; 511 continue;
512 512
513 if (rd[i].record_type != GNUNET_GNS_RECORD_PSEU) 513 if (rd[i].record_type != GNUNET_NAMESTORE_TYPE_PSEU)
514 continue; 514 continue;
515 515
516 /* found pseu */ 516 /* found pseu */
@@ -552,7 +552,7 @@ process_zone_to_name_discover (void *cls,
552 gph->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle, 552 gph->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle,
553 &gph->auth->zone, 553 &gph->auth->zone,
554 GNUNET_GNS_MASTERZONE_STR, 554 GNUNET_GNS_MASTERZONE_STR,
555 GNUNET_GNS_RECORD_PSEU, 555 GNUNET_NAMESTORE_TYPE_PSEU,
556 &process_auth_discovery_ns_result, 556 &process_auth_discovery_ns_result,
557 gph); 557 gph);
558 return; 558 return;
@@ -1264,7 +1264,7 @@ process_record_result_vpn (void* cls, int af, const void *address)
1264 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 1264 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
1265 "GNS_PHASE_REC-%llu: Answer is IPv4!\n", 1265 "GNS_PHASE_REC-%llu: Answer is IPv4!\n",
1266 rh->id); 1266 rh->id);
1267 if (GNUNET_GNS_RECORD_A != rlh->record_type) 1267 if (GNUNET_DNSPARSER_TYPE_A != rlh->record_type)
1268 { 1268 {
1269 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 1269 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
1270 "GNS_PHASE_REC-%llu: Requested record is not IPv4!\n", 1270 "GNS_PHASE_REC-%llu: Requested record is not IPv4!\n",
@@ -1272,7 +1272,7 @@ process_record_result_vpn (void* cls, int af, const void *address)
1272 rh->proc (rh->proc_cls, rh, 0, NULL); 1272 rh->proc (rh->proc_cls, rh, 0, NULL);
1273 return; 1273 return;
1274 } 1274 }
1275 rd.record_type = GNUNET_GNS_RECORD_A; 1275 rd.record_type = GNUNET_DNSPARSER_TYPE_A;
1276 rd.expiration_time = UINT64_MAX; /* FIXME: should probably pick something shorter... */ 1276 rd.expiration_time = UINT64_MAX; /* FIXME: should probably pick something shorter... */
1277 rd.data = address; 1277 rd.data = address;
1278 rd.data_size = sizeof (struct in_addr); 1278 rd.data_size = sizeof (struct in_addr);
@@ -1285,7 +1285,7 @@ process_record_result_vpn (void* cls, int af, const void *address)
1285 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 1285 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
1286 "GNS_PHASE_REC-%llu: Answer is IPv6!\n", 1286 "GNS_PHASE_REC-%llu: Answer is IPv6!\n",
1287 rh->id); 1287 rh->id);
1288 if (GNUNET_GNS_RECORD_AAAA != rlh->record_type) 1288 if (GNUNET_DNSPARSER_TYPE_AAAA != rlh->record_type)
1289 { 1289 {
1290 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 1290 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
1291 "GNS_PHASE_REC-%llu: Requested record is not IPv6!\n", 1291 "GNS_PHASE_REC-%llu: Requested record is not IPv6!\n",
@@ -1293,7 +1293,7 @@ process_record_result_vpn (void* cls, int af, const void *address)
1293 rh->proc (rh->proc_cls, rh, 0, NULL); 1293 rh->proc (rh->proc_cls, rh, 0, NULL);
1294 return; 1294 return;
1295 } 1295 }
1296 rd.record_type = GNUNET_GNS_RECORD_AAAA; 1296 rd.record_type = GNUNET_DNSPARSER_TYPE_AAAA;
1297 rd.expiration_time = UINT64_MAX; /* FIXME: should probably pick something shorter... */ 1297 rd.expiration_time = UINT64_MAX; /* FIXME: should probably pick something shorter... */
1298 rd.data = address; 1298 rd.data = address;
1299 rd.data_size = sizeof (struct in6_addr); 1299 rd.data_size = sizeof (struct in6_addr);
@@ -1383,14 +1383,14 @@ handle_dns_resolver (void *cls,
1383 if (sizeof (struct sockaddr_in) == addrlen) 1383 if (sizeof (struct sockaddr_in) == addrlen)
1384 { 1384 {
1385 sai = (struct sockaddr_in*) addr; 1385 sai = (struct sockaddr_in*) addr;
1386 rd.record_type = GNUNET_GNS_RECORD_A; 1386 rd.record_type = GNUNET_DNSPARSER_TYPE_A;
1387 rd.data_size = sizeof (struct in_addr); 1387 rd.data_size = sizeof (struct in_addr);
1388 rd.data = &sai->sin_addr; 1388 rd.data = &sai->sin_addr;
1389 } 1389 }
1390 else if (sizeof (struct sockaddr_in6) == addrlen) 1390 else if (sizeof (struct sockaddr_in6) == addrlen)
1391 { 1391 {
1392 sai6 = (struct sockaddr_in6*) addr; 1392 sai6 = (struct sockaddr_in6*) addr;
1393 rd.record_type = GNUNET_GNS_RECORD_AAAA; 1393 rd.record_type = GNUNET_DNSPARSER_TYPE_AAAA;
1394 rd.data_size = sizeof (struct in6_addr); 1394 rd.data_size = sizeof (struct in6_addr);
1395 rd.data = &sai6->sin6_addr; 1395 rd.data = &sai6->sin6_addr;
1396 } 1396 }
@@ -1418,8 +1418,8 @@ resolve_dns_name (struct ResolverHandle *rh)
1418 struct RecordLookupHandle *rlh = rh->proc_cls; 1418 struct RecordLookupHandle *rlh = rh->proc_cls;
1419 int af; 1419 int af;
1420 1420
1421 if ((GNUNET_GNS_RECORD_A != rlh->record_type) && 1421 if ((GNUNET_DNSPARSER_TYPE_A != rlh->record_type) &&
1422 (GNUNET_GNS_RECORD_AAAA != rlh->record_type)) 1422 (GNUNET_DNSPARSER_TYPE_AAAA != rlh->record_type))
1423 { 1423 {
1424 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1424 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1425 "Can only resolve A/AAAA via stub... abort\n"); 1425 "Can only resolve A/AAAA via stub... abort\n");
@@ -1427,7 +1427,7 @@ resolve_dns_name (struct ResolverHandle *rh)
1427 return; 1427 return;
1428 } 1428 }
1429 1429
1430 if (GNUNET_GNS_RECORD_A == rlh->record_type) 1430 if (GNUNET_DNSPARSER_TYPE_A == rlh->record_type)
1431 af = AF_INET; 1431 af = AF_INET;
1432 else 1432 else
1433 af = AF_INET6; 1433 af = AF_INET6;
@@ -1501,7 +1501,7 @@ read_dns_response (void *cls,
1501 packet->answers[i].type, 1501 packet->answers[i].type,
1502 rlh->record_type); 1502 rlh->record_type);
1503 /* http://tools.ietf.org/html/rfc1034#section-3.6.2 */ 1503 /* http://tools.ietf.org/html/rfc1034#section-3.6.2 */
1504 if (GNUNET_GNS_RECORD_CNAME == packet->answers[i].type) 1504 if (GNUNET_DNSPARSER_TYPE_CNAME == packet->answers[i].type)
1505 { 1505 {
1506 struct GNUNET_DNSPARSER_Query query; 1506 struct GNUNET_DNSPARSER_Query query;
1507 struct GNUNET_DNSPARSER_Packet npacket; 1507 struct GNUNET_DNSPARSER_Packet npacket;
@@ -1591,7 +1591,7 @@ read_dns_response (void *cls,
1591 1591
1592 for (i = 0; i < packet->num_authority_records; i++) 1592 for (i = 0; i < packet->num_authority_records; i++)
1593 { 1593 {
1594 if (packet->authority_records[i].type == GNUNET_GNS_RECORD_NS) 1594 if (packet->authority_records[i].type == GNUNET_DNSPARSER_TYPE_NS)
1595 { 1595 {
1596 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1596 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1597 "Found NS delegation!\n"); 1597 "Found NS delegation!\n");
@@ -1606,7 +1606,7 @@ read_dns_response (void *cls,
1606 if (GNUNET_NO == found_delegation) 1606 if (GNUNET_NO == found_delegation)
1607 break; 1607 break;
1608 1608
1609 if ((packet->additional_records[i].type == GNUNET_GNS_RECORD_A) && 1609 if ((packet->additional_records[i].type == GNUNET_DNSPARSER_TYPE_A) &&
1610 (0 == strcmp (packet->additional_records[i].name, delegation_name))) 1610 (0 == strcmp (packet->additional_records[i].name, delegation_name)))
1611 { 1611 {
1612 GNUNET_assert (sizeof (struct in_addr) == 1612 GNUNET_assert (sizeof (struct in_addr) ==
@@ -1709,7 +1709,7 @@ resolve_record_dns (struct ResolverHandle *rh,
1709 for (i = 0; i < rd_count; i++) 1709 for (i = 0; i < rd_count; i++)
1710 { 1710 {
1711 /* Synthesize dns name */ 1711 /* Synthesize dns name */
1712 if (GNUNET_GNS_RECORD_NS == rd[i].record_type) 1712 if (GNUNET_DNSPARSER_TYPE_NS == rd[i].record_type)
1713 { 1713 {
1714 strcpy (rh->dns_zone, (char*)rd[i].data); 1714 strcpy (rh->dns_zone, (char*)rd[i].data);
1715 if (0 == strcmp (rh->name, "")) 1715 if (0 == strcmp (rh->name, ""))
@@ -1718,7 +1718,7 @@ resolve_record_dns (struct ResolverHandle *rh,
1718 sprintf (rh->dns_name, "%s.%s", rh->name, (char*)rd[i].data); 1718 sprintf (rh->dns_name, "%s.%s", rh->name, (char*)rd[i].data);
1719 } 1719 }
1720 /* The glue */ 1720 /* The glue */
1721 if (GNUNET_GNS_RECORD_A == rd[i].record_type) 1721 if (GNUNET_DNSPARSER_TYPE_A == rd[i].record_type)
1722 /* need to use memcpy as .data may be unaligned */ 1722 /* need to use memcpy as .data may be unaligned */
1723 memcpy (&dnsip, rd[i].data, sizeof (dnsip)); 1723 memcpy (&dnsip, rd[i].data, sizeof (dnsip));
1724 } 1724 }
@@ -1841,7 +1841,7 @@ resolve_record_vpn (struct ResolverHandle *rh,
1841 (char*)&vpn[1], 1841 (char*)&vpn[1],
1842 GNUNET_h2s (&serv_desc)); 1842 GNUNET_h2s (&serv_desc));
1843 rh->proc = &handle_record_vpn; 1843 rh->proc = &handle_record_vpn;
1844 if (GNUNET_GNS_RECORD_A == rlh->record_type) 1844 if (GNUNET_DNSPARSER_TYPE_A == rlh->record_type)
1845 af = AF_INET; 1845 af = AF_INET;
1846 else 1846 else
1847 af = AF_INET6; 1847 af = AF_INET6;
@@ -2049,7 +2049,7 @@ process_pkey_revocation_result_ns (void *cls,
2049 2049
2050 for (i = 0; i < rd_count; i++) 2050 for (i = 0; i < rd_count; i++)
2051 { 2051 {
2052 if (GNUNET_GNS_RECORD_REV == rd[i].record_type) 2052 if (GNUNET_NAMESTORE_TYPE_REV == rd[i].record_type)
2053 { 2053 {
2054 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 2054 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
2055 "GNS_PHASE_DELEGATE_REV-%llu: Zone has been revoked.\n", 2055 "GNS_PHASE_DELEGATE_REV-%llu: Zone has been revoked.\n",
@@ -2071,11 +2071,11 @@ process_pkey_revocation_result_ns (void *cls,
2071 { 2071 {
2072 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 2072 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
2073 "GNS_PHASE_DELEGATE_REV-%llu: Starting background lookup for %s type %d\n", 2073 "GNS_PHASE_DELEGATE_REV-%llu: Starting background lookup for %s type %d\n",
2074 rh->id, "+.gads", GNUNET_GNS_RECORD_REV); 2074 rh->id, "+.gads", GNUNET_NAMESTORE_TYPE_REV);
2075 2075
2076 gns_resolver_lookup_record(rh->authority, 2076 gns_resolver_lookup_record(rh->authority,
2077 rh->private_local_zone, 2077 rh->private_local_zone,
2078 GNUNET_GNS_RECORD_REV, 2078 GNUNET_NAMESTORE_TYPE_REV,
2079 GNUNET_GNS_TLD, 2079 GNUNET_GNS_TLD,
2080 NULL, 2080 NULL,
2081 GNUNET_TIME_UNIT_FOREVER_REL, 2081 GNUNET_TIME_UNIT_FOREVER_REL,
@@ -2213,7 +2213,7 @@ process_delegation_result_dht (void* cls,
2213 rh->id, name, rh->authority_name); 2213 rh->id, name, rh->authority_name);
2214 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 2214 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
2215 "GNS_PHASE_DELEGATE_DHT-%llu: Got type: %d (wanted %d)\n", 2215 "GNS_PHASE_DELEGATE_DHT-%llu: Got type: %d (wanted %d)\n",
2216 rh->id, rd[i].record_type, GNUNET_GNS_RECORD_PKEY); 2216 rh->id, rd[i].record_type, GNUNET_NAMESTORE_TYPE_PKEY);
2217 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 2217 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
2218 "GNS_PHASE_DELEGATE_DHT-%llu: Got data length: %d\n", 2218 "GNS_PHASE_DELEGATE_DHT-%llu: Got data length: %d\n",
2219 rh->id, rd[i].data_size); 2219 rh->id, rd[i].data_size);
@@ -2221,9 +2221,9 @@ process_delegation_result_dht (void* cls,
2221 "GNS_PHASE_DELEGATE_DHT-%llu: Got flag %d\n", 2221 "GNS_PHASE_DELEGATE_DHT-%llu: Got flag %d\n",
2222 rh->id, rd[i].flags); 2222 rh->id, rd[i].flags);
2223 2223
2224 if ((GNUNET_GNS_RECORD_VPN == rd[i].record_type) || 2224 if ((GNUNET_NAMESTORE_TYPE_VPN == rd[i].record_type) ||
2225 (GNUNET_GNS_RECORD_NS == rd[i].record_type) || 2225 (GNUNET_DNSPARSER_TYPE_NS == rd[i].record_type) ||
2226 (GNUNET_GNS_RECORD_CNAME == rd[i].record_type)) 2226 (GNUNET_DNSPARSER_TYPE_CNAME == rd[i].record_type))
2227 { 2227 {
2228 /** 2228 /**
2229 * This is a VPN,NS,CNAME entry. Let namestore handle this after caching 2229 * This is a VPN,NS,CNAME entry. Let namestore handle this after caching
@@ -2238,7 +2238,7 @@ process_delegation_result_dht (void* cls,
2238 } 2238 }
2239 2239
2240 if ((0 == strcmp(name, rh->authority_name)) && 2240 if ((0 == strcmp(name, rh->authority_name)) &&
2241 (GNUNET_GNS_RECORD_PKEY == rd[i].record_type)) 2241 (GNUNET_NAMESTORE_TYPE_PKEY == rd[i].record_type))
2242 { 2242 {
2243 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 2243 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
2244 "GNS_PHASE_DELEGATE_DHT-%llu: Authority found in DHT\n", 2244 "GNS_PHASE_DELEGATE_DHT-%llu: Authority found in DHT\n",
@@ -2339,7 +2339,7 @@ process_delegation_result_dht (void* cls,
2339 rh->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle, 2339 rh->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle,
2340 &rh->authority, 2340 &rh->authority,
2341 GNUNET_GNS_MASTERZONE_STR, 2341 GNUNET_GNS_MASTERZONE_STR,
2342 GNUNET_GNS_RECORD_REV, 2342 GNUNET_NAMESTORE_TYPE_REV,
2343 &process_pkey_revocation_result_ns, 2343 &process_pkey_revocation_result_ns,
2344 rh); 2344 rh);
2345 2345
@@ -2460,12 +2460,12 @@ finish_lookup (struct ResolverHandle *rh,
2460 for (i = 0; i < rd_count; i++) 2460 for (i = 0; i < rd_count; i++)
2461 { 2461 {
2462 2462
2463 if ((GNUNET_GNS_RECORD_NS != rd[i].record_type) && 2463 if ((GNUNET_DNSPARSER_TYPE_NS != rd[i].record_type) &&
2464 (GNUNET_GNS_RECORD_PTR != rd[i].record_type) && 2464 (GNUNET_DNSPARSER_TYPE_PTR != rd[i].record_type) &&
2465 (GNUNET_GNS_RECORD_CNAME != rd[i].record_type) && 2465 (GNUNET_DNSPARSER_TYPE_CNAME != rd[i].record_type) &&
2466 (GNUNET_GNS_RECORD_MX != rd[i].record_type) && 2466 (GNUNET_DNSPARSER_TYPE_MX != rd[i].record_type) &&
2467 (GNUNET_GNS_RECORD_SOA != rd[i].record_type) && 2467 (GNUNET_DNSPARSER_TYPE_SOA != rd[i].record_type) &&
2468 (GNUNET_GNS_RECORD_SRV != rd[i].record_type)) 2468 (GNUNET_DNSPARSER_TYPE_SRV != rd[i].record_type))
2469 { 2469 {
2470 p_rd[i].data = rd[i].data; 2470 p_rd[i].data = rd[i].data;
2471 continue; 2471 continue;
@@ -2485,7 +2485,7 @@ finish_lookup (struct ResolverHandle *rh,
2485 repl_string = rlh->name+strlen(rh->name)+1; 2485 repl_string = rlh->name+strlen(rh->name)+1;
2486 2486
2487 offset = 0; 2487 offset = 0;
2488 if (GNUNET_GNS_RECORD_MX == rd[i].record_type) 2488 if (GNUNET_DNSPARSER_TYPE_MX == rd[i].record_type)
2489 { 2489 {
2490 memcpy (new_mx_data, (char*)rd[i].data, sizeof(uint16_t)); 2490 memcpy (new_mx_data, (char*)rd[i].data, sizeof(uint16_t));
2491 offset = sizeof (uint16_t); 2491 offset = sizeof (uint16_t);
@@ -2497,7 +2497,7 @@ finish_lookup (struct ResolverHandle *rh,
2497 p_rd[i].data = new_mx_data; 2497 p_rd[i].data = new_mx_data;
2498 p_rd[i].data_size = offset; 2498 p_rd[i].data_size = offset;
2499 } 2499 }
2500 else if (GNUNET_GNS_RECORD_SRV == rd[i].record_type) 2500 else if (GNUNET_DNSPARSER_TYPE_SRV == rd[i].record_type)
2501 { 2501 {
2502 /* 2502 /*
2503 * Prio, weight and port 2503 * Prio, weight and port
@@ -2513,7 +2513,7 @@ finish_lookup (struct ResolverHandle *rh,
2513 p_rd[i].data = new_srv_data; 2513 p_rd[i].data = new_srv_data;
2514 p_rd[i].data_size = sizeof (struct srv_data) + strlen ((char*)&new_srv[1]) + 1; 2514 p_rd[i].data_size = sizeof (struct srv_data) + strlen ((char*)&new_srv[1]) + 1;
2515 } 2515 }
2516 else if (GNUNET_GNS_RECORD_SOA == rd[i].record_type) 2516 else if (GNUNET_DNSPARSER_TYPE_SOA == rd[i].record_type)
2517 { 2517 {
2518 /* expand mname and rname */ 2518 /* expand mname and rname */
2519 old_soa = (struct soa_data*)rd[i].data; 2519 old_soa = (struct soa_data*)rd[i].data;
@@ -2708,7 +2708,7 @@ handle_delegation_dht(void* cls, struct ResolverHandle *rh,
2708 2708
2709 if (0 == strcmp(rh->name, "")) 2709 if (0 == strcmp(rh->name, ""))
2710 { 2710 {
2711 if (GNUNET_GNS_RECORD_PKEY == rlh->record_type) 2711 if (GNUNET_NAMESTORE_TYPE_PKEY == rlh->record_type)
2712 { 2712 {
2713 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 2713 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
2714 "GNS_PHASE_DELEGATE_DHT-%llu: Resolved queried PKEY via DHT.\n", 2714 "GNS_PHASE_DELEGATE_DHT-%llu: Resolved queried PKEY via DHT.\n",
@@ -2798,7 +2798,7 @@ resolve_delegation_dht (struct ResolverHandle *rh)
2798 rh->authority_name, 2798 rh->authority_name,
2799 GNUNET_short_h2s (&rh->authority), 2799 GNUNET_short_h2s (&rh->authority),
2800 rh->id); 2800 rh->id);
2801 xquery = htonl (GNUNET_GNS_RECORD_PKEY); 2801 xquery = htonl (GNUNET_NAMESTORE_TYPE_PKEY);
2802 GNUNET_assert (rh->get_handle == NULL); 2802 GNUNET_assert (rh->get_handle == NULL);
2803 rh->get_handle = GNUNET_DHT_get_start (dht_handle, 2803 rh->get_handle = GNUNET_DHT_get_start (dht_handle,
2804 GNUNET_BLOCK_TYPE_GNS_NAMERECORD, 2804 GNUNET_BLOCK_TYPE_GNS_NAMERECORD,
@@ -2869,7 +2869,7 @@ handle_delegation_ns (void* cls, struct ResolverHandle *rh,
2869 rh->id); 2869 rh->id);
2870 if (rh->status & RSL_CNAME_FOUND) 2870 if (rh->status & RSL_CNAME_FOUND)
2871 { 2871 {
2872 if (GNUNET_GNS_RECORD_CNAME == rlh->record_type) 2872 if (GNUNET_DNSPARSER_TYPE_CNAME == rlh->record_type)
2873 { 2873 {
2874 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 2874 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
2875 "GNS_PHASE_DELEGATE_NS-%llu: Resolved queried CNAME in NS.\n", 2875 "GNS_PHASE_DELEGATE_NS-%llu: Resolved queried CNAME in NS.\n",
@@ -2915,7 +2915,7 @@ handle_delegation_ns (void* cls, struct ResolverHandle *rh,
2915 } 2915 }
2916 else if (rh->status & RSL_DELEGATE_VPN) 2916 else if (rh->status & RSL_DELEGATE_VPN)
2917 { 2917 {
2918 if (GNUNET_GNS_RECORD_VPN == rlh->record_type) 2918 if (GNUNET_NAMESTORE_TYPE_VPN == rlh->record_type)
2919 { 2919 {
2920 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 2920 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
2921 "GNS_PHASE_DELEGATE_NS-%llu: Resolved queried VPNRR in NS.\n", 2921 "GNS_PHASE_DELEGATE_NS-%llu: Resolved queried VPNRR in NS.\n",
@@ -2933,7 +2933,7 @@ handle_delegation_ns (void* cls, struct ResolverHandle *rh,
2933 } 2933 }
2934 else if (rh->status & RSL_DELEGATE_NS) 2934 else if (rh->status & RSL_DELEGATE_NS)
2935 { 2935 {
2936 if (GNUNET_GNS_RECORD_NS == rlh->record_type) 2936 if (GNUNET_DNSPARSER_TYPE_NS == rlh->record_type)
2937 { 2937 {
2938 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2938 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2939 "GNS_PHASE_DELEGATE_NS-%llu: Resolved queried NSRR in NS.\n", 2939 "GNS_PHASE_DELEGATE_NS-%llu: Resolved queried NSRR in NS.\n",
@@ -2959,7 +2959,7 @@ handle_delegation_ns (void* cls, struct ResolverHandle *rh,
2959 finish_lookup (rh, rlh, 0, NULL); 2959 finish_lookup (rh, rlh, 0, NULL);
2960 return; 2960 return;
2961 } 2961 }
2962 else if (GNUNET_GNS_RECORD_PKEY == rlh->record_type) 2962 else if (GNUNET_NAMESTORE_TYPE_PKEY == rlh->record_type)
2963 { 2963 {
2964 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 2964 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
2965 "GNS_PHASE_DELEGATE_NS-%llu: Resolved queried PKEY in NS.\n", 2965 "GNS_PHASE_DELEGATE_NS-%llu: Resolved queried PKEY in NS.\n",
@@ -2979,7 +2979,7 @@ handle_delegation_ns (void* cls, struct ResolverHandle *rh,
2979 2979
2980 if (rh->status & RSL_DELEGATE_NS) 2980 if (rh->status & RSL_DELEGATE_NS)
2981 { 2981 {
2982 if (GNUNET_GNS_RECORD_NS == rlh->record_type) 2982 if (GNUNET_DNSPARSER_TYPE_NS == rlh->record_type)
2983 { 2983 {
2984 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 2984 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
2985 "GNS_PHASE_DELEGATE_NS-%llu: Resolved queried NSRR in NS.\n", 2985 "GNS_PHASE_DELEGATE_NS-%llu: Resolved queried NSRR in NS.\n",
@@ -3157,7 +3157,7 @@ process_delegation_result_ns (void* cls,
3157 { 3157 {
3158 switch (rd[i].record_type) 3158 switch (rd[i].record_type)
3159 { 3159 {
3160 case GNUNET_GNS_RECORD_CNAME: 3160 case GNUNET_DNSPARSER_TYPE_CNAME:
3161 /* Like in regular DNS this should mean that there is no other 3161 /* Like in regular DNS this should mean that there is no other
3162 * record for this name. */ 3162 * record for this name. */
3163 3163
@@ -3169,14 +3169,14 @@ process_delegation_result_ns (void* cls,
3169 rh->status |= RSL_CNAME_FOUND; 3169 rh->status |= RSL_CNAME_FOUND;
3170 rh->proc (rh->proc_cls, rh, rd_count, rd); 3170 rh->proc (rh->proc_cls, rh, rd_count, rd);
3171 return; 3171 return;
3172 case GNUNET_GNS_RECORD_VPN: 3172 case GNUNET_NAMESTORE_TYPE_VPN:
3173 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3173 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3174 "GNS_PHASE_DELEGATE_NS-%llu: VPN found.\n", 3174 "GNS_PHASE_DELEGATE_NS-%llu: VPN found.\n",
3175 rh->id); 3175 rh->id);
3176 rh->status |= RSL_DELEGATE_VPN; 3176 rh->status |= RSL_DELEGATE_VPN;
3177 rh->proc (rh->proc_cls, rh, rd_count, rd); 3177 rh->proc (rh->proc_cls, rh, rd_count, rd);
3178 return; 3178 return;
3179 case GNUNET_GNS_RECORD_NS: 3179 case GNUNET_DNSPARSER_TYPE_NS:
3180 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3180 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3181 "GNS_PHASE_DELEGATE_NS-%llu: NS `%.*s' found.\n", 3181 "GNS_PHASE_DELEGATE_NS-%llu: NS `%.*s' found.\n",
3182 rh->id, 3182 rh->id,
@@ -3185,7 +3185,7 @@ process_delegation_result_ns (void* cls,
3185 rh->status |= RSL_DELEGATE_NS; 3185 rh->status |= RSL_DELEGATE_NS;
3186 rh->proc (rh->proc_cls, rh, rd_count, rd); 3186 rh->proc (rh->proc_cls, rh, rd_count, rd);
3187 return; 3187 return;
3188 case GNUNET_GNS_RECORD_PKEY: 3188 case GNUNET_NAMESTORE_TYPE_PKEY:
3189 rh->status |= RSL_DELEGATE_PKEY; 3189 rh->status |= RSL_DELEGATE_PKEY;
3190 if ((ignore_pending_records != 0) && 3190 if ((ignore_pending_records != 0) &&
3191 (rd[i].flags & GNUNET_NAMESTORE_RF_PENDING)) 3191 (rd[i].flags & GNUNET_NAMESTORE_RF_PENDING))
@@ -3234,7 +3234,7 @@ process_delegation_result_ns (void* cls,
3234 rh->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle, 3234 rh->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle,
3235 &rh->authority, 3235 &rh->authority,
3236 GNUNET_GNS_MASTERZONE_STR, 3236 GNUNET_GNS_MASTERZONE_STR,
3237 GNUNET_GNS_RECORD_REV, 3237 GNUNET_NAMESTORE_TYPE_REV,
3238 &process_pkey_revocation_result_ns, 3238 &process_pkey_revocation_result_ns,
3239 rh); 3239 rh);
3240 return; 3240 return;
@@ -3300,7 +3300,7 @@ resolve_delegation_ns (struct ResolverHandle *rh)
3300 rh->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle, 3300 rh->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle,
3301 &rh->authority, 3301 &rh->authority,
3302 rh->authority_name, 3302 rh->authority_name,
3303 GNUNET_GNS_RECORD_ANY, 3303 GNUNET_DNSPARSER_TYPE_ANY,
3304 &process_delegation_result_ns, 3304 &process_delegation_result_ns,
3305 rh); 3305 rh);
3306} 3306}