Move UTP code to its own directory

pull/467/head
Michael 5 years ago
parent 5ef4e18827
commit 17b39b0ed4
No known key found for this signature in database
GPG Key ID: 2D51757B47E2434C

@ -170,10 +170,6 @@ set(LIB_SRC
link/iwp.cpp
link/server.cpp
link/session.cpp
link/utp_inbound_message.cpp
link/utp_linklayer.cpp
link/utp_session.cpp
link/utp.cpp
messages/dht_immediate.cpp
messages/dht.cpp
messages/discard.cpp
@ -224,6 +220,10 @@ set(LIB_SRC
service/tag.cpp
service/types.cpp
service/vanity.cpp
utp/inbound_message.cpp
utp/linklayer.cpp
utp/session.cpp
utp/utp.cpp
)
if(TESTNET)
set(LIB_SRC ${LIB_SRC} testnet.c)

@ -1,26 +0,0 @@
#ifndef LLARP_LINK_UTP_HPP
#define LLARP_LINK_UTP_HPP
#include <memory>
#include <link/server.hpp>
namespace llarp
{
struct AbstractRouter;
namespace utp
{
std::unique_ptr< ILinkLayer >
NewServer(llarp::Crypto* crypto, const SecretKey& routerEncSecret,
llarp::GetRCFunc getrc, llarp::LinkMessageHandler h,
llarp::SessionEstablishedHandler est,
llarp::SessionRenegotiateHandler reneg,
llarp::SignBufferFunc sign, llarp::TimeoutHandler timeout,
llarp::SessionClosedHandler closed);
std::unique_ptr< ILinkLayer >
NewServerFromRouter(AbstractRouter* r);
} // namespace utp
} // namespace llarp
#endif

@ -8,7 +8,6 @@
#include <dht/node.hpp>
#include <link/iwp.hpp>
#include <link/server.hpp>
#include <link/utp.hpp>
#include <messages/link_message.hpp>
#include <net/net.hpp>
#include <rpc/rpc.hpp>
@ -17,6 +16,7 @@
#include <util/logger.hpp>
#include <util/metrics.hpp>
#include <util/str.hpp>
#include <utp/utp.hpp>
#include <fstream>
#include <cstdlib>

@ -1,4 +1,4 @@
#include <link/utp_inbound_message.hpp>
#include <utp/inbound_message.hpp>
#include <string.h>

@ -1,5 +1,5 @@
#ifndef LLARP_LINK_UTP_INBOUND_MESSAGE_HPP
#define LLARP_LINK_UTP_INBOUND_MESSAGE_HPP
#ifndef LLARP_UTP_INBOUND_MESSAGE_HPP
#define LLARP_UTP_INBOUND_MESSAGE_HPP
#include <constants/link_layer.hpp>
#include <util/aligned.hpp>

@ -1,6 +1,6 @@
#include <link/utp_linklayer.hpp>
#include <utp/linklayer.hpp>
#include <link/utp_session.hpp>
#include <utp/session.hpp>
#ifdef __linux__
#include <linux/errqueue.h>

@ -1,7 +1,7 @@
#ifndef LLARP_LINK_UTP_LINKLAYER_HPP
#define LLARP_LINK_UTP_LINKLAYER_HPP
#ifndef LLARP_UTP_LINKLAYER_HPP
#define LLARP_UTP_LINKLAYER_HPP
#include <link/utp_inbound_message.hpp>
#include <utp/inbound_message.hpp>
#include <crypto/crypto.hpp>
#include <crypto/types.hpp>

@ -1,6 +1,6 @@
#include <link/utp_session.hpp>
#include <utp/session.hpp>
#include <link/utp_linklayer.hpp>
#include <utp/linklayer.hpp>
#include <messages/discard.hpp>
#include <messages/link_intro.hpp>
#include <util/metrics.hpp>

@ -1,9 +1,9 @@
#ifndef LLARP_LINK_UTP_SESSION_HPP
#define LLARP_LINK_UTP_SESSION_HPP
#ifndef LLARP_UTP_SESSION_HPP
#define LLARP_UTP_SESSION_HPP
#include <crypto/crypto.hpp>
#include <link/session.hpp>
#include <link/utp_inbound_message.hpp>
#include <utp/inbound_message.hpp>
#include <utp.h>

@ -1,6 +1,6 @@
#include <link/utp.hpp>
#include <utp/utp.hpp>
#include <link/utp_linklayer.hpp>
#include <utp/linklayer.hpp>
#include <router/abstractrouter.hpp>
namespace llarp

@ -0,0 +1,24 @@
#ifndef LLARP_UTP_UTP_HPP
#define LLARP_UTP_UTP_HPP
#include <memory>
#include <link/server.hpp>
namespace llarp
{
struct AbstractRouter;
namespace utp
{
std::unique_ptr< ILinkLayer >
NewServer(Crypto* crypto, const SecretKey& routerEncSecret, GetRCFunc getrc,
LinkMessageHandler h, SessionEstablishedHandler est,
SessionRenegotiateHandler reneg, SignBufferFunc sign,
TimeoutHandler timeout, SessionClosedHandler closed);
std::unique_ptr< ILinkLayer >
NewServerFromRouter(AbstractRouter* r);
} // namespace utp
} // namespace llarp
#endif

@ -1,8 +1,8 @@
#include <link/utp.hpp>
#include <link/iwp.hpp>
#include <ev/ev.h>
#include <messages/link_intro.hpp>
#include <messages/discard.hpp>
#include <utp/utp.hpp>
#include <crypto/crypto_libsodium.hpp>

Loading…
Cancel
Save