Produce hierarchy of 'libraries' inside libllarp

pull/223/head
Michael 5 years ago
parent 11257e7b4d
commit 6e38e85a79
No known key found for this signature in database
GPG Key ID: 2D51757B47E2434C

@ -292,12 +292,14 @@ endif(NOT WIN32)
set(LIB_UTIL_SRC
llarp/constants/defaults.cpp
llarp/constants/link_layer.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/codel.cpp
llarp/util/common.cpp
llarp/util/encode.cpp
llarp/util/endian.cpp
@ -490,18 +492,18 @@ set(LIB_SRC
${EV_SRC}
${UTP_SRC}
llarp/address_info.cpp
llarp/codel.cpp
llarp/config.cpp
llarp/context.cpp
llarp/crypto/constants.cpp
llarp/crypto/crypto.cpp
llarp/crypto/crypto_libsodium.cpp
llarp/crypto/encrypted.cpp
llarp/crypto/types.cpp
llarp/dht.cpp
llarp/dht/bucket.cpp
llarp/dht/context.cpp
llarp/dht/decode.cpp
llarp/dht/dht_immediate.cpp
llarp/dht/dht.cpp
llarp/dht/find_intro.cpp
llarp/dht/find_router.cpp
llarp/dht/got_intro.cpp
@ -520,8 +522,6 @@ set(LIB_SRC
llarp/dns.cpp
llarp/dnsc.cpp
llarp/dnsd.cpp
llarp/encrypted.cpp
llarp/encrypted_ack.cpp
llarp/encrypted_frame.cpp
llarp/establish_job.cpp
llarp/exit/close_exit.cpp
@ -546,7 +546,6 @@ set(LIB_SRC
llarp/link/session.cpp
llarp/link/utp.cpp
llarp/link_intro.cpp
llarp/link_layer.cpp
llarp/link_message.cpp
llarp/messages/dht.cpp
llarp/messages/dht_immediate.cpp

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 KiB

@ -0,0 +1,109 @@
digraph {
constants -> util;
util -> constants;
util -> win32;
android -> linux;
crypto -> constants;
crypto -> llarp;
crypto -> util;
dht -> crypto;
dht -> messages;
dht -> llarp;
dht -> path;
dht -> routing;
dht -> service;
dht -> util;
dns -> crypto;
dns -> ev;
dns -> handlers;
dns -> llarp;
dns -> net;
dns -> service;
dns -> util;
ev -> net;
ev -> util;
ev -> win32;
exit -> crypto;
exit -> handlers;
exit -> llarp;
exit -> messages;
exit -> path;
exit -> routing;
exit -> util;
handlers -> dns;
handlers -> ev;
handlers -> exit;
handlers -> llarp;
handlers -> net;
handlers -> service;
handlers -> util;
link -> constants;
link -> crypto;
link -> ev;
link -> linux;
link -> messages;
link -> net;
link -> util;
linux -> util;
messages -> crypto;
messages -> dht;
messages -> exit;
messages -> llarp;
messages -> path;
messages -> routing;
messages -> service;
messages -> util;
net -> android;
net -> llarp;
net -> util;
path -> crypto;
path -> dht;
path -> llarp;
path -> messages;
path -> routing;
path -> service;
path -> util;
routing -> llarp;
routing -> messages;
routing -> path;
routing -> util;
service -> crypto;
service -> dht;
service -> ev;
service -> exit;
service -> handlers;
service -> messages;
service -> net;
service -> path;
service -> routing;
service -> util;
llarp -> constants;
llarp -> crypto;
llarp -> dht;
llarp -> dns;
llarp -> ev;
llarp -> exit;
llarp -> handlers;
llarp -> link;
llarp -> messages;
llarp -> net;
llarp -> path;
llarp -> routing;
llarp -> util;
}

@ -22,7 +22,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "ifaddrs.h"
#include <android/ifaddrs.h>
#include <string.h>
#include <stdlib.h>

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

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

@ -0,0 +1 @@
#include <crypto/encrypted.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_ENCCRYPTED_HPP
#define LLARP_ENCCRYPTED_HPP
#ifndef LLARP_ENCRYPTED_HPP
#define LLARP_ENCRYPTED_HPP
#include <link_layer.hpp>
#include <constants/link_layer.hpp>
#include <util/aligned.hpp>
#include <util/bencode.h>
#include <util/buffer.h>

@ -1,8 +1,8 @@
#ifndef LLARP_DHT_CONTEXT_HPP
#define LLARP_DHT_CONTEXT_HPP
#include <dht.h>
#include <dht/bucket.hpp>
#include <dht/dht.h>
#include <dht/key.hpp>
#include <dht/message.hpp>
#include <dht/messages/findintro.hpp>

@ -1,6 +1,6 @@
#include <dht.h>
#include <dht/context.hpp>
#include "router_contact.hpp"
#include <dht/dht.h>
#include <router_contact.hpp>
llarp_dht_context::llarp_dht_context(llarp::Router *router)
{

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

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

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

@ -1,12 +0,0 @@
#ifndef LLARP_ENCRYPTED_ACK_HPP
#define LLARP_ENCRYPTED_ACK_HPP
#include <encrypted.hpp>
namespace llarp
{
struct Crypto;
} // namespace llarp
#endif

@ -1,8 +1,8 @@
#ifndef LLARP_ENCRYPTED_FRAME_HPP
#define LLARP_ENCRYPTED_FRAME_HPP
#include <crypto/encrypted.hpp>
#include <crypto/types.hpp>
#include <encrypted.hpp>
#include <util/buffer.hpp>
#include <util/mem.h>
#include <util/threadpool.h>

@ -2,8 +2,8 @@
#define LLARP_EV_HPP
#include <ev/ev.h>
#include <codel.hpp>
#include <util/buffer.h>
#include <util/codel.hpp>
#include <util/threading.hpp>
// writev

@ -1,11 +1,13 @@
#ifndef EV_WIN32_HPP
#define EV_WIN32_HPP
#include <buffer.h>
#include <ev/ev.hpp>
#include <util/logger.hpp>
#include <net/net.h>
#include <net/net.hpp>
#include <util/buffer.h>
#include <util/logger.hpp>
#include <windows.h>
#include <process.h>

@ -1,5 +1,5 @@
#include <link_layer.hpp>
#include <messages/exit.hpp>
#include <routing/handler.hpp>
namespace llarp

@ -1,12 +1,12 @@
#ifndef LLARP_HANDLERS_TUN_HPP
#define LLARP_HANDLERS_TUN_HPP
#include <codel.hpp>
#include <dns/server.hpp>
#include <ev/ev.h>
#include <ip.hpp>
#include <net/net.hpp>
#include <service/endpoint.hpp>
#include <util/codel.hpp>
#include <util/threading.hpp>
namespace llarp

@ -76,6 +76,8 @@ typedef struct ip_hdr
#include <memory>
struct llarp_ev_loop;
namespace llarp
{
namespace net

@ -1,11 +1,11 @@
#ifndef LLARP_LINK_IWP_INTERNAL_HPP
#define LLARP_LINK_IWP_INTERNAL_HPP
#include <constants/link_layer.hpp>
#include <crypto/crypto.hpp>
#include <crypto/types.hpp>
#include <link/server.hpp>
#include <link/session.hpp>
#include <link_layer.hpp>
#include <bitset>
#include <deque>

@ -1,8 +1,8 @@
#ifndef LLARP_LINK_UTP_INTERNAL_HPP
#define LLARP_LINK_UTP_INTERNAL_HPP
#include <constants/link_layer.hpp>
#include <crypto/types.hpp>
#include <link_layer.hpp>
#include <link/utp.hpp>
#include <util/aligned.hpp>
#include <utp.h>

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

@ -15,11 +15,11 @@
#include <cstring>
#include <fstream>
#include <linux/netns.hpp>
#include <logger.hpp>
#include <util/logger.hpp>
#ifndef MS_REC
#define MS_REC (16384)
#endif
#include "fs.hpp"
#include <util/fs.hpp>
namespace llarp
{

@ -1,8 +1,8 @@
#ifndef LLARP_MESSAGES_PATH_TRANSFER_HPP
#define LLARP_MESSAGES_PATH_TRANSFER_HPP
#include <crypto/encrypted.hpp>
#include <crypto/types.hpp>
#include <encrypted.hpp>
#include <routing/message.hpp>
#include <service/protocol.hpp>

@ -1,8 +1,8 @@
#ifndef LLARP_MESSAGES_RELAY_HPP
#define LLARP_MESSAGES_RELAY_HPP
#include <crypto/encrypted.hpp>
#include <crypto/types.hpp>
#include <encrypted.hpp>
#include <link_message.hpp>
#include <path/path_types.hpp>

@ -2,7 +2,6 @@
#define LLARP_RELAY_COMMIT_HPP
#include <crypto/types.hpp>
#include <encrypted_ack.hpp>
#include <encrypted_frame.hpp>
#include <link_message.hpp>
#include <path/path_types.hpp>

@ -1,7 +1,7 @@
#ifndef LLARP_MESSAGES_TRANSFER_TRAFFIC_HPP
#define LLARP_MESSAGES_TRANSFER_TRAFFIC_HPP
#include <encrypted.hpp>
#include <crypto/encrypted.hpp>
#include <routing/message.hpp>
#include <vector>
@ -18,7 +18,8 @@ namespace llarp
std::vector< llarp::Encrypted< MaxExitMTU + ExitOverhead > > X;
size_t _size = 0;
void Clear() override
void
Clear() override
{
X.clear();
_size = 0;

@ -1,7 +1,9 @@
#include <net/net.hpp>
#ifdef ANDROID
#include "android/ifaddrs.h"
#include <android/ifaddrs.h>
#endif
#ifndef _WIN32
#include <arpa/inet.h>
#ifndef ANDROID
@ -9,6 +11,7 @@
#endif
#include <net/if.h>
#endif
#include <net/net_addr.hpp>
#include <util/logger.hpp>
#include <util/str.hpp>

@ -2,13 +2,12 @@
#define LLARP_ROUTER_HPP
#include <config.h>
#include <constants/link_layer.hpp>
#include <crypto/types.hpp>
#include <dht.h>
#include <establish_job.hpp>
#include <ev/ev.h>
#include <exit/context.hpp>
#include <handlers/tun.hpp>
#include <link_layer.hpp>
#include <link_message_parser.hpp>
#include <nodedb.hpp>
#include <path/path.hpp>
@ -32,7 +31,8 @@
#include <unordered_map>
#include <set>
namespace llarp {
namespace llarp
{
struct Crypto;
}

@ -1,7 +1,6 @@
#ifndef LLARP_SERVICE_ENDPOINT_HPP
#define LLARP_SERVICE_ENDPOINT_HPP
#include <codel.hpp>
#include <ev/ev.h>
#include <exit/session.hpp>
#include <net/net.hpp>

@ -1,9 +1,9 @@
#ifndef LLARP_SERVICE_PROTOCOL_HPP
#define LLARP_SERVICE_PROTOCOL_HPP
#include <crypto/encrypted.hpp>
#include <crypto/types.hpp>
#include <dht/message.hpp>
#include <encrypted.hpp>
#include <routing/message.hpp>
#include <service/Identity.hpp>
#include <service/Info.hpp>

@ -0,0 +1 @@
#include <util/codel.hpp>
Loading…
Cancel
Save