aboutsummaryrefslogtreecommitdiffstats
path: root/tun/tun_windows.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* wintun: log when reboot is suggested by WindowsSimon Rozman2020-11-251-1/+5
| | | | | | | Which really shouldn't happen. But it is a useful information for troubleshooting. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: keep original error when Wintun session start failsSimon Rozman2020-11-251-1/+1
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* global: switch to using %w instead of %v for ErrorfJason A. Donenfeld2020-11-071-6/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wintun: ring management moved to wintun.dllSimon Rozman2020-11-071-86/+39
| | | | | 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-10/+18
| | | | | | | | 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>
* tun: windows: serialize write callsJason A. Donenfeld2020-01-071-0/+5
|
* wintun: manage ring memory manuallyJason A. Donenfeld2019-11-221-3/+3
| | | | | It's large and Go's garbage collector doesn't deal with it especially well.
* tun: match windows CreateTUN signature to the Linux variantAvery Pennarun2019-10-171-4/+9
| | | | | Signed-off-by: Avery Pennarun <apenwarr@gmail.com> [zx2c4: fix default value]
* wintun: expose versionJason A. Donenfeld2019-10-081-0/+5
|
* tun: windows: unify error message formatJason A. Donenfeld2019-09-081-2/+2
|
* wintun: take mutex so that deletion uses the right nameJason A. Donenfeld2019-08-301-7/+1
|
* wintun: move ring constants into moduleJason A. Donenfeld2019-08-291-94/+34
|
* wintun: Wintun->InterfaceJason A. Donenfeld2019-08-291-10/+10
|
* wintun: introduce adapter poolsSimon Rozman2019-08-291-5/+5
| | | | | | This makes wintun package reusable for non-WireGuard applications. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: make description consistent across fieldsJason A. Donenfeld2019-08-241-1/+1
|
* tun: windows: don't spin unless we really need itJason A. Donenfeld2019-08-191-10/+42
|
* tun: windows: spin for only a millisecond/80Jason A. Donenfeld2019-08-031-1/+1
| | | | Performance stays the same as before.
* tun: windows: styleJason A. Donenfeld2019-07-231-1/+1
|
* tun: windows: close event handle on shutdownJason A. Donenfeld2019-07-221-0/+1
|
* tun: windows: get rid of retry logicJason A. Donenfeld2019-07-191-213/+91
| | | | Things work fine on Windows 8.
* tun: windows: use specific IOCTL codeJason A. Donenfeld2019-07-191-1/+1
|
* tun: windows: open file at startup timeJason A. Donenfeld2019-07-181-0/+9
|
* tun: windows: silently drop packet when ring is fullJason A. Donenfeld2019-07-181-2/+2
|
* tun: windows: switch to NDIS device objectJason A. Donenfeld2019-07-181-2/+6
|
* tun: windows: spin for a bit before falling back to event objectJason A. Donenfeld2019-07-181-4/+19
|
* tun: windows: implement ring buffersSimon Rozman2019-07-171-186/+184
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* tun: windows: registration of write buffer no longer requiredJason A. Donenfeld2019-07-051-12/+1
|
* tun: windows: decrease alignment to 4Jason A. Donenfeld2019-07-051-3/+3
|
* tun: windows: delay initial writeJason A. Donenfeld2019-07-041-16/+22
| | | | Otherwise we provoke Wintun 0.3.
* tun: windows: packetNum is unusedJason A. Donenfeld2019-07-011-3/+0
|
* tun: windows: inform wintun of maximum buffer length for writesJason A. Donenfeld2019-06-261-0/+6
|
* tun: windows: never retry open on Windows 10Jason A. Donenfeld2019-06-181-3/+12
|
* tun: remove TUN prefix from types to reduce stutter elsewhereMatt Layher2019-06-141-5/+5
| | | | Signed-off-by: Matt Layher <mdlayher@gmail.com>
* wintun: fix comments and remove hwnd paramJason A. Donenfeld2019-06-101-5/+5
| | | | This now looks more idiomatic.
* wintun: allow controlling GUIDJason A. Donenfeld2019-06-101-1/+9
|
* global: fixup TODO comment spacingJason A. Donenfeld2019-06-061-1/+1
|
* wintun: simplify DeleteInterface method signatureSimon Rozman2019-06-061-2/+2
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* tun: windows: obsolete 256 packets per exchange buffer limitationSimon Rozman2019-06-051-2/+1
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* tun: windows: mitigate infinite loop in Flush()Jason A. Donenfeld2019-05-311-29/+35
| | | | | It's possible that for whatever reason, we keep returning EOF, resulting in repeated close/open/write operations, except with empty packets.
* wintun: remove extra /Jason A. Donenfeld2019-05-261-1/+1
|
* wintun: revise GetInterface()Simon Rozman2019-05-241-0/+2
| | | | | | | | | | | - Make foreign interface found error numeric to ease condition detection. - Update GetInterface() documentation. - Make tun.CreateTUN() quit when foreign interface found before attempting to create a Wintun interface with a duplicate name. Creation is futile. Signed-off-by: Simon Rozman <simon@rozman.si>
* setupapi: trim "Get" from gettersSimon Rozman2019-05-221-1/+1
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: don't try to flush interface, but rather deleteJason A. Donenfeld2019-05-171-16/+8
|
* wintun: make certain methods privateJason A. Donenfeld2019-05-171-10/+3
|
* wintun: change acronyms to uppercaseSimon Rozman2019-05-171-5/+5
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: add LUID accessorJason A. Donenfeld2019-05-101-0/+7
|
* wintun: wait for interface registry key on device creationSimon Rozman2019-05-101-24/+16
| | | | | | By using RegNotifyChangeKeyValue(). Also disable dead gateway detection. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: work around GetInterface staleness bugJason A. Donenfeld2019-05-031-16/+28
|
* tun: windows: Adopt new error codes returned by WintunSimon Rozman2019-04-111-3/+2
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>