#define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 20)
/* test records to resolve */
-#define TEST_DOMAIN_PLUS "www.gads"
-#define TEST_DOMAIN_ZKEY "www2.gads"
-#define TEST_DOMAIN_DNS "www3.gads"
+#define TEST_DOMAIN_PLUS "www.gnu"
+#define TEST_DOMAIN_ZKEY "www2.gnu"
+#define TEST_DOMAIN_DNS "www3.gnu"
#define TEST_IP_PLUS "127.0.0.1"
#define TEST_IP_ZKEY "127.0.0.2"
#define TEST_IP_DNS "131.159.74.67"
-#define TEST_RECORD_CNAME_SERVER "server.gads"
+#define TEST_RECORD_CNAME_SERVER "server.gnu"
#define TEST_RECORD_CNAME_PLUS "server.+"
#define TEST_RECORD_CNAME_ZKEY "www.J7POEUT41A8PBFS7KVVDRF88GBOU4HK8PSU5QKVLVE3R9T91E99G.zkey"
#define TEST_RECORD_CNAME_DNS "gnunet.org"
for (i=0; i<rd_count; i++)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type);
- if (rd[i].record_type == GNUNET_GNS_RECORD_CNAME)
+ if (rd[i].record_type == GNUNET_DNSPARSER_TYPE_CNAME)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "CNAME: %s\n", rd[i].data);
if (0 == strcmp(rd[i].data, TEST_RECORD_CNAME_SERVER))
for (i=0; i<rd_count; i++)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type);
- if (rd[i].record_type == GNUNET_GNS_RECORD_A)
+ if (rd[i].record_type == GNUNET_DNSPARSER_TYPE_A)
{
memcpy(&a, rd[i].data, sizeof(a));
addr = inet_ntoa(a);
}
}
}
- GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_PLUS, GNUNET_GNS_RECORD_CNAME,
+ GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_PLUS, GNUNET_DNSPARSER_TYPE_CNAME,
GNUNET_YES,
NULL,
&on_lookup_result_cname, TEST_DOMAIN_PLUS);
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"type: %d\n", rd[i].record_type);
- if (rd[i].record_type == GNUNET_GNS_RECORD_A)
+ if (rd[i].record_type == GNUNET_DNSPARSER_TYPE_A)
{
memcpy (&a, rd[i].data, sizeof(a));
addr = inet_ntoa(a);
"No resolution!\n");
}
}
- GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_DNS, GNUNET_GNS_RECORD_A,
+ GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_DNS, GNUNET_DNSPARSER_TYPE_A,
GNUNET_YES,
NULL,
&on_lookup_result_dns, TEST_DOMAIN_DNS);
for (i=0; i<rd_count; i++)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type);
- if (rd[i].record_type == GNUNET_GNS_RECORD_A)
+ if (rd[i].record_type == GNUNET_DNSPARSER_TYPE_A)
{
memcpy(&a, rd[i].data, sizeof(a));
addr = inet_ntoa(a);
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "No resolution!\n");
}
}
- GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_ZKEY, GNUNET_GNS_RECORD_A,
+ GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_ZKEY, GNUNET_DNSPARSER_TYPE_A,
GNUNET_YES,
NULL,
&on_lookup_result_zkey, TEST_DOMAIN_ZKEY);
GNUNET_SCHEDULER_shutdown ();
return;
}
- GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_PLUS, GNUNET_GNS_RECORD_A,
+ GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_PLUS, GNUNET_DNSPARSER_TYPE_A,
GNUNET_YES,
NULL,
&on_lookup_result_plus, TEST_DOMAIN_PLUS);
rd.data_size = strlen (TEST_RECORD_CNAME_PLUS);
rd.data = TEST_RECORD_CNAME_PLUS;
- rd.record_type = GNUNET_GNS_RECORD_CNAME;
+ rd.record_type = GNUNET_DNSPARSER_TYPE_CNAME;
GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
alice_key,
rd.data_size = strlen (TEST_RECORD_CNAME_ZKEY);
rd.data = TEST_RECORD_CNAME_ZKEY;
- rd.record_type = GNUNET_GNS_RECORD_CNAME;
+ rd.record_type = GNUNET_DNSPARSER_TYPE_CNAME;
GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
alice_key,
rd.data_size = strlen (TEST_RECORD_CNAME_DNS);
rd.data = TEST_RECORD_CNAME_DNS;
- rd.record_type = GNUNET_GNS_RECORD_CNAME;
+ rd.record_type = GNUNET_DNSPARSER_TYPE_CNAME;
GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
alice_key,