~ubuntu-branches/ubuntu/trusty/tomahawk/trusty-proposed

« back to all changes in this revision

Viewing changes to thirdparty/libportfwd/README

  • Committer: Package Import Robot
  • Author(s): Harald Sitter
  • Date: 2013-03-07 21:50:13 UTC
  • Revision ID: package-import@ubuntu.com-20130307215013-6gdjkdds7i9uenvs
Tags: upstream-0.6.0+dfsg
ImportĀ upstreamĀ versionĀ 0.6.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
libportfwd
 
2
----------
 
3
A basic, lightweight c++ wrapper around miniupnp and nat-pmp libraries
 
4
for setting up port fwds, detecting max up/downstream bandwidth, and 
 
5
finding out external IP address.
 
6
 
 
7
See: http://miniupnp.free.fr/
 
8
 
 
9
Designed to wrap up miniupnpc+natpmp libs into a static lib with a small API
 
10
so other projects can easily setup port fwds without shipping extra libs/deps.
 
11
 
 
12
Should detect any upnp or nat-pmp router and automatically use the appropriate
 
13
library under the hood.
 
14
 
 
15
Uses cmake to build needed bits of miniupnpc.
 
16
 
 
17
NB/TODO
 
18
-------
 
19
I don't have a nat-pmp capable device (eg: Airport Express)
 
20
so haven't implemented that bit yet. Only supports upnp atm.
 
21
 
 
22
Usage
 
23
-----
 
24
See the demo in main.cpp, but here's the jist:
 
25
 
 
26
 Portfwd pf;
 
27
 pf.init(2000);   // 2000 = ms to wait for response from router
 
28
 pf.add(1234);    // port to fwd to you
 
29
 pf.remove(1234); // remove port fwding on exit