Mildred Ki'Lya | 27 Aug 08:58 2014

DHT Store: why immutable values are that way?


I have been playing with the DHT store extension in my ming, and I still 
fail to see how the immutable values could be useful

* If you know the key, you know exactly what the value should contain 
(because the key is a hash of the whole value)
* Hence, you can only use immutable values to store things that are too 
large to be included verbatim
* However, you cannot be sure that any value larger than 1000 bytes 
would be stored, so it is only useful to store small values

Is there any application to that ?

However, I see another kind of store operation that is not described in 
the DHT store extension that would be very useful. Couldn't it be part 
of the extension as well ?

* Non authenticated values that can have any arbitrary key
* Multiple values could be stored on the same key. Storing a value would 
not overwrite the other values, just add to the list of values
* getting the value would get the list of all values that were stored
* each value in the list would have a separate expire time

This is very similar to announce_peer, except it could be used to store 
arbitrary information on any arbitrary key. It can serve as a central 
registry where we can publish information *about* some key. I can 
imagine tons of applications to that.

Do you think it might be worth the inclusion in the future DHT store 
(Continue reading)

Steven Siloti | 27 Aug 06:09 2014

[PATCH] print fixes for WIN32

I encountered some problems with trunk getting client_test to run on 
windows. Here's are the fixes.

Steven Siloti
diff --git a/examples/print.cpp b/examples/print.cpp
index a87ec01..07e166b 100644
--- a/examples/print.cpp
+++ b/examples/print.cpp
 <at>  <at>  -11,11 +11,14  <at>  <at> 


+#include "libtorrent/config.hpp"
 #include "print.hpp"

-#include <stdio.h> // for snprintf
 #include <stdlib.h> // for atoi
+#include <string.h> // for strlen
 #include <cmath>
+#include <algorithm> // for std::min

 char const* esc(char const* code)
 <at>  <at>  -263,7 +266,9  <at>  <at>  void print(char const* str)
 #ifdef _WIN32

(Continue reading)

Calum Lind | 26 Aug 15:24 2014

1.0.1 python build issues

Firstly a small issue, there appears to be a path issue getting
SVN_REVISION, (at the sed call in configure the working dir is the
build dir):

    sed: can't read include/libtorrent/version.hpp: No such file or directory

When configuring with a specified build dir, `dh_auto_configure
--builddirectory build-pytest` there is a resulting build error
because is not copied to the build dir. I can fix this easily
in the deb rules file but I wonder if this is something that should be
done by configure? I have noticed that the rules file also contains a
line to copy 'bindings/python/src' over, could this be included in
configure too?

I keep seeing this warning:
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is
valid for Ada/C/ObjC but not for C++ [enabled by default]

I then encountered an issue when dh tries to build: e.g.
`dh_auto_build --builddirectory build/bindings/python2.7`

src/alert.cpp: In function ‘void bind_alert()’:
src/alert.cpp:533:12: error: ‘torrent_update_alert’ was not declared
in this scope
src/alert.cpp:533:67: error: template argument 1 is invalid
src/alert.cpp:535:34: error: ‘torrent_update_alert’ is not a class or namespace
src/alert.cpp:536:34: error: ‘torrent_update_alert’ is not a class or namespace

I am not sure the precise issue but I think it's not looking at the
correct include files (possibly system installed 0.16 ones) so I am
(Continue reading)

Jason Fried | 26 Aug 08:48 2014

python3 bindings?

I found the python3 bytes patches to the python bindings, any reason those patches never made it into the release?
As far as i can tell it doesn't break python2 compatibility, I ran a basic torrent client under each. 

Also is there anyway we could get a __hash__ function added to the exposed big number bindings, would make it
possible to use info_hash as the key in a python dictionary
Sent from Mailbox
Slashdot TV.  
Video for Nerds.  Stuff that matters.
Libtorrent-discuss mailing list
Libtorrent-discuss <at>
Calum Lind | 26 Aug 01:26 2014

1.0.1 offline docs

The debian package has a large patch to make the docs available
offline however I noticed with 1.0.1 that all the html files are now

For the most part the docs are fine but there are a few issues that I
can see which could be fixed.

 * I see base.css and rst.css are in repo but they need including in
the tarball and relevant template.txt links modified.
 * In template.txt Home could point to index.html and Product and
Contact should be absolute links to the website. I did wonder since
you removed your company banner if these three links simply be
 * bittorrent.pdf link in index.html obviously doesn't work, not sure
of the solution here.

If the user is really offline then the sourceforge and flattr logos
will disappear but I don't think this is an issue.

Slashdot TV.  
Video for Nerds.  Stuff that matters.
Calum Lind | 25 Aug 23:59 2014

RC 0.16 make errors with build_dist

I was attempting to create an Ubuntu PPA package from the RC_0_16
branch and assume you use build_dist to create a clean package folder
but ran into quite a few issues with it. Mainly problems with the docs
it seems, I have moved onto 1.0.1 for now... :)

Separately I noticed the following patch that has been in the debian
package for a long time and is really trivial to add:

Slashdot TV.  
Video for Nerds.  Stuff that matters.
Calum Lind | 25 Aug 18:56 2014

Fwd: I2P proxy and listen alert

So I tested the patch you provided and I can now see the i2p_alert and
it works well for "" but not u"" still getting "Connection refused"

I think you must have fixed the segfault since 0.16.16 which I am
pretty sure was due to setting i2p_proxy twice in a row too quickly.
It's not segfaulted in latest 0.16 code but I did notice in one i2p
alert message that there is a spelling mistake:  "Operation canceled".

If needed here is the python script, I've been using:

Slashdot TV.  
Video for Nerds.  Stuff that matters.
Mildred Ki'Lya | 22 Aug 23:29 2014

DHT Store: get notified of a value change


I'm new here, and I subscribed because I am developping an application 
that uses libtorrent <>. This 
application would make use of the new dht store extension. I was 
wondering if this was the main place to talk about it or if there is a 
more specific place.

I would like my application to get notified when a value stored using 
this extension changes. In fact, I'd like the author of the change to 
notify everyone interested in it. I wonder if that has been already 

My naive idea in implementing it would be to have anyone (identified by 
the node id N) interested in a resource R, identified by its hash, 
register a value in the DHT with R as the key and N as one of the 

When the owner of the resource R want to update all its subscribers, it 
would look at all values that were stored with key R, and get a list of 
interested node ids.

This way of storing values is not described in the store extension, and 
I wondered if it could be added. Or if we could find a better 
notification mechanism.

What do you think?


(Continue reading)

Cooper Lees | 21 Aug 20:46 2014

Offering Patches for Libtorrent 0.16.16 - IPv6 ToS Marking + IPv6 LSD


I would like to share some diffs for features we’ve found handy and think they are worth sharing and
getting pushing into the main codebase. We’ve applied them to 0.16.16, but I think they could easily go
to 1.0.1

## Traffic ToS: (Manually summarized - could be errors) (RAW - With automated formatting correction)

 We wanted to mark traffic so torrent traffic can not saturate parts of our network.

Test Plan:
  Been in production for > 1 year - Stopped certain bottlenecks of the network we were hitting.

## IPv6 LSD: We wanted IPv6 local peer discovery for our IPv6 only hosts

   There's no real spec for LSD for IPv6, but this works.  We use
    ff15::efc0:988f as the ipv6 multicast address to use to find IPv6 peers
    within a rack.  ff15::efc0:988f was picked because on the internet I
    found other IPv6 multicast examples and they used ff15::1, so I used
    efc0:988f for the last 32 bits because it is the hex representation of

(Continue reading)

Calum Lind | 20 Aug 23:29 2014

I2P proxy and listen alert

I noticed when testing some new listen port code in Deluge that there
is a listen alert before I have even called listen_on.

I initially thought it was from the session constructor but the docs
say that it should require manually opening the port with listen_on if
just the fingerprint is supplied.

After an epic and quite puzzling debug session I eventually I tracked
this down to i2p_proxy settings being present in a saved session state
and when this state was loaded after initialising the session it
resulted in the errant listen alert.

As this doesn't appear to occur with proxy settings, could this be a bug?

This was on lt 0.16.16 and the i2p_proxy values were blank.

Slashdot TV.  
Video for Nerds.  Stuff that matters.
Calum Lind | 18 Aug 20:19 2014

Peer IP in created torrent file

I had a user asking the question whether their IP instead of a tracker
could be included when creating a torrent file, looking at the spec I
see no mention of this functionality but was curious if this is
something that's possible?