1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-29 18:30:18 +02:00
Files
tomahawk/libportfwd
Jeff Mitchell aaf7fc7c3f Install to "." makes libraries install into very bad (and non-working) locations. Put them
in lib like they're supposed to be...(and like they are elsewhere in the
app)
2010-12-30 20:28:29 -05:00
..
2010-10-27 03:24:56 +02:00
2010-10-17 05:32:01 +02:00

libportfwd
----------
A basic, lightweight c++ wrapper around miniupnp and nat-pmp libraries
for setting up port fwds, detecting max up/downstream bandwidth, and 
finding out external IP address.

See: http://miniupnp.free.fr/

Designed to wrap up miniupnpc+natpmp libs into a static lib with a small API
so other projects can easily setup port fwds without shipping extra libs/deps.

Should detect any upnp or nat-pmp router and automatically use the appropriate
library under the hood.

Uses cmake to build needed bits of miniupnpc.

NB/TODO
-------
I don't have a nat-pmp capable device (eg: Airport Express)
so haven't implemented that bit yet. Only supports upnp atm.

Usage
-----
See the demo in main.cpp, but here's the jist:

 Portfwd pf;
 pf.init(2000);   // 2000 = ms to wait for response from router
 pf.add(1234);    // port to fwd to you
 pf.remove(1234); // remove port fwding on exit