Commit Graph

262 Commits (8b321612da4e129b8eee4e02af755184d2405fe9)

Author SHA1 Message Date
Jeff Becker 4375df2f7d
add forgotten files for generating docs 4 years ago
Jeff Becker 3e7acb72e1
more docs, make doxygen work 4 years ago
Stephen Shelton 8a12da8bd5
Remove some .cpp files related to RouterEvents
The motivation is to reduce the raw amount of code required to create
and maintain events.
4 years ago
Thomas Winget c8c66f0a5f some refactoring of tooling code, added RCGossipReceivedEvent 4 years ago
Thomas Winget 88c80dc2ee add cxxopts to shared_lib dependencies 4 years ago
Jeff Becker e7689b40a7 dht pub intro message router event thiny doo 4 years ago
Thomas Winget f712acc486 huzzah it builds, time to test soon! 4 years ago
Jeff Becker da79b14703 make it compile 4 years ago
Thomas Winget 8dc5dabe49 working toward compilation, still has include issue 4 years ago
Jeff Becker 1fdb8b4c94 initial pybind11 introspection code 4 years ago
Jeff Becker f4520ac920
make decaying hashset use llarp::Time_t and move unit tests to use catch2 4 years ago
Jason Rhinelander 0839c16f19 Final abseil purge
Bye-bye Google Boost.
4 years ago
Jason Rhinelander 54186c4a89 Replace absl string_view with string_view from lokimq
When we add loki-mq has a dependency we can just alias it, but for now
it's easier to copy the header than add the whole submodule library.
4 years ago
Jason Rhinelander 2e9840ea39 Replace abseil date code with Hinnart's date.h
Howard Hinnart's date.h is the library that was accepted as C++20
date/calendar support, so this is essentially a backport of C++20 date
time support.

(It does support timezone support, but requires more of the library and
that seems like overkill for what we need; this just prints UTC
timestamps instead, which need only a header-only include).
4 years ago
Jason Rhinelander f84ce61d66 Removed empty cpp files
These aren't needed: CMake already knows how to follow #includes and
rebuild when headers change as long as the headers are included
*somewhere*.  The extra .cpp files here just require building a bunch of
.cpp files with just header content that we just end up throw away
during linking (since the same things will also be compiled in whatever
other compilation units include the same headers).
4 years ago
Jason Rhinelander fe61367a87 Vastly simplified llarp::util::memFn
There is a huge pile of unnecessary machinery here that can be solved
with a few lambdas and some member function pointer type deduction.
4 years ago
Jason Rhinelander b4440094b0 De-abseil, part 2: mutex, locks, (most) time
- util::Mutex is now a std::shared_timed_mutex, which is capable of
  exclusive and shared locks.

- util::Lock is still present as a std::lock_guard<util::Mutex>.

- the locking annotations are preserved, but updated to the latest
  supported by clang rather than using abseil's older/deprecated ones.

- ACQUIRE_LOCK macro is gone since we don't pass mutexes by pointer into
  locks anymore (WTF abseil).

- ReleasableLock is gone.  Instead there are now some llarp::util helper
  methods to obtain unique and/or shared locks:
    - `auto lock = util::unique_lock(mutex);` gets an RAII-but-also
      unlockable object (std::unique_lock<T>, with T inferred from
      `mutex`).
    - `auto lock = util::shared_lock(mutex);` gets an RAII shared (i.e.
      "reader") lock of the mutex.
    - `auto lock = util::unique_locks(mutex1, mutex2, mutex3);` can be
      used to atomically lock multiple mutexes at once (returning a
      tuple of the locks).
  This are templated on the mutex which makes them a bit more flexible
  than using a concrete type: they can be used for any type of lockable
  mutex, not only util::Mutex.  (Some of the code here uses them for
  getting locks around a std::mutex).  Until C++17, using the RAII types
  is painfully verbose:

  ```C++
  // pre-C++17 - needing to figure out the mutex type here is annoying:
  std::unique_lock<util::Mutex> lock(mutex);
  // pre-C++17 and even more verbose (but at least the type isn't needed):
  std::unique_lock<decltype(mutex)> lock(mutex);
  // our compromise:
  auto lock = util::unique_lock(mutex);
  // C++17:
  std::unique_lock lock(mutex);
  ```

  All of these functions will also warn (under gcc or clang) if you
  discard the return value.  You can also do fancy things like
  `auto l = util::unique_lock(mutex, std::adopt_lock)` (which lets a
  lock take over an already-locked mutex).

- metrics code is gone, which also removes a big pile of code that was
  only used by metrics:
  - llarp::util::Scheduler
  - llarp:🧵:TimerQueue
  - llarp::util::Stopwatch
4 years ago
Jason Rhinelander ac1486d0be Replace absl::optional with optional-lite
Step 1 of removing abseil from lokinet.

For the most part this is a drop-in replacement, but there are also a
few changes here to the JSONRPC layer that were needed to work around
current gcc 10 dev snapshot:

- JSONRPC returns a json now instead of an optional<json>.  It doesn't
  make any sense to have a json rpc call that just closes the connection
  with returning anything.  Invoked functions can return a null (default
  constructed) result now if they don't have anything to return (such a
  null value won't be added as "result").
4 years ago
Jason Rhinelander c522bc0537 ghc::filesystem devendor to submodule
Also removed some unused/old options for conditionally not using
ghc::filesystem and a sodium option that wasn't used anywhere.
4 years ago
Jason Rhinelander 5a787de73b Switch abseil & nlohmann to submodules and update to latest stable
Our current abseil won't build with gcc 10 (its `optional`
implementation appears broken), and spews warnings under slightly older
compilers; updating to the latest stable 2019 branch fixes both issues.
4 years ago
Jeff Becker ea3851d15f
rc gossiping 4 years ago
Jason Rhinelander 66ebe3995e Remove -Wshadow; it is far too aggressive under gcc 4 years ago
Jeff Becker 9efd796145
initial wack at 0.7.0 dht fixes 4 years ago
jeff f728e6016b router version 4 years ago
Jeff Becker fde0ca374f
i hate curl 4 years ago
Jeff Becker 336a748695
make it build in normal mode too 4 years ago
Jeff Becker 80cbddde7b
fixups for review 4 years ago
Jeff Becker 2ce592e4af
static link with docs 4 years ago
Jeff Becker 562f3f07ab
add unit test for decaying hash set 4 years ago
Thomas Winget f4c9e09d44 remove obsolete timer-related code 4 years ago
Rick V 9fa9209114
don't be aggressive
remove libcurl packaging rules. We still build it, but ship only the curl.exe
4 years ago
Rick V 6d49ffd60b
include all platform dependencies transitively 4 years ago
Rick V e15c57c114
get ready for v0.6
bump version

don't ship the shared object
4 years ago
Jeff Becker fcf0ae2b9e
prune unused files. 4 years ago
Stephen Shelton 332f33b049 Remove FS_LIB conditionals 5 years ago
Jason Rhinelander 638fb25b47 Put version info into a compiled file
This rewrites the version info using lokid's approach of compiling it
into a .cpp file that gets generated as part of the build (*not* during
the configure stage).

Among other things, this means that changing the version no longer
invalidates ccache or cmake dependencies, and because it depends on
`.git/index` git commits will cause the version to be regenerated,
making the commit tag more reliable (currently if you rebuild without
running cmake your git commit tag doesn't update).
5 years ago
Jason Rhinelander 99d27a4886 Add missing ev_libuv (now needed everywhere) 5 years ago
Jeff Becker 7a78160bf0
final change 5 years ago
Jeff Becker 5729d0bff5
more 5 years ago
Jeff Becker 0afb3b320b
add bootstrap list functionality and utility 5 years ago
Stephen Shelton 93b8832026
Merge branch 'dev' into private-keys-backup-support 5 years ago
Jeff 76fc50cfb7
Merge pull request #914 from despair86/dev
win32 fixes
5 years ago
Rick V cf3469e11a
crash on wine, we support linux, ucb_unix, svr4
natively ffs. i tested this patch on wine 4.4 on fuckin
Solaris 11 snv_151
5 years ago
Jeff Becker 3878ebd534
use curl to fetch from lokid rpc the identity key 5 years ago
Jeff Becker ac686a9329
remove valgrind access errors 5 years ago
Stephen Shelton fd02e3e149 Stub out KeyManager class 5 years ago
Jeff 3a6c16aa36
Merge pull request #871 from majestrate/ed25519-signing
Ed25519 signing
5 years ago
jeff 996ff06c6a update cmakelists.txt to no longer build removed file 5 years ago
jeff 52757fef0e Merge remote-tracking branch 'micheal/background_mode' into vpn-api-2019-10-03 5 years ago
jeff 1853b28590 remove libutp and all such code related to utp 5 years ago
jeff ac2a2aed1d gut libutp and finish making things compile and pass tests 5 years ago
Michael edd0ec398f
Move thread stuff to subdirectory 5 years ago
Michael 0950571313
Move metrics to subdirectory 5 years ago
Michael 4d8fe2a8a8
Move meta programming to subdirectory 5 years ago
Michael 1aec0dfa2b
Move logging to subdirectory 5 years ago
Jeff Becker 426ee41c46
initial iwp 5 years ago
Jeff Becker 3c3338e801
Merge remote-tracking branch 'origin/master' into memlink 5 years ago
Jeff Becker 2345dd3239
try adding proper limits 5 years ago
Jeff Becker c1f33bb1ac
initial mempipe implementation 5 years ago
Thomas Winget 38fd0552d3 Adds Link-Relay Status Messages
Success case:
  - the path endpoint creates and sends a LR_StatusMessage upon
    successful path creation

Failure case:
  - an intermediate hop creates and sends a LR_StatusMessage upon
    failure to forward the path to the next hop for any reason

Both cases:
  - transit hops receive LR_StatusMessages and add a frame
    to them reflecting their "status" with respect to that path
  - the path creator receives LR_StatusMessages and decrypts/parses
    the LR_StatusRecord frames from the path hops.  If all is good,
    the Path does as it would when receiving a PathConfirmMessage.
    If not, the Path marks the new path as failed.

LR_StatusMessage is now used/sent in place of PathConfirmMessage
5 years ago
Jeff 183ec25717
Merge pull request #729 from majestrate/fix-android-2019-07-24
make android compile again
5 years ago
Thomas Winget baf8019fe5 Refactor Router code into more classes
This commit refactors functionality from the Router class into separate,
dedicated classes.
There are a few behavior changes that came as a result of discussion on
what the correct behavior should be.
In addition, many things Router was previously doing can now be provided
callback functions to alert the calling point when the asynchronous
action completes, successfully or otherwise.
5 years ago
Jeff Becker 43cb62af16
fix android compile, have makefile pull in libuv for cmake on android 5 years ago
Jeff Becker 1f761a1cb0
* fix arm cross compile on ubuntu disco
* add toolchain option for cross compile
5 years ago
Michael e52492911d
Refactor endpoint state management to a new class 5 years ago
Jeff Becker 58005c5f81
Merge remote-tracking branch 'origin/master' into ipv6-tun 5 years ago
Michael 2acb163083
Fix llvm 8 build 5 years ago
Michael a2326efa37
Revert "Merge pull request #679 from tewinget/revert-config-refactor"
This reverts commit 2996a7f29c, reversing
changes made to 10df3bd4b3.
5 years ago
Jeff Becker 04c9c61dfb
Merge remote-tracking branch 'origin/master' into ipv6-tun 5 years ago
Thomas Winget d044d60101 Reverts #678 #677 and #669 with hashes:
10df3bd
766ece8
979f095

See those commits for further details
5 years ago
Michael bd78471dae
Move ini parser as well 5 years ago
Michael 00c237dc6d
Move config class to its own dir 5 years ago
Michael 80d1e4aef9
Add in-source version of std::filesystem::permissions 5 years ago
Michael 59e8a7316f
Revert "Merge pull request #668 from michael-loki/remove_cppbackport"
This reverts commit 33142d5005, reversing
changes made to 408a652a01.
5 years ago
Jeff Becker a225759c0f
Merge remote-tracking branch 'origin/master' into ipv6-tun 5 years ago
Michael 1639c58cb6
Remove cppbackport from vendor dir 5 years ago
Jeff Becker e265661adb
try fixing issue number 17 (not done) 5 years ago
Jeff Becker aad71c2022
try fixing issue number 17 (not done) 5 years ago
Jeff Becker 5c61df08b5
Merge remote-tracking branch 'origin/master' into ipv6-tun 5 years ago
Michael 08609f9e5a
Rename message files 5 years ago
Michael 8a058fcb34
Move other messages 5 years ago
Michael 83bd9227a7
Move exit messages 5 years ago
Michael d6751e3eeb
Move subset of messages to right directory 5 years ago
Michael 2291d48bcc
Move remaining messages around 5 years ago
Michael 66cf5cc73d
Move exit messages to match header 5 years ago
Michael b89689fec3
Refactor path build code 5 years ago
Jeff Becker dcefcd7879
Merge remote-tracking branch 'origin/master' into ipv6-tun 5 years ago
Michael c0525f2ea3
Move local publishers to their own files 5 years ago
Jeff Becker 97b4e27704
Merge remote-tracking branch 'origin/master' into ipv6-tun 5 years ago
Jeff 3a7d74b08c
Merge pull request #647 from despair86/remove-old-evloops
we libuv now
5 years ago
Jeff Becker 227f561ffc
Merge remote-tracking branch 'origin/master' into ipv6-tun 5 years ago
Rick V 68862cc830
we libuv now 5 years ago
Michael bb0c05a2ca
Introduce tag types 5 years ago
Jeff Becker 6714b06470
json logging option 5 years ago
Jeff Becker eb10638497
Merge branch 'master' into ipv6-tun 5 years ago
Jeff Becker 4c1ac0e991
update for win32 parts 5 years ago
Jeff Becker 584cc61f8f
Merge remote-tracking branch 'origin/master' 5 years ago
Michael d244674339
Unfuck integer metrics 5 years ago
Jeff Becker 2403ab8f86
ipv6 5 years ago
Jeff Becker 6bf2ec94e6
again 5 years ago
Jeff Becker 8b63326d8c
try fixing freebsd build 5 years ago
Jeff Becker 223f2702d3
Merge branch 'fix-big-ooooofff' 5 years ago
Michael 3822fe2341
Create util::MemFn and memFn to make binding callbacks easier 5 years ago
Jeff Becker 9deafa4cb8
use libuv 5 years ago
Michael 8323725509
Initial No-Op Crypto implementation 5 years ago
Rick V 7788d6ec3c
fix windows
lto stuff remains for now
since native builds work

(cherry picked from commit 37814472af5e7c35d514bae16d19b08050765d52)

i'm not porting the UNIX-tier cppfs thing

(cherry picked from commit d6edbd789534d4fd0bce6c8c2418347cd80bebdb)

none of this had to be specified directly ffs

(cherry picked from commit 5dbefa7131a6fe0b2006c90ecdba7e466fdd1ecc)

stop breaking shit reee

(cherry picked from commit 14be89902ccc75a7fc21863593da393ca976d0d4)
5 years ago
Jeff Becker 2a7ebce8f4
Merge remote-tracking branch 'origin/master' 5 years ago
Michael 725ee293c1
Refactor well named functionality in service::Endpoint into new struct 5 years ago
Jeff 01906c5d94 Merge remote-tracking branch 'origin/master' 5 years ago
Michael 9ee525a006
Fix shadowing warnings 5 years ago
Jeff Becker af1529fa72
Merge remote-tracking branch 'origin/master' 5 years ago
Michael 4143472a17
Add cmake module to target a library as 'system', and fix a few warnings 5 years ago
Jeff Becker 8484e29c9b
turn more stuff into std::shared_ptr
remove dead codepaths
5 years ago
Jeff Becker a2912ff860
Merge remote-tracking branch 'origin/master' 5 years ago
Michael 98e691f315
Tidy up more parts of the service/ directory 5 years ago
Jeff Becker 3a8cb0bfb5
add shell based hooks for service::Endpoint, also make format 5 years ago
Michael 33c80b7c16
Move service::Session to its own componet 5 years ago
Michael 94ad84363a
Move CachedTagResult and TagLookupJob to its own component 5 years ago
Michael 6bf54e0925
Remove AsyncKeyExchange, HiddenServiceAddressLookup and OutboundContext to their own components 5 years ago
Michael 2412ed59ee
Move SendContext to its own component 5 years ago
michael-loki 0195152e05 Allow builds on MSVC (#518)
* Import cxxopts to replace getopts usage

* Add visual studio build things

* Fixup abseil build parts

* Replace __attribute__((unused)) with ABSL_ATTRIBUTE_UNUSED

* Fixup minor windows build issues

* Replace getopts usage

* Temporarily fixup .rc files

* More minor windows fixes

* Get a working build

* Revert .rc files

* Revert changes to nodedb
5 years ago
Jeff bfdbf634dd
Merge pull request #523 from majestrate/master
recent stability pokes
5 years ago
Jeff Becker 9503cc66f0
add disk worker based file flusher logger
make format

remove package.json
5 years ago
Michael 9bc501bbf7 Integrate metric tank into build 5 years ago
Michael 544c5f9b61 Move metrics publishers to their own directory 5 years ago
Rick V 853d19209c
Revert "unbreak windows target"
select 64-bit target by default (since normal devs REEEEEEEE at the sight of 4 byte ptrs)
pretty much every _other_ linux/unix has a c++17 windows compiler

This reverts commit a844c61049.
5 years ago
Jeff Becker 40f8434851
syslog 5 years ago
Jeff Becker 9e24557429
refactor logger 5 years ago
Jeff Becker a844c61049
unbreak windows target 5 years ago
Jeff Becker e178a70929
use shared_ptr for event loop 5 years ago
Michael 561b997c93
Move IWP code to its own directory 5 years ago
Michael 426a9b0df5
Refactor iwp into multiple files 5 years ago
Michael 17b39b0ed4
Move UTP code to its own directory 5 years ago
Michael 5ef4e18827
Refactor utp into multiple files 5 years ago
Michael a2a275dcf1
Remove dead linklayer code 5 years ago
Rick V bbba2c0eea
improve windows select loop
add generic svr4 poll(2) event loop
5 years ago
Michael f2c5d32399
Metric collection subsystem 5 years ago
Michael acfff4ca5c
Threading structures for metrics 5 years ago
Jeff ff18ba229a
Merge pull request #411 from majestrate/staging
change signing algo
5 years ago
Jeff Becker ee283547b5
change signature scheme and fucking hope that the rest of the code doesn't fug itself over ;~; 5 years ago
Rick V 8443c5ab8c
Support abseil on i686-pc-winnt-gnu 5 years ago
Rick V 61fb9a9c82
added some notes to gear up for the #371 putback by @michael-loki
moved platform-specifc stuff *to* platform specifc lib
removed -Wno-format on windows and *actually* turn on proper format checking
here using compiler-specifc extension for C99
5 years ago
Jeff Becker 232a7ff010
more 5 years ago
Jeff 1a09a12ee0
Merge branch 'staging' into absl_mutex 5 years ago
Michael c5a129ddff
Convert to use abseil synchronisation primitives 5 years ago
Michael 93399fdbb4
Make nlohmann::json part of the build 5 years ago
Michael e6e19369e9
Create Printer - A general-purpose, stateful printer class 5 years ago
Michael 95a5c386fe
Initial type trait work 5 years ago
Michael b80ecfa4d6
Use string_view for string_view 5 years ago
Jeff 5c941263e9
Merge pull request #339 from michael-loki/dht_context_testing
Solidify interfaces
5 years ago