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

---

# llarp/layers/platform/context_base.hpp



## Namespaces

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

## Classes

|                | Name           |
| -------------- | -------------- |
| class | **[llarp::layers::platform::PlatformLayer_Base](Classes/classllarp_1_1layers_1_1platform_1_1PlatformLayer__Base.md)** <br>owner of all platform layer components  |




## Source code

```cpp
#pragma once

#include <memory>

namespace llarp
{
  // forward declare
  class AbstractRouter;
}  // namespace llarp

namespace llarp::layers::flow
{
  // forward declare
  class FlowLayer_Base;
}  // namespace llarp::layers::flow

namespace llarp::layers::platform
{

  // forward declare
  class PlatformDriver_Base;

  enum class PlatformKind
  {
    ip,
    // TODO: support this eventually
    // ethernet

    embedded,
  };

  class PlatformLayer_Base
  {
   protected:
    flow::FlowLayer_Base& m_flow_layer;

   public:
    explicit PlatformLayer_Base(AbstractRouter&);

    virtual std::unique_ptr<PlatformDriver_Base>
    make_platform_driver(PlatformKind kind = PlatformKind::ip);
  };

}  // namespace llarp::layers::platform
```


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

Updated on 2023-01-23 at 14:22:33 +0000
