lokinet/llarp/iwp/iwp.cpp

42 lines
1.2 KiB
C++
Raw Normal View History

2019-03-29 15:17:49 +00:00
#include <iwp/iwp.hpp>
#include <iwp/linklayer.hpp>
2019-02-18 19:44:41 +00:00
#include <router/abstractrouter.hpp>
2019-06-02 21:19:10 +00:00
#include <util/memfn.hpp>
2019-01-05 13:45:05 +00:00
namespace llarp
{
namespace iwp
{
std::unique_ptr< ILinkLayer >
2019-02-18 19:44:41 +00:00
NewServerFromRouter(AbstractRouter* r)
2019-01-05 13:45:05 +00:00
{
2019-02-18 19:44:41 +00:00
return NewServer(
r->encryption(), std::bind(&AbstractRouter::rc, r),
2019-06-02 21:19:10 +00:00
util::memFn(&AbstractRouter::HandleRecvLinkMessageBuffer, r),
util::memFn(&AbstractRouter::OnSessionEstablished, r),
util::memFn(&AbstractRouter::CheckRenegotiateValid, r),
util::memFn(&AbstractRouter::Sign, r),
util::memFn(&AbstractRouter::OnConnectTimeout, r),
util::memFn(&AbstractRouter::SessionClosed, r));
2019-01-05 13:45:05 +00:00
}
2019-01-05 13:45:05 +00:00
std::unique_ptr< ILinkLayer >
NewServer(const SecretKey& enckey, GetRCFunc getrc, LinkMessageHandler h,
SessionEstablishedHandler est, SessionRenegotiateHandler reneg,
SignBufferFunc sign, TimeoutHandler t,
SessionClosedHandler closed)
2019-01-05 13:45:05 +00:00
{
2019-02-19 13:32:26 +00:00
(void)enckey;
(void)getrc;
(void)h;
(void)est;
(void)reneg;
(void)sign;
(void)t;
(void)closed;
// TODO: implement me
return nullptr;
2019-01-05 13:45:05 +00:00
}
} // namespace iwp
} // namespace llarp