Commit Graph

290 Commits

Author SHA1 Message Date
Jeff Becker
eceb55623c
more 2019-03-07 10:17:29 -05:00
Michael
61f3273dc4
Add threading annotations and fix potential deadlocks 2019-03-04 00:03:52 +00:00
Michael
c5a129ddff
Convert to use abseil synchronisation primitives 2019-03-03 21:20:38 +00:00
Jeff Becker
f8d6becce8
make whitelist happy 2019-02-27 07:55:26 -05:00
Jeff Becker
ef13ec7499
Merge remote-tracking branch 'origin/staging' into staging 2019-02-26 07:55:27 -05:00
Jeff Becker
89a8c9248d
fix crash 2019-02-25 07:51:01 -05:00
Jeff Becker
ab3d435d7f
don't cast size_t to ssize_t 2019-02-25 07:46:29 -05:00
Jeff Becker
0b558959b6
send keepalives periodically 2019-02-23 13:04:12 -05:00
Jeff Becker
a27dab46d1
don't close link on message handl fail 2019-02-23 12:54:35 -05:00
Jeff Becker
41bb83aaba
more 2019-02-19 08:32:26 -05:00
Rick V
5a3947ca5c
clang-format 2019-02-18 17:58:12 -06:00
Jeff Becker
445ed05b32
make format 2019-02-18 14:44:41 -05:00
Michael
887fb4ac62
Replace insert(make_pair()) with emplace() 2019-02-18 10:35:23 +00:00
Michael
a00d6afc5e
Convert llarp_buffer_t to be a class with methods 2019-02-17 13:09:48 +00:00
Jeff Becker
1d958d95de
* make rpc compile right
* make link sessions introspectable
* make utp write buffers fully flush each tick
2019-02-15 17:19:19 -05:00
Jeff
cdc19c52fa
Merge branch 'staging' into abstract_router_replacement 2019-02-15 12:10:18 -05:00
Jeff Becker
22b63fba38
close and shutdown utp socket on timeout 2019-02-15 08:45:56 -05:00
Michael
048fa83c39
Finish replacement of Router with AbstractRouter 2019-02-14 22:31:31 +00:00
Michael
67b5d48095
Replace usage of new/delete with unique_ptr/stack allocation 2019-02-11 16:24:05 +00:00
Michael
729cd045f1
Convert llarp::Router into an abstract base class 2019-02-06 09:59:47 +00:00
Jeff Becker
cd36d126d8
!!! breaking change !!!
half the utp fragment size
2019-02-05 10:07:57 -05:00
Ryan Tharp
506a1f8ae6 Revert "fix scoping issue"
This reverts commit 93af0978a3.
2019-02-04 16:43:37 -08:00
Ryan Tharp
4bf4faa956 make format 2019-02-04 16:41:33 -08:00
Ryan Tharp
144b3f4ec3 Merge branch 'staging' of https://github.com/loki-project/loki-network 2019-02-04 23:04:38 +00:00
Michael
7ca3e13e78
Rename to ManagedBuffer 2019-02-03 00:48:10 +00:00
Michael
47380ba64b
Simplify some code 2019-02-03 00:31:10 +00:00
Michael
6f0ce07571
Fix cause of issue with LinkLayerTest.TestUTPAliceConnectToBob 2019-02-02 23:22:41 +00:00
Michael
f3b0af9d2f
Create CopyableBuffer type 2019-02-02 23:21:35 +00:00
Michael
2de621b0ad
Disable copy constructing llarp_buffer_t 2019-02-01 01:58:13 +00:00
Ryan Tharp
93af0978a3 fix scoping issue 2019-01-30 23:22:50 -08:00
Michael
f24f554a01
Convert llarp::Crypto into an abstract base class 2019-01-26 15:40:58 +00:00
Ryan Tharp
1ba5b75082 Merge branch 'master' of https://github.com/neuroscr/loki-network 2019-01-16 21:25:37 +00:00
Ryan Tharp
3148d0c20b clang-format 2019-01-16 13:08:57 -08:00
Ryan Tharp
fc5a43401a clang-format 2019-01-16 13:02:34 -08:00
Michael
da6cdfc0b2
More refactoring to continue to make dependency graph acylic 2019-01-15 23:15:44 +00:00
Michael
6e38e85a79
Produce hierarchy of 'libraries' inside libllarp 2019-01-15 23:15:43 +00:00
Michael
79157414f3
Split crypto.hpp into 3 different files 2019-01-13 16:32:51 +00:00
Michael
04e0fe3ad7
Move crypto code to a subdirectory 2019-01-13 15:06:16 +00:00
Michael
a3463120cc
Move net components into a distinct folder 2019-01-11 01:42:02 +00:00
Michael
081d4dfa32
Reorganise source into more folders 2019-01-11 01:19:49 +00:00
Michael
e5eda0fb8f
Move lokinet unspecific components to a util/ library 2019-01-10 20:07:24 +00:00
Jeff Becker
6206fb2a41
Merge branch 'datagram' into staging 2019-01-10 07:30:21 -05:00
Jeff Becker
cad1de946e
make it compile on osx 2019-01-09 09:21:55 -05:00
Jeff Becker
2a67242ccd
fixes 2019-01-07 11:35:25 -05:00
Jeff Becker
1a5c70f09d
don't call utp_shutdown in destructor 2019-01-07 11:15:47 -05:00
Jeff Becker
3d5d52de87
add fix 2019-01-07 11:13:16 -05:00
Jeff Becker
1100879eb4
fix leak in utp tests 2019-01-07 07:47:57 -05:00
Jeff Becker
7ba1395d23
fix utp leak in unit tests 2019-01-07 07:36:26 -05:00
Jeff Becker
e88c39b9e2
more work 2019-01-05 08:45:05 -05:00
Jeff Becker
593e2ddac6
make it compile 2019-01-04 07:43:53 -05:00
Jeff Becker
19a4a3ddbc
fix utp leak in unit tests 2019-01-04 07:43:41 -05:00
Michael
9658c80b48
Minor build fixes 2019-01-03 21:25:16 +00:00
Jeff Becker
f9d30b9b96
commit day's work 2019-01-03 16:10:40 -05:00
Jeff Becker
2474cf343e
dtls branch 2019-01-02 09:14:02 -05:00
Michael
7dd40015f3
Mark AlignedBuffer constructor as explicit 2019-01-02 01:04:06 +00:00
Michael
ea19093a20
Remove const byte* conversion operators from llarp::AlignedBuffer 2019-01-02 01:04:04 +00:00
Michael
1410d0a0cf
Remove byte* conversion operators from llarp::AlignedBuffer 2019-01-02 01:04:03 +00:00
Michael
334161c9bb
Remove data() conversions from llarp::AlignedBuffer 2019-01-02 01:03:53 +00:00
Michael
771af4afed
Fix C++11 build 2018-12-29 13:08:24 +00:00
Jeff Becker
6825cc0eec
fix crashes 2018-12-27 14:10:38 -05:00
Jeff Becker
4d689da148
more 2018-12-27 13:42:23 -05:00
Jeff Becker
874b1cd53c
only remove message when it successfully parses and handles 2018-12-27 13:31:19 -05:00
Jeff Becker
ec57c72e08
fix testnet 2018-12-27 13:27:43 -05:00
Jeff Becker
5972f5ab14
clean shutdown 2018-12-24 11:32:25 -05:00
Jeff Becker
6fc42dc7ad
fixes 2018-12-19 12:48:29 -05:00
Jeff Becker
cca19290de
session renegotiation, RC expiration, more utp unit tests, network isolation. 2018-12-19 11:17:41 -05:00
Jeff Becker
e58f2c521e
done for the day 2018-12-17 17:43:16 -05:00
Jeff Becker
b39c46fc03
!!! this breaks backwards compat :^) !!!
redo link protocol to use 2 session keys, add unit tests.
2018-12-17 15:46:08 -05:00
Jeff Becker
35fd046a9a
unfinished 2018-12-16 15:34:04 -05:00
Michael
4257b62e88
Add .cpp files for all .hpp files 2018-12-15 16:21:52 +00:00
Jeff Becker
be234e4b6e
* make format
* snode to snode direct traffic

* wire up dns on service node tun
2018-12-13 11:14:44 -05:00
Michael
85dde7b6b0
Move remaining include/llarp headers to llarp/ 2018-12-12 02:53:02 +00:00
Michael
b92ea0521b
Move router_contact.hpp to llarp/ 2018-12-12 02:53:01 +00:00
Michael
c0a76714fa
Move link* to llarp/ 2018-12-12 02:53:01 +00:00
Michael
c064893947
Move buffer.hpp to llarp/ 2018-12-12 02:53:00 +00:00
Jeff
c058ea9dfc
Merge pull request #128 from majestrate/dev
use RouterID not bare pointer
2018-12-11 08:35:34 -05:00
Jeff Becker
f58c63547d
use RouterID not bare pointer 2018-12-11 08:33:23 -05:00
Michael
7be452092c
Convert llarp_crypto to be a true C++ class 2018-12-11 00:53:55 +00:00
Michael
f0fce5b68a
Convert llarp_router to be a true C++ class 2018-12-10 20:15:35 +00:00
Jeff Becker
fad734a5ce
strict types for pubkey, secretkey and routerid 2018-12-10 12:22:59 -05:00
Michael
30e9dca2e5
Convert llarp_logic to be a C++ class 2018-12-10 14:15:11 +00:00
despair
f17c01a924 clang-format 2018-12-03 12:28:16 -06:00
despair
d26141d433 Merge branch 'dev' into reeeee-divergence
ok hope this works -rick

# Conflicts:
#	.gitignore
#	.vscode/settings.json
#	include/llarp/service/context.hpp
#	llarp/dns.cpp
#	llarp/dnsc.cpp
#	llarp/ev.cpp
#	llarp/ev.hpp
#	llarp/ev_win32.hpp
#	llarp/net.cpp
#	llarp/router.cpp
#	llarp/router.hpp
#	llarp/service/context.cpp
2018-12-03 12:24:56 -06:00
Jeff Becker
afdbed427a
fix previous commits 2018-12-02 20:55:59 -05:00
Jeff Becker
b0e6d01ef3
limit link sessions to max of 16 2018-12-02 20:52:40 -05:00
despair
60f6131e43 netbsd stuff 2018-11-22 20:02:24 -06:00
Jeff Becker
67eadff143
node whitelist option via jsonrpc 2018-11-21 12:46:33 -05:00
Jeff Becker
c1377851a6
return bool when trying to establish link layer session 2018-11-21 09:56:12 -05:00
despair
906f11d08f gah how did i miss that 2018-11-20 09:38:46 -06:00
Jeff Becker
b543d6243d
Merge branch 'master' into dev 2018-11-20 07:42:17 -05:00
despair
436025e0ca fix utp flags leaking into the actual socket transmission
clang-format
2018-11-20 06:11:51 -06:00
despair
964e834fea finally get the right error on windows
fix

fix up errno on win32

test
2018-11-20 02:38:24 -06:00
Michael
1c0cf72c02
Rename endian.h 2018-11-20 00:52:19 +00:00
Jeff Becker
e287e5132b
more vigorus pings 2018-11-19 17:04:23 -05:00
Jeff Becker
950d13a818
more logging 2018-11-19 16:55:41 -05:00
Jeff Becker
bad32dbb98
more logging 2018-11-19 16:33:51 -05:00
despair
be7ac352ca switch to a simulation of epoll
the native async event system on windows
is _not_ very good at getting external events
(i.e. we receive data, but we don't get any indication
that this ever happened)
2018-11-19 04:29:39 -06:00
despair
c325246beb need to start winsock to use any networking
try fixing this
2018-11-19 04:29:39 -06:00
despair
d311b2e9a9 remove dead code
(rip golden shield users D:)

remove more dead code

debug udp stuff

remove debug kqueue
2018-11-12 23:39:50 -06:00
Michael Thorpe
33bfaf7ecd
Enable -Wextra
test criteria:
- test build on macOS
- test build in debian docker container
- test build in fedora docker container
2018-11-07 15:31:13 +00:00
Michael Thorpe
a2d5d80779
Enable warnings as errors
test criteria:
- Built from clean on macOS
2018-11-06 22:48:17 +00:00
Jeff Becker
f03603a0da
always remove dht nodes, lock sometimes, don't make router destructor virtual 2018-11-05 08:19:08 -05:00
Jeff Becker
dbd2c41909
use event loop for time 2018-10-29 12:48:36 -04:00
Jeff Becker
48e4f676cc
add rpc method for llarp.admin.link.neighboors 2018-10-25 14:18:12 -04:00
Jeff Becker
26ad679b1d
set send queue limit to something really big 2018-10-19 12:12:46 -04:00
Jeff Becker
d3278946f2
ipv4 bogon checking 2018-10-15 08:02:32 -04:00
despair86
88854f558e Revert "return the correct address family?"
not really needed....looks safe so long as the bytes are in network order (hence, the inet4 link will only grab the top 32 bits of the whole inet6 address field.)
This reverts commit 56e41ebda0c29bb2a85dd3f8dbbfba30da8c0a2c.
2018-10-11 19:22:11 -05:00
despair86
7d30d9ee38 return the correct address family? 2018-10-11 19:22:11 -05:00
despair86
3c13101beb clang-format 2018-10-06 12:04:52 -05:00
despair86
31c8aee3c1 woooooooooooooo
lokinet on win32 is now live
and the server code is more stable than the client code
2018-10-06 12:04:51 -05:00
Jeff Becker
ab306b70bb
try closing session correctly 2018-10-04 13:41:23 -04:00
Jeff Becker
d71f0db2a5
more vigorous profiling 2018-10-04 13:34:26 -04:00
despair86
9fdde65798 make bencode ILP32/LLP64 clean (long is 32 bits outside of unix!)
actually open new RCs in binary mode
clang-format
win32 skeleton code for tun (still working on the guts)
2018-10-01 15:08:55 -05:00
despair86
7f809eb53b fix windows build 2018-10-01 15:06:07 -05:00
Jeff Becker
2b8bd11f5e
ping less and try not to double free in llarp_router::SendToOrQueue 2018-09-30 08:01:58 -04:00
Jeff Becker
97bae70817
close sessions on link close not on destructor 2018-09-24 06:23:11 -04:00
Jeff Becker
ce03801a51
close socket in destructor 2018-09-23 07:29:41 -04:00
Jeff Becker
5ebe3cc97c
limits and have clients use ephemeral identity 2018-09-18 16:56:22 -04:00
Jeff Becker
cde76250ca
close connections 2018-09-18 14:05:41 -04:00
Jeff Becker
8d679b00a7
only log errors on sessions made with utp
only rebuild paths when introset changes router for outbound context
2018-09-18 11:05:56 -04:00
Jeff Becker
96716a39ef
send link layer keep alive and track bad intros 2018-09-18 09:02:52 -04:00
Jeff Becker
1eda28a2da
close invalid sockets 2018-09-18 08:29:27 -04:00
Jeff Becker
7f3465022d
check for null session 2018-09-14 11:27:34 -04:00
Jeff Becker
6986f04418
basic router profiling and fix ip rewrite 2018-09-13 12:41:53 -04:00
Jeff Becker
b56d25730e
improve send rate 2018-09-12 09:29:42 -04:00
Jeff Becker
b96887ddb2
various fixes and tweaks 2018-09-10 09:43:36 -04:00
Jeff Becker
b23dab09fb
don't overwrite our RC, hide parameter. 2018-09-09 07:23:21 -04:00
Jeff Becker
adbf53bc40
protocol docs, more efficient padding, make code reflect protocol changes. 2018-09-08 11:53:20 -04:00
Jeff Becker
bfb00bb7bd
utp fixes 2018-09-07 16:36:06 -04:00
Jeff Becker
4b3a113397
mostly works 2018-09-07 13:41:49 -04:00
Jeff Becker
5dfcd60df1
more 2018-09-06 16:31:58 -04:00
Jeff Becker
6ef89ea8b2
un break (kinda) 2018-09-06 09:16:24 -04:00
Jeff Becker
60d5277351
broken 2018-09-06 07:46:19 -04:00
Jeff Becker
ba648868c4
more 2018-09-04 15:15:06 -04:00
Jeff Becker
2a8fc53ca6
make it compile 2018-09-04 08:55:20 -04:00
Jeff Becker
085563ac2f
implement utp link protocol
gut curvecp for now
2018-09-04 08:41:25 -04:00
Jeff Becker
1839da9c3c
add bencode file helpers and move link server functions into source file 2018-09-03 09:10:56 -04:00
Jeff Becker
5228a81bae
more refactor
get rid of C api
2018-08-30 14:48:43 -04:00
sachaaaaa
b5762fa85a Move EncodeLIM to its own source file 2018-07-09 13:08:41 +10:00
Jeff Becker
c51d29a0c6
add link level keepalive
remove debugging messages

start handling more messages
2018-05-26 14:31:45 -04:00