Hi Gert, 2012/2/8 Gert Doering <g...@greenie.muc.de>: > On Wed, Feb 08, 2012 at 11:27:10AM -0800, James Ring wrote: >> Does other code within openvpn care whether the fd is a UNIX socket or >> a tun/tap device? I'm guessing there may be some ioctls it wants to >> perform on the device. > > There aren't any ioctl()s (I'm aware of) for tun/tap devices, but > blocking/non-blocking behaviour might be an interesting problem,
"The file descriptor is put into non-blocking mode by default to avoid blocking Java threads." [0] >> Other than that, openvpn would be reading and >> writing IP packets with an encrypted payload and the Java wrapper >> would be responsible for forwarding the bytes between the UNIX domain >> socket and the actual tun device. > > Don't show idea that to Jan-Just, he's already complaining that OpenVPN > wastes too many CPU cycles... So let's hope the fd passing I mentioned in my other mail works on Android. :) Cheers Fabian 0: http://developer.android.com/reference/android/net/VpnService.Builder.html#establish()