Move lokinet unspecific components to a util/ library

This commit is contained in:
Michael 2019-01-10 19:41:51 +00:00
parent f6b23a28dc
commit e5eda0fb8f
No known key found for this signature in database
GPG Key ID: 2D51757B47E2434C
186 changed files with 392 additions and 359 deletions

View File

@ -198,6 +198,7 @@ set(LIB lokinet)
set(SHARED_LIB ${LIB}-shared)
set(STATIC_LIB ${LIB}-static)
set(CRYPTOGRAPHY_LIB ${LIB}-cryptography)
set(UTIL_LIB ${LIB}-util)
set(PLATFORM_LIB ${LIB}-platform)
set(ANDROID_LIB ${LIB}android)
set(TT_ROOT vendor/libtuntap-master)
@ -278,28 +279,41 @@ set(CXX_COMPAT_SRC
include_directories(vendor/cppbackport-master/lib)
endif(NOT WIN32)
set(LIB_UTIL_SRC
llarp/constants/defaults.cpp
llarp/constants/proto.cpp
llarp/constants/version.cpp
llarp/util/aligned.cpp
llarp/util/bencode.cpp
llarp/util/bits.cpp
llarp/util/buffer.cpp
llarp/util/common.cpp
llarp/util/encode.cpp
llarp/util/endian.cpp
llarp/util/fs.cpp
llarp/util/logger.c
llarp/util/logger.cpp
llarp/util/mem.cpp
llarp/util/queue_manager.cpp
llarp/util/queue.cpp
llarp/util/str.cpp
llarp/util/string_view.cpp
llarp/util/thread_pool.cpp
llarp/util/threading.cpp
llarp/util/threadpool.cpp
llarp/util/time.cpp
llarp/util/timer.cpp
llarp/util/types.cpp
)
set(LIB_PLATFORM_SRC
# string stuff
llarp/str.cpp
# for outpug
llarp/logger.cpp
# needed for threading
llarp/logic.cpp
# for zero (for net.hpp stuff for llarp::addr stuff)
llarp/mem.cpp
# for networking
llarp/ev.cpp
llarp/net.cpp
llarp/net_addr.cpp
llarp/net_inaddr.cpp
# for timer
llarp/time.cpp
# for logic
llarp/timer.cpp
# for threading
llarp/queue_manager.cpp
llarp/thread_pool.cpp
llarp/threadpool.cpp
# for android shim
${ANDROID_PLATFORM_SRC}
# process isolation implementation
@ -462,17 +476,11 @@ set(LIB_SRC
${EV_SRC}
${UTP_SRC}
llarp/address_info.cpp
llarp/aligned.cpp
llarp/bencode.cpp
llarp/bits.cpp
llarp/buffer.cpp
llarp/codel.cpp
llarp/common.cpp
llarp/config.cpp
llarp/context.cpp
llarp/crypto.cpp
llarp/crypto_libsodium.cpp
llarp/defaults.cpp
llarp/dht.cpp
llarp/dht/bucket.cpp
llarp/dht/context.cpp
@ -499,11 +507,9 @@ set(LIB_SRC
llarp/dns_rectypes.cpp
llarp/dnsc.cpp
llarp/dnsd.cpp
llarp/encode.cpp
llarp/encrypted.cpp
llarp/encrypted_ack.cpp
llarp/encrypted_frame.cpp
llarp/endian.cpp
llarp/establish_job.cpp
llarp/exit.cpp
llarp/exit/close_exit.cpp
@ -518,7 +524,6 @@ set(LIB_SRC
llarp/exit/update_exit.cpp
llarp/exit_info.cpp
llarp/exit_route.cpp
llarp/fs.cpp
llarp/handlers/exit.cpp
llarp/handlers/null.cpp
llarp/handlers/tun.cpp
@ -554,8 +559,6 @@ set(LIB_SRC
llarp/pow.cpp
llarp/profiling.cpp
llarp/proofofwork.cpp
llarp/proto.cpp
llarp/queue.cpp
llarp/relay_commit.cpp
llarp/relay_up_down.cpp
llarp/router.cpp
@ -585,12 +588,8 @@ set(LIB_SRC
llarp/service/tag.cpp
llarp/service/types.cpp
llarp/service/vanity.cpp
llarp/string_view.cpp
llarp/testnet.c
llarp/threading.cpp
llarp/transit_hop.cpp
llarp/types.cpp
llarp/version.cpp
)
set(RC_SRC
@ -670,9 +669,9 @@ if(USE_LIBABYSS)
add_executable(${ABYSS_EXE} ${ABYSS}/main.cpp)
if (NOT WIN32)
target_link_libraries(${ABYSS_EXE} ${PLATFORM_LIB})
target_link_libraries(${ABYSS_EXE} ${UTIL_LIB} ${PLATFORM_LIB})
else()
target_link_libraries(${ABYSS_EXE} ${PLATFORM_LIB} ws2_32 iphlpapi)
target_link_libraries(${ABYSS_EXE} ${UTIL_LIB} ${PLATFORM_LIB} ws2_32 iphlpapi)
endif(NOT WIN32)
set(TEST_SRC ${TEST_SRC} test/jsonrpc_unittest.cpp)
@ -714,11 +713,12 @@ endif(NOT WIN32)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_library(${STATIC_LIB} STATIC ${LIB_SRC})
add_library(${UTIL_LIB} STATIC ${LIB_UTIL_SRC})
add_library(${PLATFORM_LIB} STATIC ${LIB_PLATFORM_SRC})
if(USE_LIBABYSS)
target_link_libraries(${PLATFORM_LIB} Threads::Threads ${ABYSS_LIB})
target_link_libraries(${PLATFORM_LIB} ${UTIL_LIB} Threads::Threads ${ABYSS_LIB})
else()
target_link_libraries(${PLATFORM_LIB} Threads::Threads)
target_link_libraries(${PLATFORM_LIB} ${UTIL_LIB} Threads::Threads)
endif(USE_LIBABYSS)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(NON_PC_TARGET)
@ -727,20 +727,14 @@ endif(NOT WIN32)
target_link_libraries(${PLATFORM_LIB} -lcap)
endif(NON_PC_TARGET)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_link_libraries(${STATIC_LIB} ${CRYPTOGRAPHY_LIB} ${LIBS} ${PLATFORM_LIB})
target_link_libraries(${EXE} ${STATIC_LINK_LIBS} ${STATIC_LIB} ${PLATFORM_LIB})
#target_link_libraries(${CLIENT_EXE} ${STATIC_LINK_LIBS} ${STATIC_LIB} ${PLATFORM_LIB})
#target_link_libraries(${RC_EXE} ${STATIC_LINK_LIBS} ${STATIC_LIB} ${PLATFORM_LIB})
target_link_libraries(${TEST_EXE} ${STATIC_LINK_LIBS} gtest_main ${STATIC_LIB} ${PLATFORM_LIB})
#target_link_libraries(${DNS_EXE} ${STATIC_LIB} ${PLATFORM_LIB})
target_link_libraries(${STATIC_LIB} ${CRYPTOGRAPHY_LIB} ${LIBS} ${UTIL_LIB} ${PLATFORM_LIB})
target_link_libraries(${EXE} ${STATIC_LINK_LIBS} ${STATIC_LIB} ${UTIL_LIB} ${PLATFORM_LIB})
target_link_libraries(${TEST_EXE} ${STATIC_LINK_LIBS} gtest_main ${STATIC_LIB} ${UTIL_LIB} ${PLATFORM_LIB})
if (WIN32)
target_link_libraries(${EXE} ${STATIC_LINK_LIBS} ${STATIC_LIB} ${PLATFORM_LIB} ws2_32 iphlpapi)
#target_link_libraries(${CLIENT_EXE} ${STATIC_LINK_LIBS} ${STATIC_LIB} ${PLATFORM_LIB} ws2_32 iphlpapi)
#target_link_libraries(${RC_EXE} ${STATIC_LINK_LIBS} ${STATIC_LIB} ${PLATFORM_LIB} ws2_32 iphlpapi)
target_link_libraries(${TEST_EXE} ${STATIC_LINK_LIBS} gtest_main ${STATIC_LIB} ${PLATFORM_LIB} ws2_32 iphlpapi)
#target_link_libraries(${DNS_EXE} ${STATIC_LIB} ${PLATFORM_LIB} ws2_32 iphlpapi)
target_link_libraries(${EXE} ${STATIC_LINK_LIBS} ${STATIC_LIB} ${UTIL_LIB} ${PLATFORM_LIB} ws2_32 iphlpapi)
target_link_libraries(${TEST_EXE} ${STATIC_LINK_LIBS} gtest_main ${STATIC_LIB} ${UTIL_LIB} ${PLATFORM_LIB} ws2_32 iphlpapi)
endif(WIN32)
if(ANDROID)
add_library(${ANDROID_LIB} SHARED jni/lokinet_android.cpp)
@ -749,10 +743,6 @@ endif(NOT WIN32)
if(WITH_SHARED)
add_library(${SHARED_LIB} SHARED ${LIB_SRC})
target_link_libraries(${SHARED_LIB} ${CRYPTOGRAPHY_LIB} ${LIBS} ${PLATFORM_LIB} Threads::Threads)
#target_link_libraries(${EXE} ${SHARED_LIB})
#target_link_libraries(${TEST_EXE} ${SHARED_LIB})
#target_link_libraries(${RC_EXE} ${SHARED_LIB})
#target_link_libraries(${DNS_EXE} ${SHARED_LIB} Threads::Threads)
target_link_libraries(${SHARED_LIB} ${CRYPTOGRAPHY_LIB} ${LIBS} ${UTIL_LIB} ${PLATFORM_LIB} Threads::Threads)
endif(WITH_SHARED)
endif(SHADOW)

View File

@ -1,9 +1,9 @@
#include <config.hpp> // for ensure_config
#include <fs.hpp>
#include <util/fs.hpp>
#include <getopt.h>
#include <libgen.h>
#include <llarp.h>
#include <logger.hpp>
#include <util/logger.hpp>
#include <signal.h>
#include <string>

View File

@ -2,13 +2,13 @@
#define LLARP_H_
#ifdef __cplusplus
#include <constants/version.hpp>
#include <ev.h>
#include <mem.h>
#include <logic.hpp>
#include <version.hpp>
#include <handlers/tun.hpp> // for handlers
#include <logic.hpp>
#include <service/address.hpp> // for service::address
#include <service/endpoint.hpp>
#include <util/mem.h>
extern "C"
{

View File

@ -3,7 +3,7 @@
#include <crypto.h>
#include <llarp.h>
#include <threading.hpp>
#include <util/threading.hpp>
#include <iostream>
#include <memory>

View File

@ -1,7 +1,7 @@
#ifndef LLARP_STRING_H
#define LLARP_STRING_H
#include <common.hpp>
#include <util/common.hpp>
#ifndef __FreeBSD__
#if !(__APPLE__ && __MACH__)

View File

@ -3,7 +3,7 @@
#include <abyss/json.hpp>
#include <ev.h>
#include <string_view.hpp>
#include <util/string_view.hpp>
#include <deque>
#include <functional>

View File

@ -1,7 +1,7 @@
#ifndef __ABYSS_HTTP_HPP__
#define __ABYSS_HTTP_HPP__
#include <abyss/json.hpp>
#include <string_view.hpp>
#include <util/string_view.hpp>
#include <string>
#include <unordered_map>

View File

@ -4,8 +4,8 @@
#include <abyss/json.hpp>
#include <ev.h>
#include <logic.hpp>
#include <string_view.hpp>
#include <time.hpp>
#include <util/string_view.hpp>
#include <util/time.hpp>
#include <list>
#include <memory>

View File

@ -1,8 +1,8 @@
#include <abyss/client.hpp>
#include <abyss/http.hpp>
#include <logger.hpp>
#include <crypto.hpp>
#include <buffer.hpp>
#include <util/buffer.hpp>
#include <util/logger.hpp>
namespace abyss
{

View File

@ -1,7 +1,7 @@
#include <abyss/json.hpp>
#include <rapidjson/stringbuffer.h>
#include <rapidjson/writer.h>
#include <string_view.hpp>
#include <util/string_view.hpp>
#include <cstring>
#include <string>

View File

@ -1,8 +1,9 @@
#include <abyss/http.hpp>
#include <abyss/server.hpp>
#include <buffer.hpp>
#include <logger.hpp>
#include <time.hpp>
#include <abyss/http.hpp>
#include <util/buffer.hpp>
#include <util/logger.hpp>
#include <util/time.hpp>
#include <algorithm>
#include <sstream>

View File

@ -2,8 +2,9 @@
#ifndef _WIN32
#include <arpa/inet.h>
#endif
#include <bencode.h>
#include <mem.h>
#include <util/bencode.h>
#include <util/mem.h>
#include <string.h>
#include <net.hpp>

View File

@ -1,11 +1,11 @@
#ifndef LLARP_AI_HPP
#define LLARP_AI_HPP
#include <bencode.hpp>
#include <crypto.h>
#include <crypto.hpp>
#include <mem.h>
#include <net.h>
#include <util/bencode.hpp>
#include <util/mem.h>
#include <string>
#include <vector>

View File

@ -1 +0,0 @@
#include <aligned.hpp>

View File

@ -1 +0,0 @@
#include <bits.hpp>

View File

@ -1,10 +1,10 @@
#ifndef LLARP_CODEL_QUEUE_HPP
#define LLARP_CODEL_QUEUE_HPP
#include <logger.hpp>
#include <mem.hpp>
#include <threading.hpp>
#include <time.hpp>
#include <util/logger.hpp>
#include <util/mem.hpp>
#include <util/threading.hpp>
#include <util/time.hpp>
#include <algorithm>
#include <array>

View File

@ -1 +0,0 @@
#include <common.hpp>

View File

@ -1,11 +1,12 @@
#include <config.h>
#include <config.hpp>
#include <defaults.hpp>
#include <fs.hpp>
#include <constants/defaults.hpp>
#include <ini.hpp>
#include <logger.hpp>
#include <mem.hpp>
#include <net.hpp>
#include <util/fs.hpp>
#include <util/logger.hpp>
#include <util/mem.hpp>
namespace llarp
{

View File

@ -0,0 +1 @@
#include <constants/defaults.hpp>

View File

@ -0,0 +1 @@
#include <constants/proto.hpp>

View File

@ -1,3 +1,3 @@
#include <version.hpp>
#include <constants/version.hpp>
const char Version::LLARP_NET_ID[] = "testnet";

View File

@ -4,7 +4,7 @@
#include <getopt.h>
#include <llarp.h>
#include <llarp.hpp>
#include <logger.h>
#include <util/logger.h>
#include <router.hpp>
#include <signal.h>

View File

@ -1,7 +1,9 @@
#include <crypto.hpp>
#include <util/buffer.hpp>
#include <fstream>
#include <iterator>
#include <buffer.hpp>
namespace llarp
{

View File

@ -1,12 +1,12 @@
#ifndef LLARP_CRYPTO_HPP
#define LLARP_CRYPTO_HPP
#include <aligned.hpp>
#include <mem.h>
#include <router_id.hpp>
#include <threadpool.h>
#include <buffer.h>
#include <common.hpp>
#include <util/aligned.hpp>
#include <util/buffer.h>
#include <util/common.hpp>
#include <util/mem.h>
#include <util/threadpool.h>
#include <functional>
#include <stdbool.h>

View File

@ -1,11 +1,12 @@
#include <assert.h>
#include <crypto.h>
#include <crypto.hpp>
#include <sodium/crypto_generichash.h>
#include <sodium/crypto_sign.h>
#include <sodium/crypto_scalarmult.h>
#include <sodium/crypto_stream_xchacha20.h>
#include <crypto.hpp>
#include "mem.hpp"
#include <util/mem.hpp>
#include <assert.h>
extern "C"
{

View File

@ -1 +0,0 @@
#include <defaults.hpp>

View File

@ -2,8 +2,8 @@
#define LLARP_DHT_H_
#include <crypto.hpp>
#include <buffer.h>
#include <router_contact.hpp>
#include <util/buffer.h>
/**
* dht.h

View File

@ -8,7 +8,7 @@
#include <dht/messages/findintro.hpp>
#include <dht/node.hpp>
#include <service/IntroSet.hpp>
#include <time.hpp>
#include <util/time.hpp>
#include <set>

View File

@ -1,7 +1,7 @@
#ifndef LLARP_DHT_KEY_HPP
#define LLARP_DHT_KEY_HPP
#include <aligned.hpp>
#include <util/aligned.hpp>
#include <array>

View File

@ -1,10 +1,10 @@
#ifndef LLARP_DHT_MESSAGE_HPP
#define LLARP_DHT_MESSAGE_HPP
#include <bencode.hpp>
#include <dht.h>
#include <dht/key.hpp>
#include <path_types.hpp>
#include <util/bencode.hpp>
#include <vector>

View File

@ -1,6 +1,7 @@
#include <dnsd.hpp> // for llarp_handle_dnsd_recvfrom, dnsc
#include <endian.hpp>
#include <logger.hpp>
#include <util/endian.hpp>
#include <util/logger.hpp>
void
hexDump(const char *buffer, uint16_t size)

View File

@ -1,7 +1,9 @@
#include <buffer.hpp>
#include <dns/message.hpp>
#include <dns/dns.hpp>
#include <endian.hpp>
#include <logger.hpp>
#include <util/buffer.hpp>
#include <util/endian.hpp>
#include <util/logger.hpp>
namespace llarp
{

View File

@ -1,5 +1,6 @@
#ifndef LLARP_DNS_MESSAGE_HPP
#define LLARP_DNS_MESSAGE_HPP
#include <dns/serialize.hpp>
#include <dns/rr.hpp>
#include <dns/question.hpp>

View File

@ -1,8 +1,8 @@
#ifndef LLARP_DNS_NAME_HPP
#define LLARP_DNS_NAME_HPP
#include <buffer.h>
#include <net_int.hpp>
#include <util/buffer.h>
#include <string>

View File

@ -1,5 +1,6 @@
#include <dns/question.hpp>
#include <logger.hpp>
#include <util/logger.hpp>
namespace llarp
{

View File

@ -1,5 +1,6 @@
#include <dns/rr.hpp>
#include <logger.hpp>
#include <util/logger.hpp>
namespace llarp
{

View File

@ -1,6 +1,8 @@
#ifndef LLARP_DNS_SERIALIZE_HPP
#define LLARP_DNS_SERIALIZE_HPP
#include <buffer.h>
#include <util/buffer.h>
#include <vector>
namespace llarp

View File

@ -4,7 +4,7 @@
#include <dns/message.hpp>
#include <ev.h>
#include <net.hpp>
#include <string_view.hpp>
#include <util/string_view.hpp>
#include <unordered_map>

View File

@ -1,8 +1,9 @@
#ifndef LIBLLARP_DNS_REC_TYPES_HPP
#define LIBLLARP_DNS_REC_TYPES_HPP
#include <buffer.h> // for byte_t
#include <net.hpp> // for llarp::Addr , llarp::huint32_t
#include <util/buffer.h> // for byte_t
#include <vector>
namespace llarp

View File

@ -1,6 +1,6 @@
#include <dnsc.hpp>
#include <logger.hpp>
#include <net.hpp> // for llarp::Addr
#include <util/logger.hpp>
#ifndef _WIN32
#include <arpa/inet.h>

View File

@ -1,5 +1 @@
#include <encrypted.hpp>
#include <mem.hpp>
namespace llarp
{
} // namespace llarp

View File

@ -1,11 +1,11 @@
#ifndef LLARP_ENCCRYPTED_HPP
#define LLARP_ENCCRYPTED_HPP
#include <aligned.hpp>
#include <bencode.h>
#include <buffer.h>
#include <mem.hpp>
#include <link_layer.hpp>
#include <util/aligned.hpp>
#include <util/bencode.h>
#include <util/buffer.h>
#include <util/mem.hpp>
#include <vector>
#include <stdexcept>

View File

@ -1,7 +1,8 @@
#include <crypto.hpp>
#include <encrypted_frame.hpp>
#include <logger.hpp>
#include <mem.hpp>
#include <crypto.hpp>
#include <util/logger.hpp>
#include <util/mem.hpp>
namespace llarp
{

View File

@ -3,9 +3,9 @@
#include <crypto.h>
#include <encrypted.hpp>
#include <buffer.hpp>
#include <mem.h>
#include <threadpool.h>
#include <util/buffer.hpp>
#include <util/mem.h>
#include <util/threadpool.h>
namespace llarp
{

View File

@ -1 +0,0 @@
#include <endian.hpp>

View File

@ -1,7 +1,7 @@
#include <ev.h>
#include <logic.hpp>
#include <mem.hpp>
#include <string_view.hpp>
#include <util/mem.hpp>
#include <util/string_view.hpp>
#include <stddef.h>

View File

@ -1,8 +1,8 @@
#ifndef LLARP_EV_H
#define LLARP_EV_H
#include <buffer.h>
#include <time.hpp>
#include <util/buffer.h>
#include <util/time.hpp>
#include <tuntap.h>
#ifdef _WIN32

View File

@ -3,7 +3,8 @@
#include <ev.h>
#include <codel.hpp>
#include <threading.hpp>
#include <util/buffer.h>
#include <util/threading.hpp>
// writev
#ifndef _WIN32
@ -11,7 +12,6 @@
#endif
#include <algorithm>
#include <buffer.h>
#include <deque>
#include <list>
#include <unistd.h>

View File

@ -1,20 +1,22 @@
#ifndef EV_EPOLL_HPP
#define EV_EPOLL_HPP
#include <fcntl.h>
#include <buffer.h>
#include <ev.hpp>
#include <net.h>
#include <net.hpp>
#include <util/buffer.h>
#include <util/buffer.hpp>
#include <util/logger.hpp>
#include <util/mem.hpp>
#include <cassert>
#include <cstdio>
#include <fcntl.h>
#include <signal.h>
#include <sys/epoll.h>
#include <sys/un.h>
#include <tuntap.h>
#include <unistd.h>
#include <cstdio>
#include <buffer.hpp>
#include <ev.hpp>
#include <net.hpp>
#include <logger.hpp>
#include <mem.hpp>
#include <cassert>
#ifdef ANDROID
/** TODO: correct this value */

View File

@ -1,11 +1,11 @@
#ifndef EV_KQUEUE_HPP
#define EV_KQUEUE_HPP
#include <buffer.h>
#include <ev.hpp>
#include <logger.hpp>
#include <net.h>
#include <net.hpp>
#include <util/buffer.h>
#include <util/logger.hpp>
#include <sys/un.h>

View File

@ -4,7 +4,7 @@
#include <crypto.hpp>
#include <ip.hpp>
#include <path.hpp>
#include <time.hpp>
#include <util/time.hpp>
namespace llarp
{

View File

@ -1,7 +1,7 @@
#ifndef LLARP_EXIT_POLICY_HPP
#define LLARP_EXIT_POLICY_HPP
#include <bencode.hpp>
#include <util/bencode.hpp>
namespace llarp
{

View File

@ -1,6 +1,7 @@
#include <endian.hpp>
#include <messages/transfer_traffic.hpp>
#include <routing/handler.hpp>
#include <util/endian.hpp>
namespace llarp
{

View File

@ -2,12 +2,12 @@
#include <arpa/inet.h>
#endif
#include <bencode.h>
#include <exit_info.hpp>
#include <mem.h>
#include <string.h>
#include <util/bencode.h>
#include <util/mem.h>
#include <list>
#include <string.h>
namespace llarp
{

View File

@ -1,10 +1,10 @@
#ifndef LLARP_XI_HPP
#define LLARP_XI_HPP
#include <bencode.hpp>
#include <bits.hpp>
#include <crypto.hpp>
#include <net.hpp>
#include <util/bencode.hpp>
#include <util/bits.hpp>
#include <iostream>

View File

@ -2,8 +2,8 @@
#include <arpa/inet.h>
#endif
#include <bencode.h>
#include <exit_route.h>
#include <util/bencode.h>
#include <llarp/string.h>

View File

@ -1,8 +1,8 @@
#ifndef LLARP_XR_H
#define LLARP_XR_H
#include <buffer.h>
#include <net.h>
#include <util/buffer.h>
#include <stdint.h>

View File

@ -1 +0,0 @@
#include <fs.hpp>

View File

@ -1,8 +1,10 @@
#include <handlers/exit.hpp>
#include <dns/dns.hpp>
#include <net.hpp>
#include <router.hpp>
#include <str.hpp>
#include <dns/dns.hpp>
#include <util/str.hpp>
#include <cassert>
namespace llarp

View File

@ -7,7 +7,7 @@
#include <ip.hpp>
#include <net.hpp>
#include <service/endpoint.hpp>
#include <threading.hpp>
#include <util/threading.hpp>
namespace llarp
{

View File

@ -1,7 +1,8 @@
#include <buffer.hpp>
#include <endian.hpp>
#include <ip.hpp>
#include <mem.hpp>
#include <util/buffer.hpp>
#include <util/endian.hpp>
#include <util/mem.hpp>
#ifndef _WIN32
#include <netinet/in.h>

View File

@ -1,10 +1,10 @@
#ifndef LLARP_IP_HPP
#define LLARP_IP_HPP
#include <buffer.h>
#include <ev.h>
#include <net.hpp>
#include <time.hpp>
#include <util/buffer.h>
#include <util/time.hpp>
#ifndef _WIN32
// unix, linux

View File

@ -1,10 +1,11 @@
#ifndef LLARP_LINK_ENCODER_HPP
#define LLARP_LINK_ENCODER_HPP
#include <bencode.h>
#include <buffer.h>
#include <router_contact.hpp>
#include <util/bencode.h>
#include <util/buffer.h>
namespace llarp
{
/// encode Link Introduce Message onto a buffer

View File

@ -1,6 +1,7 @@
#include <fs.hpp>
#include <link/server.hpp>
#include <util/fs.hpp>
namespace llarp
{
ILinkLayer::ILinkLayer(const SecretKey& routerEncSecret, GetRCFunc getrc,

View File

@ -7,7 +7,7 @@
#include <logic.hpp>
#include <net.hpp>
#include <router_contact.hpp>
#include <threading.hpp>
#include <util/threading.hpp>
#include <list>
#include <unordered_map>

View File

@ -4,7 +4,7 @@
#include <crypto.hpp>
#include <net.hpp>
#include <router_contact.hpp>
#include <types.hpp>
#include <util/types.hpp>
#include <functional>

View File

@ -1,10 +1,11 @@
#include <buffer.hpp>
#include <endian.hpp>
#include <link/server.hpp>
#include <link/utp.hpp>
#include <link/server.hpp>
#include <messages/discard.hpp>
#include <messages/link_intro.hpp>
#include <router.hpp>
#include <util/buffer.hpp>
#include <util/endian.hpp>
#ifdef __linux__
#include <linux/errqueue.h>

View File

@ -2,8 +2,8 @@
#define LLARP_LINK_UTP_INTERNAL_HPP
#include <link/utp.hpp>
#include <utp.h>
#include <aligned.hpp>
#include <link_layer.hpp>
#include <util/aligned.hpp>
#include <tuple>
#include <deque>

View File

@ -1,8 +1,9 @@
#include <bencode.h>
#include <logger.hpp>
#include <messages/link_intro.hpp>
#include <router.hpp>
#include <router_contact.hpp>
#include <router.hpp>
#include <util/bencode.h>
#include <util/logger.hpp>
namespace llarp
{

View File

@ -1,6 +1,6 @@
#ifndef LLARP_LINK_LAYER_HPP
#define LLARP_LINK_LAYER_HPP
#include <types.hpp>
#include <util/types.hpp>
#include <stdlib.h>

View File

@ -1,8 +1,8 @@
#include <buffer.hpp>
#include <logger.hpp>
#include <link_message_parser.hpp>
#include <messages.hpp>
#include <router_contact.hpp>
#include <link_message_parser.hpp>
#include <util/buffer.hpp>
#include <util/logger.hpp>
namespace llarp
{

View File

@ -1,9 +1,9 @@
#ifndef LLARP_LINK_MESSAGE_HPP
#define LLARP_LINK_MESSAGE_HPP
#include <bencode.hpp>
#include <link/session.hpp>
#include <router_id.hpp>
#include <util/bencode.hpp>
#include <queue>
#include <vector>

View File

@ -1 +0,0 @@
#include "logger.h"

View File

@ -1,6 +1,7 @@
#include <logger.hpp>
#include <logic.hpp>
#include <mem.h>
#include <util/logger.hpp>
#include <util/mem.h>
namespace llarp
{

View File

@ -1,9 +1,9 @@
#ifndef LLARP_LOGIC_HPP
#define LLARP_LOGIC_HPP
#include <mem.h>
#include <threadpool.h>
#include <timer.hpp>
#include <util/mem.h>
#include <util/threadpool.h>
#include <util/timer.hpp>
namespace llarp
{

View File

@ -1,10 +1,10 @@
#ifndef LLARP_MESSAGES_DISCARD_HPP
#define LLARP_MESSAGES_DISCARD_HPP
#include <bencode.hpp>
#include <link_message.hpp>
#include <routing/handler.hpp>
#include <routing/message.hpp>
#include <util/bencode.hpp>
namespace llarp
{

View File

@ -1,5 +1,4 @@
#include <net.hpp>
#include <str.hpp>
#ifdef ANDROID
#include "android/ifaddrs.h"
#endif
@ -10,8 +9,9 @@
#endif
#include <net/if.h>
#endif
#include <logger.hpp>
#include <net_addr.hpp>
#include <util/logger.hpp>
#include <util/str.hpp>
#include <cstdio>

View File

@ -2,11 +2,11 @@
#define LLARP_NET_HPP
#include <address_info.hpp>
#include <logger.hpp>
#include <mem.hpp>
#include <net.h>
#include <net_int.hpp>
#include <string_view.hpp>
#include <net.h>
#include <util/logger.hpp>
#include <util/mem.hpp>
#include <util/string_view.hpp>
#include <functional>
#include <stdlib.h> // for itoa

View File

@ -1,6 +1,6 @@
#include <net.hpp>
#include <net_addr.hpp>
#include <string_view.hpp>
#include <util/string_view.hpp>
// for addrinfo
#ifndef _WIN32

View File

@ -4,7 +4,7 @@
#include <address_info.hpp>
#include <net.h>
#include <net.hpp>
#include <string_view.hpp>
#include <util/string_view.hpp>
#include <string>

View File

@ -1,12 +1,13 @@
#include <buffer.hpp>
#include <crypto.hpp>
#include <encode.hpp>
#include <fs.hpp>
#include <logger.hpp>
#include <logic.hpp>
#include <mem.hpp>
#include <nodedb.hpp>
#include <crypto.hpp>
#include <logic.hpp>
#include <router_contact.hpp>
#include <util/buffer.hpp>
#include <util/encode.hpp>
#include <util/fs.hpp>
#include <util/logger.hpp>
#include <util/mem.hpp>
#include <fstream>
#include <unordered_map>

View File

@ -1,11 +1,11 @@
#ifndef LLARP_NODEDB_HPP
#define LLARP_NODEDB_HPP
#include <common.hpp>
#include <crypto.h>
#include <fs.hpp>
#include <router_contact.hpp>
#include <router_id.hpp>
#include <util/common.hpp>
#include <util/fs.hpp>
/**
* nodedb.hpp

View File

@ -1,11 +1,12 @@
#include <buffer.hpp>
#include <path.hpp>
#include <encrypted_frame.hpp>
#include <endian.hpp>
#include <messages/dht.hpp>
#include <messages/discard.hpp>
#include <path.hpp>
#include <pathbuilder.hpp>
#include <router.hpp>
#include <util/buffer.hpp>
#include <util/endian.hpp>
#include <deque>

View File

@ -1,11 +1,10 @@
#ifndef LLARP_PATH_HPP
#define LLARP_PATH_HPP
#include <aligned.hpp>
#include <crypto.hpp>
#include <dht.hpp>
#include <messages/relay.hpp>
#include <messages/relay_commit.hpp>
#include <messages/relay.hpp>
#include <path_types.hpp>
#include <pathbuilder.hpp>
#include <pathset.hpp>
@ -13,8 +12,9 @@
#include <routing/handler.hpp>
#include <routing/message.hpp>
#include <service/Intro.hpp>
#include <threading.hpp>
#include <time.hpp>
#include <util/aligned.hpp>
#include <util/threading.hpp>
#include <util/time.hpp>
#include <functional>
#include <list>

View File

@ -1,7 +1,7 @@
#ifndef LLARP_PATH_TYPES_HPP
#define LLARP_PATH_TYPES_HPP
#include <aligned.hpp>
#include <util/aligned.hpp>
#include <crypto.h>
namespace llarp

View File

@ -1,8 +1,9 @@
#include <buffer.hpp>
#include <pathbuilder.hpp>
#include <nodedb.hpp>
#include <path.hpp>
#include <pathbuilder.hpp>
#include <router.hpp>
#include <util/buffer.hpp>
#include <functional>

View File

@ -7,7 +7,7 @@
#include <routing/message.hpp>
#include <service/IntroSet.hpp>
#include <service/lookup.hpp>
#include <time.hpp>
#include <util/time.hpp>
#include <functional>
#include <list>

View File

@ -1,8 +1,8 @@
#ifndef LLARP_POW_HPP
#define LLARP_POW_HPP
#include <crypto.h>
#include <bencode.hpp>
#include <router_id.hpp>
#include <util/bencode.hpp>
namespace llarp
{

View File

@ -1,10 +1,10 @@
#ifndef LLARP_PROFILING_HPP
#define LLARP_PROFILING_HPP
#include <bencode.hpp>
#include <threading.hpp>
#include <router_id.hpp>
#include <path.hpp>
#include <router_id.hpp>
#include <util/bencode.hpp>
#include <util/threading.hpp>
#include <map>

View File

@ -1,6 +1,7 @@
#include <buffer.hpp>
#include <pow.hpp>
#include <util/buffer.hpp>
#include <cmath>
namespace llarp

View File

@ -1 +0,0 @@
#include <proto.hpp>

View File

@ -1 +0,0 @@
#include <queue.hpp>

View File

@ -1,10 +1,10 @@
#include <bencode.hpp>
#include <buffer.hpp>
#include <logger.hpp>
#include <messages/path_confirm.hpp>
#include <messages/relay_commit.hpp>
#include <path.hpp>
#include <router.hpp>
#include <util/bencode.hpp>
#include <util/buffer.hpp>
#include <util/logger.hpp>
namespace llarp
{

View File

@ -1,6 +1,6 @@
#include <bencode.hpp>
#include <messages/relay.hpp>
#include <router.hpp>
#include <util/bencode.hpp>
namespace llarp
{

View File

@ -1,16 +1,17 @@
#include <buffer.hpp>
#include <encode.hpp>
#include <router.hpp>
#include <constants/proto.hpp>
#include <crypto.hpp>
#include <link_message.hpp>
#include <link/iwp.hpp>
#include <link/server.hpp>
#include <link/utp.hpp>
#include <link/iwp.hpp>
#include <link_message.hpp>
#include <logger.hpp>
#include <net.hpp>
#include <proto.hpp>
#include <router.hpp>
#include <rpc.hpp>
#include <str.hpp>
#include <crypto.hpp>
#include <util/buffer.hpp>
#include <util/encode.hpp>
#include <util/logger.hpp>
#include <util/str.hpp>
#include <fstream>
#include <cstdlib>

Some files were not shown because too many files have changed in this diff Show More