mirror of https://github.com/oxen-io/lokinet
start working on onion routing parts
parent
ebbce7554c
commit
a947806b57
@ -0,0 +1,24 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"browse": {
|
||||
"path": [
|
||||
"${workspaceFolder}/llarp",
|
||||
"${workspaceFolder}/daemon",
|
||||
"${workspaceFolder}/include"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true
|
||||
},
|
||||
"includePath": [
|
||||
"${workspaceFolder}/include"
|
||||
],
|
||||
"defines": [],
|
||||
"compilerPath": "/usr/bin/clang",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17",
|
||||
"intelliSenseMode": "clang-x64"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "(gdb) Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "enter program name, for example ${workspaceFolder}/a.out",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
#ifndef LLARP_MESSAGES_HPP
|
||||
#define LLARP_MESSAGES_HPP
|
||||
|
||||
/**
|
||||
include shortcut for all link and routing messages
|
||||
*/
|
||||
|
||||
#include <llarp/messages/dht_immediate.hpp>
|
||||
#include <llarp/messages/discard.hpp>
|
||||
#include <llarp/messages/link_intro.hpp>
|
||||
#include <llarp/messages/relay.hpp>
|
||||
#include <llarp/messages/relay_ack.hpp>
|
||||
#include <llarp/messages/relay_commit.hpp>
|
||||
|
||||
#endif
|
@ -0,0 +1,38 @@
|
||||
#ifndef LLARP_MESSAGES_RELAY_HPP
|
||||
#define LLARP_MESSAGES_RELAY_HPP
|
||||
#include <llarp/link_message.hpp>
|
||||
|
||||
namespace llarp
|
||||
{
|
||||
struct RelayUpstreamMessage : public ILinkMessage
|
||||
{
|
||||
RelayUpstreamMessage(const RouterID& from);
|
||||
~RelayUpstreamMessage();
|
||||
|
||||
bool
|
||||
DecodeKey(llarp_buffer_t key, llarp_buffer_t* buf);
|
||||
|
||||
bool
|
||||
BEncode(llarp_buffer_t* buf) const;
|
||||
|
||||
bool
|
||||
HandleMessage(llarp_router* router) const;
|
||||
};
|
||||
|
||||
struct RelayDownstreamMessage : public ILinkMessage
|
||||
{
|
||||
RelayDownstreamMessage(const RouterID& from);
|
||||
~RelayDownstreamMessage();
|
||||
|
||||
bool
|
||||
DecodeKey(llarp_buffer_t key, llarp_buffer_t* buf);
|
||||
|
||||
bool
|
||||
BEncode(llarp_buffer_t* buf) const;
|
||||
|
||||
bool
|
||||
HandleMessage(llarp_router* router) const;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,24 @@
|
||||
#ifndef LLARP_MESSAGES_RELAY_ACK_HPP
|
||||
#define LLARP_MESSAGES_RELAY_ACK_HPP
|
||||
#include <llarp/link_message.hpp>
|
||||
|
||||
namespace llarp
|
||||
{
|
||||
struct LR_AckMessage : public ILinkMessage
|
||||
{
|
||||
LR_AckMessage(const RouterID& from);
|
||||
|
||||
~LR_AckMessage();
|
||||
|
||||
bool
|
||||
DecodeKey(llarp_buffer_t key, llarp_buffer_t* buf);
|
||||
|
||||
bool
|
||||
BEncode(llarp_buffer_t* buf) const;
|
||||
|
||||
bool
|
||||
HandleMessage(llarp_router* router) const;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,28 @@
|
||||
#include <llarp/messages/relay_ack.hpp>
|
||||
|
||||
namespace llarp
|
||||
{
|
||||
LR_AckMessage::LR_AckMessage(const RouterID & from) : ILinkMessage(from)
|
||||
{
|
||||
|
||||
}
|
||||
LR_AckMessage::~LR_AckMessage()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool LR_AckMessage::BEncode(llarp_buffer_t * buf) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LR_AckMessage::DecodeKey(llarp_buffer_t key, llarp_buffer_t * buf)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LR_AckMessage::HandleMessage(llarp_router * router) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
#include <llarp/messages/relay.hpp>
|
||||
|
||||
namespace llarp
|
||||
{
|
||||
RelayUpstreamMessage::RelayUpstreamMessage(const RouterID &from)
|
||||
: ILinkMessage(from)
|
||||
{
|
||||
}
|
||||
|
||||
RelayUpstreamMessage::~RelayUpstreamMessage()
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
RelayUpstreamMessage::BEncode(llarp_buffer_t *buf) const
|
||||
{
|
||||
// TODO: implement me
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
RelayUpstreamMessage::DecodeKey(llarp_buffer_t key, llarp_buffer_t *buf)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
RelayUpstreamMessage::HandleMessage(llarp_router *router) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
RelayDownstreamMessage::RelayDownstreamMessage(const RouterID &from)
|
||||
: ILinkMessage(from)
|
||||
{
|
||||
}
|
||||
|
||||
RelayDownstreamMessage::~RelayDownstreamMessage()
|
||||
{
|
||||
}
|
||||
bool
|
||||
RelayDownstreamMessage::BEncode(llarp_buffer_t *buf) const
|
||||
{
|
||||
// TODO: implement me
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
RelayDownstreamMessage::DecodeKey(llarp_buffer_t key, llarp_buffer_t *buf)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
RelayDownstreamMessage::HandleMessage(llarp_router *router) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue