2018-11-29 13:12:35 +00:00
|
|
|
#ifndef LLARP_HANDLERS_NULL_HPP
|
|
|
|
#define LLARP_HANDLERS_NULL_HPP
|
|
|
|
#include <llarp/service/endpoint.hpp>
|
|
|
|
|
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
|
|
|
{
|
|
|
|
struct NullEndpoint final : public llarp::service::Endpoint
|
|
|
|
{
|
2018-12-10 16:26:46 +00:00
|
|
|
NullEndpoint(const std::string &name, llarp::Router *r)
|
2018-12-02 18:07:07 +00:00
|
|
|
: llarp::service::Endpoint(name, r){};
|
2018-11-29 13:12:35 +00:00
|
|
|
|
2018-12-02 18:07:07 +00:00
|
|
|
bool HandleWriteIPPacket(llarp_buffer_t,
|
|
|
|
std::function< huint32_t(void) >) override
|
2018-11-29 13:12:35 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2018-12-02 18:07:07 +00:00
|
|
|
huint32_t
|
|
|
|
ObtainIPForAddr(const byte_t *, bool) override
|
2018-11-29 13:12:35 +00:00
|
|
|
{
|
|
|
|
return {0};
|
|
|
|
}
|
2018-12-02 18:07:07 +00:00
|
|
|
|
|
|
|
bool
|
|
|
|
HasAddress(const byte_t *) const override
|
2018-11-29 13:12:35 +00:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
};
|
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
|