mirror of https://github.com/oxen-io/lokinet
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
754 B
C++
36 lines
754 B
C++
6 years ago
|
#ifndef LLARP_HANDLERS_NULL_HPP
|
||
|
#define LLARP_HANDLERS_NULL_HPP
|
||
|
#include <llarp/service/endpoint.hpp>
|
||
|
|
||
6 years ago
|
namespace llarp
|
||
6 years ago
|
{
|
||
6 years ago
|
namespace handlers
|
||
6 years ago
|
{
|
||
|
struct NullEndpoint final : public llarp::service::Endpoint
|
||
|
{
|
||
6 years ago
|
NullEndpoint(const std::string &name, llarp::Router *r)
|
||
6 years ago
|
: llarp::service::Endpoint(name, r){};
|
||
6 years ago
|
|
||
6 years ago
|
bool HandleWriteIPPacket(llarp_buffer_t,
|
||
|
std::function< huint32_t(void) >) override
|
||
6 years ago
|
{
|
||
|
return true;
|
||
|
}
|
||
|
|
||
6 years ago
|
huint32_t
|
||
|
ObtainIPForAddr(const byte_t *, bool) override
|
||
6 years ago
|
{
|
||
|
return {0};
|
||
|
}
|
||
6 years ago
|
|
||
|
bool
|
||
|
HasAddress(const byte_t *) const override
|
||
6 years ago
|
{
|
||
|
return false;
|
||
|
}
|
||
|
};
|
||
6 years ago
|
} // namespace handlers
|
||
|
} // namespace llarp
|
||
6 years ago
|
|
||
6 years ago
|
#endif
|