GNUnet 0.21.1
gnunet_block_lib.h File Reference

Library for data block manipulation. More...

#include "gnunet_util_lib.h"
#include "gnunet_dht_block_types.h"
Include dependency graph for gnunet_block_lib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  GNUNET_BLOCK_ReplyEvaluationResult {
  GNUNET_BLOCK_REPLY_TYPE_NOT_SUPPORTED = -1 , GNUNET_BLOCK_REPLY_OK_DUPLICATE = 0 , GNUNET_BLOCK_REPLY_IRRELEVANT = 1 , GNUNET_BLOCK_REPLY_OK_MORE = 2 ,
  GNUNET_BLOCK_REPLY_OK_LAST = 3
}
 Possible ways for how a block may relate to a query. More...
 

Functions

void GNUNET_BLOCK_mingle_hash (const struct GNUNET_HashCode *in, uint32_t mingle_number, struct GNUNET_HashCode *hc)
 Mingle hash with the mingle_number to produce different bits. More...
 
struct GNUNET_BLOCK_ContextGNUNET_BLOCK_context_create (const struct GNUNET_CONFIGURATION_Handle *cfg)
 Create a block context. More...
 
void GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx)
 Destroy the block context. More...
 
struct GNUNET_BLOCK_GroupGNUNET_BLOCK_group_create (struct GNUNET_BLOCK_Context *ctx, enum GNUNET_BLOCK_Type type, const void *raw_data, size_t raw_data_size,...)
 Create a new block group. More...
 
enum GNUNET_GenericReturnValue GNUNET_BLOCK_group_serialize (struct GNUNET_BLOCK_Group *bg, void **raw_data, size_t *raw_data_size)
 Serialize state of a block group. More...
 
void GNUNET_BLOCK_group_destroy (struct GNUNET_BLOCK_Group *bg)
 Destroy resources used by a block group. More...
 
enum GNUNET_BLOCK_ReplyEvaluationResult GNUNET_BLOCK_check_reply (struct GNUNET_BLOCK_Context *ctx, enum GNUNET_BLOCK_Type type, struct GNUNET_BLOCK_Group *group, const struct GNUNET_HashCode *query, const void *xquery, size_t xquery_size, const void *reply_block, size_t reply_block_size)
 Function called to validate if a reply is good for a particular query. More...
 
enum GNUNET_GenericReturnValue GNUNET_BLOCK_check_query (struct GNUNET_BLOCK_Context *ctx, enum GNUNET_BLOCK_Type type, const struct GNUNET_HashCode *query, const void *xquery, size_t xquery_size)
 Function called to validate a request. More...
 
enum GNUNET_GenericReturnValue GNUNET_BLOCK_check_block (struct GNUNET_BLOCK_Context *ctx, enum GNUNET_BLOCK_Type type, const void *block, size_t block_size)
 Function called to validate a block. More...
 
enum GNUNET_GenericReturnValue GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx, enum GNUNET_BLOCK_Type type, const void *block, size_t block_size, struct GNUNET_HashCode *key)
 Function called to obtain the key for a block. More...
 
enum GNUNET_GenericReturnValue GNUNET_BLOCK_group_set_seen (struct GNUNET_BLOCK_Group *bg, const struct GNUNET_HashCode *seen_results, unsigned int seen_results_count)
 Update block group to filter out the given results. More...
 
enum GNUNET_GenericReturnValue GNUNET_BLOCK_group_merge (struct GNUNET_BLOCK_Group *bg1, struct GNUNET_BLOCK_Group *bg2)
 Try merging two block groups. More...
 

Detailed Description

Library for data block manipulation.

Definition in file gnunet_block_lib.h.