GNUnet  0.10.x
Enumerations | Functions
gnunet_block_lib.h File Reference
#include "gnunet_util_lib.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_Type {
  GNUNET_BLOCK_TYPE_ANY = 0, GNUNET_BLOCK_TYPE_FS_DBLOCK = 1, GNUNET_BLOCK_TYPE_FS_IBLOCK = 2, GNUNET_BLOCK_TYPE_FS_KBLOCK = 3,
  GNUNET_BLOCK_TYPE_FS_SBLOCK = 4, GNUNET_BLOCK_TYPE_FS_NBLOCK = 5, GNUNET_BLOCK_TYPE_FS_ONDEMAND = 6, GNUNET_BLOCK_TYPE_DHT_HELLO = 7,
  GNUNET_BLOCK_TYPE_TEST = 8, GNUNET_BLOCK_TYPE_FS_UBLOCK = 9, GNUNET_BLOCK_TYPE_DNS = 10, GNUNET_BLOCK_TYPE_GNS_NAMERECORD = 11,
  GNUNET_BLOCK_TYPE_REVOCATION = 12, GNUNET_BLOCK_TYPE_REGEX = 22, GNUNET_BLOCK_TYPE_REGEX_ACCEPT = 23, GNUNET_BLOCK_TYPE_SET_TEST = 24,
  GNUNET_BLOCK_TYPE_CONSENSUS_ELEMENT = 25
}
 Blocks in the datastore and the datacache must have a unique type. More...
 
enum  GNUNET_BLOCK_EvaluationOptions { GNUNET_BLOCK_EO_NONE = 0, GNUNET_BLOCK_EO_LOCAL_SKIP_CRYPTO = 1 }
 Flags that can be set to control the evaluation. More...
 
enum  GNUNET_BLOCK_EvaluationResult {
  GNUNET_BLOCK_EVALUATION_OK_MORE = 0, GNUNET_BLOCK_EVALUATION_OK_LAST = 1, GNUNET_BLOCK_EVALUATION_OK_DUPLICATE = 2, GNUNET_BLOCK_EVALUATION_RESULT_INVALID = 3,
  GNUNET_BLOCK_EVALUATION_RESULT_IRRELEVANT = 4, GNUNET_BLOCK_EVALUATION_REQUEST_VALID = 10, GNUNET_BLOCK_EVALUATION_REQUEST_INVALID = 11, GNUNET_BLOCK_EVALUATION_TYPE_NOT_SUPPORTED = 20
}
 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, uint32_t nonce, const void *raw_data, size_t raw_data_size,...)
 Create a new block group. More...
 
int GNUNET_BLOCK_group_serialize (struct GNUNET_BLOCK_Group *bg, uint32_t *nonce, 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_EvaluationResult GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx, enum GNUNET_BLOCK_Type type, struct GNUNET_BLOCK_Group *group, enum GNUNET_BLOCK_EvaluationOptions eo, 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 a reply or a request. More...
 
int 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...
 
int 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...
 
int GNUNET_BLOCK_group_merge (struct GNUNET_BLOCK_Group *bg1, struct GNUNET_BLOCK_Group *bg2)
 Try merging two block groups. More...
 

Detailed Description

Author
Christian Grothoff

Library for data block manipulation

Definition in file gnunet_block_lib.h.