Const correctness.
Support autoconf's --runstatedir option. Put the PID file in @runstatedir@ instead of @localstatedir@/run. This requires autoconf 2.70, which is not released yet, so add a fallback to use @localstatedir@/run if @runstatedir@ is not set.
Reformat all code using astyle.
Fix return type of vde_recv() as well. In this case it is not really necessary as the conversion to int will already take care of ensuring the return value is treated as signed.
Fix return value type of vde_send(). The libvdeplug_dyn.h header file incorrectly declares the return type of vde_send() to size_t, while in reality it is ssize_t.
Set FD_CLOEXEC flag on all sockets. Scripts called by tinc would inherit its open filedescriptors. This could be a problem if other long-running daemons are started from those scripts, if those daemons would not close all filedescriptors before going into the background. Problem found and solution suggested by Nick Hibma.
Allow linking with multiple device drivers. Apart from the platform specific tun/tap driver, link with the dummy and raw_socket devices, and optionally with support for UML and VDE devices. At runtime, the DeviceType option can be used to select which driver to use.