---
title: llarp/layers/platform/os_traffic.hpp

---

# llarp/layers/platform/os_traffic.hpp



## Namespaces

| Name           |
| -------------- |
| **[llarp](Namespaces/namespacellarp.md)** <br>[crypto.hpp] |
| **[llarp::layers](Namespaces/namespacellarp_1_1layers.md)**  |
| **[llarp::layers::platform](Namespaces/namespacellarp_1_1layers_1_1platform.md)**  |

## Classes

|                | Name           |
| -------------- | -------------- |
| struct | **[llarp::layers::platform::OSTraffic](Classes/structllarp_1_1layers_1_1platform_1_1OSTraffic.md)** <br>platfrom datum that is used to read and write to the os  |




## Source code

```cpp
#pragma once
#include <llarp/util/formattable.hpp>
#include "ethertype.hpp"
#include "platform_addr.hpp"
#include <cstdint>
#include <vector>

namespace llarp::layers::platform
{
  struct OSTraffic
  {
    EtherType_t kind;
    PlatformAddr src, dst;
    std::vector<uint8_t> data;

    OSTraffic() = default;

    OSTraffic(EtherType_t kind, PlatformAddr src, PlatformAddr dst, std::vector<uint8_t> data);

    std::string
    ToString() const;

   private:
    void
    recompute_checksums();
  };

}  // namespace llarp::layers::platform

namespace llarp
{
  template <>
  inline constexpr bool IsToStringFormattable<layers::platform::OSTraffic> = true;
}
```


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

Updated on 2023-03-06 at 20:36:34 +0000
