mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-15 12:13:24 +00:00
46ad8d4058
- includes are now sorted in consistent, logical order; first step in an attempt to fix the tomfoolery (no relation to Tom) brought in by include-what-you-use - shuffled around some cmake linking to simplify dependency graph - superfluous files removed
76 lines
1.3 KiB
C++
76 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include "link_message.hpp"
|
|
|
|
#include <llarp/crypto/encrypted.hpp>
|
|
#include <llarp/crypto/types.hpp>
|
|
#include <llarp/path/path_types.hpp>
|
|
|
|
#include <vector>
|
|
|
|
namespace llarp
|
|
{
|
|
/*
|
|
Data messages to be sent via quic datagrams
|
|
*/
|
|
|
|
struct RelayUpstreamMessage final : public AbstractLinkMessage
|
|
{
|
|
Encrypted<MAX_LINK_MSG_SIZE - 128> enc;
|
|
TunnelNonce nonce;
|
|
|
|
bool
|
|
decode_key(const llarp_buffer_t& key, llarp_buffer_t* buf) override;
|
|
|
|
std::string
|
|
bt_encode() const override;
|
|
|
|
bool
|
|
handle_message(Router* router) const override;
|
|
|
|
void
|
|
clear() override;
|
|
|
|
const char*
|
|
name() const override
|
|
{
|
|
return "RelayUpstream";
|
|
}
|
|
uint16_t
|
|
priority() const override
|
|
{
|
|
return 0;
|
|
}
|
|
};
|
|
|
|
struct RelayDownstreamMessage final : public AbstractLinkMessage
|
|
{
|
|
Encrypted<MAX_LINK_MSG_SIZE - 128> enc;
|
|
TunnelNonce nonce;
|
|
|
|
bool
|
|
decode_key(const llarp_buffer_t& key, llarp_buffer_t* buf) override;
|
|
|
|
std::string
|
|
bt_encode() const override;
|
|
|
|
bool
|
|
handle_message(Router* router) const override;
|
|
|
|
void
|
|
clear() override;
|
|
|
|
const char*
|
|
name() const override
|
|
{
|
|
return "RelayDownstream";
|
|
}
|
|
|
|
uint16_t
|
|
priority() const override
|
|
{
|
|
return 0;
|
|
}
|
|
};
|
|
} // namespace llarp
|