aboutsummaryrefslogtreecommitdiffstats
path: root/tun (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* 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-182-7/+6
|
* wintun: calculate path of NDIS device object symbolic linkJason A. Donenfeld2019-07-181-0/+20
|
* tun: openbsd: don't change MTU when it's already the expected sizeMichael Zeltner2019-07-181-4/+7
| | | | | | Allows for running wireguard-go as non-root user. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* 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-182-4/+13
|
* tun: remove TUN prefix from types to reduce stutter elsewhereMatt Layher2019-06-146-51/+51
| | | | Signed-off-by: Matt Layher <mdlayher@gmail.com>
* 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
|
* wintun: fix comments and remove hwnd paramJason A. Donenfeld2019-06-102-124/+55
| | | | This now looks more idiomatic.
* setupapi: add SetDeviceRegistryPropertyString descriptionSimon Rozman2019-06-101-1/+2
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* setupapi: unify ERROR_INSUFFICIENT_BUFFER handlingSimon Rozman2019-06-101-58/+32
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: allow controlling GUIDJason A. Donenfeld2019-06-102-2/+29
|
* setupapi: add DeviceInstanceID()Jason A. Donenfeld2019-06-103-0/+41
|
* global: fixup TODO comment spacingJason A. Donenfeld2019-06-066-10/+10
|
* wintun: guid functions are upstreamJason A. Donenfeld2019-06-065-117/+11
|
* wintun: simplify DeleteInterface method signatureSimon Rozman2019-06-062-58/+79
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: don't run HrRenameConnection in separate threadJason A. Donenfeld2019-06-051-3/+2
| | | | | It's very slow, but unfortunately we haven't a choice. NLA needs this to have completed.
* tun: windows: obsolete 256 packets per exchange buffer limitationSimon Rozman2019-06-051-2/+1
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* setupapi, wintun: replace syscall with golang.org/x/sys/windowsSimon Rozman2019-06-044-36/+32
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: set DI_QUIETINSTALL flag for GUI-less device managementSimon Rozman2019-06-041-3/+26
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* setupapi: define PropChangeParams structSimon Rozman2019-06-041-1/+20
| | | | | | | This structure is required for calling DIF_PROPERTYCHANGE installer class. 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.
* device, tun: rearrange code and fix device testsMatt Layher2019-05-291-93/+0
| | | | Signed-off-by: Matt Layher <mdlayher@gmail.com>
* wintun: remove extra /Jason A. Donenfeld2019-05-261-1/+1
|
* wintun: revise GetInterface()Simon Rozman2019-05-242-3/+6
| | | | | | | | | | | - 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>
* wintun: never return nil, nilJason A. Donenfeld2019-05-231-1/+1
|
* setupapi: trim "Get" from gettersSimon Rozman2019-05-225-53/+53
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: don't try to flush interface, but rather deleteJason A. Donenfeld2019-05-172-25/+8
|
* wintun: make certain methods privateJason A. Donenfeld2019-05-172-33/+41
|
* wintun: change acronyms to uppercaseSimon Rozman2019-05-171-5/+5
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* global: regroup all importsJason A. Donenfeld2019-05-146-11/+16
|
* wintun: registry: fix nitsJason A. Donenfeld2019-05-111-17/+20
|
* wintun: registry: revise value readingSimon Rozman2019-05-112-67/+82
| | | | | | | | | | | | | | - Make getStringValueRetry() reusable for reading any value type. This merges code from GetIntegerValueWait(). - expandString() >> toString() and extend to support REG_MULTI_SZ (to return first value of REG_MULTI_SZ). Furthermore, doing our own UTF-16 to UTF-8 conversion works around a bug in windows/registry's GetStringValue() non-zero terminated string handling. - Provide toInteger() analogous to toString() - GetStringValueWait() tolerates and reads REG_MULTI_SZ too now. It returns REG_MULTI_SZ[0], making GetFirstStringValueWait() redundant. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: call HrRenameConnection in another threadJason A. Donenfeld2019-05-101-2/+3
|
* wintun: add LUID accessorJason A. Donenfeld2019-05-101-0/+7
|
* wintun: enumerate faster by using COMPATDRIVER instead of CLASSDRIVERJason A. Donenfeld2019-05-101-1/+1
|
* wintun: destroy devinfolist after usageJason A. Donenfeld2019-05-101-0/+1
|
* wintun: registry: replace REG_NOTIFY with NOTIFYSimon Rozman2019-05-103-13/+9
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: IpConfig is a MULTI_SZ, and fix errorsJason A. Donenfeld2019-05-102-49/+72
|
* wintun: poll for device keyJason A. Donenfeld2019-05-101-9/+10
| | | | It's actually pretty hard to guess where it is.