Adrien Béraud
60db9fd9cd
logs: reduce node expiration to debug level
2018-05-25 10:26:58 -04:00
Adrien Béraud
e8989f1f79
network engine: handle EPERM
2018-05-24 16:07:16 -04:00
Adrien Béraud
9249f34c47
network engine: fix node leak during destruction
2018-05-24 15:01:23 -04:00
Adrien Béraud
4a49a53222
Revert "network engine: expire node on next run on network failure"
...
This reverts commit 8489433060 .
2018-05-02 11:55:01 -04:00
Adrien Béraud
8489433060
network engine: expire node on next run on network failure
2018-04-11 11:27:46 -04:00
Adrien Béraud
6a2f61a0db
dht: fix compilation warnings
2018-04-10 12:48:19 -04:00
Adrien Béraud
d2df93c75e
network engine: send nodes in listen confirmation
2018-03-28 09:54:04 -04:00
Adrien Béraud
1617c79e5d
network: add signaling for expired, refreshed values
2018-03-14 23:39:35 -04:00
Adrien Béraud
cab0813b17
dht: reduce log verbosity
2018-02-24 15:15:49 -05:00
Adrien Béraud
e6a2d96622
net: restart socket in case of sigpipe
2018-01-23 11:34:14 -05:00
Adrien Béraud
3a61692618
net: set MSG_NOSIGNAL if possible
2017-11-17 02:20:31 +01:00
Adrien Beraud
dc99919338
InfoHash: add explicit operator bool()
2017-11-01 11:59:11 -04:00
Adrien Béraud
fcaaa01b2d
network engine: add "value update" message type
2017-10-30 13:12:16 -04:00
Adrien Béraud
8cd3ff9fc4
network engine: remove unused constant
2017-10-30 13:12:16 -04:00
Adrien Béraud
476fbb1160
network: use full 32-bits of transaction IDs
...
We used to use the first 16 bits for the message type.
2017-10-20 17:42:28 +02:00
Adrien Béraud
cf6447dc80
NetworkEngine: use proper type for constant
2017-10-17 19:22:15 +02:00
Adrien Béraud
376486e64f
node: use full range of socket IDs
2017-10-17 15:25:09 +02:00
Adrien Béraud
9d4e6e0984
rate limiter: use deterministic maintenance
...
Using deterministic maintenance sets an upper bound
to the size of the address map.
2017-10-15 01:18:32 +02:00
Adrien Béraud
e9f007025f
node: make most fields private
2017-10-13 01:10:09 +02:00
Adrien Béraud
e20ae56cab
dht: support client mode
...
In client mode, a node won't store data
and won't participate in routing.
2017-10-12 15:44:14 +02:00
Adrien Béraud
4ce0168916
network engine: move ParsedMessage to separate file
2017-10-11 23:51:44 +02:00
Adrien Béraud
98ec789526
nertwork engine: move tid management to Node
2017-10-11 17:36:20 +02:00
Adrien Béraud
3bb5e7ee12
network engine: move transaction ownership to Node
2017-10-11 17:36:20 +02:00
Adrien Béraud
be7494961c
network engine: move socket management to Node
2017-10-11 02:23:56 +02:00
Adrien Béraud
bdb0bef0ee
network engine: move RequestAnswer out of class
2017-10-11 02:22:03 +02:00
Adrien Béraud
1c45f34262
SockAddr: use pointer to sockaddr
...
Save memory and reduce copies by using a pointer
to a sockaddr structure of the right size instead of
using a full sockaddr_storage structure for every address.
2017-09-26 16:30:29 +02:00
Adrien Beraud
9bfaa224bc
dht: move set_nonblocking to NetworkEngine
2017-07-16 18:10:49 -04:00
Adrien Beraud
15e5fa433b
network engine: handle EAFNOSUPPORT
2017-07-15 23:46:33 -04:00
Adrien Beraud
43ff0e9e52
network engine: handle EAGAIN, ENETUNREACH
...
Handle a few common error codes from send():
* EAGAIN: reschedule without increasing retry count.
This prevent nodes from failing on slow/very slow connections.
* ENETUNREACH, EHOSTUNREACH: expire the node immediately instead
of waiting for an answer, to expire IPv6 nodes quickly if no
IPv6 network is available.
2017-07-15 23:36:33 -04:00
Adrien Beraud
73bcebf355
license cleanup
2017-04-10 01:43:20 +02:00
Adrien Beraud
696ac1bbd5
network engine: print error if send fails
...
for now just print an error
2017-04-05 17:52:34 +02:00
Adrien Beraud
ab7d175322
network engine: make buffer length depend on HASH_LEN
2017-03-07 23:14:25 +01:00
Adrien Béraud
c4d5621f67
network: treat loopback address as sender address
...
When learning about nodes in an answer,
we used to drop nodes with loopback address.
Address is now replaced by the packet sender
address and the port is preserved.
2017-02-10 00:10:11 -05:00
Adrien Béraud
34908d573f
network engine: use make_shared
2017-02-08 14:14:06 -05:00
Adrien Béraud
ac65ca5177
add shortcut Sp for std::shared_ptr
2017-01-24 23:38:31 -05:00
Simon Désaulniers
b03a8b5b50
update license notice (2017)
2017-01-13 17:27:29 -05:00
Adrien Béraud
b6dca5ccd6
dht: use new NodeStats structure to provide stats
2017-01-10 23:34:56 -05:00
Adrien Béraud
7f84c1e397
utils: remove useless definitions
2016-11-23 15:12:37 -05:00
Simon Désaulniers
2d9f6241a9
net: don't close socket on listen renew
2016-11-08 16:07:15 -05:00
Simon Désaulniers
ab7d1d6582
dht,net: introduce socket, support multiple listen
...
Since the initial implementation of listen operation, multiple listen requests
from a single node on a same hash was not possible without singular
inconsistencies. The flaw was coming from the fact that nodes receiving listen
request could not differentiate between listen refresh request and a new
independent listen request.
This patch introduces the new net::Socket structure which in time will enable
remote nodes to send update for a storage while differentiating between
concurrent listen requests. A socket has a unique identifier which consists of a
transaction id as defined in the OpenDHT protocol.
2016-11-07 06:44:15 -05:00
Simon Désaulniers
77ea6d8c2f
net: create net namespace, moving relevant structs
2016-11-05 19:29:00 -04:00
Adrien Béraud
6703e039b1
network_engine: deserialize proper number of fields
2016-10-26 17:50:30 -04:00
Adrien Béraud
1d62b3ca64
log: add InfoHash filter
...
* filter log entries with new method setLogFilter
* filter by node id, search or infohash
* add optional parameter to 'log' in dhtnode
2016-10-24 02:09:38 -04:00
Adrien Béraud
9dc6004329
network engine: cancel request when clearing listen status
2016-10-19 13:58:18 -04:00
Adrien Béraud
d4bd17a2dc
dhtrunner: use a second condition variable for bootstrap
2016-10-19 13:34:33 -04:00
Adrien Béraud
0d646eb244
network engine: log cleanup
2016-10-19 01:01:51 -04:00
Simon Désaulniers
6743cbbf50
dht: introduce "refresh" operation
...
This operation requests a node to refresh a value's time_point information of
its lifetime begining. This is intended to fix the *permanent put* operation
which has been having syncing issues since the introduction of an enhanced and
lighter put operation.
2016-10-17 11:56:54 -04:00
Adrien Béraud
96da4cd85d
build: make logs optional at build time
2016-10-16 22:36:42 -04:00
Adrien Béraud
9440c03048
dht: log cleanup
2016-10-16 22:36:24 -04:00
Adrien Béraud
aa611bde50
network engine: cleanup
2016-10-15 20:07:37 -04:00