Commit Graph

30 Commits (af6caf776a4a7a8580d96d5e72cb9e037708e3c4)

Author SHA1 Message Date
Thomas Winget 15229ea7ff
New RC format (#1368)
* initial work for RC SRVs.

Needs tests for new RC format.

Needs SRVs added to new RC, and associated tests.

* convert rc sign/verify test to catch2, add test for new rc

Also fixes a mistake in new rc serialization

* bump loki-mq submodule

need support for viewing bt deserialize consumer buffer so we
know how much it has consumed.

* fix some behavior errors

need to advance llarp_buffer_t after consuming data from it

only rewind and modify size of llarp_buffer_t in owning context.

* Add test for router contact (de-)serialization

Adds a test that makes a list of RouterContact with mixed
versions and ensures it serializes and deserializes correctly.
4 years ago
Jason Rhinelander a7c42ab2bd
Use lokimq's hex/base32z encoding/decoding 4 years ago
Jeff Becker 0006751d80
initial wack at lokimq 4 years ago
Rick V 2fe4c15792 why jeff why 4 years ago
Jeff Becker 403bc74493
unbreak unit tests 4 years ago
Jeff Becker f0eca908a4
use static_assert instead 4 years ago
Jeff Becker 4ad8ae253d
align to either 64bit or max_align_t which ever is smaller, for 32 bit. 4 years ago
Jeff Becker eb0abbf1ff
add eraseif to decaying hashset 4 years ago
Jeff Becker 6af498092b
exit traffic via loki addresses 4 years ago
Jason Rhinelander dccc663f31 Miss Match demands her name be removed from the code
(i.e. fix speeling mistack: missmatch -> mismatch)
4 years ago
Stephen Shelton 273270916e
The Great Wall of Blame
This commit reflects changes to clang-format rules. Unfortunately,
these rule changes create a massive change to the codebase, which
causes an apparent rewrite of git history.

Git blame's --ignore-rev flag can be used to ignore this commit when
attempting to `git blame` some code.
4 years ago
Thomas Winget 68c1ae52b3 add ShortHex function to AlignedBuffer 4 years ago
Jeff Becker 8b8d636ded
make format 5 years ago
Jason Rhinelander 1b710455a7 Disallow AlignedBuffer < 8 bytes; add oddball buffer sizes 5 years ago
Jason Rhinelander d57d6bfc6d Use memcpy to extract hash value
Using the straight reinterpret_cast runs into type aliasing issues,
which manifest on armhf.  C++20 adds `std::bit_cast` to deal with
exactly this, but memcpy is the pre-C++20 way to do it properly.
5 years ago
Rick V a08d2ff64e
microsoft libc a shit 5 years ago
Rick V caa6549cbb
clang-format everything 5 years ago
Rick V 64710ca4d4
Explicitly align to 16 bytes on Win32 targets 5 years ago
Stephen Shelton a4aef312ae make format (or format-verify, at least) 5 years ago
Jason Rhinelander d4a5dc66ac Change alignment to std::max_align_t
This will typically be stricter alignment (16 byte on amd64) which seems
useful for the intended use case here.
5 years ago
Jason Rhinelander 460d64fc0f Simplify AlignedBuffer alignment implementation
This simplifies the use of std::aligned_storage with just using an
`alignas` on AlignedBuffer itself so that the (only) data member gets
the proper alignment and saves a bunch of reinterpret_casts in favour of
just having the std::array as an ordinary member.
5 years ago
Stephen Shelton e2e9e63467 Optimize AlignedBuffer:::IsZero() 5 years ago
Jeff Becker a7884a82e2
use faster hashing 5 years ago
Michael 4d8fe2a8a8
Move meta programming to subdirectory 5 years ago
Michael 1aec0dfa2b
Move logging to subdirectory 5 years ago
Michael f9e9227e19
Fix gcc trunk warnings 5 years ago
Michael e4cf1f245c
Convert most of llarp to use Printer 5 years ago
Michael 47380ba64b
Simplify some code 5 years ago
Michael f3b0af9d2f
Create CopyableBuffer type 5 years ago
Michael e5eda0fb8f
Move lokinet unspecific components to a util/ library 6 years ago