Skip to content

Commit

Permalink
redo includes to be consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
majestrate committed Jan 20, 2023
1 parent 0ab0506 commit 4508c59
Show file tree
Hide file tree
Showing 60 changed files with 148 additions and 152 deletions.
6 changes: 3 additions & 3 deletions llarp/config/config.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include <chrono>
#include "config.hpp"

#include "config/definition.hpp"
#include "definition.hpp"
#include "ini.hpp"

#include <llarp/constants/files.hpp>
#include <llarp/constants/platform.hpp>
#include <llarp/constants/version.hpp>
Expand All @@ -18,6 +17,7 @@

#include <llarp/service/name.hpp>

#include <chrono>
#include <cstdlib>
#include <ios>
#include <iostream>
Expand Down
6 changes: 3 additions & 3 deletions llarp/config/config.hpp
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#pragma once
#include "ini.hpp"
#include "definition.hpp"

#include <chrono>

#include <llarp/bootstrap.hpp>
#include <llarp/crypto/types.hpp>
#include <llarp/router_contact.hpp>
#include <llarp/util/fs.hpp>
#include <llarp/util/str.hpp>
#include <llarp/util/logging.hpp>
#include "ini.hpp"
#include "definition.hpp"
#include <llarp/constants/files.hpp>
#include <llarp/net/ip_address.hpp>
#include <llarp/net/net_int.hpp>
#include <llarp/net/ip_range_map.hpp>
#include <llarp/service/address.hpp>
#include <llarp/service/auth.hpp>
#include <llarp/dns/srv_data.hpp>

#include <llarp/router_contact.hpp>

#include <cstdlib>
Expand Down
4 changes: 2 additions & 2 deletions llarp/constants/version.cpp.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <constants/version.hpp>
#include <constants/proto.hpp>
#include <llarp/constants/version.hpp>
#include <llarp/constants/proto.hpp>

namespace llarp
{
Expand Down
2 changes: 1 addition & 1 deletion llarp/crypto/constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <cstdint>

#include <libntrup/ntru.h>
#include <llarp/crypto/ntru/ntru.h>

static constexpr uint32_t PUBKEYSIZE = 32;
static constexpr uint32_t SECKEYSIZE = 64;
Expand Down
2 changes: 1 addition & 1 deletion llarp/dns/rr.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "rr.hpp"
#include "dns.hpp"
#include "util/formattable.hpp"
#include <llarp/util/formattable.hpp>
#include <llarp/util/mem.hpp>
#include <llarp/util/logging.hpp>

Expand Down
2 changes: 1 addition & 1 deletion llarp/exit/session.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "exit_messages.hpp"
#include "service/protocol_type.hpp"
#include <llarp/service/protocol_type.hpp>
#include <llarp/net/ip_packet.hpp>
#include <llarp/path/pathbuilder.hpp>
#include <llarp/routing/transfer_traffic_message.hpp>
Expand Down
2 changes: 1 addition & 1 deletion llarp/handlers/exit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <llarp/router/i_rc_lookup_handler.hpp>

#include <cassert>
#include "service/protocol_type.hpp"
#include <llarp/service/protocol_type.hpp>

namespace llarp
{
Expand Down
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion llarp/messages/relay_commit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <llarp/crypto/encrypted_frame.hpp>
#include <llarp/crypto/types.hpp>
#include "link_message.hpp"
#include <llarp/messages/link_message.hpp>
#include <llarp/path/path_types.hpp>
#include <llarp/pow.hpp>

Expand Down
4 changes: 2 additions & 2 deletions llarp/path/pathbuilder.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "pathbuilder.hpp"
#include "path_context.hpp"

#include <llarp/crypto/crypto.hpp>
#include <llarp/messages/relay_commit.hpp>
#include <llarp/nodedb.hpp>
#include "path_context.hpp"
#include "util/logging.hpp"
#include <llarp/util/logging.hpp>
#include <llarp/profiling.hpp>
#include <llarp/router/abstractrouter.hpp>
#include <llarp/router/i_rc_lookup_handler.hpp>
Expand Down
2 changes: 1 addition & 1 deletion llarp/path/pathset.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "path_types.hpp"
#include "service/protocol_type.hpp"
#include <llarp/service/protocol_type.hpp>
#include <llarp/router_id.hpp>
#include <llarp/routing/message.hpp>
#include <llarp/service/intro_set.hpp>
Expand Down
4 changes: 3 additions & 1 deletion llarp/path/transit_hop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ namespace llarp
}

TransitHop::TransitHop()
: m_UpstreamGather(transit_hop_queue_size), m_DownstreamGather(transit_hop_queue_size)
: IHopHandler{}
, m_UpstreamGather{transit_hop_queue_size}
, m_DownstreamGather{transit_hop_queue_size}
{
m_UpstreamGather.enable();
m_DownstreamGather.enable();
Expand Down
4 changes: 2 additions & 2 deletions llarp/path/transit_hop.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include <llarp/constants/path.hpp>
#include "ihophandler.hpp"
#include "path_types.hpp"
#include <llarp/path/ihophandler.hpp>
#include <llarp/path/path_types.hpp>
#include <llarp/routing/handler.hpp>
#include <llarp/router_id.hpp>
#include <llarp/util/compare_ptr.hpp>
Expand Down
6 changes: 3 additions & 3 deletions llarp/quic/tunnel.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "tunnel.hpp"
#include "service/convotag.hpp"
#include "service/endpoint.hpp"
#include "service/name.hpp"
#include <llarp/service/convotag.hpp>
#include <llarp/service/endpoint.hpp>
#include <llarp/service/name.hpp>
#include "stream.hpp"
#include <limits>
#include <llarp/util/logging.hpp>
Expand Down
4 changes: 2 additions & 2 deletions llarp/router/route_poker.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "route_poker.hpp"
#include "abstractrouter.hpp"
#include "net/sock_addr.hpp"
#include <llarp/router/abstractrouter.hpp>
#include <llarp/net/sock_addr.hpp>
#include <llarp/service/context.hpp>
#include <llarp/dns/platform.hpp>
#include <unordered_set>
Expand Down
2 changes: 1 addition & 1 deletion llarp/service/convotag.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "convotag.hpp"
#include "net/ip.hpp"
#include <llarp/net/ip.hpp>

namespace llarp::service
{
Expand Down
21 changes: 10 additions & 11 deletions llarp/service/endpoint.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
#include <chrono>
#include <memory>
#include "endpoint.hpp"
#include "endpoint_state.hpp"
#include "endpoint_util.hpp"
#include "hidden_service_address_lookup.hpp"
#include "outbound_context.hpp"
#include "protocol.hpp"
#include "info.hpp"
#include "protocol_type.hpp"

#include <llarp/net/ip.hpp>
#include <llarp/dht/context.hpp>
#include <llarp/dht/key.hpp>
#include <llarp/dht/messages/findintro.hpp>
Expand All @@ -16,27 +24,18 @@
#include <llarp/router/abstractrouter.hpp>
#include <llarp/routing/dht_message.hpp>
#include <llarp/routing/path_transfer_message.hpp>
#include "endpoint_state.hpp"
#include "endpoint_util.hpp"
#include "hidden_service_address_lookup.hpp"
#include "net/ip.hpp"
#include "outbound_context.hpp"
#include "protocol.hpp"
#include "service/info.hpp"
#include "service/protocol_type.hpp"

#include <llarp/util/str.hpp>
#include <llarp/util/buffer.hpp>
#include <llarp/util/meta/memfn.hpp>
#include <llarp/link/link_manager.hpp>
#include <llarp/tooling/dht_event.hpp>
#include <llarp/quic/server.hpp>
#include <llarp/quic/tunnel.hpp>
#include <llarp/util/priority_queue.hpp>

#include <optional>
#include <utility>

#include <llarp/quic/server.hpp>
#include <llarp/quic/tunnel.hpp>
#include <uvw.hpp>
#include <variant>

Expand Down
29 changes: 16 additions & 13 deletions llarp/service/endpoint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,27 @@
#include <llarp/net/net.hpp>
#include <llarp/path/path.hpp>
#include <llarp/path/pathbuilder.hpp>
#include "address.hpp"
#include "handler.hpp"
#include "identity.hpp"
#include "pendingbuffer.hpp"
#include "protocol.hpp"
#include "sendcontext.hpp"
#include "service/protocol_type.hpp"
#include "session.hpp"
#include "lookup.hpp"
#include <llarp/util/compare_ptr.hpp>

// --- begin kitchen sink headers ----
#include <llarp/service/address.hpp>
#include <llarp/service/handler.hpp>
#include <llarp/service/identity.hpp>
#include <llarp/service/pendingbuffer.hpp>
#include <llarp/service/protocol.hpp>
#include <llarp/service/sendcontext.hpp>
#include <llarp/service/protocol_type.hpp>
#include <llarp/service/session.hpp>
#include <llarp/service/lookup.hpp>
#include <llarp/service/endpoint_types.hpp>
#include <llarp/endpoint_base.hpp>
#include <llarp/service/auth.hpp>
// ----- end kitchen sink headers -----

#include <optional>
#include <unordered_map>
#include <variant>
#include <oxenc/variant.h>
#include "endpoint_types.hpp"
#include "llarp/endpoint_base.hpp"

#include "auth.hpp"

#include <llarp/vpn/egres_packet_router.hpp>
#include <llarp/dns/server.hpp>
Expand Down
2 changes: 1 addition & 1 deletion llarp/service/intro.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "intro.hpp"
#include "util/time.hpp"
#include <llarp/util/time.hpp>

namespace llarp
{
Expand Down
9 changes: 4 additions & 5 deletions llarp/service/outbound_context.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
#include "outbound_context.hpp"

#include <llarp/router/abstractrouter.hpp>
#include "async_key_exchange.hpp"
#include "hidden_service_address_lookup.hpp"
#include "endpoint.hpp"
#include "endpoint_util.hpp"
#include "protocol_type.hpp"

#include <llarp/router/abstractrouter.hpp>
#include <llarp/nodedb.hpp>
#include <llarp/profiling.hpp>
#include <llarp/util/meta/memfn.hpp>

#include "endpoint_util.hpp"
#include "service/protocol_type.hpp"

#include <random>
#include <algorithm>

Expand Down
4 changes: 2 additions & 2 deletions llarp/tooling/router_hive.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include "router_event.hpp"

#include <llarp.hpp>
#include <config/config.hpp>
#include <tooling/hive_context.hpp>
#include <llarp/config/config.hpp>
#include <llarp/tooling/hive_context.hpp>

#include <vector>
#include <deque>
Expand Down
2 changes: 1 addition & 1 deletion llarp/vpn/win32.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "vpn/win32.hpp"
#include "win32.hpp"
#include <llarp/win32/windivert.hpp>
#include <llarp/win32/wintun.hpp>
#include <fmt/core.h>
Expand Down
3 changes: 2 additions & 1 deletion pybind/llarp/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#include <llarp/tooling/hive_context.hpp>
#include <llarp/router/router.hpp>
#include <llarp/handlers/pyhandler.hpp>
#include "service/protocol_type.hpp"
#include <llarp/service/protocol_type.hpp>

namespace llarp
{
void
Expand Down
4 changes: 0 additions & 4 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,4 @@ if(WIN32)
target_link_libraries(testAll PUBLIC ws2_32 iphlpapi shlwapi)
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
target_link_directories(testAll PRIVATE /usr/local/lib)
endif()

add_custom_target(check COMMAND testAll)
4 changes: 2 additions & 2 deletions test/check_main.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#define CATCH_CONFIG_RUNNER
#include <catch2/catch.hpp>

#include <util/logging.hpp>
#include <util/service_manager.hpp>
#include <llarp/util/logging.hpp>
#include <llarp/util/service_manager.hpp>

#ifdef _WIN32
#include <winsock2.h>
Expand Down
2 changes: 1 addition & 1 deletion test/config/test_llarp_config_definition.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <config/definition.hpp>
#include <llarp/config/definition.hpp>

#include <catch2/catch.hpp>

Expand Down
2 changes: 1 addition & 1 deletion test/config/test_llarp_config_ini.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <config/ini.hpp>
#include <llarp/config/ini.hpp>

#include <catch2/catch.hpp>

Expand Down
2 changes: 1 addition & 1 deletion test/config/test_llarp_config_output.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <config/definition.hpp>
#include <llarp/config/definition.hpp>

#include <catch2/catch.hpp>

Expand Down
2 changes: 1 addition & 1 deletion test/crypto/test_llarp_crypto.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <crypto/crypto_libsodium.hpp>
#include <llarp/crypto/crypto_libsodium.hpp>

#include <iostream>

Expand Down
4 changes: 2 additions & 2 deletions test/crypto/test_llarp_crypto_types.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include <crypto/types.hpp>
#include <llarp/crypto/types.hpp>

#include <fstream>
#include <string>

#include <test_util.hpp>
#include "test_util.hpp"
#include <catch2/catch.hpp>

extern "C" {
Expand Down
11 changes: 6 additions & 5 deletions test/crypto/test_llarp_key_manager.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#include <config/key_manager.hpp>
#include "llarp_test.hpp"
#include "test_util.hpp"

#include <crypto/crypto.hpp>
#include <crypto/crypto_libsodium.hpp>
#include <llarp_test.hpp>
#include <llarp/config/key_manager.hpp>

#include <llarp/crypto/crypto.hpp>
#include <llarp/crypto/crypto_libsodium.hpp>

#include <functional>
#include <random>

#include <string>
#include <test_util.hpp>
#include <catch2/catch.hpp>

using namespace ::llarp;
Expand Down
Loading

0 comments on commit 4508c59

Please sign in to comment.