lokinet/llarp/exit/policy.hpp
dr7ana f574cd798f Clang format include sorting + CMake
- 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
2024-01-31 07:54:12 -08:00

34 lines
601 B
C++

#pragma once
#include <llarp/util/bencode.hpp>
#include <oxenc/bt.h>
namespace
{
static auto policy_cat = llarp::log::Cat("lokinet.policy");
} // namespace
namespace llarp::exit
{
struct Policy
{
uint64_t proto = 0;
uint64_t port = 0;
uint64_t drop = 0;
uint64_t version = llarp::constants::proto_version;
bool
BDecode(llarp_buffer_t* buf)
{
return bencode_decode_dict(*this, buf);
}
bool
decode_key(const llarp_buffer_t& k, llarp_buffer_t* val);
void
bt_encode(oxenc::bt_dict_producer& btdp) const;
};
} // namespace llarp::exit