mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-11 07:10:36 +00:00
273270916e
This commit reflects changes to clang-format rules. Unfortunately, these rule changes create a massive change to the codebase, which causes an apparent rewrite of git history. Git blame's --ignore-rev flag can be used to ignore this commit when attempting to `git blame` some code.
33 lines
575 B
C++
33 lines
575 B
C++
#ifndef LLARP_EXIT_POLICY_HPP
|
|
#define LLARP_EXIT_POLICY_HPP
|
|
|
|
#include <util/bencode.hpp>
|
|
|
|
namespace llarp
|
|
{
|
|
namespace exit
|
|
{
|
|
struct Policy
|
|
{
|
|
uint64_t proto = 0;
|
|
uint64_t port = 0;
|
|
uint64_t drop = 0;
|
|
uint64_t version = LLARP_PROTO_VERSION;
|
|
|
|
bool
|
|
BDecode(llarp_buffer_t* buf)
|
|
{
|
|
return bencode_decode_dict(*this, buf);
|
|
}
|
|
|
|
bool
|
|
DecodeKey(const llarp_buffer_t& k, llarp_buffer_t* val);
|
|
|
|
bool
|
|
BEncode(llarp_buffer_t* buf) const;
|
|
};
|
|
} // namespace exit
|
|
} // namespace llarp
|
|
|
|
#endif
|