Author: | Arvid Norberg, arvid@rasterbar.com |
---|
Mainline DHT extensions
libtorrent implements a few extensions to the Mainline DHT protocol.
get_peers response
libtorrent always responds with nodes to a get_peers request. If it has peers for the specified info-hash, it will return values as well. This is because just because some peer announced to us, doesn't mean that we are among the 8 closest nodes of the info hash. libtorrent also keeps traversing nodes using get_peers until it has found the 8 closest ones, and then announces to those nodes.
client identification
In each DHT packet, an extra key is inserted named "v". This is a string describing the client and version used. This can help alot when debugging and finding errors in client implementations. The string is encoded as four characters, two characters describing the client and two characters interpreted as a binary number describing the client version.
Currently known clients:
uTorrent | UT |
libtorrent | LT |
MooPolice | MP |
GetRight | GR |