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.
54 lines
1.0 KiB
C++
54 lines
1.0 KiB
C++
6 years ago
|
#ifndef LLARP_MESSAGES_RELAY_HPP
|
||
|
#define LLARP_MESSAGES_RELAY_HPP
|
||
|
|
||
6 years ago
|
#include <crypto.hpp>
|
||
6 years ago
|
#include <encrypted.hpp>
|
||
6 years ago
|
#include <link_message.hpp>
|
||
6 years ago
|
#include <path_types.hpp>
|
||
6 years ago
|
|
||
6 years ago
|
#include <vector>
|
||
|
|
||
6 years ago
|
namespace llarp
|
||
|
{
|
||
|
struct RelayUpstreamMessage : public ILinkMessage
|
||
|
{
|
||
6 years ago
|
PathID_t pathid;
|
||
|
Encrypted X;
|
||
|
TunnelNonce Y;
|
||
|
|
||
|
RelayUpstreamMessage();
|
||
6 years ago
|
RelayUpstreamMessage(ILinkSession* from);
|
||
6 years ago
|
~RelayUpstreamMessage();
|
||
|
|
||
|
bool
|
||
|
DecodeKey(llarp_buffer_t key, llarp_buffer_t* buf);
|
||
|
|
||
|
bool
|
||
|
BEncode(llarp_buffer_t* buf) const;
|
||
|
|
||
|
bool
|
||
6 years ago
|
HandleMessage(llarp::Router* router) const;
|
||
6 years ago
|
};
|
||
|
|
||
|
struct RelayDownstreamMessage : public ILinkMessage
|
||
|
{
|
||
6 years ago
|
PathID_t pathid;
|
||
|
Encrypted X;
|
||
|
TunnelNonce Y;
|
||
|
RelayDownstreamMessage();
|
||
6 years ago
|
RelayDownstreamMessage(ILinkSession* from);
|
||
6 years ago
|
~RelayDownstreamMessage();
|
||
|
|
||
|
bool
|
||
|
DecodeKey(llarp_buffer_t key, llarp_buffer_t* buf);
|
||
|
|
||
|
bool
|
||
|
BEncode(llarp_buffer_t* buf) const;
|
||
|
|
||
|
bool
|
||
6 years ago
|
HandleMessage(llarp::Router* router) const;
|
||
6 years ago
|
};
|
||
6 years ago
|
} // namespace llarp
|
||
6 years ago
|
|
||
|
#endif
|