#define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 30)
/* test records to resolve */
-#define TEST_DOMAIN "www.alicewonderland.bobbuilder.gads"
+#define TEST_DOMAIN "www.alicewonderland.bobbuilder.gnu"
#define TEST_IP "127.0.0.1"
#define TEST_RECORD_NAME "www"
#define TEST_AUTHORITY_BOB "bobbuilder"
#define TEST_AUTHORITY_ALICE "alicewonderland"
#define TEST_PSEU_ALICE "carol"
-#define TEST_EXPECTED_RESULT "www.carol.short.private.gads"
+#define TEST_EXPECTED_RESULT "www.carol.short.private.gnu"
#define DHT_OPERATION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30)
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_zone (gns_handle, TEST_DOMAIN,
&our_zone,
- GNUNET_GNS_RECORD_A,
+ GNUNET_DNSPARSER_TYPE_A,
GNUNET_NO,
short_key,
&on_lookup_result, TEST_DOMAIN);
struct GNUNET_NAMESTORE_RecordData rd;
memset (&rd, 0, sizeof (struct GNUNET_NAMESTORE_RecordData));
- rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value;
+ rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
rd.data_size = strlen(TEST_PSEU_ALICE)+1;
rd.data = TEST_PSEU_ALICE;
- rd.record_type = GNUNET_GNS_RECORD_PSEU;
+ rd.record_type = GNUNET_NAMESTORE_TYPE_PSEU;
rd.flags = 0;
sig = GNUNET_NAMESTORE_create_signature(alice_key,
rd.expiration_time = UINT64_MAX;
rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
rd.data = &alice_hash;
- rd.record_type = GNUNET_GNS_RECORD_PKEY;
+ rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY;
rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY;
sig = GNUNET_NAMESTORE_create_signature (bob_key,
rd.expiration_time = UINT64_MAX;
rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
rd.data = &bob_hash;
- rd.record_type = GNUNET_GNS_RECORD_PKEY;
+ rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY;
rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY;
GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
rd.expiration_time = UINT64_MAX;
rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
rd.data = &short_zone;
- rd.record_type = GNUNET_GNS_RECORD_PKEY;
+ rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY;
rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY;
GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
rd.expiration_time = UINT64_MAX;
rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
rd.data = &priv_zone;
- rd.record_type = GNUNET_GNS_RECORD_PKEY;
+ rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY;
rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY;
GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,