2019-04-21 16:44:27 +00:00
|
|
|
#ifndef LLARP_SERVICE_HIDDEN_SERVICE_ADDRESS_LOOKUP_HPP
|
|
|
|
#define LLARP_SERVICE_HIDDEN_SERVICE_ADDRESS_LOOKUP_HPP
|
|
|
|
|
2019-06-15 14:55:13 +00:00
|
|
|
#include <routing/dht_message.hpp>
|
2019-04-22 18:35:19 +00:00
|
|
|
#include <service/intro_set.hpp>
|
2019-04-21 16:44:27 +00:00
|
|
|
#include <service/lookup.hpp>
|
|
|
|
|
|
|
|
namespace llarp
|
|
|
|
{
|
|
|
|
namespace service
|
|
|
|
{
|
|
|
|
struct Endpoint;
|
|
|
|
struct HiddenServiceAddressLookup : public IServiceLookup
|
|
|
|
{
|
|
|
|
Address remote;
|
|
|
|
using HandlerFunc = std::function< bool(const Address&, const IntroSet*,
|
|
|
|
const RouterID&) >;
|
|
|
|
HandlerFunc handle;
|
|
|
|
|
|
|
|
HiddenServiceAddressLookup(Endpoint* p, HandlerFunc h,
|
|
|
|
const Address& addr, uint64_t tx);
|
|
|
|
|
|
|
|
~HiddenServiceAddressLookup()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
HandleResponse(const std::set< IntroSet >& results);
|
|
|
|
|
2019-04-23 14:28:59 +00:00
|
|
|
std::shared_ptr< routing::IMessage >
|
2019-04-21 16:44:27 +00:00
|
|
|
BuildRequestMessage();
|
|
|
|
};
|
|
|
|
} // namespace service
|
|
|
|
} // namespace llarp
|
|
|
|
|
|
|
|
#endif
|