The IETF PPSP peer protocol reference implementation
C++ Python C JavaScript Shell Perl Other
Latest commit dda307f Oct 26, 2015 @badrock badrock Merge pull request #49 from fabianfreyer/feature-doxygen
Added doxyfile
Permalink
Failed to load latest commit information.
doc Merge pull request #32 from arno481/devel Jun 17, 2014
ext made picker timeout a global configurable var Jan 23, 2015
firefox
java - Works (stats output from module reaches Java) Oct 9, 2013
mfold - Import of ttuki.vtt.fi/svn/p2p-next/next-share/tags/M48/Next-Share/… Mar 13, 2012
scripts - Example script. Oct 9, 2013
tests added brake line option (options+=--max-code-length=120) May 31, 2014
.gitignore
Android.mk - Funky Android build env. Oct 9, 2013
Application.mk - Copied files from swift-droid-release-1.1. Oct 12, 2012
BUGS - Import of ttuki.vtt.fi/svn/p2p-next/next-share/tags/M48/Next-Share/… Mar 13, 2012
ChangeLog
Doxyfile Added doxyfile Aug 8, 2014
LICENSE
Makefile Update Makefile Feb 27, 2015
Makefile.mac compile swift with OpenSSL on Mac Jul 23, 2014
NativeLib.cpp added brake line option (options+=--max-code-length=120) May 31, 2014
README.md minor grammar fix Feb 19, 2014
SConstruct add print_backtrace() for Windows Sep 8, 2014
TODO
address.cpp main reformat all files to astyle k&r (options=--indent-namespaces, -… May 30, 2014
api.cpp
arno-build.bat - Copied files from swift-droid-release-1.1. Oct 12, 2012
avail.cpp manually adjusted spacing in function declaration/definition May 31, 2014
avail.h manually adjusted spacing in function declaration/definition May 31, 2014
avgspeed.cpp added brake line option (options+=--max-code-length=120) May 31, 2014
avgspeed.h
bin.cpp main reformat all files to astyle k&r (options=--indent-namespaces, -… May 30, 2014
bin.h main reformat all files to astyle k&r (options=--indent-namespaces, -… May 30, 2014
bin_utils.h main reformat all files to astyle k&r (options=--indent-namespaces, -… May 30, 2014
binmap.cpp
binmap.h added brake line option (options+=--max-code-length=120) May 31, 2014
channel.cpp avoid slow start when moving from k-a to congestion avoidance Jan 23, 2015
cmdgw.cpp fix #52: segfault while downloading many files at the same time Aug 28, 2014
com_tudelft_triblerdroid_swift_NativeLib.h main reformat all files to astyle k&r (options=--indent-namespaces, -… May 30, 2014
compat.cpp add print_backtrace() for Windows Sep 8, 2014
compat.h
content.cpp
do_tests.sh removed missing tests Oct 9, 2013
exttrack.cpp added brake line option (options+=--max-code-length=120) May 31, 2014
exttrack.h main reformat all files to astyle k&r (options=--indent-namespaces, -… May 30, 2014
getopt.c
getopt_long.c
getopt_win.h
hashtree.cpp
hashtree.h
httpgw.cpp added brake line option (options+=--max-code-length=120) May 31, 2014
live.cpp
livehashtree.cpp added brake line option (options+=--max-code-length=120) May 31, 2014
livehashtree.h manually adjusted spacing in function declaration/definition May 31, 2014
livesig.cpp added brake line option (options+=--max-code-length=120) May 31, 2014
livesig.h added brake line option (options+=--max-code-length=120) May 31, 2014
nat_test.cpp
nat_test_server.c
operational.h main reformat all files to astyle k&r (options=--indent-namespaces, -… May 30, 2014
send_control.cpp testing with different init values for cwnd Jan 23, 2015
sendrecv.cpp Update sendrecv.cpp Feb 27, 2015
serialize.h main reformat all files to astyle k&r (options=--indent-namespaces, -… May 30, 2014
sha1.cpp
sha1.h
statsgw.cpp
storage.cpp fix memory allocation and releasing in constructors and destructors Sep 8, 2014
svn-build-rev.py - Result of svn merge -x --ignore-eol-style -r 28812:29527 https://sv… Nov 12, 2012
svn-revision.h - Changed usec_time() on Windows to also return UTC, not just a micro… Oct 16, 2013
swarm.url - First version with BT tracker support. Sep 4, 2013
swarmmanager.cpp
swarmmanager.h added brake line option (options+=--max-code-length=120) May 31, 2014
swift.cpp reformatted usage output and added quiet description Jun 25, 2014
swift.h made picker timeout a global configurable var Jan 23, 2015
transfer.cpp fix memory allocation and releasing in constructors and destructors Sep 8, 2014
win32-build-jni.bat
win32-build.bat fix building scripts for windows Jun 5, 2014
xpimakedist-unix.sh
xpimakedist.bat - From arno-iet882-demo SwiftTransport dir. Apr 2, 2014
zerohashtree.cpp
zerostate.cpp

README.md

libswift

The multiparty transport protocol.

Description

This is Libswift (aka BitTorrent at the transport layer). Differently from TCP, the protocol does not use the ordered data stream abstraction. Effectively, it splits a file into 1KB packets and sends them around. The secret sauce is Merkle hash trees and binmaps.

Requires libevent-2.0.17 or higher.

See doc/index.html for marketing stuff, ideas and rants, doc/draft-ietf-ppsp-peer-protocol-00.txt for the drafr protocol specification, and *.cpp files for the actual code.

Usage

swift.cpp is the main exec file; it may be run as e.g.

$ ./swift -t node300.das2.ewi.tudelft.nl:20000 -h \
d1502706c46779d361a1d562a10da0a45c4c40e5 -f \
trailer.ogg

...to retrieve video and save it to a file.

Alternatively, you might play with the HTTP gateway, the preliminary version. First, run the seeder-tracker:

$ ./swift -f ~/Downloads/big_buck_bunny_480p_stereo.ogg -l 0.0.0.0:20000
Root hash: 7c462ad1d980ba44ab4b819e29004eb0bf6e6d5f

...then you may try running the swift-HTTP gateway...

$ ./swift -t 127.0.0.1:20000 -g 0.0.0.0:8080 -w

...and finally you may point your browser at the gateway...

http://127.0.0.1:8080/7c462ad1d980ba44ab4b819e29004eb0bf6e6d5f

If you use an HTML5 browser (Chrome preferred), you are likely to see the bunny trailer at this point...