LaKabane / libtuntap

The portable Tun/Tap devices configuration utility
193 stars 63 forks source link

add utun for darwin #16

Open majestrate opened 5 years ago

majestrate commented 5 years ago

add support for apple's non standard utun network interace creation mechanism.

tleguern commented 5 years ago

Call for testing: @chipot or @ntnmrndn 😃

ntnmrndn commented 5 years ago

Hi, sorry for the delay, I'm starting to review the PR.

It doesn't compile on my computer:

libtuntap/tuntap-unix-darwin.c:63:39: error: use of undeclared identifier 'errno'

Adding the include #include <sys/errno.h> solves the issue As for the tests, we went from

14 - tuntap.test14 (Failed) 16 - tuntap.test18 (Failed)

to

2 - tuntap.test02 (Failed) 6 - tuntap.test06 (Failed) 8 - tuntap.test08 (Failed) 10 - tuntap.test10 (Failed) 12 - tuntap.test12 (Failed) 14 - tuntap.test14 (Failed) 16 - tuntap.test18 (Failed) 18 - tuntap.test22 (Failed) 20 - tuntap.test24 (Failed) 22 - tuntap.test26 (Failed)

tleguern commented 5 years ago

@ntnmrndn: It is clear every tun operations are failing. Can you run the failing regress tests individually and share the output please ?

ntnmrndn commented 5 years ago

"Can't get interface values"

tleguern commented 5 years ago

I think the code needs to be split a bit further than this as the traditional ioctl calls are not going to work on utun interfaces. The code is currently able to create an utun device of unspecified number but can't manipulate it yet.