141 const unsigned char pubkey[32],
142 const unsigned char *salt,
size_t salt_len,
169 const unsigned char secret[64],
170 const unsigned char pubkey[32],
171 const unsigned char *salt,
size_t salt_len,
int dht_put_mutable(struct dht_node *node, const unsigned char secret[64], const unsigned char pubkey[32], const unsigned char *salt, size_t salt_len, put_mutable_callback callback, void *opaque, dht_search_t *handle)
Put an mutable value to the DHT.
int dht_put_immutable(struct dht_node *node, const struct bvalue *v, put_immutable_callback callback, void *opaque, dht_search_t *handle, unsigned char hash[20])
Put an immutable value to the DHT.
API for running a DHT node.
DHT node object.
Definition: node.h:140
void(* put_mutable_callback)(struct bvalue **val, void *opaque)
Put mutable callback.
Definition: put.h:70
void(* get_callback)(const struct bvalue *val, void *opaque)
Get complete callback.
Definition: put.h:37
bencoding value.
Definition: bencode.h:32
struct search * dht_search_t
Search handle.
Definition: node.h:165
struct bvalue ** val
array of values
Definition: bencode.h:69
int dht_get_immutable(struct dht_node *node, const unsigned char hash[20], get_callback callback, void *opaque, dht_search_t *handle)
Get an immutable value from the DHT.
int dht_get_mutable(struct dht_node *node, const unsigned char pubkey[32], const unsigned char *salt, size_t salt_len, get_callback callback, void *opaque, dht_search_t *handle)
Get a mutable value from the DHT.
void(* put_immutable_callback)(int result, void *opaque)
Put immutable callback.
Definition: put.h:48