Tatsuhiro Tsujikawa
10cdc59297
Remove vbegin and vend in favor of std::begin and std::end
2013-06-24 21:46:42 +09:00
Tatsuhiro Tsujikawa
07d270c87e
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
2013-06-22 01:10:38 +09:00
Tatsuhiro Tsujikawa
8b0c701266
Removed trailing spaces
2012-10-01 23:52:22 +09:00
Tatsuhiro Tsujikawa
3c73b6e767
Eliminated inet_ntoa and inet_ntop. Use getnameinfo() instead.
2011-08-20 21:53:48 +09:00
Tatsuhiro Tsujikawa
dea7a7969c
Rewritten DHTRoutingTableSerializer using stdio instead of stream.
2011-08-05 22:15:55 +09:00
Tatsuhiro Tsujikawa
5db7b123b5
2010-10-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Use inet_ntoa if inet_ntop is not available. Since inet_ntoa does
not handle IPv6 address, IPv6 support is limited in this
case. Fixed unit test error under mingw32.
* configure.ac
* src/AsyncNameResolver.cc
* src/SocketCore.cc
* src/bittorrent_helper.cc
* test/BittorrentHelperTest.cc
* test/DHTMessageFactoryImplTest.cc
* test/DHTRoutingTableDeserializerTest.cc
* test/DHTRoutingTableSerializerTest.cc
* test/DefaultBtAnnounceTest.cc
* test/Metalink2RequestGroupTest.cc
* test/UTPexExtensionMessageTest.cc
2010-10-04 14:33:49 +00:00
Tatsuhiro Tsujikawa
26d6692376
2010-08-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added IPv6 DHT. Added --dht-entry-porint6, --dht-file-path6,
--dht-listen-addr6 and --enable-dht6 option. IPv6 DHT is disabled
by default. To use IPv6 DHT, you need to use --enable-dht6 and
specify a global unicast address to --dht-listen-addr6. IPv6 DHT
is highly experimental.
* src/BtSetup.cc
* src/DHTAutoSaveCommand.cc
* src/DHTAutoSaveCommand.h
* src/DHTConnectionImpl.cc
* src/DHTConnectionImpl.h
* src/DHTEntryPointNameResolveCommand.cc
* src/DHTFindNodeReplyMessage.cc
* src/DHTFindNodeReplyMessage.h
* src/DHTGetPeersMessage.cc
* src/DHTGetPeersReplyMessage.cc
* src/DHTGetPeersReplyMessage.h
* src/DHTMessageFactory.h
* src/DHTMessageFactoryImpl.cc
* src/DHTMessageFactoryImpl.h
* src/DHTMessageTracker.cc
* src/DHTRegistry.cc
* src/DHTRegistry.h
* src/DHTRoutingTableDeserializer.cc
* src/DHTRoutingTableDeserializer.h
* src/DHTRoutingTableSerializer.cc
* src/DHTRoutingTableSerializer.h
* src/DHTSetup.cc
* src/DHTSetup.h
* src/FtpConnection.cc
* src/LpdMessageReceiver.cc
* src/OptionHandlerFactory.cc
* src/OptionHandlerImpl.h
* src/PeerInteractionCommand.cc
* src/RequestGroup.cc
* src/SocketCore.cc
* src/SocketCore.h
* src/bittorrent_helper.cc
* src/bittorrent_helper.h
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/DHTConnectionImplTest.cc
* test/DHTFindNodeReplyMessageTest.cc
* test/DHTGetPeersMessageTest.cc
* test/DHTGetPeersReplyMessageTest.cc
* test/DHTMessageFactoryImplTest.cc
* test/DHTRoutingTableDeserializerTest.cc
* test/DHTRoutingTableSerializerTest.cc
* test/LpdMessageDispatcherTest.cc
* test/MockDHTMessageFactory.h
2010-08-07 14:15:21 +00:00
Tatsuhiro Tsujikawa
2bd5020f81
2010-08-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added bittorrent::packcompact() which replaces
bittorrent::createcompact() and supports IPv6 addresses. Rewritten
bittorrent::unpackcompact() and bittorrent::extractPeer() to
support IPv6 addresses. Fixed added.f flags in ut_pex.
* src/BtConstants.h
* src/DHTFindNodeReplyMessage.cc
* src/DHTGetPeersReplyMessage.cc
* src/DHTMessageFactoryImpl.cc
* src/DHTRoutingTableDeserializer.cc
* src/DHTRoutingTableSerializer.cc
* src/DHTTokenTracker.cc
* src/DefaultBtAnnounce.cc
* src/UTPexExtensionMessage.cc
* src/bittorrent_helper.cc
* src/bittorrent_helper.h
* test/BittorrentHelperTest.cc
* test/DHTFindNodeReplyMessageTest.cc
* test/DHTGetPeersReplyMessageTest.cc
* test/DHTMessageFactoryImplTest.cc
* test/DHTRoutingTableSerializerTest.cc
* test/DefaultExtensionMessageFactoryTest.cc
* test/UTPexExtensionMessageTest.cc
2010-08-03 11:44:24 +00:00
Tatsuhiro Tsujikawa
886f8ee58e
2010-03-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Removed arrayLength. Defined A2_ARRAY_LEN as macro to calculate
size of array at compile time.
* src/array_fun.h
* test/BitfieldManTest.cc
* test/BtPortMessageTest.cc
* test/DHTRoutingTableDeserializerTest.cc
* test/DHTRoutingTableSerializerTest.cc
* test/DownloadHelperTest.cc
* test/LongestSequencePieceSelectorTest.cc
* test/MultiDiskAdaptorTest.cc
* test/OptionParserTest.cc
* test/PriorityPieceSelectorTest.cc
* test/array_funTest.cc
2010-03-25 14:22:43 +00:00
Tatsuhiro Tsujikawa
f15d22b619
2010-03-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added vbegin() and vend() for fixed sized array.
* src/DownloadHandlerConstants.cc
* src/FeatureConfig.cc
* src/OptionHandlerFactory.cc
* src/ServerStat.cc
* src/TimeA2.cc
* src/XmlRpcMethod.cc
* src/array_fun.h
* src/download_helper.cc
* src/messageDigest.cc
* src/util.cc
* test/BittorrentHelperTest.cc
* test/DHTRoutingTableDeserializerTest.cc
* test/DHTRoutingTableSerializerTest.cc
* test/DefaultBtAnnounceTest.cc
* test/DefaultBtProgressInfoFileTest.cc
* test/DownloadContextTest.cc
* test/DownloadHelperTest.cc
* test/FeatureConfigTest.cc
* test/FeedbackURISelectorTest.cc
* test/HttpRequestTest.cc
* test/InOrderURISelectorTest.cc
* test/MSEHandshakeTest.cc
* test/MultiDiskAdaptorTest.cc
* test/MultiFileAllocationIteratorTest.cc
* test/PriorityPieceSelectorTest.cc
* test/RequestGroupManTest.cc
* test/UtilTest.cc
* test/XmlRpcMethodTest.cc
* test/a2algoTest.cc
* test/array_funTest.cc
2010-03-25 13:51:10 +00:00
Tatsuhiro Tsujikawa
c342bde962
2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Use vector instead of deque for containers which is used for
mostly read-only purpose.
2010-02-28 12:30:11 +00:00
Tatsuhiro Tsujikawa
e976b23728
2009-10-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Renamed Util.{cc,h} as util.{cc,h}
* src/Util.cc
* src/Util.h
* src/util.cc
* src/util.h
2009-10-22 15:35:33 +00:00
Tatsuhiro Tsujikawa
c6035b2e24
2009-10-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Moved static functions in Util class to namespace util.
* src
* test
2009-10-22 15:09:00 +00:00
Tatsuhiro Tsujikawa
99654e4160
2009-09-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Move all functions in PeerMessageUtil to bittorrent_helper.
* src/BtBitfieldMessage.cc
* src/BtBitfieldMessageValidator.h
* src/BtExtendedMessage.cc
* src/BtHandshakeMessage.cc
* src/BtHandshakeMessageValidator.h
* src/BtPieceMessage.cc
* src/BtPieceMessageValidator.h
* src/BtPortMessage.cc
* src/DHTFindNodeReplyMessage.cc
* src/DHTGetPeersReplyMessage.cc
* src/DHTMessageFactoryImpl.cc
* src/DHTRoutingTableDeserializer.cc
* src/DHTRoutingTableSerializer.cc
* src/DHTTokenTracker.cc
* src/DefaultBtMessageFactory.cc
* src/IndexBtMessage.cc
* src/IndexBtMessage.h
* src/IndexBtMessageValidator.h
* src/Makefile.am
* src/PeerMessageUtil.cc: Removed.
* src/PeerMessageUtil.h: Removed.
* src/RangeBtMessage.cc
* src/RangeBtMessage.h
* src/RangeBtMessageValidator.h
* src/UTPexExtensionMessage.cc
* src/ZeroBtMessage.cc
* src/ZeroBtMessage.h
* src/bittorrent_helper.cc
* src/bittorrent_helper.h
* test/BittorrentHelperTest.cc
* test/BtAllowedFastMessageTest.cc
* test/BtBitfieldMessageTest.cc
* test/BtCancelMessageTest.cc
* test/BtChokeMessageTest.cc
* test/BtExtendedMessageTest.cc
* test/BtHandshakeMessageTest.cc
* test/BtHaveAllMessageTest.cc
* test/BtHaveMessageTest.cc
* test/BtHaveNoneMessageTest.cc
* test/BtInterestedMessageTest.cc
* test/BtNotInterestedMessageTest.cc
* test/BtPieceMessageTest.cc
* test/BtPortMessageTest.cc
* test/BtRejectMessageTest.cc
* test/BtRequestMessageTest.cc
* test/BtSuggestPieceMessageTest.cc
* test/BtUnchokeMessageTest.cc
* test/DHTFindNodeReplyMessageTest.cc
* test/DHTGetPeersReplyMessageTest.cc
* test/DHTMessageFactoryImplTest.cc
* test/DHTRoutingTableDeserializerTest.cc
* test/DHTRoutingTableSerializerTest.cc
* test/DefaultBtMessageFactoryTest.cc
* test/DefaultExtensionMessageFactoryTest.cc
* test/Makefile.am
* test/PeerListProcessorTest.cc
* test/PeerMessageUtilTest.cc: Removed.
* test/UTPexExtensionMessageTest.cc
2009-09-29 14:52:42 +00:00
Tatsuhiro Tsujikawa
a933438401
2009-05-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Fixed g++-4.4 compiler warning: dereferencing type-punned pointer
will break strict-aliasing rules
* src/PeerConnection.cc
* test/DHTRoutingTableSerializerTest.cc
2009-05-23 15:48:20 +00:00
Tatsuhiro Tsujikawa
15101a89a0
2008-08-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Bump up version number of dht.dat file to 3. In version 3
format, time
is stored in 64bit, network byte order.
New build can load old format(version 2) but it saves the file
in new
format. It means once you used new build, your dht.dat becomes
incompatible with older build.
* src/DHTRoutingTableDeserializer.cc
* src/DHTRoutingTableSerializer.cc
* test/DHTRoutingTableSerializerTest.cc
2008-08-25 11:55:30 +00:00
Tatsuhiro Tsujikawa
3505201f33
2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Rewritten SharedHandle. Now copy constructor taking raw pointer
has
keyword explicit and SharedHandle's default constructor
initializes
its internal obj to null, old implementation initializes it
using
obj's default constructor.
To assign null, write SharedHandle<T> x(...); x.reset();
TODO: test/SharedHandleTest.cc needs more tests.
* src/SharedHandle.h
2008-04-20 00:50:22 +00:00
Tatsuhiro Tsujikawa
8dacfe45b8
2008-03-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Added missing include files for MinGW
* test/HttpHeaderProcessorTest.cc
* test/DHTRoutingTableSerializerTest.cc
* test/DHTRoutingTableDeserializerTest.cc
* test/UriListParserTest.cc
2008-03-13 13:13:53 +00:00
Tatsuhiro Tsujikawa
fc0fa4203a
2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Use unsigned char for data store.
2008-03-07 12:05:50 +00:00
Tatsuhiro Tsujikawa
55552adb93
2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Included missing iostream.
* test/AllTest.cc
* test/BtDependencyTest.cc
* test/BtExtendedMessageTest.cc
* test/DHTConnectionImplTest.cc
* test/DHTMessageFactoryImplTest.cc
* test/DHTMessageTrackerEntryTest.cc
* test/DHTNodeTest.cc
* test/DHTRoutingTableSerializerTest.cc
* test/DefaultBtAnnounceTest.cc
* test/DefaultBtContextTest.cc
* test/DefaultBtMessageFactoryTest.cc
* test/DefaultExtensionMessageFactoryTest.cc
* test/HandshakeExtensionMessageTest.cc
* test/HttpResponseTest.cc
* test/MetalinkProcessorTest.cc
* test/MultiFileAllocationIteratorTest.cc
* test/SocketCoreTest.cc
* test/UTPexExtensionMessageTest.cc
2008-03-03 11:30:12 +00:00
Tatsuhiro Tsujikawa
0d130b77f4
2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Make room for future enchancements for IPv6 addresses.
Bump up version number of dht.dat file format to 2.
Not compatible with previous version.
* src/DHTRoutingTableSerializer.cc
* src/DHTRoutingTableDeserializer.cc
* test/DHTRoutingTableSerializerTest.cc
2008-02-21 02:19:55 +00:00
Tatsuhiro Tsujikawa
1b7c198289
2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Removed "using namespace std;" from all sources. Appended std::
prefix to c++
standard classes.
Included string.h where mem* function are used.
2008-02-08 15:53:45 +00:00
Tatsuhiro Tsujikawa
0f13363229
2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Added DHT functionality, compatible with mainline.
DHT is disabled by default. To enable it, give --enable-dht to
aria2c.
You may need to specify entry point to DHT network using
--dht-entry-point. DHT uses UDP port to listen incoming message.
Use --dht-listen-port to specify port number. Make sure that
your
firewall configuration can pass through UDP traffic to the port.
The routing table is saved in $HOME/.aria2/dht.dat.
* src/DHT*
* src/BNode.{h, cc}
* src/PeerInteractionCommand.cc: enable DHT functionality for a
particular torrent.
* src/Data.cc: Rewritten ctor.
* src/OptionHandlerFactory.cc: Added --enable-dht,
--dht-listen-port,
--dht-entry-point.
* src/DefaultBtInteractive.cc: Send port message if dht is
enabled.
* src/RequestGroup.cc: Initialize DHT functionality. When
download
ends, remove BtContext from DHTPeerAnnounceStorage.
* src/BtPortMessage.{h, cc}: Rewritten.
* src/message.h
* src/OptionHandlerImpl.cc
* src/option_processing.cc: Added --enable-dht,
--dht-listen-port,
--dht-entry-point.
* src/Dictionary.{h, cc} (remove): New function.
* src/prefs.h
* src/DefaultBtMessageFactory.h
* src/BtHandshakeMessage.cc
* src/ActivePeerConnectionCommand.cc
* src/SocketCore.{h, cc}: Added datagram socket support.
* src/DefaultBtMessageFactory.cc
* src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
Create DHT commands.
* src/BtMessageFactory.h
* src/PeerMessageUtil.{h, cc}
2008-02-01 17:36:33 +00:00