2018-11-29 13:12:35 +00:00
|
|
|
#ifndef LLARP_HANDLERS_NULL_HPP
|
|
|
|
#define LLARP_HANDLERS_NULL_HPP
|
2018-12-12 02:15:08 +00:00
|
|
|
|
|
|
|
#include <service/endpoint.hpp>
|
2018-11-29 13:12:35 +00:00
|
|
|
|
2018-12-02 18:07:07 +00:00
|
|
|
namespace llarp
|
2018-11-29 13:12:35 +00:00
|
|
|
{
|
2018-12-02 18:07:07 +00:00
|
|
|
namespace handlers
|
2018-11-29 13:12:35 +00:00
|
|
|
{
|
2020-04-07 18:38:56 +00:00
|
|
|
struct NullEndpoint final : public llarp::service::Endpoint,
|
|
|
|
public std::enable_shared_from_this<NullEndpoint>
|
2018-11-29 13:12:35 +00:00
|
|
|
{
|
2020-04-30 19:40:20 +00:00
|
|
|
NullEndpoint(AbstractRouter* r, llarp::service::Context* parent)
|
|
|
|
: llarp::service::Endpoint(r, parent)
|
2019-04-24 23:27:31 +00:00
|
|
|
{
|
|
|
|
}
|
2018-11-29 13:12:35 +00:00
|
|
|
|
2020-02-28 16:29:15 +00:00
|
|
|
virtual bool
|
2020-04-07 18:38:56 +00:00
|
|
|
HandleInboundPacket(
|
|
|
|
const service::ConvoTag, const llarp_buffer_t&, service::ProtocolType) override
|
2018-11-29 13:12:35 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2020-08-21 15:07:37 +00:00
|
|
|
std::string
|
|
|
|
GetIfName() const override
|
|
|
|
{
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
2019-04-23 16:13:22 +00:00
|
|
|
path::PathSet_ptr
|
|
|
|
GetSelf() override
|
|
|
|
{
|
|
|
|
return shared_from_this();
|
|
|
|
}
|
|
|
|
|
2019-06-11 16:44:05 +00:00
|
|
|
bool
|
|
|
|
SupportsV6() const override
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2020-05-21 14:18:23 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
SendPacketToRemote(const llarp_buffer_t&) override{};
|
2020-08-20 12:59:01 +00:00
|
|
|
|
|
|
|
huint128_t
|
|
|
|
ObtainIPForAddr(const AlignedBuffer<32>&, bool) override
|
|
|
|
{
|
|
|
|
return {0};
|
|
|
|
}
|
2018-11-29 13:12:35 +00:00
|
|
|
};
|
2018-12-02 18:07:07 +00:00
|
|
|
} // namespace handlers
|
|
|
|
} // namespace llarp
|
2018-11-29 13:12:35 +00:00
|
|
|
|
2018-12-10 16:26:46 +00:00
|
|
|
#endif
|