diff --git a/CMakeLists.txt b/CMakeLists.txt index f95e62f68..3da1ac2a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -209,32 +209,32 @@ if(UNIX) add_definitions(-DPOSIX) if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-linux.c) - set(EV_SRC llarp/ev_epoll.cpp) + set(EV_SRC llarp/ev/ev_epoll.cpp) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Android") set(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-linux.c) - set(EV_SRC llarp/ev_epoll.cpp) + set(EV_SRC llarp/ev/ev_epoll.cpp) elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") set(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-openbsd.c ${TT_ROOT}/tuntap-unix-bsd.c) - set(EV_SRC llarp/ev_kqueue.cpp) + set(EV_SRC llarp/ev/ev_kqueue.cpp) elseif (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") set(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-netbsd.c ${TT_ROOT}/tuntap-unix-bsd.c) - set(EV_SRC llarp/ev_kqueue.cpp) + set(EV_SRC llarp/ev/ev_kqueue.cpp) elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly") set(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-freebsd.c ${TT_ROOT}/tuntap-unix-bsd.c) - set(EV_SRC llarp/ev_kqueue.cpp) + set(EV_SRC llarp/ev/ev_kqueue.cpp) elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-darwin.c ${TT_ROOT}/tuntap-unix-bsd.c) - set(EV_SRC llarp/ev_kqueue.cpp) + set(EV_SRC llarp/ev/ev_kqueue.cpp) # TODO: _actually_ port to solaris/illumos (it's fairly complete...except for TUN) -rick elseif (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") set(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-sunos.c) - set(EV_SRC llarp/ev_epoll.cpp) + set(EV_SRC llarp/ev/ev_epoll.cpp) else() message(FATAL_ERROR "Your operating system is not supported yet") endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") elseif(WIN32) set(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-windows.c) - set(EV_SRC llarp/ev_win32.cpp) + set(EV_SRC llarp/ev/ev_win32.cpp) add_definitions(-DWIN32_LEAN_AND_MEAN -DWIN32 -DWINVER=0x500 -D_WIN32_WINNT=0x500) else() message(FATAL_ERROR "What operating system _are_ you building on/for?") @@ -291,8 +291,10 @@ set(LIB_UTIL_SRC llarp/util/encode.cpp llarp/util/endian.cpp llarp/util/fs.cpp + llarp/util/ini.cpp llarp/util/logger.c llarp/util/logger.cpp + llarp/util/logic.cpp llarp/util/mem.cpp llarp/util/queue_manager.cpp llarp/util/queue.cpp @@ -307,13 +309,11 @@ set(LIB_UTIL_SRC ) set(LIB_PLATFORM_SRC -# needed for threading - llarp/logic.cpp # for networking - llarp/ev.cpp - llarp/net.cpp - llarp/net_addr.cpp - llarp/net_inaddr.cpp + llarp/ev/ev.cpp + llarp/net/net.cpp + llarp/net/net_addr.cpp + llarp/net/net_inaddr.cpp # for android shim ${ANDROID_PLATFORM_SRC} # process isolation implementation @@ -323,9 +323,9 @@ set(LIB_PLATFORM_SRC # c++17 compat code ${CXX_COMPAT_SRC} # win32 inline code - llarp/win32_inet.c - llarp/win32_intrnl.c - llarp/win32_upoll.c + llarp/win32/win32_inet.c + llarp/win32/win32_intrnl.c + llarp/win32/win32_upoll.c ) set(NTRU_AVX_SRC @@ -459,11 +459,14 @@ if(WIN32) endif(WIN32) set(DNSLIB_SRC + llarp/dns/dotlokilookup.cpp llarp/dns/dns.cpp + llarp/dns/iptracker.cpp llarp/dns/message.cpp llarp/dns/name.cpp llarp/dns/query.cpp llarp/dns/question.cpp + llarp/dns/rectypes.cpp llarp/dns/rr.cpp llarp/dns/serialize.cpp llarp/dns/server.cpp @@ -502,9 +505,6 @@ set(LIB_SRC llarp/dht/node.cpp llarp/dht/publish_intro.cpp llarp/dns.cpp - llarp/dns_dotlokilookup.cpp - llarp/dns_iptracker.cpp - llarp/dns_rectypes.cpp llarp/dnsc.cpp llarp/dnsd.cpp llarp/encrypted.cpp @@ -522,11 +522,9 @@ set(LIB_SRC llarp/exit/transfer_traffic.cpp llarp/exit/update_exit.cpp llarp/exit_info.cpp - llarp/exit_route.cpp llarp/handlers/exit.cpp llarp/handlers/null.cpp llarp/handlers/tun.cpp - llarp/ini.cpp llarp/ip.cpp llarp/link/curvecp.cpp llarp/link/encoder.cpp @@ -537,7 +535,6 @@ set(LIB_SRC llarp/link_intro.cpp llarp/link_layer.cpp llarp/link_message.cpp - llarp/messages.cpp llarp/messages/dht.cpp llarp/messages/dht_immediate.cpp llarp/messages/discard.cpp @@ -549,12 +546,12 @@ set(LIB_SRC llarp/messages/relay.cpp llarp/messages/relay_commit.cpp llarp/messages/transfer_traffic.cpp - llarp/net_int.cpp + llarp/net/net_int.cpp llarp/nodedb.cpp - llarp/path.cpp - llarp/path_types.cpp - llarp/pathbuilder.cpp - llarp/pathset.cpp + llarp/path/path.cpp + llarp/path/path_types.cpp + llarp/path/pathbuilder.cpp + llarp/path/pathset.cpp llarp/pow.cpp llarp/profiling.cpp llarp/proofofwork.cpp @@ -601,27 +598,27 @@ set(DNS_SRC llarp/dns_iptracker.cpp llarp/dns_dotlokilookup.cpp llarp/dns_rectypes.cpp - llarp/net.cpp + llarp/net/net.cpp daemon/dns.cpp ) set(TEST_SRC + test/dht/test_llarp_dht_key.cpp test/dht/test_llarp_dht.cpp test/dns/test_llarp_dns_dns.cpp test/exit/test_llarp_exit_context.cpp test/link/test_llarp_link.cpp test/main.cpp + test/net/test_llarp_net_inaddr.cpp + test/net/test_llarp_net.cpp test/routing/llarp_routing_transfer_traffic.cpp test/routing/test_llarp_routing_obtainexitmessage.cpp test/service/test_llarp_service_address.cpp test/service/test_llarp_service_identity.cpp test/test_llarp_crypto.cpp - test/test_llarp_dht_key.cpp test/test_llarp_dns.cpp test/test_llarp_dnsd.cpp test/test_llarp_encrypted_frame.cpp - test/test_llarp_net_inaddr.cpp - test/test_llarp_net.cpp test/test_llarp_router_contact.cpp test/util/test_llarp_util_aligned.cpp test/util/test_llarp_util_bencode.cpp diff --git a/daemon/main.cpp b/daemon/main.cpp index 2e9de711a..5a72455bb 100644 --- a/daemon/main.cpp +++ b/daemon/main.cpp @@ -1,9 +1,10 @@ #include // for ensure_config -#include -#include #include #include +#include #include + +#include #include #include diff --git a/include/llarp.h b/include/llarp.h index 8e2393608..eefb1cc65 100644 --- a/include/llarp.h +++ b/include/llarp.h @@ -3,11 +3,11 @@ #ifdef __cplusplus #include -#include +#include #include // for handlers -#include #include // for service::address #include +#include #include extern "C" diff --git a/libabyss/include/abyss/client.hpp b/libabyss/include/abyss/client.hpp index 75bb50fc4..8a6bd3aea 100644 --- a/libabyss/include/abyss/client.hpp +++ b/libabyss/include/abyss/client.hpp @@ -2,7 +2,7 @@ #define __ABYSS_CLIENT_HPP__ #include -#include +#include #include #include diff --git a/libabyss/include/abyss/server.hpp b/libabyss/include/abyss/server.hpp index 77d55065d..fcecec598 100644 --- a/libabyss/include/abyss/server.hpp +++ b/libabyss/include/abyss/server.hpp @@ -2,8 +2,8 @@ #define __ABYSS_SERVER_HPP__ #include -#include -#include +#include +#include #include #include diff --git a/libabyss/main.cpp b/libabyss/main.cpp index 0ebfbe62f..a721d0d37 100644 --- a/libabyss/main.cpp +++ b/libabyss/main.cpp @@ -1,5 +1,5 @@ #include -#include +#include #ifndef _WIN32 #include diff --git a/llarp/address_info.cpp b/llarp/address_info.cpp index 0790e5929..6816821ff 100644 --- a/llarp/address_info.cpp +++ b/llarp/address_info.cpp @@ -2,11 +2,11 @@ #ifndef _WIN32 #include #endif +#include #include #include #include -#include namespace llarp { diff --git a/llarp/address_info.hpp b/llarp/address_info.hpp index c387f2f8a..baee3daa0 100644 --- a/llarp/address_info.hpp +++ b/llarp/address_info.hpp @@ -2,7 +2,7 @@ #define LLARP_AI_HPP #include -#include +#include #include #include diff --git a/llarp/config.cpp b/llarp/config.cpp index ee6ffd78e..7dd5d699b 100644 --- a/llarp/config.cpp +++ b/llarp/config.cpp @@ -2,9 +2,9 @@ #include #include -#include -#include +#include #include +#include #include #include @@ -141,7 +141,7 @@ llarp_generic_ensure_config(std::ofstream &f, std::string basepath) f << "bind=127.0.0.1:1190" << std::endl; f << std::endl << std::endl; - f << "# system settings for priviledges and such" << std::endl; + f << "# system settings for privileges and such" << std::endl; f << "[system]" << std::endl; #ifdef _WIN32 f << "# "; diff --git a/llarp/config.hpp b/llarp/config.hpp index c556a5a17..eb37c9f34 100644 --- a/llarp/config.hpp +++ b/llarp/config.hpp @@ -1,5 +1,5 @@ -#ifndef LIBLLARP_CONFIG_HPP -#define LIBLLARP_CONFIG_HPP +#ifndef LLARP_CONFIG_HPP +#define LLARP_CONFIG_HPP #include #include diff --git a/llarp/context.cpp b/llarp/context.cpp index 8c2e5f95d..b552a25e7 100644 --- a/llarp/context.cpp +++ b/llarp/context.cpp @@ -2,12 +2,12 @@ #include #include -#include +#include #include -#include -#include -#include +#include #include +#include +#include #include #include diff --git a/llarp/dht/message.hpp b/llarp/dht/message.hpp index 28a49dd27..4eb13c14d 100644 --- a/llarp/dht/message.hpp +++ b/llarp/dht/message.hpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include diff --git a/llarp/dns.hpp b/llarp/dns.hpp index 6b19882a1..14a3c10bb 100644 --- a/llarp/dns.hpp +++ b/llarp/dns.hpp @@ -1,5 +1,5 @@ -#ifndef LIBLLARP_DNS_HPP -#define LIBLLARP_DNS_HPP +#ifndef LLARP_DNS_HPP +#define LLARP_DNS_HPP #include #include // for uint & ssize_t @@ -8,8 +8,8 @@ #include #endif -#include // for llarp::Addr , llarp::huint32_t -#include +#include +#include // for llarp::Addr , llarp::huint32_t #include #include @@ -23,6 +23,7 @@ #define LLARP_DNS_RECTYPE_MX 15 #define LLARP_DNS_RECTYPE_TXT 16 +struct dnsc_answer_request; struct dnsd_context; // dnsc can work over any UDP socket diff --git a/llarp/dns_dotlokilookup.cpp b/llarp/dns/dotlokilookup.cpp similarity index 99% rename from llarp/dns_dotlokilookup.cpp rename to llarp/dns/dotlokilookup.cpp index 2a52e5f53..2b500568a 100644 --- a/llarp/dns_dotlokilookup.cpp +++ b/llarp/dns/dotlokilookup.cpp @@ -1,7 +1,8 @@ -#include +#include + #include -#include #include +#include std::string const default_chars = "abcdefghijklmnaoqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; diff --git a/llarp/dns_dotlokilookup.hpp b/llarp/dns/dotlokilookup.hpp similarity index 93% rename from llarp/dns_dotlokilookup.hpp rename to llarp/dns/dotlokilookup.hpp index 73a6fc012..7eb202620 100644 --- a/llarp/dns_dotlokilookup.hpp +++ b/llarp/dns/dotlokilookup.hpp @@ -1,5 +1,5 @@ -#ifndef LIBLLARP_DNS_DOTLOKILOOKUP_HPP -#define LIBLLARP_DNS_DOTLOKILOOKUP_HPP +#ifndef LLARP_DNS_DOTLOKILOOKUP_HPP +#define LLARP_DNS_DOTLOKILOOKUP_HPP #include #include diff --git a/llarp/dns_iptracker.cpp b/llarp/dns/iptracker.cpp similarity index 99% rename from llarp/dns_iptracker.cpp rename to llarp/dns/iptracker.cpp index ac95e1ceb..70279bd9d 100644 --- a/llarp/dns_iptracker.cpp +++ b/llarp/dns/iptracker.cpp @@ -1,4 +1,4 @@ -#include +#include dns_iptracker g_dns_iptracker; diff --git a/llarp/dns_iptracker.hpp b/llarp/dns/iptracker.hpp similarity index 90% rename from llarp/dns_iptracker.hpp rename to llarp/dns/iptracker.hpp index 8a26a2fa4..e53f13d77 100644 --- a/llarp/dns_iptracker.hpp +++ b/llarp/dns/iptracker.hpp @@ -1,8 +1,8 @@ -#ifndef LIBLLARP_DNSIPTRACKER_HPP -#define LIBLLARP_DNSIPTRACKER_HPP +#ifndef LLARP_DNSIPTRACKER_HPP +#define LLARP_DNSIPTRACKER_HPP -#include -#include +#include +#include #include #include diff --git a/llarp/dns/name.cpp b/llarp/dns/name.cpp index cb75ecb04..46f466b1f 100644 --- a/llarp/dns/name.cpp +++ b/llarp/dns/name.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/llarp/dns/name.hpp b/llarp/dns/name.hpp index 18b718b8c..55b38bc55 100644 --- a/llarp/dns/name.hpp +++ b/llarp/dns/name.hpp @@ -1,7 +1,7 @@ #ifndef LLARP_DNS_NAME_HPP #define LLARP_DNS_NAME_HPP -#include +#include #include #include diff --git a/llarp/dns/question.hpp b/llarp/dns/question.hpp index 68401c35c..20c749f46 100644 --- a/llarp/dns/question.hpp +++ b/llarp/dns/question.hpp @@ -3,7 +3,7 @@ #include #include -#include +#include namespace llarp { diff --git a/llarp/dns_rectypes.cpp b/llarp/dns/rectypes.cpp similarity index 99% rename from llarp/dns_rectypes.cpp rename to llarp/dns/rectypes.cpp index c3bb93cd4..6168f7679 100644 --- a/llarp/dns_rectypes.cpp +++ b/llarp/dns/rectypes.cpp @@ -1,5 +1,5 @@ #include // for vput16bits() -#include +#include namespace llarp { diff --git a/llarp/dns_rectypes.hpp b/llarp/dns/rectypes.hpp similarity index 94% rename from llarp/dns_rectypes.hpp rename to llarp/dns/rectypes.hpp index afedecceb..1ce559caf 100644 --- a/llarp/dns_rectypes.hpp +++ b/llarp/dns/rectypes.hpp @@ -1,7 +1,7 @@ -#ifndef LIBLLARP_DNS_REC_TYPES_HPP -#define LIBLLARP_DNS_REC_TYPES_HPP +#ifndef LLARP_DNS_REC_TYPES_HPP +#define LLARP_DNS_REC_TYPES_HPP -#include // for llarp::Addr , llarp::huint32_t +#include // for llarp::Addr , llarp::huint32_t #include // for byte_t #include diff --git a/llarp/dns/rr.hpp b/llarp/dns/rr.hpp index 995f0566f..c9d3dbf43 100644 --- a/llarp/dns/rr.hpp +++ b/llarp/dns/rr.hpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include diff --git a/llarp/dns/serialize.cpp b/llarp/dns/serialize.cpp index 7872ec1fa..8e69cd807 100644 --- a/llarp/dns/serialize.cpp +++ b/llarp/dns/serialize.cpp @@ -1,5 +1,5 @@ #include -#include +#include namespace llarp { diff --git a/llarp/dns/server.hpp b/llarp/dns/server.hpp index 20762b6c9..6bd2d6886 100644 --- a/llarp/dns/server.hpp +++ b/llarp/dns/server.hpp @@ -2,8 +2,8 @@ #define LLARP_DNS_SERVER_HPP #include -#include -#include +#include +#include #include #include diff --git a/llarp/dnsc.cpp b/llarp/dnsc.cpp index 7da1d0d03..2892ec5c2 100644 --- a/llarp/dnsc.cpp +++ b/llarp/dnsc.cpp @@ -1,5 +1,5 @@ #include -#include // for llarp::Addr +#include // for llarp::Addr #include #ifndef _WIN32 diff --git a/llarp/dnsc.hpp b/llarp/dnsc.hpp index fd21b32fc..742070fc0 100644 --- a/llarp/dnsc.hpp +++ b/llarp/dnsc.hpp @@ -1,8 +1,8 @@ -#ifndef LIBLLARP_DNSC_HPP -#define LIBLLARP_DNSC_HPP +#ifndef LLARP_DNSC_HPP +#define LLARP_DNSC_HPP -#include // for sockaadr #include // get protocol structs +#include // for sockaadr // internal, non-public functions // well dnsc init/stop are public... diff --git a/llarp/dnsd.cpp b/llarp/dnsd.cpp index 23f3b8ab6..539c03c65 100644 --- a/llarp/dnsd.cpp +++ b/llarp/dnsd.cpp @@ -1,5 +1,5 @@ #include -#include +#include extern dns_tracker dns_udp_tracker; diff --git a/llarp/dnsd.hpp b/llarp/dnsd.hpp index 81f1b080e..39910199f 100644 --- a/llarp/dnsd.hpp +++ b/llarp/dnsd.hpp @@ -1,9 +1,9 @@ -#ifndef LIBLLARP_DNSD_HPP -#define LIBLLARP_DNSD_HPP +#ifndef LLARP_DNSD_HPP +#define LLARP_DNSD_HPP -#include // for sockaadr #include // question and dnsc #include +#include // for sockaadr #include diff --git a/llarp/ev.cpp b/llarp/ev/ev.cpp similarity index 98% rename from llarp/ev.cpp rename to llarp/ev/ev.cpp index 709030ec7..3ce147434 100644 --- a/llarp/ev.cpp +++ b/llarp/ev/ev.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include @@ -7,12 +7,12 @@ // apparently current Solaris will emulate epoll. #if __linux__ || __sun__ -#include "ev_epoll.hpp" +#include #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) \ || (__APPLE__ && __MACH__) -#include "ev_kqueue.hpp" +#include #elif defined(_WIN32) || defined(_WIN64) || defined(__NT__) -#include "ev_win32.hpp" +#include #else #error No async event loop for your platform, subclass llarp_ev_loop #endif diff --git a/llarp/ev.h b/llarp/ev/ev.h similarity index 100% rename from llarp/ev.h rename to llarp/ev/ev.h diff --git a/llarp/ev.hpp b/llarp/ev/ev.hpp similarity index 99% rename from llarp/ev.hpp rename to llarp/ev/ev.hpp index ab66c48ab..f61d1f9b4 100644 --- a/llarp/ev.hpp +++ b/llarp/ev/ev.hpp @@ -1,7 +1,7 @@ #ifndef LLARP_EV_HPP #define LLARP_EV_HPP -#include +#include #include #include #include @@ -17,8 +17,8 @@ #include #ifdef _WIN32 -#include -#include +#include +#include // From the preview SDK, should take a look at that // periodically in case its definition changes #define UNIX_PATH_MAX 108 diff --git a/llarp/ev/ev_epoll.cpp b/llarp/ev/ev_epoll.cpp new file mode 100644 index 000000000..68a0f36ad --- /dev/null +++ b/llarp/ev/ev_epoll.cpp @@ -0,0 +1 @@ +#include diff --git a/llarp/ev_epoll.hpp b/llarp/ev/ev_epoll.hpp similarity index 98% rename from llarp/ev_epoll.hpp rename to llarp/ev/ev_epoll.hpp index 48494103c..3a6f37675 100644 --- a/llarp/ev_epoll.hpp +++ b/llarp/ev/ev_epoll.hpp @@ -1,9 +1,9 @@ #ifndef EV_EPOLL_HPP #define EV_EPOLL_HPP -#include -#include -#include +#include +#include +#include #include #include #include @@ -25,7 +25,7 @@ namespace llarp { - int + inline int tcp_conn::read(byte_t* buf, size_t sz) { if(_shouldClose) @@ -47,14 +47,14 @@ namespace llarp return 0; } - void + inline void tcp_conn::flush_write() { connected(); ev_io::flush_write(); } - ssize_t + inline ssize_t tcp_conn::do_write(void* buf, size_t sz) { if(_shouldClose) @@ -65,7 +65,7 @@ namespace llarp return ::send(fd, buf, sz, MSG_NOSIGNAL); // ignore sigpipe } - void + inline void tcp_conn::connect() { socklen_t slen = sizeof(sockaddr_in); @@ -94,7 +94,7 @@ namespace llarp } } - int + inline int tcp_serv::read(byte_t*, size_t) { int new_fd = ::accept(fd, nullptr, nullptr); diff --git a/llarp/ev/ev_kqueue.cpp b/llarp/ev/ev_kqueue.cpp new file mode 100644 index 000000000..9b2fec47c --- /dev/null +++ b/llarp/ev/ev_kqueue.cpp @@ -0,0 +1 @@ +#include diff --git a/llarp/ev_kqueue.hpp b/llarp/ev/ev_kqueue.hpp similarity index 99% rename from llarp/ev_kqueue.hpp rename to llarp/ev/ev_kqueue.hpp index 57113dab1..8edd93382 100644 --- a/llarp/ev_kqueue.hpp +++ b/llarp/ev/ev_kqueue.hpp @@ -1,9 +1,9 @@ #ifndef EV_KQUEUE_HPP #define EV_KQUEUE_HPP -#include -#include -#include +#include +#include +#include #include #include diff --git a/llarp/ev/ev_win32.cpp b/llarp/ev/ev_win32.cpp new file mode 100644 index 000000000..7ed05d2a2 --- /dev/null +++ b/llarp/ev/ev_win32.cpp @@ -0,0 +1 @@ +#include diff --git a/llarp/ev_win32.hpp b/llarp/ev/ev_win32.hpp similarity index 99% rename from llarp/ev_win32.hpp rename to llarp/ev/ev_win32.hpp index 2a6b068f1..b93b9a88a 100644 --- a/llarp/ev_win32.hpp +++ b/llarp/ev/ev_win32.hpp @@ -2,10 +2,10 @@ #define EV_WIN32_HPP #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/llarp/ev_epoll.cpp b/llarp/ev_epoll.cpp deleted file mode 100644 index 8b1378917..000000000 --- a/llarp/ev_epoll.cpp +++ /dev/null @@ -1 +0,0 @@ - diff --git a/llarp/ev_kqueue.cpp b/llarp/ev_kqueue.cpp deleted file mode 100644 index cd5e8dc8c..000000000 --- a/llarp/ev_kqueue.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/llarp/ev_win32.cpp b/llarp/ev_win32.cpp deleted file mode 100644 index c5d65ac21..000000000 --- a/llarp/ev_win32.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/llarp/exit/endpoint.hpp b/llarp/exit/endpoint.hpp index dc33c4829..f4fb3d723 100644 --- a/llarp/exit/endpoint.hpp +++ b/llarp/exit/endpoint.hpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include namespace llarp diff --git a/llarp/exit/session.cpp b/llarp/exit/session.cpp index 19b342db1..84f2afa63 100644 --- a/llarp/exit/session.cpp +++ b/llarp/exit/session.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include namespace llarp diff --git a/llarp/exit/session.hpp b/llarp/exit/session.hpp index f758a3374..0f1996813 100644 --- a/llarp/exit/session.hpp +++ b/llarp/exit/session.hpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include diff --git a/llarp/exit_info.hpp b/llarp/exit_info.hpp index 06474dbd9..8182c3654 100644 --- a/llarp/exit_info.hpp +++ b/llarp/exit_info.hpp @@ -2,7 +2,7 @@ #define LLARP_XI_HPP #include -#include +#include #include #include diff --git a/llarp/exit_route.cpp b/llarp/exit_route.cpp deleted file mode 100644 index 911646953..000000000 --- a/llarp/exit_route.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef _WIN32 -#include -#endif - -#include -#include - -#include - -bool -llarp_xr_bencode(struct llarp_xr* xr, llarp_buffer_t* buff) -{ - char addr_buff[128] = {0}; - const char* addr; - - if(!bencode_start_dict(buff)) - return false; - - /** gateway */ - addr = inet_ntop(AF_INET6, &xr->gateway, addr_buff, sizeof(addr_buff)); - if(!addr) - return false; - if(!bencode_write_bytestring(buff, "a", 1)) - return false; - if(!bencode_write_bytestring(buff, addr, strnlen(addr, sizeof(addr_buff)))) - return false; - - /** netmask */ - addr = inet_ntop(AF_INET6, &xr->netmask, addr_buff, sizeof(addr_buff)); - if(!addr) - return false; - if(!bencode_write_bytestring(buff, "b", 1)) - return false; - if(!bencode_write_bytestring(buff, addr, strnlen(addr, sizeof(addr_buff)))) - return false; - - /** source */ - addr = inet_ntop(AF_INET6, &xr->source, addr_buff, sizeof(addr_buff)); - if(!addr) - return false; - if(!bencode_write_bytestring(buff, "c", 1)) - return false; - if(!bencode_write_bytestring(buff, addr, strnlen(addr, sizeof(addr_buff)))) - return false; - - /** lifetime */ - if(!bencode_write_bytestring(buff, "l", 1)) - return false; - if(!bencode_write_uint64(buff, xr->lifetime)) - return false; - - /** version */ - if(!bencode_write_version_entry(buff)) - return false; - - /* end */ - return bencode_end(buff); -} diff --git a/llarp/exit_route.h b/llarp/exit_route.h deleted file mode 100644 index 4714e141c..000000000 --- a/llarp/exit_route.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef LLARP_XR_H -#define LLARP_XR_H - -#include -#include - -#include - -struct llarp_xr -{ - struct in6_addr gateway; - struct in6_addr netmask; - struct in6_addr source; - uint64_t lifetime; -}; - -bool -llarp_xr_bencode(struct llarp_xr* xr, llarp_buffer_t* buff); -bool -llarp_xr_bdecode(struct llarp_xr* xr, llarp_buffer_t* buff); - -#endif diff --git a/llarp/handlers/exit.cpp b/llarp/handlers/exit.cpp index 887c1b199..c0dc224a6 100644 --- a/llarp/handlers/exit.cpp +++ b/llarp/handlers/exit.cpp @@ -1,7 +1,7 @@ #include #include -#include +#include #include #include diff --git a/llarp/handlers/tun.cpp b/llarp/handlers/tun.cpp index 68de4d3f3..e320ad756 100644 --- a/llarp/handlers/tun.cpp +++ b/llarp/handlers/tun.cpp @@ -8,9 +8,9 @@ #include #endif -#include -#include #include +#include +#include namespace llarp { diff --git a/llarp/handlers/tun.hpp b/llarp/handlers/tun.hpp index 4f95e8bda..90970483b 100644 --- a/llarp/handlers/tun.hpp +++ b/llarp/handlers/tun.hpp @@ -3,9 +3,9 @@ #include #include -#include +#include #include -#include +#include #include #include diff --git a/llarp/ini.cpp b/llarp/ini.cpp deleted file mode 100644 index 2c8e92a7c..000000000 --- a/llarp/ini.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/llarp/ip.hpp b/llarp/ip.hpp index 08fe2a2b3..112079341 100644 --- a/llarp/ip.hpp +++ b/llarp/ip.hpp @@ -1,8 +1,8 @@ #ifndef LLARP_IP_HPP #define LLARP_IP_HPP -#include -#include +#include +#include #include #include diff --git a/llarp/link/server.hpp b/llarp/link/server.hpp index da4b5c4d6..29d52e877 100644 --- a/llarp/link/server.hpp +++ b/llarp/link/server.hpp @@ -2,11 +2,11 @@ #define LLARP_LINK_SERVER_HPP #include -#include +#include #include -#include -#include +#include #include +#include #include #include @@ -188,7 +188,7 @@ namespace llarp /// called by link session to remove a pending session who is timed out void - RemovePending(ILinkSession * s); + RemovePending(ILinkSession* s); private: static void diff --git a/llarp/link/session.hpp b/llarp/link/session.hpp index 7c0dae31e..d4a7ab3ce 100644 --- a/llarp/link/session.hpp +++ b/llarp/link/session.hpp @@ -2,7 +2,7 @@ #define LLARP_LINK_SESSION_HPP #include -#include +#include #include #include diff --git a/llarp/link_message.cpp b/llarp/link_message.cpp index 6cca0cbc9..037c86f21 100644 --- a/llarp/link_message.cpp +++ b/llarp/link_message.cpp @@ -1,5 +1,5 @@ #include -#include + #include #include #include diff --git a/llarp/link_message_parser.hpp b/llarp/link_message_parser.hpp index f0431a600..056a8c198 100644 --- a/llarp/link_message_parser.hpp +++ b/llarp/link_message_parser.hpp @@ -1,7 +1,12 @@ #ifndef LLARP_LINK_MESSAGE_PARSER_HPP #define LLARP_LINK_MESSAGE_PARSER_HPP + #include -#include +#include +#include +#include +#include +#include namespace llarp { diff --git a/llarp/messages.cpp b/llarp/messages.cpp deleted file mode 100644 index db2933878..000000000 --- a/llarp/messages.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/llarp/messages.hpp b/llarp/messages.hpp deleted file mode 100644 index 57f15381e..000000000 --- a/llarp/messages.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef LLARP_MESSAGES_HPP -#define LLARP_MESSAGES_HPP - -/** - include shortcut for all link and routing messages - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/llarp/messages/relay.hpp b/llarp/messages/relay.hpp index d977bd1c7..c53f774e4 100644 --- a/llarp/messages/relay.hpp +++ b/llarp/messages/relay.hpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include diff --git a/llarp/messages/relay_commit.hpp b/llarp/messages/relay_commit.hpp index 73dc99de1..5ab67c9db 100644 --- a/llarp/messages/relay_commit.hpp +++ b/llarp/messages/relay_commit.hpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include diff --git a/llarp/net.cpp b/llarp/net/net.cpp similarity index 99% rename from llarp/net.cpp rename to llarp/net/net.cpp index 21fddd13a..d822d3281 100644 --- a/llarp/net.cpp +++ b/llarp/net/net.cpp @@ -1,4 +1,4 @@ -#include +#include #ifdef ANDROID #include "android/ifaddrs.h" #endif @@ -9,7 +9,7 @@ #endif #include #endif -#include +#include #include #include diff --git a/llarp/net.h b/llarp/net/net.h similarity index 100% rename from llarp/net.h rename to llarp/net/net.h diff --git a/llarp/net.hpp b/llarp/net/net.hpp similarity index 96% rename from llarp/net.hpp rename to llarp/net/net.hpp index b34cb6574..a28cae3a3 100644 --- a/llarp/net.hpp +++ b/llarp/net/net.hpp @@ -2,8 +2,8 @@ #define LLARP_NET_HPP #include -#include -#include +#include +#include #include #include #include @@ -147,7 +147,7 @@ namespace llarp } // namespace llarp -#include -#include +#include +#include #endif diff --git a/llarp/net_addr.cpp b/llarp/net/net_addr.cpp similarity index 99% rename from llarp/net_addr.cpp rename to llarp/net/net_addr.cpp index a314ee2c9..15f3ebbca 100644 --- a/llarp/net_addr.cpp +++ b/llarp/net/net_addr.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include // for addrinfo diff --git a/llarp/net_addr.hpp b/llarp/net/net_addr.hpp similarity index 98% rename from llarp/net_addr.hpp rename to llarp/net/net_addr.hpp index 63dbacf80..07c525ccf 100644 --- a/llarp/net_addr.hpp +++ b/llarp/net/net_addr.hpp @@ -2,8 +2,8 @@ #define LLARP_NET_ADDR_HPP #include -#include -#include +#include +#include #include #include diff --git a/llarp/net_inaddr.cpp b/llarp/net/net_inaddr.cpp similarity index 99% rename from llarp/net_inaddr.cpp rename to llarp/net/net_inaddr.cpp index bfee7684a..3149de7cc 100644 --- a/llarp/net_inaddr.cpp +++ b/llarp/net/net_inaddr.cpp @@ -1,4 +1,4 @@ -#include +#include std::ostream& operator<<(std::ostream& out, const llarp::inAddr& a) diff --git a/llarp/net_inaddr.hpp b/llarp/net/net_inaddr.hpp similarity index 98% rename from llarp/net_inaddr.hpp rename to llarp/net/net_inaddr.hpp index d46721036..23155e391 100644 --- a/llarp/net_inaddr.hpp +++ b/llarp/net/net_inaddr.hpp @@ -1,7 +1,7 @@ #ifndef LLARP_NET_INADDR_HPP #define LLARP_NET_INADDR_HPP -#include +#include namespace llarp { diff --git a/llarp/net/net_int.cpp b/llarp/net/net_int.cpp new file mode 100644 index 000000000..57119b4f5 --- /dev/null +++ b/llarp/net/net_int.cpp @@ -0,0 +1 @@ +#include diff --git a/llarp/net_int.hpp b/llarp/net/net_int.hpp similarity index 99% rename from llarp/net_int.hpp rename to llarp/net/net_int.hpp index 662f8919d..c1f81bc98 100644 --- a/llarp/net_int.hpp +++ b/llarp/net/net_int.hpp @@ -12,7 +12,7 @@ #define inet_aton(x, y) inet_pton(AF_INET, x, y) #endif -#include +#include #include // for itoa #include diff --git a/llarp/net_int.cpp b/llarp/net_int.cpp deleted file mode 100644 index 64a60f87f..000000000 --- a/llarp/net_int.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/llarp/nodedb.cpp b/llarp/nodedb.cpp index 9eba9fe0a..4b04966a9 100644 --- a/llarp/nodedb.cpp +++ b/llarp/nodedb.cpp @@ -1,12 +1,12 @@ #include #include -#include #include #include #include #include #include +#include #include #include diff --git a/llarp/path.cpp b/llarp/path/path.cpp similarity index 99% rename from llarp/path.cpp rename to llarp/path/path.cpp index 15ae806fb..de80c625d 100644 --- a/llarp/path.cpp +++ b/llarp/path/path.cpp @@ -1,9 +1,9 @@ -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/llarp/path.hpp b/llarp/path/path.hpp similarity index 99% rename from llarp/path.hpp rename to llarp/path/path.hpp index 4f0f0c3ca..994bc0394 100644 --- a/llarp/path.hpp +++ b/llarp/path/path.hpp @@ -4,9 +4,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/llarp/path/path_types.cpp b/llarp/path/path_types.cpp new file mode 100644 index 000000000..eb23914ab --- /dev/null +++ b/llarp/path/path_types.cpp @@ -0,0 +1 @@ +#include diff --git a/llarp/path_types.hpp b/llarp/path/path_types.hpp similarity index 100% rename from llarp/path_types.hpp rename to llarp/path/path_types.hpp diff --git a/llarp/pathbuilder.cpp b/llarp/path/pathbuilder.cpp similarity index 99% rename from llarp/pathbuilder.cpp rename to llarp/path/pathbuilder.cpp index 92e4b0336..f0926c4c5 100644 --- a/llarp/pathbuilder.cpp +++ b/llarp/path/pathbuilder.cpp @@ -1,7 +1,7 @@ -#include +#include #include -#include +#include #include #include diff --git a/llarp/pathbuilder.hpp b/llarp/path/pathbuilder.hpp similarity index 98% rename from llarp/pathbuilder.hpp rename to llarp/path/pathbuilder.hpp index f7d1d89ca..2e31a4012 100644 --- a/llarp/pathbuilder.hpp +++ b/llarp/path/pathbuilder.hpp @@ -1,7 +1,7 @@ #ifndef LLARP_PATHBUILDER_HPP_ #define LLARP_PATHBUILDER_HPP_ -#include +#include #include namespace llarp diff --git a/llarp/pathset.cpp b/llarp/path/pathset.cpp similarity index 99% rename from llarp/pathset.cpp rename to llarp/path/pathset.cpp index e2e31c050..16cb110fb 100644 --- a/llarp/pathset.cpp +++ b/llarp/path/pathset.cpp @@ -1,7 +1,8 @@ +#include + #include #include -#include -#include +#include namespace llarp { diff --git a/llarp/pathset.hpp b/llarp/path/pathset.hpp similarity index 99% rename from llarp/pathset.hpp rename to llarp/path/pathset.hpp index c3aafa8d4..13fe42a20 100644 --- a/llarp/pathset.hpp +++ b/llarp/path/pathset.hpp @@ -2,7 +2,7 @@ #define LLARP_PATHSET_HPP #include -#include +#include #include #include #include diff --git a/llarp/path_types.cpp b/llarp/path_types.cpp deleted file mode 100644 index ee2fddaa8..000000000 --- a/llarp/path_types.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/llarp/profiling.hpp b/llarp/profiling.hpp index 583f1f65a..bc449b416 100644 --- a/llarp/profiling.hpp +++ b/llarp/profiling.hpp @@ -1,7 +1,7 @@ #ifndef LLARP_PROFILING_HPP #define LLARP_PROFILING_HPP -#include +#include #include #include #include diff --git a/llarp/relay_commit.cpp b/llarp/relay_commit.cpp index 97934d032..1513f1416 100644 --- a/llarp/relay_commit.cpp +++ b/llarp/relay_commit.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include #include diff --git a/llarp/router.cpp b/llarp/router.cpp index 9bb17dd41..07226e4d8 100644 --- a/llarp/router.cpp +++ b/llarp/router.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include @@ -127,7 +127,7 @@ llarp_findOrCreateEncryption(llarp::Crypto *crypto, const fs::path &path, llarp::SecretKey &encryption) { std::string fpath = path.string(); - llarp::LogDebug("find or create ",fpath); + llarp::LogDebug("find or create ", fpath); std::error_code ec; if(!fs::exists(path, ec)) { @@ -1041,7 +1041,7 @@ namespace llarp { if(!link->Start(logic)) { - llarp::LogWarn("outbound link '", link->Name(),"' failed to start"); + llarp::LogWarn("outbound link '", link->Name(), "' failed to start"); return false; } } diff --git a/llarp/router.hpp b/llarp/router.hpp index 2a5f648ae..7e7be04d3 100644 --- a/llarp/router.hpp +++ b/llarp/router.hpp @@ -5,14 +5,13 @@ #include #include #include -#include +#include #include #include #include #include -#include #include -#include +#include #include #include #include @@ -21,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/llarp/router_contact.cpp b/llarp/router_contact.cpp index ebda9e733..9ea68b117 100644 --- a/llarp/router_contact.cpp +++ b/llarp/router_contact.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include #include diff --git a/llarp/router_identity.c b/llarp/router_identity.c deleted file mode 100644 index e69de29bb..000000000 diff --git a/llarp/routing/message.hpp b/llarp/routing/message.hpp index a206dfa8b..94e609a22 100644 --- a/llarp/routing/message.hpp +++ b/llarp/routing/message.hpp @@ -1,7 +1,7 @@ #ifndef LLARP_ROUTING_MESSAGE_HPP #define LLARP_ROUTING_MESSAGE_HPP -#include +#include #include #include diff --git a/llarp/routing/message_parser.hpp b/llarp/routing/message_parser.hpp index 58de6eb18..15210421f 100644 --- a/llarp/routing/message_parser.hpp +++ b/llarp/routing/message_parser.hpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include diff --git a/llarp/rpc.hpp b/llarp/rpc.hpp index 48610c2c3..3cfcdb901 100644 --- a/llarp/rpc.hpp +++ b/llarp/rpc.hpp @@ -2,7 +2,7 @@ #define LLARP_RPC_HPP #include -#include +#include #include #include diff --git a/llarp/service/Intro.hpp b/llarp/service/Intro.hpp index c6a5ca084..562f2e4da 100644 --- a/llarp/service/Intro.hpp +++ b/llarp/service/Intro.hpp @@ -2,7 +2,7 @@ #define LLARP_SERVICE_INTRO_HPP #include -#include +#include #include #include diff --git a/llarp/service/IntroSet.cpp b/llarp/service/IntroSet.cpp index 33382b1fd..571733dae 100644 --- a/llarp/service/IntroSet.cpp +++ b/llarp/service/IntroSet.cpp @@ -1,6 +1,6 @@ #include -#include +#include namespace llarp { diff --git a/llarp/service/config.cpp b/llarp/service/config.cpp index c4fab9047..86e475de2 100644 --- a/llarp/service/config.cpp +++ b/llarp/service/config.cpp @@ -1,6 +1,6 @@ #include -#include +#include namespace llarp { diff --git a/llarp/service/context.hpp b/llarp/service/context.hpp index 5ff34851c..87cde2bc9 100644 --- a/llarp/service/context.hpp +++ b/llarp/service/context.hpp @@ -2,7 +2,7 @@ #define LLARP_SERVICE_CONTEXT_HPP #include -#include +#include #include #include diff --git a/llarp/service/endpoint.cpp b/llarp/service/endpoint.cpp index f11b1a669..7ba7704fa 100644 --- a/llarp/service/endpoint.cpp +++ b/llarp/service/endpoint.cpp @@ -1,10 +1,10 @@ #include #include -#include #include #include #include +#include #include diff --git a/llarp/service/endpoint.hpp b/llarp/service/endpoint.hpp index eaaa00e4c..7b4b777fe 100644 --- a/llarp/service/endpoint.hpp +++ b/llarp/service/endpoint.hpp @@ -2,11 +2,11 @@ #define LLARP_SERVICE_ENDPOINT_HPP #include -#include +#include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/llarp/service/handler.hpp b/llarp/service/handler.hpp index 07b5e28d4..2fcfa6b09 100644 --- a/llarp/service/handler.hpp +++ b/llarp/service/handler.hpp @@ -2,7 +2,7 @@ #define LLARP_SERVICE_HANDLER_HPP #include -#include +#include #include #include diff --git a/llarp/service/lookup.cpp b/llarp/service/lookup.cpp index 85bbb94c2..a214e72a6 100644 --- a/llarp/service/lookup.cpp +++ b/llarp/service/lookup.cpp @@ -1,6 +1,7 @@ -#include -#include #include + +#include +#include #include namespace llarp diff --git a/llarp/service/protocol.cpp b/llarp/service/protocol.cpp index 3d640b9c7..86e85c2da 100644 --- a/llarp/service/protocol.cpp +++ b/llarp/service/protocol.cpp @@ -1,8 +1,8 @@ #include -#include #include #include +#include #include namespace llarp diff --git a/llarp/transit_hop.cpp b/llarp/transit_hop.cpp index bd5e34ed0..8085a0ed3 100644 --- a/llarp/transit_hop.cpp +++ b/llarp/transit_hop.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/llarp/util/ini.cpp b/llarp/util/ini.cpp new file mode 100644 index 000000000..f3f4021b4 --- /dev/null +++ b/llarp/util/ini.cpp @@ -0,0 +1 @@ +#include diff --git a/llarp/ini.hpp b/llarp/util/ini.hpp similarity index 100% rename from llarp/ini.hpp rename to llarp/util/ini.hpp diff --git a/llarp/logic.cpp b/llarp/util/logic.cpp similarity index 98% rename from llarp/logic.cpp rename to llarp/util/logic.cpp index d2d12b992..5e419dbf9 100644 --- a/llarp/logic.cpp +++ b/llarp/util/logic.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/llarp/logic.hpp b/llarp/util/logic.hpp similarity index 100% rename from llarp/logic.hpp rename to llarp/util/logic.hpp diff --git a/llarp/win32_inet.c b/llarp/win32/win32_inet.c similarity index 100% rename from llarp/win32_inet.c rename to llarp/win32/win32_inet.c diff --git a/llarp/win32_intrnl.c b/llarp/win32/win32_intrnl.c similarity index 100% rename from llarp/win32_intrnl.c rename to llarp/win32/win32_intrnl.c diff --git a/llarp/win32_intrnl.h b/llarp/win32/win32_intrnl.h similarity index 100% rename from llarp/win32_intrnl.h rename to llarp/win32/win32_intrnl.h diff --git a/llarp/win32_up.h b/llarp/win32/win32_up.h similarity index 100% rename from llarp/win32_up.h rename to llarp/win32/win32_up.h diff --git a/llarp/win32_upoll.c b/llarp/win32/win32_upoll.c similarity index 100% rename from llarp/win32_upoll.c rename to llarp/win32/win32_upoll.c diff --git a/llarp/win32_upoll.h b/llarp/win32/win32_upoll.h similarity index 100% rename from llarp/win32_upoll.h rename to llarp/win32/win32_upoll.h diff --git a/test/test_llarp_dht_key.cpp b/test/dht/test_llarp_dht_key.cpp similarity index 100% rename from test/test_llarp_dht_key.cpp rename to test/dht/test_llarp_dht_key.cpp diff --git a/test/dns/test_llarp_dns_dns.cpp b/test/dns/test_llarp_dns_dns.cpp index 0996a35fe..920e71825 100644 --- a/test/dns/test_llarp_dns_dns.cpp +++ b/test/dns/test_llarp_dns_dns.cpp @@ -4,7 +4,8 @@ #include #include #include -#include +#include +#include #include diff --git a/test/link/test_llarp_link.cpp b/test/link/test_llarp_link.cpp index 81aa1683f..c0cd9e8a7 100644 --- a/test/link/test_llarp_link.cpp +++ b/test/link/test_llarp_link.cpp @@ -1,8 +1,8 @@ #include #include +#include #include #include -#include #include diff --git a/test/test_llarp_net.cpp b/test/net/test_llarp_net.cpp similarity index 96% rename from test/test_llarp_net.cpp rename to test/net/test_llarp_net.cpp index da2093936..4868b2afe 100644 --- a/test/test_llarp_net.cpp +++ b/test/net/test_llarp_net.cpp @@ -1,7 +1,7 @@ #include -#include -#include +#include +#include struct TestNet : public ::testing::Test { diff --git a/test/test_llarp_net_inaddr.cpp b/test/net/test_llarp_net_inaddr.cpp similarity index 98% rename from test/test_llarp_net_inaddr.cpp rename to test/net/test_llarp_net_inaddr.cpp index dbe020342..43c7387e5 100644 --- a/test/test_llarp_net_inaddr.cpp +++ b/test/net/test_llarp_net_inaddr.cpp @@ -1,6 +1,6 @@ #include -#include +#include struct TestNetInAddr : public ::testing::Test { diff --git a/test/service/test_llarp_service_identity.cpp b/test/service/test_llarp_service_identity.cpp index 88c5bc2e0..ef7316c3c 100644 --- a/test/service/test_llarp_service_identity.cpp +++ b/test/service/test_llarp_service_identity.cpp @@ -1,7 +1,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/test_libabyss.cpp b/test/test_libabyss.cpp index acda39c42..23c2a9351 100644 --- a/test/test_libabyss.cpp +++ b/test/test_libabyss.cpp @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include #include struct AbyssTestBase : public ::testing::Test diff --git a/test/test_llarp_dns.cpp b/test/test_llarp_dns.cpp index 4e7bfe66c..09824d25a 100644 --- a/test/test_llarp_dns.cpp +++ b/test/test_llarp_dns.cpp @@ -2,9 +2,9 @@ #include #include -#include // for llarp_main_init -#include // for threadpool/llarp::Logic -#include // for llarp::Addr +#include // for llarp_main_init +#include // for llarp::Addr +#include // for threadpool/llarp::Logic struct DNSTest : public ::testing::Test { diff --git a/test/test_llarp_dnsd.cpp b/test/test_llarp_dnsd.cpp index 4e47700b0..e4bd2b81f 100644 --- a/test/test_llarp_dnsd.cpp +++ b/test/test_llarp_dnsd.cpp @@ -2,9 +2,9 @@ #include -#include // for llarp_main_init -#include // for threadpool/llarp::Logic -#include // for llarp::Addr +#include // for llarp_main_init +#include // for llarp::Addr +#include // for threadpool/llarp::Logic unsigned int g_length = 0; std::string g_result = "";