1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

Fix includes/forward declarations

This commit is contained in:
sachaaaaa 2018-07-09 14:26:27 +10:00
parent 6f055eca4f
commit 661f050636
6 changed files with 36 additions and 21 deletions

View file

@ -7,6 +7,10 @@
#include <queue>
#include <vector>
struct llarp_router;
struct llarp_link_session;
struct llarp_link_session_iter;
namespace llarp
{
struct ILinkMessage;

View file

@ -4,7 +4,11 @@
#include <llarp/threadpool.h>
#include <llarp/timer.h>
struct llarp_logic;
struct llarp_logic
{
struct llarp_threadpool* thread;
struct llarp_timer_context* timer;
};
struct llarp_logic*
llarp_init_logic();

View file

@ -1,6 +1,8 @@
#ifndef LLARP_CODEL_QUEUE_HPP
#define LLARP_CODEL_QUEUE_HPP
#include <llarp/time.h>
#include "llarp/logger.hpp"
#include <cmath>
#include <functional>
#include <mutex>

View file

@ -1,6 +1,7 @@
#include <llarp/router_contact.h>
#include <llarp/messages.hpp>
#include "buffer.hpp"
#include "llarp/iwp/session.hpp"
#include "logger.hpp"
#include "router.hpp"
@ -53,8 +54,8 @@ namespace llarp
switch(*strbuf.cur)
{
case 'i':
handler->msg = new LinkIntroMessage(
handler->from->get_remote_router(handler->from));
handler->msg =
new LinkIntroMessage(handler->from->get_remote_router());
break;
case 'd':
handler->msg = new RelayDownstreamMessage(handler->GetCurrentFrom());
@ -90,7 +91,7 @@ namespace llarp
RouterID
InboundMessageParser::GetCurrentFrom()
{
auto rc = from->get_remote_router(from);
auto rc = from->get_remote_router();
return rc->pubkey;
}

View file

@ -1,10 +1,11 @@
#include "router.hpp"
#include <llarp/iwp.h>
#include <llarp/link.h>
#include <llarp/proto.h>
#include <llarp/router.h>
#include <llarp/link_message.hpp>
#include <llarp/messages/discard.hpp>
#include "llarp/iwp/establish_job.hpp"
#include "llarp/iwp/server.hpp"
#include "llarp/iwp/session.hpp"
#include "buffer.hpp"
#include "encode.hpp"

View file

@ -2,7 +2,6 @@
#define LLARP_ROUTER_HPP
#include <llarp/dht.h>
#include <llarp/nodedb.h>
#include <llarp/router.h>
#include <llarp/router_contact.h>
#include <llarp/path.hpp>
@ -14,27 +13,31 @@
#include <llarp/dht.hpp>
#include <llarp/link_message.hpp>
#include <llarp/routing/handler.hpp>
#include "llarp/iwp/establish_job.hpp"
#include "crypto.hpp"
#include "fs.hpp"
#include "mem.hpp"
namespace llarp
{
struct try_connect_ctx
{
llarp_router *router = nullptr;
llarp_ai addr;
};
/** 2^15 bytes */
#define MAX_LINK_MSG_SIZE (32768)
// forward declare
namespace path
{
struct TransitHop;
}
} // namespace llarp
// TODO: unused. remove?
// struct try_connect_ctx
// {
// llarp_router *router = nullptr;
// llarp_ai addr;
// };
// // forward declare
// namespace path
// {
// struct TransitHop;
// }
struct llarp_link;
struct llarp_link_session_iter;
/// c++
bool
llarp_findOrCreateEncryption(llarp_crypto *crypto, const char *fpath,
llarp::SecretKey *encryption);