UPnP support in tinc

David Nicol davidnicol at gmail.com
Wed Nov 11 22:57:41 CET 2015


On Wed, Nov 11, 2015 at 3:04 PM, Etienne Dechamps <etienne at edechamps.fr>
wrote:

> miniupnpc only provides a blocking API, there is no way to
> integrate it into an event loop. That pretty much means we will need
> to run the UPnP code in a separate thread. Which means using pthreads
> on POSIX, and then we would either have a dependency on pthreads-Win32
> on Windows, or we would need to #ifdef Win32 thread code in.
>
> I'm wondering what your thoughts are on this topic. I can definitely
> give miniupnpc integration a try if you are okay with adding these
> extra dependencies to tinc. It would be very easy to provide a
> configure option to disable UPnP support, making these new
> dependencies less of a concern.
>


it is entirely possible to write code that uses threads on Win32 and forks
on POSIX by abstracting the communication bits generically. Signalling
could work over pipes on both.

https://msdn.microsoft.com/en-us/library/windows/desktop/aa365152(v=vs.85).aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20151111/3cf3e7d7/attachment.html>


More information about the tinc mailing list