lokinet/llarp/exit/policy.hpp
dr7ana 46ad8d4058 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
2023-10-24 12:11:51 -07: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