2016-12-30 00:05:44 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ipfs/merkledag/node.h"
|
2017-02-27 17:27:40 +00:00
|
|
|
#include "ipfs/core/ipfs_node.h"
|
2016-12-30 00:05:44 +00:00
|
|
|
|
2017-04-03 16:55:36 +00:00
|
|
|
/**
|
|
|
|
* Implements a resover. EOM
|
|
|
|
*/
|
|
|
|
|
2016-12-30 00:05:44 +00:00
|
|
|
/**
|
|
|
|
* Interogate the path and the current node, looking
|
|
|
|
* for the desired node.
|
|
|
|
* @param path the current path
|
|
|
|
* @param from the current node (or NULL if it is the first call)
|
|
|
|
* @returns what we are looking for, or NULL if it wasn't found
|
|
|
|
*/
|
2017-04-20 22:56:03 +00:00
|
|
|
struct HashtableNode* ipfs_resolver_get(const char* path, struct HashtableNode* from, const struct IpfsNode* ipfs_node);
|
2017-04-03 16:55:36 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Interrogate the path, looking for the peer
|
|
|
|
* @param path the peer path to search for
|
|
|
|
* @param ipfs_node the context
|
|
|
|
* @returns the MultiAddress that relates to the path, or NULL if not found
|
|
|
|
*/
|
|
|
|
struct Libp2pPeer* ipfs_resolver_find_peer(const char* path, const struct IpfsNode* ipfs_node);
|