Page 1 of 1

Using the TAP driver with windows 7.

Posted: Tue Feb 21, 2012 9:01 am
by Chipot
Hello.

Me and my classmate are coding our own tun/tap based VPN since few weeks, and we
want to port it on windows.

I learned about the tap driver released by the OpenVPN project, but I failed at
finding any good quality documentation about it. Can you point me at some
resources or tutorials on how to behave with the tap driver under windows ?

As far I know, in the OpenVPN source code, you use CreateFile to create a
network interface handle but I don't quite understand how you get that device
Path. In the Windows device manager I can find a Physical Device Object Name
which is something like "\Device\000000b2". Can I pass this directly to
CreateFile ? Or do I need to prefix this with "\\.\" or something like this ?

Thanks !

Re: Using the TAP driver with windows 7.

Posted: Tue Feb 21, 2012 10:12 pm
by janjust
read the openvpn sources, file tun.c ; the routines you are looking for are the WIN32 version of 'open_tun' and 'tun_read_queue'