lokinet/include/llarp/pathbuilder.hpp

35 lines
794 B
C++
Raw Normal View History

2018-07-09 17:32:11 +00:00
#ifndef LLARP_PATHBUILDER_HPP_
#define LLARP_PATHBUILDER_HPP_
2018-06-18 22:03:50 +00:00
#include <llarp/pathbuilder.h>
2018-07-09 17:32:11 +00:00
#include <llarp/router.h>
#include <llarp/path.hpp>
2018-07-09 17:32:11 +00:00
#include <llarp/pathset.hpp>
2018-06-18 22:03:50 +00:00
struct llarp_pathbuilder_context : public llarp::path::PathSet
2018-06-18 22:03:50 +00:00
{
struct llarp_router* router;
struct llarp_dht_context* dht;
llarp::SecretKey enckey;
size_t numHops;
/// construct
2018-06-18 22:03:50 +00:00
llarp_pathbuilder_context(llarp_router* p_router,
struct llarp_dht_context* p_dht, size_t numPaths,
size_t numHops);
virtual ~llarp_pathbuilder_context(){};
virtual bool
SelectHop(llarp_nodedb* db, llarp_rc* prev, llarp_rc* cur, size_t hop);
void
BuildOne();
2018-08-12 17:22:29 +00:00
void
ManualRebuild(size_t N);
virtual byte_t*
GetTunnelEncryptionSecretKey();
2018-06-18 22:03:50 +00:00
};
#endif