lokinet/llarp/iwp/iwp.cpp

73 lines
1.6 KiB
C++
Raw Normal View History

#include "iwp.hpp"
#include "linklayer.hpp"
#include <memory>
#include <llarp/router/abstractrouter.hpp>
2019-01-05 13:45:05 +00:00
namespace llarp
{
namespace iwp
{
2019-08-22 20:53:27 +00:00
LinkLayer_ptr
NewInboundLink(
std::shared_ptr<KeyManager> keyManager,
2021-02-22 13:26:32 +00:00
std::shared_ptr<EventLoop> loop,
GetRCFunc getrc,
LinkMessageHandler h,
SignBufferFunc sign,
BeforeConnectFunc_t before,
SessionEstablishedHandler est,
SessionRenegotiateHandler reneg,
TimeoutHandler timeout,
SessionClosedHandler closed,
PumpDoneHandler pumpDone,
WorkerFunc_t work)
2019-01-05 13:45:05 +00:00
{
return std::make_shared<LinkLayer>(
2021-02-22 13:26:32 +00:00
keyManager,
loop,
getrc,
h,
sign,
before,
est,
reneg,
timeout,
closed,
pumpDone,
work,
true);
2019-08-22 20:53:27 +00:00
}
LinkLayer_ptr
NewOutboundLink(
std::shared_ptr<KeyManager> keyManager,
2021-02-22 13:26:32 +00:00
std::shared_ptr<EventLoop> loop,
GetRCFunc getrc,
LinkMessageHandler h,
SignBufferFunc sign,
BeforeConnectFunc_t before,
SessionEstablishedHandler est,
SessionRenegotiateHandler reneg,
TimeoutHandler timeout,
SessionClosedHandler closed,
PumpDoneHandler pumpDone,
WorkerFunc_t work)
2019-08-22 20:53:27 +00:00
{
return std::make_shared<LinkLayer>(
2021-02-22 13:26:32 +00:00
keyManager,
loop,
getrc,
h,
sign,
before,
est,
reneg,
timeout,
closed,
pumpDone,
work,
false);
2019-01-05 13:45:05 +00:00
}
} // namespace iwp
} // namespace llarp