WINTUN example user space app?

Duane Ellis duane at
Tue Mar 10 05:41:12 CET 2020

Hi - 

I'd like to use WINTUN for a project I'm working on but - I'm a bit stuck.

I know how to make things work on Linux, but I do not know this part of windows .

In my case, I need to take packets - encapsulate them into a serial protocol and send them to a radio,
Then - take packets from the radio and pump them back into the network stack.
It is sort of like SLIP ... but its not... 

For me - the above is trival on Linux, but.. my challenge is this statement:


>>> After loading the driver and creating a network interface the typical way using SetupAPI, open the NDIS device object associated with the PnPInstanceId, enabling all forms of file sharing:

There are ENDLESS windows rabbit holes, and rat holes to go exploring...  I just don't know the setup api that well.

Is there a "full simple windows example app"  that I can use as a starting point?

Something simplistic to start with, in C, C++ or C# 

a) Given an network interface name on the command line
b) Opens that interface 
c) Prints to stdout the some of the packets it received.
d) Possibly injects a few example packets, ie: send a ping to some address like or something?

If WINTUN is not the place I should be please let me know...

More information about the WireGuard mailing list