Adrien Béraud
e9f007025f
node: make most fields private
2017-10-13 01:10:09 +02:00
Adrien Béraud
6ce1531e1f
node: make id const
2017-10-12 15:44:34 +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
024dd42e5a
dht: remove processMessage
2017-10-11 17:36:20 +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
73f26e120d
doc: improve documentation
2017-10-10 18:16:33 +02:00
Adrien Béraud
d0bcd39341
IpServiceAnnouncement: use SockAddr
2017-10-09 15:06:34 +02:00
Adrien Béraud
42125367d7
SockAddr: add documentation
2017-10-09 14:46:35 +02:00
Adrien Béraud
d87a4ef28c
InfoHash: add operator==
2017-10-07 11:35:56 +02:00
Adrien Béraud
a3f4388556
InfoHash: increase toFloat precision
2017-10-07 11:35:56 +02:00
Adrien Béraud
97ee4b6fea
dht: move onNewNode to RoutingTable
2017-10-07 11:35:56 +02:00
Adrien Béraud
0abd288958
SockAddr: factorize setters
2017-10-05 14:09:56 +02:00
Adrien Béraud
131073e211
SockAddr: cleanup
2017-09-27 11:36:42 +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
a82f575232
NodeExport: add ostream operator
2017-08-30 10:48:49 +02:00
Adrien Beraud
bedb51bf52
crypto: add EC curve identity generation
2017-08-28 12:03:15 -04:00
Adrien Béraud
1b9e9452c4
NodeExport: add msgpack serialization
2017-08-28 12:02:09 -04:00
Adrien Beraud
83d1cb97c8
dht: cleanup sendCachedPing
2017-07-16 23:30:58 -04:00
Adrien Beraud
477799a2b9
dht: remove unused method
2017-07-16 23:30:58 -04:00
Adrien Beraud
7e8c9ce944
dht: use SockAddr& in makeToken
2017-07-16 23:30:58 -04:00
Adrien Beraud
6decb6609a
dht: use uint64_t to store secret
2017-07-16 23:30:58 -04:00
Adrien Beraud
e69d61d8c7
dht: move request to src
2017-07-16 17:45:24 -04:00
Adrien Beraud
61f91d626b
dht: move Storage, Listener out of the Dht class
2017-07-16 15:04:18 -04:00
Adrien Beraud
732d10713d
dht: minor coverity fixes
2017-07-16 13:39:14 -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
8a123f9f68
network: prevent sending packets larger than 1280 bytes
2017-07-12 11:24:58 -04:00
Simon Désaulniers
b96d0de8a2
python: make use of Filter, Where in DhtRunner.get
2017-06-27 09:59:01 +02:00
Simon Désaulniers
98c4e39ed1
python: expose queries to API
2017-06-26 17:56:44 -04:00
Simon Désaulniers
9c483880cb
value: prevent queries redundant information
2017-06-22 18:39:25 -04:00
Adrien Beraud
39a254ce9f
log: add syslog support
...
Add support to log using standard syslog,
add related option in dhtnode.
dhtnode will use syslog by default
when starting in daemon mode and
no logfile is defined.
2017-05-30 12:20:09 +02:00
Adrien Beraud
37d8481e28
crypto: handle null certificate in getCopy(), getChain()
2017-05-13 17:18:00 -04:00
Adrien Beraud
d9bced965b
crypto: add TrustList move operator, prevent copy
2017-05-01 16:26:12 -04:00
Adrien Beraud
d0a8a92a56
crypto: add GnuTLS trust list wrapper
2017-04-27 04:45:59 +02:00
Adrien Beraud
65de9622fb
crypto: add Certificate::getChainWithRevocations
2017-04-26 16:43:06 +02:00
Adrien Beraud
e8cb635b3a
crypto: add getChain()
2017-04-22 19:48:32 +02:00
Adrien Beraud
f41c8fef99
crypto: unify API across GnuTLS versions
...
Throw an exception if GnuTLS is too old
instead of not providing the API.
Also consistently throw in case of hash error,
and return 0 for an empty hash, for both
PublicKey and Certificate.
2017-04-20 17:07:21 +02:00
Adrien Beraud
79e266aac6
crypto: don't build getLongID() with old gnutls
2017-04-14 16:57:58 +02:00
Adrien Beraud
9d75ed14b4
infohash: add to_c_str(), improve toString() performance
2017-04-10 15:48:04 +02:00
Adrien Beraud
73bcebf355
license cleanup
2017-04-10 01:43:20 +02:00
Adrien Beraud
4132c63faf
def: fix typo
2017-04-09 17:22:18 +02:00
Adrien Beraud
2fc7cc57a9
default types: fix uninitialized fields
2017-04-05 18:15:34 +02:00
Adrien Beraud
732479736b
select: cleanup
2017-04-05 17:52:34 +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
b73a50bace
pht: prevent unneeded use of shared_ptr
...
Prefer a const reference instead of shared_ptr if the shared_ptr
is not used and argument type is not changed in the method.
This allows to prevent useless shared_ptr allocations.
In getRealPrefix, use OpState to track state instead of using many
different shared_ptr.
2017-04-03 19:10:49 +02:00
Adrien Beraud
70ccbe4e40
value: remove FieldSelectorDescription
...
FieldSelectorDescription is just Value::Field and
adds nothing on top of it.
Remove it in favor of Value::Field.
2017-04-03 19:10:01 +02:00
Adrien Beraud
5823e98c76
rng: add missing header
2017-03-29 03:07:09 +02:00
Adrien Beraud
e2ce496779
crypto: add Certificate::getCopy()
2017-03-29 00:22:19 +02:00