Commit Graph
53 Commits
Author SHA1 Message Date
Hamish Coleman 743f6325cf Fix building with lots of options turned on 2023-05-06 08:48:04 +08:00
Hamish Coleman c9447689fb Update dependancies for new configure file 2023-04-30 20:45:44 -05:00
Hamish Coleman 1accc76ad3 Fix the building the win32 subdir.
It looks like the github windows build environment is not correctly
inheriting environment variables.  Which is strange, as that has not
been changed with the recent updates.  Include the vars directly as a
workaround (and plan to refactor later)
2023-04-30 20:40:50 -05:00
Hamish Coleman 9de98c2bb0 Ensure the library is linked to the tools 2023-04-30 19:36:06 -05:00
Hamish Coleman 37722ab8b6 Consolidate the config.mak settings 2023-04-30 19:00:04 -05:00
Hamish Coleman bd4418fdec Convert the tools dir makefile similarly to the topdir 2023-04-30 18:10:39 -05:00
Logan oos EvenandGitHub 2ee7dfdb98 added Windows support to n2n-route tool (#1023)
* added Windows support to n2n-route tool

* fixed includes

* more include fixes

* one more include addition

* more compile fixes

* wish I had a working Windows VM

* fixed some more Windows compile errors

* considered Windows-specific lib linkage

* promised to never code OS specific tools again

* removed invisible invalid characters

* where to get if_idx from

* retrieving interface index for route

* bracket...

* one more bracket...

* added optional gateway parameter to user-defined routes

* clarification

* clarification

* Windows needs special network init

* adapted waiting-for-key
2023-02-03 17:01:57 +01:00
Logan oos EvenandGitHub ba8855fa71 added to portfwd tool - Windows keyboard fix (#1035)
* added to portfwd tool - Windows keyboard fix

* is it just a hick-up
2022-06-30 16:04:16 +02:00
Logan oos EvenandGitHub 504a552c77 Windows needs special network init (#1034) 2022-06-30 11:58:54 +02:00
Logan oos EvenandGitHub c0259ae967 compile fixes (#1022) 2022-06-23 07:47:41 +02:00
Logan oos EvenandGitHub f63cb718b3 unified verbosity handling for edge and tools (#1009) 2022-06-05 18:57:14 +02:00
Logan oos EvenandGitHub 51a3a71f95 introduced n2n-portfwd tool (#1008)
* moved dev to version 3.1.1

* introduced n2n-portfwd tool

* moved port-forwarding source to tool

* adjusted tiny things, seemingly works with ./configure's  --enable-miniupnp  and  --enable-natpmp

* adjusted for Windows

* wished for better typing skills

* applied some finishing touch

* typo
2022-06-05 18:05:40 +02:00
Logan oos EvenandGitHub 99b6b6b66d added n2n-route tool (#982)
* moved dev to version 3.1.1

* laid ground for n2n-route tool

* adapted code style

* overhauled n2n-route's tool program logic and removed route code from edge

* added missing initialization of federation's purgeable field

* lifted un/purgeable confusion

* added warning about removed -n cli option

* realized that Windows does not offer inet_aton()

* removed -n option documentation from edge's man page

* slightly simplified n2n-route program logic

* applied more logic changes to n2n-route tool

* added 'info' read command to edge's management port

* corrected indention

* added Linux route control to n2n-route tool

* temporarily restricted n2n-route tool to Linux only

* We must be over the routing!

* pulled default gateway change detection into main loop to cover mobile use, and added devstr_t type

* corrected use of new UNPURGEABLE - so far gone unnoticed

* addresses possiible address issue

* i broke it

* reverted bad ideas

* added command line options, help text, and prevented vpn gateway being used for supernode/peer traffic routes

* added option to manually provide default gateway, also verbosity options

* getting there

* added option to limit networks to be routed (-n), adapted documentation

* fine-tuned minor things
2022-05-24 20:38:51 +02:00
Logan oos EvenandGitHub 73d0d76f29 changed benchmark to MTU sized packets (#966) 2022-03-12 20:56:56 +01:00
Logan oos EvenandGitHub e686b9592c (C) update (#965) 2022-03-12 10:22:42 +01:00
Logan oos EvenandGitHub f59c6900a1 moved compression code into transforms (#961) 2022-02-21 10:09:06 +01:00
Hamish ColemanandGitHub e4e2aba420 Increase code Coverage (#897)
* Make it clear which hash we are testing

* Coverage for all pearson hash variants

* Initial coverage for auth.c

* Add some more auth.c coverage

* Ensure new bins are added to both build systems

* Ensure new source files are fully linted
2021-11-10 06:02:05 +00:00
Hamish ColemanandGitHub 80b33cd1a9 Basic C Code lint checker and shell checker (#859)
* Factor build packages out into a more maintainable list

* Create a location for scripts to live

* Provide a make target to return the source dir as close as reasonable to the original distributed state

* Add a code lint step, checking the coding style

* Change test harness as recommended by shellcheck

* Ensure we actually have the linter tool installed

* Use the correct directory for cmake to run the tests

* Adjust for the older uncrustify in the current github ubuntu-latest

* Make one file pass the linter

* Integrate the lint with the existing test workflow

* Add files with minimal changes needed to the linter

* Add more files with minimal changes needed to the linter

* Dont build binaries if we fail the lint test

* Update the phony targets with the lint steps

* Ensure the flake8 package is installed in the new lint workflow job

* Use the makefile to drive the packages needed to install for linting

* No need to add dependancies on lint, just rely on the workflow status to show failure

* Update the scripts dir README to reflect current assumptions

* Rename and briefly document the indent.sh script

* Fix the ignore to ignore the right Makefile

* Rename the test_harness script to make it clear it is a shell script

* Provide a master lint make target and add a shell script lint tool

* Elminate stray tabs

* Drop include/auth.h from linter - there are inconsistant results with function definitions when using the current uncrustify rules
2021-10-24 01:21:18 +05:45
Logan oos EvenandGitHub 5f3c27e3a6 compile fix (#846) 2021-10-07 14:05:29 +05:45
Hamish ColemanandGitHub 2e57663cde increased test coverage (#844)
* Start adding helper functions to the wire tests

* Add tests for two more wire functions

* Update test expects with new test data

* Use the normal mac address format, like a boss
2021-10-07 13:22:00 +05:45
Hamish ColemanandGitHub 4438f1aa2a added mingw test platform (#829)
* Provide a minimal reimplementation of our autoconf, to try windows builds

* Try building with windows

* Fix thinko in spelling

* Ensure shell script runs inside a shell

* Add a hack to aid include discovery

* Just keep adding tech debt...

* Assume that we will have slashes in some of the replacement strings and avoid that char with sed

* Restore one slash

* Hack around the tools makefile interdependancy bug

* A correct cflags include hack for each compile dir

* Ensure we link against winsock (note, even though this says 32bit, it should link the 64bit library ... I think)

* Bad link ordering if we dont use LDLIBS

* Remove unused make variable

* Remove makefile duplication using inheritance (this does mean you can no longer cd tools; make, but must do make tools)

* Add missing library for win32

* Show OS variable

* Make hack autoconf more robust for tests on non gitlab runners

* Remove no longer used substitutions from hack autoconf

* Add missing include path to tools under win32

* Build the win32 subdir when the compiler is Msys

* The different subdirs have different dependancies

* Ensure we can find the include files

* Fix library link ordering

* Ensure the tools dir can find the special win32 lib

* Deal with the differing basic type sizes on both linux/64bit and windows/64bit

* Document the steps to mimic the github windows/mingw build locally - to allow for simpler debugging

* Ensure branch name in instructions matches my test branch name

* Clarify the shell needed to build with mingw

* Since the makefile depends on knowing the OS, raise a fatal error if we cannot determine this

* Handling different compile environments is hard.

- Linux: sane and reasonable results for both uname -s (=Linux) and
  uname -o (=GNU/Linux)
- Windows/Mingw: insane results for uname -s
  (=MSYS_NT-$MAJOR.$MINOR-$BUILDNR) but sane results for uname -o (Msys)
- Macos: sane results for uname -s (=Darwin) but does not support
  uname -o at all

* Revamp the way that Mingw is detected

* Avoid attempting to generate gcovr report when running under windows

* Whoops, isolate the right step

* Fix spelling mistake

* win32/Makefile: Remove unused setting and add comment

* ensure that all win32 includes use the same expected path

* Allow simpler cross compilation by letting configure pass the CC and AR environment through

* Avoid multiple '_CRT_SECURE_NO_WARNINGS redefined' warnings

* Convert to a consolidated CONFIG_TARGET variable to select any different compile options

* Use the more generic printf defines to avoid warnings on mingw

* Update mingw build docs

* English better for reader happy make

* Address a number of mingw compiler warnings

* Fix Visual C compile

* Be sure to document some of the hacky nature of the mingw build
2021-10-06 00:52:15 +05:45
Hamish ColemanandGitHub b735ad6b9e added test framework and code coverage reporting (#797)
* Add a simple test framework

* Add a code coverage report example oneliner

* Move the coverage report into a separate directory

* Add a github action to run tests and publish a branch with the coverage report

* Fix: Missing job separator

* Fix: remember to actually run configure

* Fix: Gotta autogen before I configure

* Dont try to upload coverage report unless this is a push

* Clearly show the git ref tested in the coverage report

* Add a test for the various transforms

* Add tests for the elliptic curve and pearson hash

* Ensure we ignore new generated output

* Remove unneeded boilerplate from the compression tests

* Add an example of a test of the encoded wire packets

* Ensure that correctly testable data is output even when zstd is not compiled

* Factor test runner out into its own script and attempt to add it to the cmake file

* Tell cmake about a new object file

* Stop trying to make Cmake work...

* Stop trying to make cmake work, round 2

* In the middle of a thousand lines of cmake output was one important one - windows could not find assert() - try again

* Try again to plumb the tests into cmake

* Add missing library to our superset install line

* Fix build error when libcap-dev is installed

* Switch to using artifact uploads instead of pages to store/show the coverage report

* Fix artifact upload yaml

* Upload coverage report to codecov

* Fix codecov - clearly it doesnt do a recursive search for coverage files

* Fix codecov - my hopeful use of a list of directories didnt work

* Fix codecov - unfortunately, it doesnt just consume the coverage data and needs us to generate the gcov output

* Fix codecov - nope, it still doesnt recursively search

* Fix codecov - it really helps if I run the gcov data generator

* Add a simple matrix build

* Fix older ubuntu versions of gcovr that do not support the '--html-title' option

* Ensure we use gcover options that are identical on older ubuntu

* Improve coverage generation and required build packages
2021-09-27 15:26:06 +05:45
Hamish ColemanandGitHub 35ec7336a6 simplified the makefiles (#795)
* Move the makefiles towards a clearer arrangement

* Break circular make dependancy and start using implicit rules for most compilation

* Fix old cmake to compile again after renames
2021-09-16 18:34:04 +05:45
Hamish ColemanandGitHub 370ea9bd37 addressed all but one of the remaining compile warnings (#793)
* Fix the mismatched char, uint8_t warnings

* Ensure we leave room for zero termination and then ensure the string is terminated

* GCC has a warning if it thinks your could overflow your snprintf buffer, but dont check for said overflow
2021-09-16 14:45:46 +05:45
Logan oos EvenandGitHub a28327a0af added user-password edge authentication (#673) 2021-06-04 03:11:22 +05:45
Luca Deri 85894715bd Added build target for Ubiquity EdgeRouter X 2021-02-16 11:31:23 +00:00
Logan oos EvenandGitHub cef5561c5a switched to 2021 (#632) 2021-02-08 16:11:06 +05:45
Logan oos EvenandGitHub 9ee62d7415 rebased time stamp format: header encryption (#579)
* rebased time stamp format (header encryption)

* rearranged time stamp fields
2021-01-12 14:28:21 +05:45
Logan oos EvenandGitHub fb989236f5 refrained from calling gettimeofday() too often during benchmark (#484)
* refrained from calling gettimeofday too often during benchmark

* refrained from calling gettimeofday too often during benchmark
2020-11-09 16:06:19 +01:00
Luca Deri 3095c816e2 Warnign fixes 2020-10-20 17:17:17 +02:00
b858ffeb06 added pure decryption speed output (#470)
Co-authored-by: Logan007 <you@example.com>
2020-10-19 09:45:20 +02:00
2f220fd924 added (de-)compression to benchmark tool (#446)
* moved calls to decode functions into the decryption block

* adjusted output

* added (de)compression to benchmark

* added pearson hashing to benchmark

Co-authored-by: Logan007 <you@example.com>
2020-10-03 17:15:12 +02:00
maruncz a02c1ae1ea fix benchmark output formatting 2020-09-13 10:01:27 +02:00
Logan007 0267f1db7f reworked cc20 2020-09-01 22:55:53 +05:45
Logan007 87ee4d6fa7 reworked cc20 2020-09-01 22:50:52 +05:45
Logan oos EvenandGitHub 90a071a1d3 Merge branch 'dev' into revCc20 2020-09-01 20:16:32 +05:45
Logan007 8757312d41 reworked cc20 2020-09-01 20:09:29 +05:45
Logan007 c9412a290b made aes always available 2020-08-31 02:24:23 +05:45
Logan007 d5c1295bec replaced twofish implementation by a faster version 2020-08-26 18:07:05 +05:45
Logan007 252ce9779a moved windows-gettimeofday() from benchmark.c to n2n.c 2020-07-21 19:11:31 +05:45
Luca Deri 0bf7ae0a01 Minor code claanup 2020-06-21 22:33:28 +02:00
Luca Deri 3eb82b2a32 Code reorganization 2020-06-21 22:26:27 +02:00
lucaderi cd62591ade CentOS6 fixes 2020-06-08 00:01:28 +02:00
Luca Deri bd49b4e3a3 Compilation fixes 2020-06-07 13:51:48 +02:00
Luca DeriandGitHub 3b0903785e Merge branch 'dev' into speck 2020-06-07 10:10:20 +02:00
Logan007 9509634ca5 added SSE - Part II 2020-06-03 22:10:49 +05:45
Logan007 0477e476e8 added Speck 2020-05-28 03:17:21 +05:45
Logan007 9e5934acc8 added ChaCha20 (cc20) 2020-04-26 15:46:41 +02:00
Luca Deri 97c8948113 MacOS fixes 2020-04-24 00:36:32 +02:00
Luca Deri 2636c65999 Waarning fix 2020-04-23 23:55:16 +02:00