---
title: llarp/vpn/packet_intercept.hpp

---

# llarp/vpn/packet_intercept.hpp



## Namespaces

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

## Classes

|                | Name           |
| -------------- | -------------- |
| class | **[llarp::vpn::I_PacketInterceptor](Classes/classllarp_1_1vpn_1_1I__PacketInterceptor.md)**  |




## Source code

```cpp
#pragma once
#include <functional>
#include <vector>
#include <llarp/util/types.hpp>

namespace llarp::vpn
{
  using PacketSendFunc_t = std::function<void(std::vector<byte_t>)>;
  using PacketInterceptFunc_t = std::function<void(std::vector<byte_t>, PacketSendFunc_t)>;

  class I_PacketInterceptor
  {
   public:
    virtual ~I_PacketInterceptor() = default;

    virtual void
    start(PacketInterceptFunc_t f) = 0;

    virtual void
    stop() = 0;
  };

}  // namespace llarp::vpn
```


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

Updated on 2023-01-06 at 19:35:06 +0000
