1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
lokinet/include/llarp/dht.h
Jeff Becker 5228a81bae
more refactor
get rid of C api
2018-08-30 14:48:43 -04:00

36 lines
741 B
C

#ifndef LLARP_DHT_H_
#define LLARP_DHT_H_
#include <llarp/buffer.h>
#include <llarp/router.h>
/**
* dht.h
*
* DHT functions
*/
struct llarp_dht_context;
/// allocator
struct llarp_dht_context*
llarp_dht_context_new(struct llarp_router* parent);
/// deallocator
void
llarp_dht_context_free(struct llarp_dht_context* dht);
/// start dht context with our location in keyspace
void
llarp_dht_context_start(struct llarp_dht_context* ctx, const byte_t* key);
/// start allowing dht participation on a context
void
llarp_dht_allow_transit(struct llarp_dht_context* ctx);
/// remove router from tracked dht peer list
/// internal function do not use
void
__llarp_dht_remove_peer(struct llarp_dht_context* ctx, const byte_t* id);
#endif