27 #ifndef GNUNET_SERVICE_DHT_DATACACHE_H 28 #define GNUNET_SERVICE_DHT_DATACACHE_H 49 unsigned int put_path_length,
75 unsigned int put_path_length,
77 unsigned int get_path_length,
135 unsigned int put_path_length,
struct GNUNET_GETOPT_CommandLineOption options[]
GNUNET_BLOCK_Type
Blocks in the datastore and the datacache must have a unique type.
void GDS_DATACACHE_get_successors(const struct GNUNET_HashCode *key, GDS_DATACACHE_SuccessorCallback cb, void *cb_cls)
Handle a request for data close to a key that we have received from another peer. ...
void(* GDS_DATACACHE_GetCallback)(void *cls, enum GNUNET_BLOCK_Type type, struct GNUNET_TIME_Absolute expiration_time, const struct GNUNET_HashCode *key, unsigned int put_path_length, const struct GNUNET_PeerIdentity *put_path, unsigned int get_path_length, const struct GNUNET_PeerIdentity *get_path, const void *data, size_t data_size)
Handle a result for a GET operation.
static size_t data_size
Number of bytes in data.
void(* GDS_DATACACHE_SuccessorCallback)(void *cls, enum GNUNET_DHT_RouteOption options, const struct GNUNET_HashCode *key, enum GNUNET_BLOCK_Type type, unsigned int put_path_length, const struct GNUNET_PeerIdentity *put_path, struct GNUNET_TIME_Absolute expiration, const void *data, size_t data_size)
Send the get result to requesting client.
enum GNUNET_BLOCK_EvaluationResult GDS_DATACACHE_handle_get(const struct GNUNET_HashCode *key, enum GNUNET_BLOCK_Type type, const void *xquery, size_t xquery_size, struct GNUNET_BLOCK_Group *bg, GDS_DATACACHE_GetCallback gc, void *gc_cls)
Handle a GET request we've received from another peer.
void GDS_DATACACHE_done(void)
Shutdown datacache subsystem.
static char * expiration
Credential TTL.
GNUNET_DHT_RouteOption
Options for routing.
struct GNUNET_HashCode key
The key used in the DHT.
GNUNET_BLOCK_EvaluationResult
Possible ways for how a block may relate to a query.
The identity of the host (wraps the signing key of the peer).
void GDS_DATACACHE_init(void)
Initialize datacache subsystem.
int GDS_DATACACHE_get_random_key(struct GNUNET_HashCode *key)
Obtain a random key from the datacache.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
Time for absolute times used by GNUnet, in microseconds.
void GDS_DATACACHE_handle_put(struct GNUNET_TIME_Absolute expiration, const struct GNUNET_HashCode *key, unsigned int put_path_length, const struct GNUNET_PeerIdentity *put_path, enum GNUNET_BLOCK_Type type, size_t data_size, const void *data)
Handle a datum we've received from another peer.
uint32_t data
The data value.