#include "gnunet_crypto_lib.h"
#include "gnunet_constants.h"
#include "gnunet_dnsparser_lib.h"
-#include "gnunet_arm_service.h"
+#include "gnunet_gnsrecord_lib.h"
#include "gnunet_signatures.h"
#include "gnunet_namecache_service.h"
-#include "gnunet_namestore_service.h"
#include "namecache.h"
/**
* Function to call with the blocks we get back; or NULL.
*/
- GNUNET_NAMESTORE_BlockProcessor block_proc;
+ GNUNET_NAMECACHE_BlockProcessor block_proc;
/**
* Closure for @e block_proc.
const struct LookupBlockResponseMessage *msg,
size_t size)
{
- struct GNUNET_NAMESTORE_Block *block;
- char buf[size + sizeof (struct GNUNET_NAMESTORE_Block)
+ struct GNUNET_GNSRECORD_Block *block;
+ char buf[size + sizeof (struct GNUNET_GNSRECORD_Block)
- sizeof (struct LookupBlockResponseMessage)];
LOG (GNUNET_ERROR_TYPE_DEBUG,
return GNUNET_OK;
}
- block = (struct GNUNET_NAMESTORE_Block *) buf;
+ block = (struct GNUNET_GNSRECORD_Block *) buf;
block->signature = msg->signature;
block->derived_key = msg->derived_key;
block->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN);
&msg[1],
size - sizeof (struct LookupBlockResponseMessage));
if (GNUNET_OK !=
- GNUNET_NAMESTORE_block_verify (block))
+ GNUNET_GNSRECORD_block_verify (block))
{
GNUNET_break (0);
return GNUNET_SYSERR;
if (NULL != qe->cont)
qe->cont (qe->cont_cls,
res,
- (GNUNET_OK == res) ?
- NULL
+ (GNUNET_OK == res)
+ ? NULL
: _("Namecache failed to cache block"));
return GNUNET_OK;
}
*/
struct GNUNET_NAMECACHE_QueueEntry *
GNUNET_NAMECACHE_block_cache (struct GNUNET_NAMECACHE_Handle *h,
- const struct GNUNET_NAMESTORE_Block *block,
+ const struct GNUNET_GNSRECORD_Block *block,
GNUNET_NAMECACHE_ContinuationWithStatus cont,
void *cont_cls)
{
struct GNUNET_NAMECACHE_QueueEntry *
GNUNET_NAMECACHE_lookup_block (struct GNUNET_NAMECACHE_Handle *h,
const struct GNUNET_HashCode *derived_hash,
- GNUNET_NAMESTORE_BlockProcessor proc, void *proc_cls)
+ GNUNET_NAMECACHE_BlockProcessor proc, void *proc_cls)
{
struct GNUNET_NAMECACHE_QueueEntry *qe;
struct PendingMessage *pe;
size_t msg_size;
uint32_t rid;
- GNUNET_assert (NULL != h);
- GNUNET_assert (NULL != derived_hash);
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Looking for block under %s\n",
GNUNET_h2s (derived_hash));