[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28575 - in gnunet/src: gns include pt
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28575 - in gnunet/src: gns include pt |
Date: |
Tue, 13 Aug 2013 19:10:07 +0200 |
Author: grothoff
Date: 2013-08-13 19:10:07 +0200 (Tue, 13 Aug 2013)
New Revision: 28575
Modified:
gnunet/src/gns/gns.h
gnunet/src/gns/gns_api.c
gnunet/src/gns/gnunet-dns2gns.c
gnunet/src/gns/gnunet-gns-helper-service-w32.c
gnunet/src/gns/gnunet-gns-proxy.c
gnunet/src/gns/gnunet-gns.c
gnunet/src/gns/gnunet-service-gns.c
gnunet/src/gns/gnunet-service-gns_interceptor.c
gnunet/src/gns/gnunet-service-gns_resolver.c
gnunet/src/gns/gnunet-service-gns_resolver.h
gnunet/src/gns/test_gns_cname_lookup.c
gnunet/src/gns/test_gns_dht_delegated_lookup.c
gnunet/src/gns/test_gns_dht_three_peers.c
gnunet/src/gns/test_gns_max_queries.c
gnunet/src/gns/test_gns_ns_lookup.c
gnunet/src/gns/test_gns_proxy.c
gnunet/src/gns/test_gns_pseu_shorten.c
gnunet/src/gns/test_gns_revocation.c
gnunet/src/gns/test_gns_simple_delegated_lookup.c
gnunet/src/gns/test_gns_simple_get_authority.c
gnunet/src/gns/test_gns_simple_lookup.c
gnunet/src/gns/test_gns_simple_mx_lookup.c
gnunet/src/gns/test_gns_simple_shorten.c
gnunet/src/gns/test_gns_simple_srv_lookup.c
gnunet/src/gns/test_gns_simple_zkey_lookup.c
gnunet/src/include/gnunet_gns_service.h
gnunet/src/pt/test_gns_vpn.c
Log:
-getting rid of duplication of record type values / enum GNUNET_GNS_RecordType
Modified: gnunet/src/gns/gns.h
===================================================================
--- gnunet/src/gns/gns.h 2013-08-13 16:40:41 UTC (rev 28574)
+++ gnunet/src/gns/gns.h 2013-08-13 17:10:07 UTC (rev 28575)
@@ -83,7 +83,7 @@
/**
* the type of record to look up
*/
- /* enum GNUNET_GNS_RecordType */ uint32_t type;
+ /* int */ uint32_t type;
/**
* The key for shorten, if 'have_key' is set
Modified: gnunet/src/gns/gns_api.c
===================================================================
--- gnunet/src/gns/gns_api.c 2013-08-13 16:40:41 UTC (rev 28574)
+++ gnunet/src/gns/gns_api.c 2013-08-13 17:10:07 UTC (rev 28575)
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- (C) 2009, 2010, 2012 Christian Grothoff (and other contributing authors)
+ (C) 2009-2013 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@ -821,7 +821,7 @@
GNUNET_GNS_lookup_zone (struct GNUNET_GNS_Handle *handle,
const char *name,
struct GNUNET_CRYPTO_ShortHashCode *zone,
- enum GNUNET_GNS_RecordType type,
+ int type,
int only_cached,
struct GNUNET_CRYPTO_EccPrivateKey *shorten_key,
GNUNET_GNS_LookupResultProcessor proc,
@@ -900,7 +900,7 @@
struct GNUNET_GNS_LookupRequest *
GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle,
const char *name,
- enum GNUNET_GNS_RecordType type,
+ int type,
int only_cached,
struct GNUNET_CRYPTO_EccPrivateKey *shorten_key,
GNUNET_GNS_LookupResultProcessor proc,
Modified: gnunet/src/gns/gnunet-dns2gns.c
===================================================================
--- gnunet/src/gns/gnunet-dns2gns.c 2013-08-13 16:40:41 UTC (rev 28574)
+++ gnunet/src/gns/gnunet-dns2gns.c 2013-08-13 17:10:07 UTC (rev 28575)
@@ -356,7 +356,7 @@
char *dot;
char *nname;
size_t name_len;
- enum GNUNET_GNS_RecordType type;
+ int type;
int use_gns;
struct GNUNET_CRYPTO_ShortHashCode zone;
Modified: gnunet/src/gns/gnunet-gns-helper-service-w32.c
===================================================================
--- gnunet/src/gns/gnunet-gns-helper-service-w32.c 2013-08-13 16:40:41 UTC
(rev 28574)
+++ gnunet/src/gns/gnunet-gns-helper-service-w32.c 2013-08-13 17:10:07 UTC
(rev 28575)
@@ -282,13 +282,13 @@
{
switch (rd[i].record_type)
{
- case GNUNET_GNS_RECORD_A:
+ case GNUNET_DNSPARSER_TYPE_A:
if (rd[i].data_size != sizeof (struct in_addr))
continue;
size += sizeof (CSADDR_INFO) + sizeof (struct sockaddr_in) * 2;
csanum++;
break;
- case GNUNET_GNS_RECORD_AAAA:
+ case GNUNET_DNSPARSER_TYPE_AAAA:
if (rd[i].data_size != sizeof (struct in6_addr))
continue;
size += sizeof (CSADDR_INFO) + sizeof (struct sockaddr_in6) * 2;
@@ -305,13 +305,13 @@
blobsize += sizeof (void *); /* For addresses */
for (i = 0; i < rd_count; i++)
{
- if ((rq->af == AF_INET || rq->af == AF_UNSPEC) && rd[i].record_type ==
GNUNET_GNS_RECORD_A)
+ if ((rq->af == AF_INET || rq->af == AF_UNSPEC) && rd[i].record_type ==
GNUNET_DNSPARSER_TYPE_A)
{
blobsize += sizeof (void *);
blobsize += sizeof (struct in_addr);
blobaddrcount++;
}
- else if (rq->af == AF_INET6 && rd[i].record_type ==
GNUNET_GNS_RECORD_AAAA)
+ else if (rq->af == AF_INET6 && rd[i].record_type ==
GNUNET_DNSPARSER_TYPE_AAAA)
{
blobsize += sizeof (void *);
blobsize += sizeof (struct in6_addr);
@@ -367,7 +367,7 @@
{
switch (rd[i].record_type)
{
- case GNUNET_GNS_RECORD_A:
+ case GNUNET_DNSPARSER_TYPE_A:
if (rd[i].data_size != sizeof (struct in_addr))
continue;
qs->lpcsaBuffer[j].iSocketType = SOCK_STREAM;
@@ -389,7 +389,7 @@
size_recalc += sizeof (CSADDR_INFO) + sizeof (struct sockaddr_in) * 2;
j++;
break;
- case GNUNET_GNS_RECORD_AAAA:
+ case GNUNET_DNSPARSER_TYPE_AAAA:
if (rd[i].data_size != sizeof (struct in6_addr))
continue;
qs->lpcsaBuffer[j].iSocketType = SOCK_STREAM;
@@ -460,7 +460,7 @@
for (i = 0; i < rd_count; i++)
{
if ((rq->af == AF_INET || rq->af == AF_UNSPEC) &&
- rd[i].record_type == GNUNET_GNS_RECORD_A)
+ rd[i].record_type == GNUNET_DNSPARSER_TYPE_A)
{
he->h_addr_list[j] = (char *) ptr;
ptr += sizeof (struct in_addr);
@@ -471,7 +471,7 @@
memcpy (he->h_addr_list[j], rd[i].data, sizeof (struct in_addr));
j++;
}
- else if (rq->af == AF_INET6 && rd[i].record_type ==
GNUNET_GNS_RECORD_AAAA)
+ else if (rq->af == AF_INET6 && rd[i].record_type ==
GNUNET_DNSPARSER_TYPE_AAAA)
{
he->h_addr_list[j] = (char *) ptr;
ptr += sizeof (struct in6_addr);
@@ -512,25 +512,25 @@
uint32_t rtype;
if (IsEqualGUID (&SVCID_DNS_TYPE_A, &sc))
- rtype = GNUNET_GNS_RECORD_A;
+ rtype = GNUNET_DNSPARSER_TYPE_A;
else if (IsEqualGUID (&SVCID_DNS_TYPE_NS, &sc))
- rtype = GNUNET_GNS_RECORD_NS;
+ rtype = GNUNET_DNSPARSER_TYPE_NS;
else if (IsEqualGUID (&SVCID_DNS_TYPE_CNAME, &sc))
- rtype = GNUNET_GNS_RECORD_CNAME;
+ rtype = GNUNET_DNSPARSER_TYPE_CNAME;
else if (IsEqualGUID (&SVCID_DNS_TYPE_SOA, &sc))
- rtype = GNUNET_GNS_RECORD_SOA;
+ rtype = GNUNET_DNSPARSER_TYPE_SOA;
else if (IsEqualGUID (&SVCID_DNS_TYPE_PTR, &sc))
- rtype = GNUNET_GNS_RECORD_PTR;
+ rtype = GNUNET_DNSPARSER_TYPE_PTR;
else if (IsEqualGUID (&SVCID_DNS_TYPE_MX, &sc))
- rtype = GNUNET_GNS_RECORD_MX;
+ rtype = GNUNET_DNSPARSER_TYPE_MX;
else if (IsEqualGUID (&SVCID_DNS_TYPE_TEXT, &sc))
- rtype = GNUNET_GNS_RECORD_TXT;
+ rtype = GNUNET_DNSPARSER_TYPE_TXT;
else if (IsEqualGUID (&SVCID_DNS_TYPE_AAAA, &sc))
- rtype = GNUNET_GNS_RECORD_AAAA;
+ rtype = GNUNET_DNSPARSER_TYPE_AAAA;
else if (IsEqualGUID (&SVCID_DNS_TYPE_SRV, &sc))
- rtype = GNUNET_GNS_RECORD_SRV;
+ rtype = GNUNET_DNSPARSER_TYPE_SRV;
else if (IsEqualGUID (&SVCID_INET_HOSTADDRBYNAME, &sc))
- rtype = GNUNET_GNS_RECORD_A;
+ rtype = GNUNET_DNSPARSER_TYPE_A;
else
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
Modified: gnunet/src/gns/gnunet-gns-proxy.c
===================================================================
--- gnunet/src/gns/gnunet-gns-proxy.c 2013-08-13 16:40:41 UTC (rev 28574)
+++ gnunet/src/gns/gnunet-gns-proxy.c 2013-08-13 17:10:07 UTC (rev 28575)
@@ -1751,7 +1751,7 @@
for (i=0; i<rd_count; i++)
{
- if (rd[i].record_type != GNUNET_GNS_RECORD_LEHO)
+ if (rd[i].record_type != GNUNET_NAMESTORE_TYPE_LEHO)
continue;
memcpy (ctask->leho, rd[i].data, rd[i].data_size);
@@ -1849,7 +1849,7 @@
GNUNET_GNS_lookup_zone (gns_handle,
ctask->host,
local_gns_zone,
- GNUNET_GNS_RECORD_LEHO,
+ GNUNET_NAMESTORE_TYPE_LEHO,
GNUNET_YES, //Only cached for performance
shorten_zonekey,
&process_leho_lookup,
Modified: gnunet/src/gns/gnunet-gns.c
===================================================================
--- gnunet/src/gns/gnunet-gns.c 2013-08-13 16:40:41 UTC (rev 28574)
+++ gnunet/src/gns/gnunet-gns.c 2013-08-13 17:10:07 UTC (rev 28575)
@@ -62,7 +62,7 @@
/**
* Requested record type.
*/
-static enum GNUNET_GNS_RecordType rtype;
+static int rtype;
/**
* Handle to lookup request
@@ -291,7 +291,7 @@
if (NULL != lookup_type)
rtype = GNUNET_NAMESTORE_typename_to_number (lookup_type);
else
- rtype = GNUNET_GNS_RECORD_A;
+ rtype = GNUNET_DNSPARSER_TYPE_A;
if ( (NULL != shorten_name) &&
(NULL != shorten_zone) &&
Modified: gnunet/src/gns/gnunet-service-gns.c
===================================================================
--- gnunet/src/gns/gnunet-service-gns.c 2013-08-13 16:40:41 UTC (rev 28574)
+++ gnunet/src/gns/gnunet-service-gns.c 2013-08-13 17:10:07 UTC (rev 28575)
@@ -110,7 +110,7 @@
/**
* request type
*/
- enum GNUNET_GNS_RecordType type;
+ int type;
/**
* name to shorten
@@ -192,7 +192,7 @@
/**
* request type
*/
- enum GNUNET_GNS_RecordType type;
+ int type;
};
@@ -1129,7 +1129,7 @@
return;
}
- if ((GNUNET_GNS_RECORD_A == clh->type) &&
+ if ((GNUNET_DNSPARSER_TYPE_A == clh->type) &&
(GNUNET_OK != v4_enabled))
{
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
@@ -1139,7 +1139,7 @@
return;
}
- if ((GNUNET_GNS_RECORD_AAAA == clh->type) &&
+ if ((GNUNET_DNSPARSER_TYPE_AAAA == clh->type) &&
(GNUNET_OK != v6_enabled))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
Modified: gnunet/src/gns/gnunet-service-gns_interceptor.c
===================================================================
--- gnunet/src/gns/gnunet-service-gns_interceptor.c 2013-08-13 16:40:41 UTC
(rev 28574)
+++ gnunet/src/gns/gnunet-service-gns_interceptor.c 2013-08-13 17:10:07 UTC
(rev 28575)
@@ -123,16 +123,16 @@
answer_records[i].type = rd[i].record_type;
switch(rd[i].record_type)
{
- case GNUNET_GNS_RECORD_NS:
- case GNUNET_GNS_RECORD_CNAME:
- case GNUNET_GNS_RECORD_PTR:
+ case GNUNET_DNSPARSER_TYPE_NS:
+ case GNUNET_DNSPARSER_TYPE_CNAME:
+ case GNUNET_DNSPARSER_TYPE_PTR:
answer_records[i].data.hostname = (char*)rd[i].data;
break;
- case GNUNET_GNS_RECORD_SOA:
+ case GNUNET_DNSPARSER_TYPE_SOA:
answer_records[i].data.soa =
(struct GNUNET_DNSPARSER_SoaRecord *)rd[i].data;
break;
- case GNUNET_GNS_RECORD_MX:
+ case GNUNET_DNSPARSER_TYPE_MX:
answer_records[i].data.mx =
(struct GNUNET_DNSPARSER_MxRecord *)rd[i].data;
break;
@@ -150,16 +150,16 @@
additional_records[i].type = rd[i].record_type;
switch(rd[i].record_type)
{
- case GNUNET_GNS_RECORD_NS:
- case GNUNET_GNS_RECORD_CNAME:
- case GNUNET_GNS_RECORD_PTR:
+ case GNUNET_DNSPARSER_TYPE_NS:
+ case GNUNET_DNSPARSER_TYPE_CNAME:
+ case GNUNET_DNSPARSER_TYPE_PTR:
additional_records[i].data.hostname = (char*)rd[i].data;
break;
- case GNUNET_GNS_RECORD_SOA:
+ case GNUNET_DNSPARSER_TYPE_SOA:
additional_records[i].data.soa =
(struct GNUNET_DNSPARSER_SoaRecord *)rd[i].data;
break;
- case GNUNET_GNS_RECORD_MX:
+ case GNUNET_DNSPARSER_TYPE_MX:
additional_records[i].data.mx =
(struct GNUNET_DNSPARSER_MxRecord *)rd[i].data;
break;
Modified: gnunet/src/gns/gnunet-service-gns_resolver.c
===================================================================
--- gnunet/src/gns/gnunet-service-gns_resolver.c 2013-08-13 16:40:41 UTC
(rev 28574)
+++ gnunet/src/gns/gnunet-service-gns_resolver.c 2013-08-13 17:10:07 UTC
(rev 28575)
@@ -296,7 +296,7 @@
new_pkey.expiration_time = UINT64_MAX;
new_pkey.data_size = sizeof (struct GNUNET_CRYPTO_ShortHashCode);
new_pkey.data = &gph->auth->zone;
- new_pkey.record_type = GNUNET_GNS_RECORD_PKEY;
+ new_pkey.record_type = GNUNET_NAMESTORE_TYPE_PKEY;
new_pkey.flags = GNUNET_NAMESTORE_RF_AUTHORITY
| GNUNET_NAMESTORE_RF_PRIVATE
| GNUNET_NAMESTORE_RF_PENDING;
@@ -436,7 +436,7 @@
for (i=0; i < num_records; i++)
{
if ((strcmp (name, GNUNET_GNS_MASTERZONE_STR) == 0) &&
- (rd[i].record_type == GNUNET_GNS_RECORD_PSEU))
+ (rd[i].record_type == GNUNET_NAMESTORE_TYPE_PSEU))
{
/* found pseu */
process_pseu_result (gph, (char*)rd[i].data);
@@ -489,7 +489,7 @@
gph->timeout = GNUNET_SCHEDULER_add_delayed (DHT_LOOKUP_TIMEOUT,
&handle_auth_discovery_timeout, gph);
- xquery = htonl (GNUNET_GNS_RECORD_PSEU);
+ xquery = htonl (GNUNET_NAMESTORE_TYPE_PSEU);
GNUNET_assert (gph->get_handle == NULL);
@@ -510,7 +510,7 @@
if (0 != (strcmp (name, GNUNET_GNS_TLD_PLUS)))
continue;
- if (rd[i].record_type != GNUNET_GNS_RECORD_PSEU)
+ if (rd[i].record_type != GNUNET_NAMESTORE_TYPE_PSEU)
continue;
/* found pseu */
@@ -552,7 +552,7 @@
gph->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle,
&gph->auth->zone,
GNUNET_GNS_MASTERZONE_STR,
- GNUNET_GNS_RECORD_PSEU,
+ GNUNET_NAMESTORE_TYPE_PSEU,
&process_auth_discovery_ns_result,
gph);
return;
@@ -1264,7 +1264,7 @@
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_REC-%llu: Answer is IPv4!\n",
rh->id);
- if (GNUNET_GNS_RECORD_A != rlh->record_type)
+ if (GNUNET_DNSPARSER_TYPE_A != rlh->record_type)
{
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_REC-%llu: Requested record is not IPv4!\n",
@@ -1272,7 +1272,7 @@
rh->proc (rh->proc_cls, rh, 0, NULL);
return;
}
- rd.record_type = GNUNET_GNS_RECORD_A;
+ rd.record_type = GNUNET_DNSPARSER_TYPE_A;
rd.expiration_time = UINT64_MAX; /* FIXME: should probably pick something
shorter... */
rd.data = address;
rd.data_size = sizeof (struct in_addr);
@@ -1285,7 +1285,7 @@
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_REC-%llu: Answer is IPv6!\n",
rh->id);
- if (GNUNET_GNS_RECORD_AAAA != rlh->record_type)
+ if (GNUNET_DNSPARSER_TYPE_AAAA != rlh->record_type)
{
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_REC-%llu: Requested record is not IPv6!\n",
@@ -1293,7 +1293,7 @@
rh->proc (rh->proc_cls, rh, 0, NULL);
return;
}
- rd.record_type = GNUNET_GNS_RECORD_AAAA;
+ rd.record_type = GNUNET_DNSPARSER_TYPE_AAAA;
rd.expiration_time = UINT64_MAX; /* FIXME: should probably pick something
shorter... */
rd.data = address;
rd.data_size = sizeof (struct in6_addr);
@@ -1383,14 +1383,14 @@
if (sizeof (struct sockaddr_in) == addrlen)
{
sai = (struct sockaddr_in*) addr;
- rd.record_type = GNUNET_GNS_RECORD_A;
+ rd.record_type = GNUNET_DNSPARSER_TYPE_A;
rd.data_size = sizeof (struct in_addr);
rd.data = &sai->sin_addr;
}
else if (sizeof (struct sockaddr_in6) == addrlen)
{
sai6 = (struct sockaddr_in6*) addr;
- rd.record_type = GNUNET_GNS_RECORD_AAAA;
+ rd.record_type = GNUNET_DNSPARSER_TYPE_AAAA;
rd.data_size = sizeof (struct in6_addr);
rd.data = &sai6->sin6_addr;
}
@@ -1418,8 +1418,8 @@
struct RecordLookupHandle *rlh = rh->proc_cls;
int af;
- if ((GNUNET_GNS_RECORD_A != rlh->record_type) &&
- (GNUNET_GNS_RECORD_AAAA != rlh->record_type))
+ if ((GNUNET_DNSPARSER_TYPE_A != rlh->record_type) &&
+ (GNUNET_DNSPARSER_TYPE_AAAA != rlh->record_type))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Can only resolve A/AAAA via stub... abort\n");
@@ -1427,7 +1427,7 @@
return;
}
- if (GNUNET_GNS_RECORD_A == rlh->record_type)
+ if (GNUNET_DNSPARSER_TYPE_A == rlh->record_type)
af = AF_INET;
else
af = AF_INET6;
@@ -1501,7 +1501,7 @@
packet->answers[i].type,
rlh->record_type);
/* http://tools.ietf.org/html/rfc1034#section-3.6.2 */
- if (GNUNET_GNS_RECORD_CNAME == packet->answers[i].type)
+ if (GNUNET_DNSPARSER_TYPE_CNAME == packet->answers[i].type)
{
struct GNUNET_DNSPARSER_Query query;
struct GNUNET_DNSPARSER_Packet npacket;
@@ -1591,7 +1591,7 @@
for (i = 0; i < packet->num_authority_records; i++)
{
- if (packet->authority_records[i].type == GNUNET_GNS_RECORD_NS)
+ if (packet->authority_records[i].type == GNUNET_DNSPARSER_TYPE_NS)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Found NS delegation!\n");
@@ -1606,7 +1606,7 @@
if (GNUNET_NO == found_delegation)
break;
- if ((packet->additional_records[i].type == GNUNET_GNS_RECORD_A) &&
+ if ((packet->additional_records[i].type == GNUNET_DNSPARSER_TYPE_A) &&
(0 == strcmp (packet->additional_records[i].name, delegation_name)))
{
GNUNET_assert (sizeof (struct in_addr) ==
@@ -1709,7 +1709,7 @@
for (i = 0; i < rd_count; i++)
{
/* Synthesize dns name */
- if (GNUNET_GNS_RECORD_NS == rd[i].record_type)
+ if (GNUNET_DNSPARSER_TYPE_NS == rd[i].record_type)
{
strcpy (rh->dns_zone, (char*)rd[i].data);
if (0 == strcmp (rh->name, ""))
@@ -1718,7 +1718,7 @@
sprintf (rh->dns_name, "%s.%s", rh->name, (char*)rd[i].data);
}
/* The glue */
- if (GNUNET_GNS_RECORD_A == rd[i].record_type)
+ if (GNUNET_DNSPARSER_TYPE_A == rd[i].record_type)
/* need to use memcpy as .data may be unaligned */
memcpy (&dnsip, rd[i].data, sizeof (dnsip));
}
@@ -1841,7 +1841,7 @@
(char*)&vpn[1],
GNUNET_h2s (&serv_desc));
rh->proc = &handle_record_vpn;
- if (GNUNET_GNS_RECORD_A == rlh->record_type)
+ if (GNUNET_DNSPARSER_TYPE_A == rlh->record_type)
af = AF_INET;
else
af = AF_INET6;
@@ -2049,7 +2049,7 @@
for (i = 0; i < rd_count; i++)
{
- if (GNUNET_GNS_RECORD_REV == rd[i].record_type)
+ if (GNUNET_NAMESTORE_TYPE_REV == rd[i].record_type)
{
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_DELEGATE_REV-%llu: Zone has been revoked.\n",
@@ -2071,11 +2071,11 @@
{
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_DELEGATE_REV-%llu: Starting background lookup for %s type
%d\n",
- rh->id, "+.gads", GNUNET_GNS_RECORD_REV);
+ rh->id, "+.gads", GNUNET_NAMESTORE_TYPE_REV);
gns_resolver_lookup_record(rh->authority,
rh->private_local_zone,
- GNUNET_GNS_RECORD_REV,
+ GNUNET_NAMESTORE_TYPE_REV,
GNUNET_GNS_TLD,
NULL,
GNUNET_TIME_UNIT_FOREVER_REL,
@@ -2213,7 +2213,7 @@
rh->id, name, rh->authority_name);
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_DELEGATE_DHT-%llu: Got type: %d (wanted %d)\n",
- rh->id, rd[i].record_type, GNUNET_GNS_RECORD_PKEY);
+ rh->id, rd[i].record_type, GNUNET_NAMESTORE_TYPE_PKEY);
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_DELEGATE_DHT-%llu: Got data length: %d\n",
rh->id, rd[i].data_size);
@@ -2221,9 +2221,9 @@
"GNS_PHASE_DELEGATE_DHT-%llu: Got flag %d\n",
rh->id, rd[i].flags);
- if ((GNUNET_GNS_RECORD_VPN == rd[i].record_type) ||
- (GNUNET_GNS_RECORD_NS == rd[i].record_type) ||
- (GNUNET_GNS_RECORD_CNAME == rd[i].record_type))
+ if ((GNUNET_NAMESTORE_TYPE_VPN == rd[i].record_type) ||
+ (GNUNET_DNSPARSER_TYPE_NS == rd[i].record_type) ||
+ (GNUNET_DNSPARSER_TYPE_CNAME == rd[i].record_type))
{
/**
* This is a VPN,NS,CNAME entry. Let namestore handle this after
caching
@@ -2238,7 +2238,7 @@
}
if ((0 == strcmp(name, rh->authority_name)) &&
- (GNUNET_GNS_RECORD_PKEY == rd[i].record_type))
+ (GNUNET_NAMESTORE_TYPE_PKEY == rd[i].record_type))
{
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_DELEGATE_DHT-%llu: Authority found in DHT\n",
@@ -2339,7 +2339,7 @@
rh->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle,
&rh->authority,
GNUNET_GNS_MASTERZONE_STR,
- GNUNET_GNS_RECORD_REV,
+ GNUNET_NAMESTORE_TYPE_REV,
&process_pkey_revocation_result_ns,
rh);
@@ -2460,12 +2460,12 @@
for (i = 0; i < rd_count; i++)
{
- if ((GNUNET_GNS_RECORD_NS != rd[i].record_type) &&
- (GNUNET_GNS_RECORD_PTR != rd[i].record_type) &&
- (GNUNET_GNS_RECORD_CNAME != rd[i].record_type) &&
- (GNUNET_GNS_RECORD_MX != rd[i].record_type) &&
- (GNUNET_GNS_RECORD_SOA != rd[i].record_type) &&
- (GNUNET_GNS_RECORD_SRV != rd[i].record_type))
+ if ((GNUNET_DNSPARSER_TYPE_NS != rd[i].record_type) &&
+ (GNUNET_DNSPARSER_TYPE_PTR != rd[i].record_type) &&
+ (GNUNET_DNSPARSER_TYPE_CNAME != rd[i].record_type) &&
+ (GNUNET_DNSPARSER_TYPE_MX != rd[i].record_type) &&
+ (GNUNET_DNSPARSER_TYPE_SOA != rd[i].record_type) &&
+ (GNUNET_DNSPARSER_TYPE_SRV != rd[i].record_type))
{
p_rd[i].data = rd[i].data;
continue;
@@ -2485,7 +2485,7 @@
repl_string = rlh->name+strlen(rh->name)+1;
offset = 0;
- if (GNUNET_GNS_RECORD_MX == rd[i].record_type)
+ if (GNUNET_DNSPARSER_TYPE_MX == rd[i].record_type)
{
memcpy (new_mx_data, (char*)rd[i].data, sizeof(uint16_t));
offset = sizeof (uint16_t);
@@ -2497,7 +2497,7 @@
p_rd[i].data = new_mx_data;
p_rd[i].data_size = offset;
}
- else if (GNUNET_GNS_RECORD_SRV == rd[i].record_type)
+ else if (GNUNET_DNSPARSER_TYPE_SRV == rd[i].record_type)
{
/*
* Prio, weight and port
@@ -2513,7 +2513,7 @@
p_rd[i].data = new_srv_data;
p_rd[i].data_size = sizeof (struct srv_data) + strlen
((char*)&new_srv[1]) + 1;
}
- else if (GNUNET_GNS_RECORD_SOA == rd[i].record_type)
+ else if (GNUNET_DNSPARSER_TYPE_SOA == rd[i].record_type)
{
/* expand mname and rname */
old_soa = (struct soa_data*)rd[i].data;
@@ -2708,7 +2708,7 @@
if (0 == strcmp(rh->name, ""))
{
- if (GNUNET_GNS_RECORD_PKEY == rlh->record_type)
+ if (GNUNET_NAMESTORE_TYPE_PKEY == rlh->record_type)
{
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_DELEGATE_DHT-%llu: Resolved queried PKEY via
DHT.\n",
@@ -2798,7 +2798,7 @@
rh->authority_name,
GNUNET_short_h2s (&rh->authority),
rh->id);
- xquery = htonl (GNUNET_GNS_RECORD_PKEY);
+ xquery = htonl (GNUNET_NAMESTORE_TYPE_PKEY);
GNUNET_assert (rh->get_handle == NULL);
rh->get_handle = GNUNET_DHT_get_start (dht_handle,
GNUNET_BLOCK_TYPE_GNS_NAMERECORD,
@@ -2869,7 +2869,7 @@
rh->id);
if (rh->status & RSL_CNAME_FOUND)
{
- if (GNUNET_GNS_RECORD_CNAME == rlh->record_type)
+ if (GNUNET_DNSPARSER_TYPE_CNAME == rlh->record_type)
{
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_DELEGATE_NS-%llu: Resolved queried CNAME in
NS.\n",
@@ -2915,7 +2915,7 @@
}
else if (rh->status & RSL_DELEGATE_VPN)
{
- if (GNUNET_GNS_RECORD_VPN == rlh->record_type)
+ if (GNUNET_NAMESTORE_TYPE_VPN == rlh->record_type)
{
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_DELEGATE_NS-%llu: Resolved queried VPNRR in NS.\n",
@@ -2933,7 +2933,7 @@
}
else if (rh->status & RSL_DELEGATE_NS)
{
- if (GNUNET_GNS_RECORD_NS == rlh->record_type)
+ if (GNUNET_DNSPARSER_TYPE_NS == rlh->record_type)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_DELEGATE_NS-%llu: Resolved queried NSRR in
NS.\n",
@@ -2959,7 +2959,7 @@
finish_lookup (rh, rlh, 0, NULL);
return;
}
- else if (GNUNET_GNS_RECORD_PKEY == rlh->record_type)
+ else if (GNUNET_NAMESTORE_TYPE_PKEY == rlh->record_type)
{
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_DELEGATE_NS-%llu: Resolved queried PKEY in
NS.\n",
@@ -2979,7 +2979,7 @@
if (rh->status & RSL_DELEGATE_NS)
{
- if (GNUNET_GNS_RECORD_NS == rlh->record_type)
+ if (GNUNET_DNSPARSER_TYPE_NS == rlh->record_type)
{
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_DELEGATE_NS-%llu: Resolved queried NSRR in NS.\n",
@@ -3157,7 +3157,7 @@
{
switch (rd[i].record_type)
{
- case GNUNET_GNS_RECORD_CNAME:
+ case GNUNET_DNSPARSER_TYPE_CNAME:
/* Like in regular DNS this should mean that there is no other
* record for this name. */
@@ -3169,14 +3169,14 @@
rh->status |= RSL_CNAME_FOUND;
rh->proc (rh->proc_cls, rh, rd_count, rd);
return;
- case GNUNET_GNS_RECORD_VPN:
+ case GNUNET_NAMESTORE_TYPE_VPN:
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_DELEGATE_NS-%llu: VPN found.\n",
rh->id);
rh->status |= RSL_DELEGATE_VPN;
rh->proc (rh->proc_cls, rh, rd_count, rd);
return;
- case GNUNET_GNS_RECORD_NS:
+ case GNUNET_DNSPARSER_TYPE_NS:
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"GNS_PHASE_DELEGATE_NS-%llu: NS `%.*s' found.\n",
rh->id,
@@ -3185,7 +3185,7 @@
rh->status |= RSL_DELEGATE_NS;
rh->proc (rh->proc_cls, rh, rd_count, rd);
return;
- case GNUNET_GNS_RECORD_PKEY:
+ case GNUNET_NAMESTORE_TYPE_PKEY:
rh->status |= RSL_DELEGATE_PKEY;
if ((ignore_pending_records != 0) &&
(rd[i].flags & GNUNET_NAMESTORE_RF_PENDING))
@@ -3234,7 +3234,7 @@
rh->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle,
&rh->authority,
GNUNET_GNS_MASTERZONE_STR,
-
GNUNET_GNS_RECORD_REV,
+
GNUNET_NAMESTORE_TYPE_REV,
&process_pkey_revocation_result_ns,
rh);
return;
@@ -3300,7 +3300,7 @@
rh->namestore_task = GNUNET_NAMESTORE_lookup_record (namestore_handle,
&rh->authority,
rh->authority_name,
- GNUNET_GNS_RECORD_ANY,
+
GNUNET_DNSPARSER_TYPE_ANY,
&process_delegation_result_ns,
rh);
}
Modified: gnunet/src/gns/gnunet-service-gns_resolver.h
===================================================================
--- gnunet/src/gns/gnunet-service-gns_resolver.h 2013-08-13 16:40:41 UTC
(rev 28574)
+++ gnunet/src/gns/gnunet-service-gns_resolver.h 2013-08-13 17:10:07 UTC
(rev 28575)
@@ -356,7 +356,7 @@
/**
* the record type to look up
*/
- enum GNUNET_GNS_RecordType record_type;
+ int record_type;
/**
* the name to look up
Modified: gnunet/src/gns/test_gns_cname_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_cname_lookup.c 2013-08-13 16:40:41 UTC (rev
28574)
+++ gnunet/src/gns/test_gns_cname_lookup.c 2013-08-13 17:10:07 UTC (rev
28575)
@@ -132,7 +132,7 @@
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))
@@ -173,7 +173,7 @@
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);
@@ -191,7 +191,7 @@
}
}
}
- 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);
@@ -221,7 +221,7 @@
{
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);
@@ -241,7 +241,7 @@
"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);
@@ -269,7 +269,7 @@
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);
@@ -286,7 +286,7 @@
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);
@@ -322,7 +322,7 @@
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);
@@ -387,7 +387,7 @@
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,
@@ -398,7 +398,7 @@
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,
@@ -409,7 +409,7 @@
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,
Modified: gnunet/src/gns/test_gns_dht_delegated_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_dht_delegated_lookup.c 2013-08-13 16:40:41 UTC
(rev 28574)
+++ gnunet/src/gns/test_gns_dht_delegated_lookup.c 2013-08-13 17:10:07 UTC
(rev 28575)
@@ -156,7 +156,7 @@
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);
@@ -198,7 +198,7 @@
return;
}
- GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN, GNUNET_GNS_RECORD_A,
+ GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN, GNUNET_DNSPARSER_TYPE_A,
GNUNET_NO,
NULL,
&on_lookup_result, TEST_DOMAIN);
@@ -343,7 +343,7 @@
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,
Modified: gnunet/src/gns/test_gns_dht_three_peers.c
===================================================================
--- gnunet/src/gns/test_gns_dht_three_peers.c 2013-08-13 16:40:41 UTC (rev
28574)
+++ gnunet/src/gns/test_gns_dht_three_peers.c 2013-08-13 17:10:07 UTC (rev
28575)
@@ -261,7 +261,7 @@
{
fprintf (stderr, "\n");
wait_task = GNUNET_SCHEDULER_NO_TASK;
- lookup_handle = GNUNET_GNS_lookup(gh, TEST_DOMAIN, GNUNET_GNS_RECORD_A,
+ lookup_handle = GNUNET_GNS_lookup(gh, TEST_DOMAIN, GNUNET_DNSPARSER_TYPE_A,
GNUNET_NO,
NULL,
&on_lookup_result, TEST_DOMAIN);
@@ -353,7 +353,7 @@
GNUNET_assert(1 == inet_pton (AF_INET, TEST_IP, web));
rd.data_size = sizeof(struct in_addr);
rd.data = web;
- rd.record_type = GNUNET_GNS_RECORD_A;
+ rd.record_type = GNUNET_DNSPARSER_TYPE_A;
rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY;
GNUNET_NAMESTORE_record_put_by_authority (nh[0], key, "www",
@@ -362,7 +362,7 @@
rd.data_size = strlen(TEST_DAVE_PSEU);
rd.data = TEST_DAVE_PSEU;
- rd.record_type = GNUNET_GNS_RECORD_PSEU;
+ rd.record_type = GNUNET_NAMESTORE_TYPE_PSEU;
GNUNET_NAMESTORE_record_put_by_authority (nh[0], key,
@@ -421,7 +421,7 @@
rd.expiration_time = UINT64_MAX;
rd.data_size = sizeof(struct GNUNET_CRYPTO_ShortHashCode);
rd.data = &dave_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 (nh[1], key, "buddy",
@@ -473,7 +473,7 @@
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 (nh[2], key, "bob",
Modified: gnunet/src/gns/test_gns_max_queries.c
===================================================================
--- gnunet/src/gns/test_gns_max_queries.c 2013-08-13 16:40:41 UTC (rev
28574)
+++ gnunet/src/gns/test_gns_max_queries.c 2013-08-13 17:10:07 UTC (rev
28575)
@@ -182,7 +182,7 @@
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);
@@ -231,13 +231,13 @@
GNUNET_snprintf(lookup_name,
GNUNET_DNSPARSER_MAX_NAME_LENGTH,
"www.doesnotexist-%d.bob.gads", i);
- lr = GNUNET_GNS_lookup (gns_handle, lookup_name, GNUNET_GNS_RECORD_A,
+ lr = GNUNET_GNS_lookup (gns_handle, lookup_name, GNUNET_DNSPARSER_TYPE_A,
GNUNET_NO,
NULL,
&on_lookup_result_dummy, &requests[num_requests]);
requests[num_requests++] = lr;
}
- lr = GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN, GNUNET_GNS_RECORD_A,
+ lr = GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN, GNUNET_DNSPARSER_TYPE_A,
GNUNET_NO,
NULL,
&on_lookup_result, TEST_DOMAIN);
@@ -320,7 +320,7 @@
GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash);
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;
GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
alice_key,
Modified: gnunet/src/gns/test_gns_ns_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_ns_lookup.c 2013-08-13 16:40:41 UTC (rev 28574)
+++ gnunet/src/gns/test_gns_ns_lookup.c 2013-08-13 17:10:07 UTC (rev 28575)
@@ -267,7 +267,7 @@
ok = 1;
for (i=0; i<rd_count; i++)
{
- 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);
@@ -335,7 +335,7 @@
ok = 1;
for (i=0; i<rd_count; i++)
{
- 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);
@@ -366,7 +366,7 @@
"Starting lookup for `%s'\n",
TEST_DOMAIN_ALT2);
lr = GNUNET_GNS_lookup (gns_handle,
- TEST_DOMAIN_ALT2, GNUNET_GNS_RECORD_A,
+ TEST_DOMAIN_ALT2, GNUNET_DNSPARSER_TYPE_A,
GNUNET_YES,
NULL,
&on_lookup_result_alt2, NULL);
@@ -407,7 +407,7 @@
ok = 1;
for (i=0; i<rd_count; i++)
{
- 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);
@@ -438,7 +438,7 @@
"Starting lookup for `%s'\n",
TEST_DOMAIN_ALT);
- lr = GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_ALT, GNUNET_GNS_RECORD_A,
+ lr = GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN_ALT, GNUNET_DNSPARSER_TYPE_A,
GNUNET_YES,
NULL,
&on_lookup_result_alt, NULL);
@@ -462,7 +462,7 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Records ready, starting lookup for `%s'\n",
TEST_DOMAIN);
- lr = GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN, GNUNET_GNS_RECORD_A,
+ lr = GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN, GNUNET_DNSPARSER_TYPE_A,
GNUNET_YES,
NULL,
&on_lookup_result, NULL);
@@ -606,7 +606,7 @@
rd[1].expiration_time = UINT64_MAX;
rd[1].data_size = strlen (TEST_RECORD_NS);
rd[1].data = TEST_RECORD_NS;
- rd[1].record_type = GNUNET_GNS_RECORD_NS;
+ rd[1].record_type = GNUNET_DNSPARSER_TYPE_NS;
rd[1].flags = GNUNET_NAMESTORE_RF_AUTHORITY;
qe = GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
Modified: gnunet/src/gns/test_gns_proxy.c
===================================================================
--- gnunet/src/gns/test_gns_proxy.c 2013-08-13 16:40:41 UTC (rev 28574)
+++ gnunet/src/gns/test_gns_proxy.c 2013-08-13 17:10:07 UTC (rev 28575)
@@ -423,11 +423,11 @@
host_key = GNUNET_CRYPTO_ecc_key_create_from_file (zone_keyfile);
rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
- GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_string_to_value
(GNUNET_GNS_RECORD_A,
+ GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_string_to_value
(GNUNET_DNSPARSER_TYPE_A,
"127.0.0.1",
(void**)&rd.data,
&rd.data_size));
- rd.record_type = GNUNET_GNS_RECORD_A;
+ rd.record_type = GNUNET_DNSPARSER_TYPE_A;
GNUNET_NAMESTORE_record_create (namestore,
host_key,
Modified: gnunet/src/gns/test_gns_pseu_shorten.c
===================================================================
--- gnunet/src/gns/test_gns_pseu_shorten.c 2013-08-13 16:40:41 UTC (rev
28574)
+++ gnunet/src/gns/test_gns_pseu_shorten.c 2013-08-13 17:10:07 UTC (rev
28575)
@@ -200,7 +200,7 @@
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);
@@ -247,7 +247,7 @@
}
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);
@@ -272,7 +272,7 @@
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,
@@ -447,7 +447,7 @@
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,
@@ -518,7 +518,7 @@
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,
@@ -539,7 +539,7 @@
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,
@@ -640,7 +640,7 @@
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,
Modified: gnunet/src/gns/test_gns_revocation.c
===================================================================
--- gnunet/src/gns/test_gns_revocation.c 2013-08-13 16:40:41 UTC (rev
28574)
+++ gnunet/src/gns/test_gns_revocation.c 2013-08-13 17:10:07 UTC (rev
28575)
@@ -130,7 +130,7 @@
for (i=0; i<rd_count; i++)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "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);
@@ -168,7 +168,7 @@
return;
}
- GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN, GNUNET_GNS_RECORD_A,
+ GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN, GNUNET_DNSPARSER_TYPE_A,
GNUNET_NO,
NULL,
&on_lookup_result, TEST_DOMAIN);
@@ -225,7 +225,7 @@
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,
@@ -253,7 +253,7 @@
NULL,
NULL);
rd.data_size = 0;
- rd.record_type = GNUNET_GNS_RECORD_REV;
+ rd.record_type = GNUNET_NAMESTORE_TYPE_REV;
GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
bob_key,
Modified: gnunet/src/gns/test_gns_simple_delegated_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_simple_delegated_lookup.c 2013-08-13 16:40:41 UTC
(rev 28574)
+++ gnunet/src/gns/test_gns_simple_delegated_lookup.c 2013-08-13 17:10:07 UTC
(rev 28575)
@@ -138,7 +138,7 @@
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)
continue;
memcpy (&a, rd[i].data, sizeof (a));
addr = inet_ntoa (a);
@@ -177,7 +177,7 @@
GNUNET_SCHEDULER_shutdown ();
return;
}
- GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN, GNUNET_GNS_RECORD_A,
+ GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN, GNUNET_DNSPARSER_TYPE_A,
GNUNET_NO,
NULL,
&on_lookup_result, TEST_DOMAIN);
@@ -232,7 +232,7 @@
GNUNET_CRYPTO_short_hash (&bob_pkey, sizeof(bob_pkey), &bob_hash);
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,
alice_key,
Modified: gnunet/src/gns/test_gns_simple_get_authority.c
===================================================================
--- gnunet/src/gns/test_gns_simple_get_authority.c 2013-08-13 16:40:41 UTC
(rev 28574)
+++ gnunet/src/gns/test_gns_simple_get_authority.c 2013-08-13 17:10:07 UTC
(rev 28575)
@@ -231,7 +231,7 @@
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;
/* put bob into our zone */
@@ -280,7 +280,7 @@
rd.data_size = strlen(TEST_ALICE_PSEU);
rd.data = TEST_ALICE_PSEU;
- rd.record_type = GNUNET_GNS_RECORD_PSEU;
+ rd.record_type = GNUNET_NAMESTORE_TYPE_PSEU;
GNUNET_free(sig);
sig =
GNUNET_NAMESTORE_create_signature(alice_key,GNUNET_TIME_UNIT_FOREVER_ABS, "",
Modified: gnunet/src/gns/test_gns_simple_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_simple_lookup.c 2013-08-13 16:40:41 UTC (rev
28574)
+++ gnunet/src/gns/test_gns_simple_lookup.c 2013-08-13 17:10:07 UTC (rev
28575)
@@ -153,7 +153,7 @@
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);
@@ -209,7 +209,7 @@
end_badly_now ();
return;
}
- lr = GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN, GNUNET_GNS_RECORD_A,
+ lr = GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN, GNUNET_DNSPARSER_TYPE_A,
GNUNET_YES,
NULL,
&on_lookup_result, TEST_DOMAIN);
Modified: gnunet/src/gns/test_gns_simple_mx_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_simple_mx_lookup.c 2013-08-13 16:40:41 UTC (rev
28574)
+++ gnunet/src/gns/test_gns_simple_mx_lookup.c 2013-08-13 17:10:07 UTC (rev
28575)
@@ -131,7 +131,7 @@
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_MX)
+ if (rd[i].record_type == GNUNET_DNSPARSER_TYPE_MX)
{
mx = (char*)rd[i].data+sizeof(uint16_t);
mx_preference = *(uint16_t*)rd[i].data;
@@ -168,7 +168,7 @@
end_badly_now();
return;
}
- GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN, GNUNET_GNS_RECORD_MX,
+ GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN, GNUNET_DNSPARSER_TYPE_MX,
GNUNET_NO,
NULL,
&on_lookup_result, TEST_DOMAIN);
@@ -228,7 +228,7 @@
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,
@@ -262,7 +262,7 @@
memcpy(mx_record, &mx_preference, sizeof(uint16_t));
strcpy(mx_record+sizeof(uint16_t), TEST_MX_NAME);
rd.data = mx_record;
- rd.record_type = GNUNET_GNS_RECORD_MX;
+ rd.record_type = GNUNET_DNSPARSER_TYPE_MX;
sig = GNUNET_NAMESTORE_create_signature(bob_key,
GNUNET_TIME_UNIT_FOREVER_ABS,
GNUNET_GNS_MASTERZONE_STR,
Modified: gnunet/src/gns/test_gns_simple_shorten.c
===================================================================
--- gnunet/src/gns/test_gns_simple_shorten.c 2013-08-13 16:40:41 UTC (rev
28574)
+++ gnunet/src/gns/test_gns_simple_shorten.c 2013-08-13 17:10:07 UTC (rev
28575)
@@ -256,7 +256,7 @@
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;
/* put bob into our zone */
@@ -308,7 +308,7 @@
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;
GNUNET_free(sig);
GNUNET_NAMESTORE_record_put_by_authority (namestore_handle,
Modified: gnunet/src/gns/test_gns_simple_srv_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_simple_srv_lookup.c 2013-08-13 16:40:41 UTC (rev
28574)
+++ gnunet/src/gns/test_gns_simple_srv_lookup.c 2013-08-13 17:10:07 UTC (rev
28575)
@@ -130,7 +130,7 @@
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_SRV)
+ if (rd[i].record_type == GNUNET_DNSPARSER_TYPE_SRV)
{
srv_data = (uint16_t*)rd[i].data;
srv = (char*)&srv_data[3];
@@ -170,7 +170,7 @@
return;
}
- GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN, GNUNET_GNS_RECORD_SRV,
+ GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN, GNUNET_DNSPARSER_TYPE_SRV,
GNUNET_NO,
NULL,
&on_lookup_result, TEST_DOMAIN);
@@ -234,7 +234,7 @@
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,
@@ -269,7 +269,7 @@
srv_data->weight = srv_weight;
strcpy((char*)&srv_data[1], TEST_SRV_NAME);
rd.data = srv_data;
- rd.record_type = GNUNET_GNS_RECORD_SRV;
+ rd.record_type = GNUNET_DNSPARSER_TYPE_SRV;
sig = GNUNET_NAMESTORE_create_signature(bob_key,
GNUNET_TIME_UNIT_FOREVER_ABS,
TEST_RECORD_NAME_SRV,
Modified: gnunet/src/gns/test_gns_simple_zkey_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_simple_zkey_lookup.c 2013-08-13 16:40:41 UTC
(rev 28574)
+++ gnunet/src/gns/test_gns_simple_zkey_lookup.c 2013-08-13 17:10:07 UTC
(rev 28575)
@@ -132,7 +132,7 @@
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);
@@ -187,7 +187,7 @@
pos++;
strcpy(pos, GNUNET_GNS_TLD_ZKEY);
- GNUNET_GNS_lookup(gns_handle, name, GNUNET_GNS_RECORD_A,
+ GNUNET_GNS_lookup(gns_handle, name, GNUNET_DNSPARSER_TYPE_A,
GNUNET_NO,
NULL,
&on_lookup_result, NULL);
@@ -243,7 +243,7 @@
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,
Modified: gnunet/src/include/gnunet_gns_service.h
===================================================================
--- gnunet/src/include/gnunet_gns_service.h 2013-08-13 16:40:41 UTC (rev
28574)
+++ gnunet/src/include/gnunet_gns_service.h 2013-08-13 17:10:07 UTC (rev
28575)
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet
- (C) 2012 Christian Grothoff (and other contributing authors)
+ (C) 2012-2013 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@ -55,102 +55,8 @@
*/
struct GNUNET_GNS_LookupRequest;
-/**
- * Handle to control a shorten operation.
- */
-struct GNUNET_GNS_ShortenRequest;
/**
- * Handle to control a get authority operation
- */
-struct GNUNET_GNS_GetAuthRequest;
-
-/**
- * Record types
- * Based on GNUNET_DNSPARSER_TYPEs (standard DNS)
- */
-enum GNUNET_GNS_RecordType
-{
- /**
- * A 'struct in_addr'
- */
- GNUNET_GNS_RECORD_A = GNUNET_DNSPARSER_TYPE_A,
-
- /**
- * A 'char *'
- */
- GNUNET_GNS_RECORD_NS = GNUNET_DNSPARSER_TYPE_NS,
-
- /**
- * A 'char *'
- */
- GNUNET_GNS_RECORD_CNAME = GNUNET_DNSPARSER_TYPE_CNAME,
-
- /**
- * A 'struct soa_data'
- */
- GNUNET_GNS_RECORD_SOA = GNUNET_DNSPARSER_TYPE_SOA,
-
- /**
- * A 'struct srv_data'
- */
- GNUNET_GNS_RECORD_SRV = GNUNET_DNSPARSER_TYPE_SRV,
-
- /**
- * A 'char *'
- */
- GNUNET_GNS_RECORD_PTR = GNUNET_DNSPARSER_TYPE_PTR,
-
- /**
- * A 'uint16_t' and a 'char *'
- */
- GNUNET_GNS_RECORD_MX = GNUNET_DNSPARSER_TYPE_MX,
-
- /**
- * A 'char *'
- */
- GNUNET_GNS_RECORD_TXT = GNUNET_DNSPARSER_TYPE_TXT,
-
- /**
- * A 'struct in6_addr'
- */
- GNUNET_GNS_RECORD_AAAA = GNUNET_DNSPARSER_TYPE_AAAA,
-
- /* GNS specific */
- /**
- * A 'struct GNUNET_CRYPTO_ShortHashCode'
- */
- GNUNET_GNS_RECORD_PKEY = GNUNET_NAMESTORE_TYPE_PKEY,
-
- /**
- * A 'char *'
- */
- GNUNET_GNS_RECORD_PSEU = GNUNET_NAMESTORE_TYPE_PSEU,
- GNUNET_GNS_RECORD_ANY = GNUNET_NAMESTORE_TYPE_ANY,
-
- /**
- * A 'char *'
- */
- GNUNET_GNS_RECORD_LEHO = GNUNET_NAMESTORE_TYPE_LEHO,
-
- /**
- * A 'struct vpn_data'
- */
- GNUNET_GNS_RECORD_VPN = GNUNET_NAMESTORE_TYPE_VPN,
-
- /**
- * Revocation, no data.
- */
- GNUNET_GNS_RECORD_REV = GNUNET_NAMESTORE_TYPE_REV,
-
- /**
- * Social place.
- */
- GNUNET_GNS_RECORD_PLACE = GNUNET_NAMESTORE_TYPE_PLACE
-};
-
-
-/**
* Initialize the connection with the GNS service.
*
* @param cfg configuration to use
@@ -169,14 +75,11 @@
GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *handle);
-/* *************** Standard API: lookup ******************* */
-
/**
- * Iterator called on obtained result for a GNS
- * lookup
+ * Iterator called on obtained result for a GNS lookup.
*
* @param cls closure
- * @param rd_count number of records
+ * @param rd_count number of records in @a rd
* @param rd the records in reply
*/
typedef void (*GNUNET_GNS_LookupResultProcessor) (void *cls,
@@ -184,14 +87,13 @@
const struct
GNUNET_NAMESTORE_RecordData *rd);
-
/**
* Perform an asynchronous lookup operation on the GNS.
*
* @param handle handle to the GNS service
* @param name the name to look up
* @param zone zone to look in
- * @param type the record type to look for
+ * @param type the GNS record type to look for
* @param only_cached #GNUNET_NO to only check locally (not in the DHT)
* @param shorten_zone_key the private key of the shorten zone (can be NULL);
* specify to enable automatic shortening (given a PSEU
@@ -206,7 +108,7 @@
GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle,
const char *name,
const struct GNUNET_CRYPTO_EccPublicKey *zone,
- enum GNUNET_GNS_RecordType type,
+ int type,
int only_cached,
struct GNUNET_CRYPTO_EccPrivateKey *shorten_zone_key,
GNUNET_GNS_LookupResultProcessor proc,
@@ -222,45 +124,6 @@
GNUNET_GNS_cancel_lookup_request (struct GNUNET_GNS_LookupRequest *lr);
-
-/* *************** Standard API: get authority ******************* */
-
-
-/**
- * Processor called on for a name shortening result
- * called only once
- *
- * @param cls closure
- * @param auth_name the name of the auhtority or NULL
- */
-typedef void (*GNUNET_GNS_GetAuthResultProcessor) (void *cls,
- const char* short_name);
-
-
-/**
- * Perform an authority lookup for a given name.
- *
- * @param handle handle to the GNS service
- * @param name the name to look up authority for
- * @param proc function to call on result
- * @param proc_cls closure for processor
- * @return handle to the operation
- */
-struct GNUNET_GNS_GetAuthRequest*
-GNUNET_GNS_get_authority (struct GNUNET_GNS_Handle *handle,
- const char *name,
- GNUNET_GNS_GetAuthResultProcessor proc,
- void *proc_cls);
-
-
-/**
- * Cancel pending get auth request
- *
- * @param gar the lookup request to cancel
- */
-void
-GNUNET_GNS_cancel_get_auth_request (struct GNUNET_GNS_GetAuthRequest *gar);
-
#if 0 /* keep Emacsens' auto-indent happy */
{
#endif
Modified: gnunet/src/pt/test_gns_vpn.c
===================================================================
--- gnunet/src/pt/test_gns_vpn.c 2013-08-13 16:40:41 UTC (rev 28574)
+++ gnunet/src/pt/test_gns_vpn.c 2013-08-13 17:10:07 UTC (rev 28575)
@@ -395,11 +395,11 @@
host_key = GNUNET_CRYPTO_ecc_key_create_from_file (zone_keyfile);
rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
GNUNET_asprintf (&rd_string, "6 %s %s", (char*)&peername, "www.gads.");
- GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_string_to_value
(GNUNET_GNS_RECORD_VPN,
+ GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_string_to_value
(GNUNET_NAMESTORE_TYPE_VPN,
rd_string,
(void**)&rd.data,
&rd.data_size));
- rd.record_type = GNUNET_GNS_RECORD_VPN;
+ rd.record_type = GNUNET_NAMESTORE_TYPE_VPN;
GNUNET_NAMESTORE_records_store (namestore,
host_key,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28575 - in gnunet/src: gns include pt,
gnunet <=