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

---

# llarp/layers/layers.hpp



## Namespaces

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

## Classes

|                | Name           |
| -------------- | -------------- |
| struct | **[llarp::layers::Layers](Classes/structllarp_1_1layers_1_1Layers.md)** <br>a holder type that abstracts out how lokinet works at each layer.  |




## Source code

```cpp
#pragma once

#include <llarp/layers/platform/platform_layer.hpp>
#include <llarp/layers/flow/flow_layer.hpp>
#include <llarp/layers/route/route_layer.hpp>
#include <llarp/layers/onion/onion_layer.hpp>
#include <memory>
namespace llarp
{
  // forward declare
  struct AbstractRouter;
  struct Config;
}  // namespace llarp

namespace llarp::layers
{
  struct Layers
  {
    std::unique_ptr<platform::PlatformLayer> platform;
    std::unique_ptr<flow::FlowLayer> flow;
    std::unique_ptr<route::RouteLayer> route;
    std::unique_ptr<onion::OnionLayer> onion;
    // TODO: add more layers as they are wired up

    void
    start_all() const;

    void
    stop_all() const;
  };

  std::unique_ptr<const Layers>
  make_layers(AbstractRouter& router, const Config& conf);

}  // namespace llarp::layers
```


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

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