---
title: llarp/exit/policy.hpp

---

# llarp/exit/policy.hpp



## Namespaces

| Name           |
| -------------- |
| **[llarp](Namespaces/namespacellarp.md)** <br>[crypto.hpp] |
| **[llarp::exit](Namespaces/namespacellarp_1_1exit.md)**  |

## Classes

|                | Name           |
| -------------- | -------------- |
| struct | **[llarp::exit::Policy](Classes/structllarp_1_1exit_1_1Policy.md)**  |




## Source code

```cpp
#pragma once

#include <llarp/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::constants::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
```


-------------------------------

Updated on 2023-01-09 at 18:23:49 +0000
