| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
|
|
|
|
|
| |
Discourage use of kernel interface, which gives us more flexibility if
we ever want to change it.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
|
|
|
|
| |
"Create" and "Open" natural names for these.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
|
|
|
|
|
|
| |
This makes the API parallel:
Wintun*Allocate*SendPacket -> WintunSendPacket
WintunReceivePacket -> Wintun*Release*ReceivePacket
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
|
|
|
|
|
| |
This makes our intentions a lot more clear, and in case we ever add
other version functions, makes the forward path simpler.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
|
|
|
|
|
|
|
| |
The iphlpapi takes both LUIDs and GUIDs but prefers LUIDs, so exposing
the NET_LUID makes sense. However, we were previously exposing the
configuration GUID, rather than the net GUID, which is confusing, so
just make it all go away.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
|
|
|
|
| |
...and add API for uninstalling it.
Signed-off-by: Simon Rozman <simon@rozman.si>
|
|
|
|
|
|
| |
Makes the API a bit more clear.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
|
|
|
|
|
|
|
|
| |
This is an appalling hack. We need the lib tool to generate a coff lib
with the "undecorate" parameter. And apparently the only way to do this
with the MSVC tools is by making a stub object, and then rewriting the
symbols using the def file. See Q131313 for Microsoft-sanctioned
details.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
|
|
|
|
| |
This allows clients to use it in WaitForMultipleObjects().
Signed-off-by: Simon Rozman <simon@rozman.si>
|
|
|
|
|
|
|
| |
Spinning on the WintunReceivePacket() while it returns
ERROR_NO_MORE_ITEMS achieves the same.
Signed-off-by: Simon Rozman <simon@rozman.si>
|
|
|
|
|
|
|
|
|
| |
- Return pointer to ring buffer with packet data allowing clients to
read/write directly. This eliminates one memcpy().
- Make sending/receiving packets thread-safe.
Signed-off-by: Simon Rozman <simon@rozman.si>
|
|
|
|
|
|
|
|
| |
Rather than every client reinvent the art of using the Wintun and its
ring buffers, we offer helper structs and functions to unify and
simplify Wintun usage.
Signed-off-by: Simon Rozman <simon@rozman.si>
|
|
|
|
|
|
| |
And other unifications with installer before merging.
Signed-off-by: Simon Rozman <simon@rozman.si>
|
|
|
|
| |
Signed-off-by: Simon Rozman <simon@rozman.si>
|
|
|
|
|
|
|
|
|
|
|
| |
Mind that this also fixes the order of adapter detection checks. A fast
test to eliminate non-Wintun adapters from iteration to speed things up
rendered the method incapable of detecting a non-Wintun adapter with the
name we are looking for.
ERROR_OBJECT_NOT_FOUND was replaced with ERROR_FILE_NOT_FOUND.
Signed-off-by: Simon Rozman <simon@rozman.si>
|
|
Signed-off-by: Simon Rozman <simon@rozman.si>
|