Adding kademlia routing to daemon
This commit is contained in:
parent
43ca313854
commit
f494344b15
5 changed files with 107 additions and 5 deletions
|
@ -11,6 +11,7 @@ struct IpfsNode {
|
|||
struct Identity* identity;
|
||||
struct FSRepo* repo;
|
||||
struct Peerstore* peerstore;
|
||||
struct Routing* routing;
|
||||
//struct Pinner pinning; // an interface
|
||||
//struct Mount** mounts;
|
||||
// TODO: Add more here
|
||||
|
|
|
@ -51,6 +51,11 @@ typedef struct s_ipfs_routing ipfs_routing;
|
|||
|
||||
// offline routing routines.
|
||||
ipfs_routing* ipfs_routing_new_offline (struct IpfsNode* local_node, struct RsaPrivateKey *private_key);
|
||||
// online using secio, should probably be deprecated
|
||||
ipfs_routing* ipfs_routing_new_online (struct IpfsNode* local_node, struct RsaPrivateKey* private_key, struct Stream* stream);
|
||||
int ipfs_routing_generic_put_value (ipfs_routing* offlineRouting, char *key, size_t key_size, void *val, size_t vlen);int ipfs_routing_generic_get_value (ipfs_routing* offlineRouting, char *key, size_t key_size, void **val, size_t *vlen);
|
||||
// online using DHT/kademlia, the recommended router
|
||||
ipfs_routing* ipfs_routing_new_kademlia(struct IpfsNode* local_node, struct RsaPrivateKey* private_key, struct Stream* stream);
|
||||
// generic routines
|
||||
int ipfs_routing_generic_put_value (ipfs_routing* offlineRouting, char *key, size_t key_size, void *val, size_t vlen);
|
||||
int ipfs_routing_generic_get_value (ipfs_routing* offlineRouting, char *key, size_t key_size, void **val, size_t *vlen);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue