aboutsummaryrefslogtreecommitdiffstats
path: root/example (follow)
Commit message (Collapse)AuthorAgeFilesLines
* api: elevate to SYSTEM in WintunEnumAdapters()Simon Rozman2021-03-081-0/+11
| | | | | | | | | | | | | | The WintunEnumAdapters() requires namespace mutex. However, NamespaceTakePoolMutex() works as SYSTEM user only. WireGuard is using the WintunEnumAdapters() in its manager service to cleanup stale adapters. As the WireGuard manager service is running as SYSTEM, this requirement was not apparent before. This commit also extends the example project to list its existing adapters at start. Signed-off-by: Simon Rozman <simon@rozman.si>
* global: bump copyrightJason A. Donenfeld2021-01-301-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: remove return value from logger functionJason A. Donenfeld2020-11-101-3/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: remove WintunOpenAdapterDeviceObjectJason A. Donenfeld2020-11-051-2/+0
| | | | | | | 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>
* example: raise to 4MiBJason A. Donenfeld2020-11-051-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: rename WintunGetAdapter to WintunOpenAdapterJason A. Donenfeld2020-11-051-3/+3
| | | | | | "Create" and "Open" natural names for these. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: rename ReceiveRelease to ReleaseReceivePacketJason A. Donenfeld2020-11-051-3/+4
| | | | | | | | This makes the API parallel: Wintun*Allocate*SendPacket -> WintunSendPacket WintunReceivePacket -> Wintun*Release*ReceivePacket Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: move InititalizeWintun to top to be easier to findJason A. Donenfeld2020-11-051-33/+32
| | | | | | It's the primary function we want people copy and pasting. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: rename GetVersion to GetRunningDriverVersionJason A. Donenfeld2020-11-041-3/+4
| | | | | | | 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>
* example: account for buffer being drained too slowlyJason A. Donenfeld2020-11-041-3/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: use GetLastError() to report failures like standard Win32Simon Rozman2020-11-041-36/+51
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* example: account for adapter reuseJason A. Donenfeld2020-11-031-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: remove guid getterJason A. Donenfeld2020-11-031-5/+2
| | | | | | | | | 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>
* api: use 'open' name since caller must close handleJason A. Donenfeld2020-11-031-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: add pool/driver removal for uninstaller semanticsJason A. Donenfeld2020-11-031-8/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* example: add sal markingsJason A. Donenfeld2020-11-031-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: only return top two version nibblesJason A. Donenfeld2020-11-031-4/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* example: remove extra argument from printJason A. Donenfeld2020-11-031-2/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* example: rewrite and replace api's debug rundll32 functionalityJason A. Donenfeld2020-11-023-114/+231
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* api: rename test to example and update a few thingsJason A. Donenfeld2020-11-023-0/+395
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>