From 18ca8b9b97d598888e7c8f1ab563887b9746e841 Mon Sep 17 00:00:00 2001 From: EinMByte Date: Mon, 27 Jul 2015 22:17:31 +0200 Subject: [PATCH] Move SSU and NTCP to transport/. --- Daemon.cpp | 4 ++-- HTTPServer.cpp | 2 +- I2NPProtocol.cpp | 2 +- I2PControl.cpp | 2 +- Makefile | 3 +++ Makefile.bsd | 2 +- Makefile.linux | 2 +- Makefile.osx | 2 +- NetDb.cpp | 2 +- NetDbRequests.cpp | 2 +- TransitTunnel.cpp | 2 +- Tunnel.cpp | 2 +- TunnelEndpoint.cpp | 2 +- TunnelGateway.cpp | 2 +- TunnelPool.cpp | 2 +- api.cpp | 2 +- filelist.mk | 11 ++++++----- NTCPSession.cpp => transport/NTCPSession.cpp | 0 NTCPSession.h => transport/NTCPSession.h | 0 SSU.cpp => transport/SSU.cpp | 0 SSU.h => transport/SSU.h | 0 SSUData.cpp => transport/SSUData.cpp | 0 SSUData.h => transport/SSUData.h | 0 SSUSession.cpp => transport/SSUSession.cpp | 0 SSUSession.h => transport/SSUSession.h | 0 TransportSession.h => transport/TransportSession.h | 0 Transports.cpp => transport/Transports.cpp | 0 Transports.h => transport/Transports.h | 0 28 files changed, 25 insertions(+), 21 deletions(-) rename NTCPSession.cpp => transport/NTCPSession.cpp (100%) rename NTCPSession.h => transport/NTCPSession.h (100%) rename SSU.cpp => transport/SSU.cpp (100%) rename SSU.h => transport/SSU.h (100%) rename SSUData.cpp => transport/SSUData.cpp (100%) rename SSUData.h => transport/SSUData.h (100%) rename SSUSession.cpp => transport/SSUSession.cpp (100%) rename SSUSession.h => transport/SSUSession.h (100%) rename TransportSession.h => transport/TransportSession.h (100%) rename Transports.cpp => transport/Transports.cpp (100%) rename Transports.h => transport/Transports.h (100%) diff --git a/Daemon.cpp b/Daemon.cpp index 7ba7ccb3..81f597e1 100644 --- a/Daemon.cpp +++ b/Daemon.cpp @@ -5,8 +5,8 @@ #include "Log.h" #include "base64.h" #include "version.h" -#include "Transports.h" -#include "NTCPSession.h" +#include "transport/Transports.h" +#include "transport/NTCPSession.h" #include "RouterInfo.h" #include "RouterContext.h" #include "Tunnel.h" diff --git a/HTTPServer.cpp b/HTTPServer.cpp index 3d656730..16ace2d8 100644 --- a/HTTPServer.cpp +++ b/HTTPServer.cpp @@ -5,7 +5,7 @@ #include "Log.h" #include "Tunnel.h" #include "TransitTunnel.h" -#include "Transports.h" +#include "transport/Transports.h" #include "NetDb.h" #include "I2PEndian.h" #include "Streaming.h" diff --git a/I2NPProtocol.cpp b/I2NPProtocol.cpp index 82e7a0be..28821240 100644 --- a/I2NPProtocol.cpp +++ b/I2NPProtocol.cpp @@ -8,7 +8,7 @@ #include "NetDb.h" #include "Tunnel.h" #include "base64.h" -#include "Transports.h" +#include "transport/Transports.h" #include "Garlic.h" #include "I2NPProtocol.h" diff --git a/I2PControl.cpp b/I2PControl.cpp index 9c36b2ac..d94c28fe 100644 --- a/I2PControl.cpp +++ b/I2PControl.cpp @@ -15,7 +15,7 @@ #include "Daemon.h" #include "Tunnel.h" #include "Timestamp.h" -#include "Transports.h" +#include "transport/Transports.h" #include "version.h" namespace i2p diff --git a/Makefile b/Makefile index bc9d60fc..10670bbe 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,7 @@ tests: mk_build_test_dir $(TESTS) mk_build_dir: mkdir -p obj + mkdir -p obj/transport mk_build_test_dir: mkdir -p obj/tests @@ -42,12 +43,14 @@ api: $(SHLIB) deps: @mkdir -p obj + @mkdir -p obj/transport @mkdir -p obj/tests $(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) -MM *.cpp > $(DEPS) @sed -i -e '/\.o:/ s/^/obj\//' $(DEPS) obj/%.o : %.cpp @mkdir -p obj + @mkdir -p obj/transport @mkdir -p obj/tests $(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(CPU_FLAGS) -c -o $@ $< diff --git a/Makefile.bsd b/Makefile.bsd index cd6948f3..26dc0e89 100644 --- a/Makefile.bsd +++ b/Makefile.bsd @@ -7,7 +7,7 @@ CXXFLAGS = -O2 ## -std=c++11. If you want to remove this variable please do so in a way that allows setting ## custom FLAGS to work at build-time. NEEDED_CXXFLAGS = -std=c++11 -INCFLAGS = -I/usr/include/ -I/usr/local/include/ +INCFLAGS = -I/usr/include/ -I/usr/local/include/ -I. LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib LDLIBS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread LDTESTLIBS = -lboost_unit_test_framework diff --git a/Makefile.linux b/Makefile.linux index a2bfed17..21e1bb8c 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -1,5 +1,5 @@ CXXFLAGS = -g -Wall -INCFLAGS = +INCFLAGS = -I. ## NOTE: The NEEDED_CXXFLAGS are here so that custom CXXFLAGS can be specified at build time ## **without** overwriting the CXXFLAGS which we need in order to build. diff --git a/Makefile.osx b/Makefile.osx index fddf5a6b..502efce9 100644 --- a/Makefile.osx +++ b/Makefile.osx @@ -1,7 +1,7 @@ CXX = clang++ CXXFLAGS = -g -Wall -std=c++11 -DCRYPTOPP_DISABLE_ASM -DMAC_OSX #CXXFLAGS = -g -O2 -Wall -std=c++11 -DCRYPTOPP_DISABLE_ASM -INCFLAGS = -I/usr/local/include +INCFLAGS = -I/usr/local/include -I. LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib LDLIBS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread LDTESTLIBS = -lboost_unit_test_framework diff --git a/NetDb.cpp b/NetDb.cpp index 474f9d2d..97d813ba 100644 --- a/NetDb.cpp +++ b/NetDb.cpp @@ -9,7 +9,7 @@ #include "Timestamp.h" #include "I2NPProtocol.h" #include "Tunnel.h" -#include "Transports.h" +#include "transport/Transports.h" #include "RouterContext.h" #include "Garlic.h" #include "NetDb.h" diff --git a/NetDbRequests.cpp b/NetDbRequests.cpp index d3bff8ce..1dcbbf6a 100644 --- a/NetDbRequests.cpp +++ b/NetDbRequests.cpp @@ -1,6 +1,6 @@ #include "Log.h" #include "I2NPProtocol.h" -#include "Transports.h" +#include "transport/Transports.h" #include "NetDb.h" #include "NetDbRequests.h" diff --git a/TransitTunnel.cpp b/TransitTunnel.cpp index e042ee8a..ed298699 100644 --- a/TransitTunnel.cpp +++ b/TransitTunnel.cpp @@ -4,7 +4,7 @@ #include "RouterContext.h" #include "I2NPProtocol.h" #include "Tunnel.h" -#include "Transports.h" +#include "transport/Transports.h" #include "TransitTunnel.h" namespace i2p diff --git a/Tunnel.cpp b/Tunnel.cpp index 9e85b698..0eeab5b6 100644 --- a/Tunnel.cpp +++ b/Tunnel.cpp @@ -8,7 +8,7 @@ #include "Log.h" #include "Timestamp.h" #include "I2NPProtocol.h" -#include "Transports.h" +#include "transport/Transports.h" #include "NetDb.h" #include "Tunnel.h" diff --git a/TunnelEndpoint.cpp b/TunnelEndpoint.cpp index 24dd0bb1..e38701ca 100644 --- a/TunnelEndpoint.cpp +++ b/TunnelEndpoint.cpp @@ -3,7 +3,7 @@ #include "Log.h" #include "NetDb.h" #include "I2NPProtocol.h" -#include "Transports.h" +#include "transport/Transports.h" #include "RouterContext.h" #include "TunnelEndpoint.h" diff --git a/TunnelGateway.cpp b/TunnelGateway.cpp index 89f69da1..3ef7579a 100644 --- a/TunnelGateway.cpp +++ b/TunnelGateway.cpp @@ -3,7 +3,7 @@ #include #include "Log.h" #include "RouterContext.h" -#include "Transports.h" +#include "transport/Transports.h" #include "TunnelGateway.h" namespace i2p diff --git a/TunnelPool.cpp b/TunnelPool.cpp index 62d52075..4cdc94d5 100644 --- a/TunnelPool.cpp +++ b/TunnelPool.cpp @@ -5,7 +5,7 @@ #include "NetDb.h" #include "Timestamp.h" #include "Garlic.h" -#include "Transports.h" +#include "transport/Transports.h" #include "TunnelPool.h" namespace i2p diff --git a/api.cpp b/api.cpp index e5258195..0df091f0 100644 --- a/api.cpp +++ b/api.cpp @@ -2,7 +2,7 @@ #include #include "Log.h" #include "NetDb.h" -#include "Transports.h" +#include "transport/Transports.h" #include "Tunnel.h" #include "RouterContext.h" #include "Identity.h" diff --git a/filelist.mk b/filelist.mk index 5602970c..bbf10ba2 100644 --- a/filelist.mk +++ b/filelist.mk @@ -1,10 +1,11 @@ COMMON_SRC = \ + transport/NTCPSession.cpp transport/SSU.cpp transport/SSUSession.cpp \ + transport/SSUData.cpp transport/Transports.cpp \ CryptoConst.cpp Datagram.cpp Garlic.cpp I2NPProtocol.cpp LeaseSet.cpp \ - Log.cpp NTCPSession.cpp NetDb.cpp NetDbRequests.cpp Profiling.cpp \ - Reseed.cpp RouterContext.cpp RouterInfo.cpp Signature.cpp SSU.cpp \ - SSUSession.cpp SSUData.cpp Streaming.cpp Identity.cpp TransitTunnel.cpp \ - Transports.cpp Tunnel.cpp TunnelEndpoint.cpp TunnelPool.cpp TunnelGateway.cpp \ - Destination.cpp UPnP.cpp util.cpp aes.cpp base64.cpp + Log.cpp NetDb.cpp NetDbRequests.cpp Profiling.cpp Reseed.cpp \ + RouterContext.cpp RouterInfo.cpp Signature.cpp Streaming.cpp Identity.cpp \ + TransitTunnel.cpp Tunnel.cpp TunnelEndpoint.cpp TunnelPool.cpp \ + TunnelGateway.cpp Destination.cpp UPnP.cpp util.cpp aes.cpp base64.cpp ifeq ($(UNAME),Darwin) diff --git a/NTCPSession.cpp b/transport/NTCPSession.cpp similarity index 100% rename from NTCPSession.cpp rename to transport/NTCPSession.cpp diff --git a/NTCPSession.h b/transport/NTCPSession.h similarity index 100% rename from NTCPSession.h rename to transport/NTCPSession.h diff --git a/SSU.cpp b/transport/SSU.cpp similarity index 100% rename from SSU.cpp rename to transport/SSU.cpp diff --git a/SSU.h b/transport/SSU.h similarity index 100% rename from SSU.h rename to transport/SSU.h diff --git a/SSUData.cpp b/transport/SSUData.cpp similarity index 100% rename from SSUData.cpp rename to transport/SSUData.cpp diff --git a/SSUData.h b/transport/SSUData.h similarity index 100% rename from SSUData.h rename to transport/SSUData.h diff --git a/SSUSession.cpp b/transport/SSUSession.cpp similarity index 100% rename from SSUSession.cpp rename to transport/SSUSession.cpp diff --git a/SSUSession.h b/transport/SSUSession.h similarity index 100% rename from SSUSession.h rename to transport/SSUSession.h diff --git a/TransportSession.h b/transport/TransportSession.h similarity index 100% rename from TransportSession.h rename to transport/TransportSession.h diff --git a/Transports.cpp b/transport/Transports.cpp similarity index 100% rename from Transports.cpp rename to transport/Transports.cpp diff --git a/Transports.h b/transport/Transports.h similarity index 100% rename from Transports.h rename to transport/Transports.h