2018-06-08 13:12:17 +00:00
|
|
|
#ifndef LLARP_MESSAGES_RELAY_ACK_HPP
|
|
|
|
#define LLARP_MESSAGES_RELAY_ACK_HPP
|
2018-06-12 16:45:12 +00:00
|
|
|
#include <llarp/crypto.hpp>
|
|
|
|
#include <llarp/encrypted_frame.hpp>
|
2018-06-08 13:12:17 +00:00
|
|
|
#include <llarp/link_message.hpp>
|
2018-06-12 16:45:12 +00:00
|
|
|
#include <llarp/path_types.hpp>
|
2018-06-08 13:12:17 +00:00
|
|
|
|
|
|
|
namespace llarp
|
|
|
|
{
|
2018-06-12 16:45:12 +00:00
|
|
|
struct LR_AckRecord
|
|
|
|
{
|
|
|
|
uint64_t version = 0;
|
|
|
|
|
|
|
|
bool
|
|
|
|
BEncode(llarp_buffer_t* buf) const;
|
|
|
|
|
|
|
|
bool
|
|
|
|
BDecode(llarp_buffer_t* buf);
|
|
|
|
};
|
|
|
|
|
2018-06-08 13:12:17 +00:00
|
|
|
struct LR_AckMessage : public ILinkMessage
|
|
|
|
{
|
2018-06-18 22:03:50 +00:00
|
|
|
std::vector< EncryptedFrame > replies;
|
2018-06-12 16:45:12 +00:00
|
|
|
uint64_t version = 0;
|
|
|
|
|
2018-06-08 13:12:17 +00:00
|
|
|
LR_AckMessage(const RouterID& from);
|
|
|
|
|
|
|
|
~LR_AckMessage();
|
|
|
|
|
|
|
|
bool
|
|
|
|
DecodeKey(llarp_buffer_t key, llarp_buffer_t* buf);
|
|
|
|
|
|
|
|
bool
|
|
|
|
BEncode(llarp_buffer_t* buf) const;
|
|
|
|
|
|
|
|
bool
|
|
|
|
HandleMessage(llarp_router* router) const;
|
|
|
|
};
|
2018-06-18 22:03:50 +00:00
|
|
|
} // namespace llarp
|
2018-06-08 13:12:17 +00:00
|
|
|
|
|
|
|
#endif
|