UCIS/QuickTun — pull request #2 by linusyang (2014-03-01 11:51:52+00:00)
Title: Support Darwin's native utun device

Apple's XNU kernel supports native TUN interface called `utun` from iOS 4.1 and OS X 10.7 Lion. It is a bit different from the standard TUN interface, which is similar with the OpenBSD one.

This patch adds necessary code to build up the utun interface and set `session->use_pi = 2` for manipulating TUN devices just like OpenBSD. It is tested to work on OS X 10.9 Mavericks.

References:
OpenVPN `utun` patch: http://thread.gmane.org/gmane.network.openvpn.devel/7464/focus=7739
Mac OS X and iOS Internals: http://newosxbook.com/src.jl?tree=listings&file=17-15-utun.c