lokinet/llarp/exit/policy.hpp

30 lines
538 B
C++
Raw Normal View History

#pragma once
#include <llarp/util/bencode.hpp>
namespace llarp
{
namespace exit
{
2019-05-24 02:01:36 +00:00
struct Policy
{
uint64_t proto = 0;
uint64_t port = 0;
uint64_t drop = 0;
2022-05-26 15:59:44 +00:00
uint64_t version = llarp::constants::proto_version;
2019-05-24 02:01:36 +00:00
bool
BDecode(llarp_buffer_t* buf)
{
return bencode_decode_dict(*this, buf);
}
bool
2019-05-24 02:01:36 +00:00
DecodeKey(const llarp_buffer_t& k, llarp_buffer_t* val);
bool
2019-05-24 02:01:36 +00:00
BEncode(llarp_buffer_t* buf) const;
};
} // namespace exit
} // namespace llarp