diff --git a/include/llarp.h b/include/llarp.h index ed6bfcae3..c8e6a44c4 100644 --- a/include/llarp.h +++ b/include/llarp.h @@ -8,8 +8,8 @@ #ifdef __cplusplus #include // for handlers -#include // for service::address -#include +#include // for service::address +#include extern "C" { diff --git a/include/llarp/dns_dotlokilookup.hpp b/include/llarp/dns_dotlokilookup.hpp index 2eb70cf72..6854bf71c 100644 --- a/include/llarp/dns_dotlokilookup.hpp +++ b/include/llarp/dns_dotlokilookup.hpp @@ -1,9 +1,9 @@ #ifndef LIBLLARP_DNS_DOTLOKILOOKUP_HPP #define LIBLLARP_DNS_DOTLOKILOOKUP_HPP -#include +#include +#include -#include "dnsd.hpp" using map_address_hook_func = std::function< bool(const byte_t *addr, bool isSNode, uint32_t ip) >; diff --git a/include/llarp/dns_iptracker.hpp b/include/llarp/dns_iptracker.hpp index 13bb451b4..b2c9f882d 100644 --- a/include/llarp/dns_iptracker.hpp +++ b/include/llarp/dns_iptracker.hpp @@ -1,11 +1,12 @@ #ifndef LIBLLARP_DNSIPTRACKER_HPP #define LIBLLARP_DNSIPTRACKER_HPP +#include #include +#include + #include #include -#include -#include "dns_dotlokilookup.hpp" // either a request or response? // neither, it's a result set row diff --git a/include/llarp/messages/path_transfer.hpp b/include/llarp/messages/path_transfer.hpp index ac7378c37..f4a150ee2 100644 --- a/include/llarp/messages/path_transfer.hpp +++ b/include/llarp/messages/path_transfer.hpp @@ -3,8 +3,8 @@ #include #include -#include #include +#include namespace llarp { diff --git a/include/llarp/path.hpp b/include/llarp/path.hpp index 542527c9b..552764239 100644 --- a/include/llarp/path.hpp +++ b/include/llarp/path.hpp @@ -10,11 +10,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include diff --git a/include/llarp/pathset.hpp b/include/llarp/pathset.hpp index 27c1135bc..94c0f182b 100644 --- a/include/llarp/pathset.hpp +++ b/include/llarp/pathset.hpp @@ -4,10 +4,10 @@ #include #include #include -#include -#include #include #include +#include +#include #include #include diff --git a/include/llarp/service.hpp b/include/llarp/service.hpp deleted file mode 100644 index c8854d8af..000000000 --- a/include/llarp/service.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef LLARP_SERVICE_HPP -#define LLARP_SERVICE_HPP -#include -#include -#include -#include -#include -#include -#include -#include - -#endif \ No newline at end of file diff --git a/include/llarp/service/types.hpp b/include/llarp/service/types.hpp deleted file mode 100644 index eb338b775..000000000 --- a/include/llarp/service/types.hpp +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef LLARP_SERVICE_TYPES_HPP -#define LLARP_SERVICE_TYPES_HPP -#include -#include - -#endif \ No newline at end of file diff --git a/llarp/context.cpp b/llarp/context.cpp index 6e1d09e53..08aac2a51 100644 --- a/llarp/context.cpp +++ b/llarp/context.cpp @@ -464,7 +464,6 @@ extern "C" return nullptr; } - //#include bool main_router_endpoint_iterator( struct llarp_main *ptr, struct llarp::service::Context::endpoint_iter &i) diff --git a/llarp/dht/context.hpp b/llarp/dht/context.hpp index 1716968b2..8a06d7c8d 100644 --- a/llarp/dht/context.hpp +++ b/llarp/dht/context.hpp @@ -7,8 +7,8 @@ #include #include #include -#include #include +#include #include diff --git a/llarp/dht/messages/findintro.hpp b/llarp/dht/messages/findintro.hpp index d58d39efd..1dd193934 100644 --- a/llarp/dht/messages/findintro.hpp +++ b/llarp/dht/messages/findintro.hpp @@ -2,9 +2,9 @@ #define LLARP_DHT_MESSAGES_FIND_INTRO_HPP #include -#include -#include #include +#include +#include namespace llarp { diff --git a/llarp/dht/messages/gotintro.hpp b/llarp/dht/messages/gotintro.hpp index e9acad1ba..c398f3969 100644 --- a/llarp/dht/messages/gotintro.hpp +++ b/llarp/dht/messages/gotintro.hpp @@ -1,7 +1,9 @@ #ifndef LLARP_DHT_MESSAGES_GOT_INTRO_HPP #define LLARP_DHT_MESSAGES_GOT_INTRO_HPP + #include -#include +#include + #include namespace llarp diff --git a/llarp/dht/messages/pubintro.hpp b/llarp/dht/messages/pubintro.hpp index 74e2602b0..d5447f63a 100644 --- a/llarp/dht/messages/pubintro.hpp +++ b/llarp/dht/messages/pubintro.hpp @@ -1,7 +1,8 @@ #ifndef LLARP_DHT_MESSAGES_PUB_INTRO_HPP #define LLARP_DHT_MESSAGES_PUB_INTRO_HPP #include -#include +#include + #include namespace llarp diff --git a/llarp/dht/node.hpp b/llarp/dht/node.hpp index 25ef1d0ec..2fcef3972 100644 --- a/llarp/dht/node.hpp +++ b/llarp/dht/node.hpp @@ -2,8 +2,8 @@ #define LLARP_DHT_NODE_HPP #include -#include #include +#include namespace llarp { diff --git a/llarp/dns_dotlokilookup.cpp b/llarp/dns_dotlokilookup.cpp index 94f6a0a74..855e928e2 100644 --- a/llarp/dns_dotlokilookup.cpp +++ b/llarp/dns_dotlokilookup.cpp @@ -1,7 +1,7 @@ #include #include -#include #include +#include std::string const default_chars = "abcdefghijklmnaoqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; diff --git a/llarp/handlers/null.hpp b/llarp/handlers/null.hpp index 79bbbca80..061da8850 100644 --- a/llarp/handlers/null.hpp +++ b/llarp/handlers/null.hpp @@ -1,6 +1,7 @@ #ifndef LLARP_HANDLERS_NULL_HPP #define LLARP_HANDLERS_NULL_HPP -#include + +#include namespace llarp { diff --git a/llarp/handlers/tun.hpp b/llarp/handlers/tun.hpp index 7d83f9b9b..7eb64109f 100644 --- a/llarp/handlers/tun.hpp +++ b/llarp/handlers/tun.hpp @@ -1,12 +1,13 @@ #ifndef LLARP_HANDLERS_TUN_HPP #define LLARP_HANDLERS_TUN_HPP -#include + +#include #include +#include #include -#include -#include -#include #include +#include +#include namespace llarp { diff --git a/llarp/router.hpp b/llarp/router.hpp index 2dfb655ef..782db5906 100644 --- a/llarp/router.hpp +++ b/llarp/router.hpp @@ -18,10 +18,10 @@ #include #include #include -#include #include #include #include +#include #include #include diff --git a/llarp/service.cpp b/llarp/service.cpp index 60cf09878..a2d3dae2b 100644 --- a/llarp/service.cpp +++ b/llarp/service.cpp @@ -1,7 +1,7 @@ -#include -#include "buffer.hpp" -#include "fs.hpp" -#include "ini.hpp" +#include +#include +#include +#include namespace llarp { diff --git a/llarp/service.hpp b/llarp/service.hpp new file mode 100644 index 000000000..28f8207ee --- /dev/null +++ b/llarp/service.hpp @@ -0,0 +1,14 @@ +#ifndef LLARP_SERVICE_HPP +#define LLARP_SERVICE_HPP + +#include +#include +#include +#include +#include +#include +#include + +#include + +#endif diff --git a/include/llarp/service/Identity.hpp b/llarp/service/Identity.hpp similarity index 91% rename from include/llarp/service/Identity.hpp rename to llarp/service/Identity.hpp index 420d86e06..f55de902e 100644 --- a/include/llarp/service/Identity.hpp +++ b/llarp/service/Identity.hpp @@ -1,10 +1,11 @@ #ifndef LLARP_SERVICE_IDENTITY_HPP #define LLARP_SERVICE_IDENTITY_HPP -#include + #include -#include -#include -#include +#include +#include +#include +#include namespace llarp { diff --git a/include/llarp/service/Info.hpp b/llarp/service/Info.hpp similarity index 98% rename from include/llarp/service/Info.hpp rename to llarp/service/Info.hpp index f38e099ce..292f3f134 100644 --- a/include/llarp/service/Info.hpp +++ b/llarp/service/Info.hpp @@ -1,8 +1,9 @@ #ifndef LLARP_SERVICE_INFO_HPP #define LLARP_SERVICE_INFO_HPP -#include + #include -#include +#include +#include namespace llarp { diff --git a/include/llarp/service/Intro.hpp b/llarp/service/Intro.hpp similarity index 100% rename from include/llarp/service/Intro.hpp rename to llarp/service/Intro.hpp diff --git a/include/llarp/service/IntroSet.hpp b/llarp/service/IntroSet.hpp similarity index 97% rename from include/llarp/service/IntroSet.hpp rename to llarp/service/IntroSet.hpp index 9677b7f79..5415b5b25 100644 --- a/include/llarp/service/IntroSet.hpp +++ b/llarp/service/IntroSet.hpp @@ -1,16 +1,16 @@ #ifndef LLARP_SERVICE_INTROSET_HPP #define LLARP_SERVICE_INTROSET_HPP -#include -#include -#include #include +#include #include -#include -#include -#include +#include +#include +#include +#include -#include #include +#include +#include namespace llarp { diff --git a/llarp/service/address.cpp b/llarp/service/address.cpp index c1ed792e5..3622487fa 100644 --- a/llarp/service/address.cpp +++ b/llarp/service/address.cpp @@ -1,5 +1,6 @@ +#include + #include -#include namespace llarp { diff --git a/include/llarp/service/address.hpp b/llarp/service/address.hpp similarity index 100% rename from include/llarp/service/address.hpp rename to llarp/service/address.hpp diff --git a/include/llarp/service/config.hpp b/llarp/service/config.hpp similarity index 100% rename from include/llarp/service/config.hpp rename to llarp/service/config.hpp diff --git a/llarp/service/context.cpp b/llarp/service/context.cpp index ea881eb44..4d16a9100 100644 --- a/llarp/service/context.cpp +++ b/llarp/service/context.cpp @@ -1,7 +1,7 @@ -#include #include -#include -#include +#include +#include +#include namespace llarp { diff --git a/include/llarp/service/context.hpp b/llarp/service/context.hpp similarity index 96% rename from include/llarp/service/context.hpp rename to llarp/service/context.hpp index 6b44d6e22..fce6651f0 100644 --- a/include/llarp/service/context.hpp +++ b/llarp/service/context.hpp @@ -1,9 +1,10 @@ #ifndef LLARP_SERVICE_CONTEXT_HPP #define LLARP_SERVICE_CONTEXT_HPP + #include #include -#include -#include +#include +#include #include diff --git a/llarp/service/endpoint.cpp b/llarp/service/endpoint.cpp index b33a4f089..b4359ec49 100644 --- a/llarp/service/endpoint.cpp +++ b/llarp/service/endpoint.cpp @@ -1,11 +1,10 @@ - +#include #include #include #include -#include -#include -#include "buffer.hpp" -#include "router.hpp" +#include +#include +#include namespace llarp { diff --git a/include/llarp/service/endpoint.hpp b/llarp/service/endpoint.hpp similarity index 99% rename from include/llarp/service/endpoint.hpp rename to llarp/service/endpoint.hpp index 17db05b40..d38c9b5dc 100644 --- a/include/llarp/service/endpoint.hpp +++ b/llarp/service/endpoint.hpp @@ -1,14 +1,15 @@ #ifndef LLARP_SERVICE_ENDPOINT_HPP #define LLARP_SERVICE_ENDPOINT_HPP + #include #include #include #include #include #include -#include -#include -#include +#include +#include +#include // minimum time between interoset shifts #ifndef MIN_SHIFT_INTERVAL diff --git a/include/llarp/service/handler.hpp b/llarp/service/handler.hpp similarity index 97% rename from include/llarp/service/handler.hpp rename to llarp/service/handler.hpp index fd2ba65e2..fa4ac91fa 100644 --- a/include/llarp/service/handler.hpp +++ b/llarp/service/handler.hpp @@ -1,9 +1,10 @@ #ifndef LLARP_SERVICE_HANDLER_HPP #define LLARP_SERVICE_HANDLER_HPP -#include + #include -#include +#include #include +#include namespace llarp { diff --git a/llarp/service/info.cpp b/llarp/service/info.cpp index d2f9c3b62..347b53bec 100644 --- a/llarp/service/info.cpp +++ b/llarp/service/info.cpp @@ -1,9 +1,11 @@ +#include +#include +#include + #include -#include -#include -#include "buffer.hpp" #include + namespace llarp { namespace service diff --git a/llarp/service/lookup.cpp b/llarp/service/lookup.cpp index 0a00c80fa..e8ca7983e 100644 --- a/llarp/service/lookup.cpp +++ b/llarp/service/lookup.cpp @@ -1,7 +1,7 @@ #include -#include -#include #include +#include +#include namespace llarp { diff --git a/include/llarp/service/lookup.hpp b/llarp/service/lookup.hpp similarity index 97% rename from include/llarp/service/lookup.hpp rename to llarp/service/lookup.hpp index 9df180dc9..dadb91e56 100644 --- a/include/llarp/service/lookup.hpp +++ b/llarp/service/lookup.hpp @@ -1,8 +1,8 @@ #ifndef LLARP_SERVICE_LOOKUP_HPP #define LLARP_SERVICE_LOOKUP_HPP -#include #include +#include #include diff --git a/llarp/service/protocol.cpp b/llarp/service/protocol.cpp index 8647d7045..b88f74e56 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/include/llarp/service/protocol.hpp b/llarp/service/protocol.hpp similarity index 95% rename from include/llarp/service/protocol.hpp rename to llarp/service/protocol.hpp index 88c709128..8437fd418 100644 --- a/include/llarp/service/protocol.hpp +++ b/llarp/service/protocol.hpp @@ -5,12 +5,12 @@ #include #include #include -#include -#include -#include -#include #include #include +#include +#include +#include +#include #include diff --git a/llarp/service/tag.cpp b/llarp/service/tag.cpp index 81d345967..9486699c7 100644 --- a/llarp/service/tag.cpp +++ b/llarp/service/tag.cpp @@ -1,4 +1,4 @@ -#include +#include namespace llarp { @@ -10,4 +10,4 @@ namespace llarp return std::string((const char *)data()); } } // namespace service -} // namespace llarp \ No newline at end of file +} // namespace llarp diff --git a/include/llarp/service/tag.hpp b/llarp/service/tag.hpp similarity index 100% rename from include/llarp/service/tag.hpp rename to llarp/service/tag.hpp diff --git a/llarp/service/types.hpp b/llarp/service/types.hpp new file mode 100644 index 000000000..17a71ed49 --- /dev/null +++ b/llarp/service/types.hpp @@ -0,0 +1,6 @@ +#ifndef LLARP_SERVICE_TYPES_HPP +#define LLARP_SERVICE_TYPES_HPP +#include +#include + +#endif diff --git a/include/llarp/service/vanity.hpp b/llarp/service/vanity.hpp similarity index 100% rename from include/llarp/service/vanity.hpp rename to llarp/service/vanity.hpp diff --git a/test/hiddenservice_unittest.cpp b/test/hiddenservice_unittest.cpp index 19cb60ae2..6c7849eb7 100644 --- a/test/hiddenservice_unittest.cpp +++ b/test/hiddenservice_unittest.cpp @@ -1,7 +1,7 @@ #include -#include #include +#include struct HiddenServiceTest : public ::testing::Test {