aboutsummaryrefslogtreecommitdiffstats
path: root/tun/wintun/wintun_windows.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* namedpipe: rename from winpipe to keep in sync with CL299009Jason A. Donenfeld2021-11-041-150/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wintun: align 64-bit argument on ARM32Jason A. Donenfeld2021-10-261-1/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wintun: allow retrieving DLL versionJason A. Donenfeld2021-10-201-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wintun: use new swdevice-based API for upcoming Wintun 0.14Jason A. Donenfeld2021-10-121-123/+54
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: bump copyrightJason A. Donenfeld2021-01-281-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wintun: do not load dll in init()Jason A. Donenfeld2021-01-071-4/+3
| | | | | | | This prevents linking to wintun.dll until it's actually needed, which should improve startup time. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wintun: ring management moved to wintun.dllSimon Rozman2020-11-071-11/+0
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wintun: load wintun.dll from RCDATA resourceSimon Rozman2020-11-071-1/+1
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wintun: migrate to wintun.dll APISimon Rozman2020-11-071-742/+149
| | | | | | | | Rather than having every application using Wintun driver reinvent the wheel, the Wintun device/adapter/interface management has been moved from wireguard-go to wintun.dll deployed with Wintun itself. Signed-off-by: Simon Rozman <simon@rozman.si>
* global: update header comments and modulesJason A. Donenfeld2020-05-021-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wintun: make remaining HWID comparisons case insensitiveSimon Rozman2020-05-021-2/+19
| | | | | | | | | | | | | | | | | c85e4a410f27986a2967a49c0155633c716bf3ca introduced preliminary HWID checking to speed up Wintun adapter enumeration. However, all HWID are case insensitive by Windows convention. Furthermore, a device might have multiple HWIDs. When DevInfo's DeviceRegistryProperty(SPDRP_HARDWAREID) method returns []string, all strings returned should be checked against given hardware ID. This issue was discovered when researching Wintun and wireguard-go on Windows 10 ARM64. The Wintun adapter was created using devcon.exe utility with "wintun" hardware ID, causing wireguard-go fail to enumerate the adapter properly. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: normalize variable names for their typesJason A. Donenfeld2019-10-171-72/+72
|
* wintun: quickly ignore non-Wintun devicesAvery Pennarun2019-10-171-0/+18
| | | | | | | | | Some devices take ~2 seconds to enumerate on Windows if we try to get their instance name. The hardware id property, on the other hand, is available right away. Signed-off-by: Avery Pennarun <apenwarr@gmail.com> [zx2c4: inlined this to where it makes sense, reused setupapi const]
* wintun: expose versionJason A. Donenfeld2019-10-081-1/+29
|
* wintun: take mutex first alwaysJason A. Donenfeld2019-09-011-9/+9
| | | | This prevents an ABA deadlock with setupapi's internal locks.
* wintun: put mutex into private namespaceJason A. Donenfeld2019-08-301-26/+0
|
* wintun: take mutex so that deletion uses the right nameJason A. Donenfeld2019-08-301-9/+70
|
* wintun: move ring constants into moduleJason A. Donenfeld2019-08-291-2/+2
|
* wintun: delete all interfaces is not used anymoreJason A. Donenfeld2019-08-291-9/+0
|
* wintun: Wintun->InterfaceJason A. Donenfeld2019-08-291-27/+26
|
* wintun: keep reference to pool in wintun objectJason A. Donenfeld2019-08-291-7/+9
|
* wintun: introduce adapter poolsSimon Rozman2019-08-291-21/+45
| | | | | | This makes wintun package reusable for non-WireGuard applications. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: simplify rename logicJason A. Donenfeld2019-08-281-5/+4
|
* wintun: give better errors when ndis interface listing failsJason A. Donenfeld2019-08-281-2/+2
|
* wintun: also check for numbered suffix and friendly nameJason A. Donenfeld2019-08-281-9/+22
|
* wintun: upgrade deleting all interfaces and make it reusableSimon Rozman2019-08-281-4/+29
| | | | | | | | | | | DeleteAllInterfaces() didn't check if SPDRP_DEVICEDESC == "WireGuard Tunnel". It deleted _all_ Wintun adapters, not just WireGuard's. Furthermore, the DeleteAllInterfaces() was upgraded into a new function called DeleteMatchingInterfaces() for selectively deletion. This will be used by WireGuard to clean stale Wintun adapters. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: cleanup earlierJason A. Donenfeld2019-08-271-19/+20
|
* wintun: rename duplicate adapters instead of ourselvesJason A. Donenfeld2019-08-271-0/+25
|
* wintun: match suffix numbersJason A. Donenfeld2019-08-261-1/+8
|
* wintun: make description consistent across fieldsJason A. Donenfeld2019-08-241-12/+9
|
* wintun: try multiple names until one isn't a duplicateJason A. Donenfeld2019-08-221-4/+12
|
* wintun: use nci.dll directly instead of buggy netshellJason A. Donenfeld2019-08-211-52/+6
|
* wintun: set friendly a bit betterJason A. Donenfeld2019-08-201-22/+10
| | | | | This is still wrong, but NETSETUPPKEY_Driver_FriendlyName seems a bit tricky to use.
* wintun: also set friendly name after setting interface nameJason A. Donenfeld2019-08-191-8/+23
|
* wintun: defer requires unique variableJason A. Donenfeld2019-08-191-33/+22
|
* wintun: set adapter description nameJason A. Donenfeld2019-08-191-0/+24
|
* wintun: merge opening device registry keySimon Rozman2019-08-021-21/+15
| | | | | | | | | This also introduces waiting for key to appear on initial access. See if this resolves the issue caused by HDD power-up delay resulting in failure to create the adapter. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: simplify checking reboot requirementSimon Rozman2019-08-021-18/+7
| | | | | | We never checked checkReboot() reported error anyway. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: refactor `err == nil` error checkingSimon Rozman2019-08-021-111/+144
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: handle error for deadgwdetectJason A. Donenfeld2019-08-021-2/+3
|
* wintun: get interface path properly with cfgmgrJason A. Donenfeld2019-07-231-3/+6
|
* wintun: simplify resolution of dev nodeJason A. Donenfeld2019-07-231-13/+10
|
* wintun: enable sharing of pnp nodeJason A. Donenfeld2019-07-221-1/+1
|
* tun: windows: get rid of retry logicJason A. Donenfeld2019-07-191-5/+9
| | | | Things work fine on Windows 8.
* tun: windows: switch to NDIS device objectJason A. Donenfeld2019-07-181-5/+0
|
* wintun: calculate path of NDIS device object symbolic linkJason A. Donenfeld2019-07-181-0/+20
|
* tun: windows: never retry open on Windows 10Jason A. Donenfeld2019-06-181-1/+1
|
* wintun: increase registry timeoutJason A. Donenfeld2019-06-111-1/+1
|
* wintun: add helper for cleaning upJason A. Donenfeld2019-06-101-9/+82
|
* wintun: simplify error matching and remove dumb commentsJason A. Donenfeld2019-06-101-19/+4
|