summaryrefslogtreecommitdiffhomepage
path: root/tun/tun_windows.go
AgeCommit message (Collapse)Author
2019-03-22tun: windows: Increase unavailable adapter timeout to 30secSimon Rozman
5 seconds was too short when debugging. Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-22tun: windows: Make writing persistent tooSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-22tun: windows: Fix paused adapter testSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-21tun: windows: just open two file handlesJason A. Donenfeld
2019-03-21receive: implement flush semanticsJason A. Donenfeld
2019-03-21tun: windows: add dummy overlapped events backJason A. Donenfeld
These seem basically wrong to me, but we get crashes without them.
2019-03-20tun: windows: use new constants in sysJason A. Donenfeld
2019-03-21wintun: Use native Win32 API for I/OSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-18tun: windows: wintun does iocpJason A. Donenfeld
2019-03-13tun: windows: temporary hack for forcing MTUJason A. Donenfeld
2019-03-04wintun: Resolve some of golint warningsSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-04Elaborate the failing step when forwarding errors on returnSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-03global: begin modularizationJason A. Donenfeld
2019-03-01tun: windows: expose GUIDJason A. Donenfeld
2019-03-01tun: allow special methods in NativeTunJason A. Donenfeld
2019-02-22wintun: Read/write packet size from/to exchange buffer directlySimon Rozman
Driver <-> user-space communication is local and using native endian. Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-22wintun: Make two-step slicing a one stepSimon Rozman
Stop relying to Go compiler optimizations and calculate the end offset directly. Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-20wintun: Write exchange buffer increased back to 1MiBSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-20wintun: Migrate from unsafe buffer handling to encoding/binarySimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-20wintun: Adopt new packet data alignmentSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-20wintun: CleanupSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-20wintun: Add TUN device lockingSimon Rozman
In case reading from TUN device detected TUN device was closed, it closed the file handle and set tunFile to nil. The tunFile is automatically reopened on retry, but... If another packet comes in the WireGuard calls Write() method. With tunFile set to nil, this will cause access violation. Therefore, locking was introduced. Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-20wintun: Move exchange buffer in separate struct on heapSimon Rozman
This allows buffer alignment and keeps it together with its meta-data. Furthermore, the write buffer has been reduced - as long as we flush after _every_ write, we don't need a 1MiB write buffer. Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-19wintun: Switch to dynamic packet sizesSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-18Change package pathJason A. Donenfeld
2019-02-08wintun: Auto-calculate TUN exchange buffer sizeSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-08wintun: Simplify Read method()Simon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-08wintun: Make constants private and adopt Go recommended caseSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-08wintun: Check for user close in read loop regardless the loadSimon Rozman
Do the WaitForSingleObject() always to provide high-load responsiveness. Reorder events so TUN_SIGNAL_CLOSE has priority over TUN_SIGNAL_DATA_AVAIL, to provide high-load responsiveness at all. Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-08wintun: Adjust tunRWQueue.left member to match Wintun driverSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-07wintun: Detect if a foreign interface with the same name existsSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-07wintun: add FlushInterface stubJason A. Donenfeld
2019-02-07wintun: Introduce new package for obscuring Windows bitsJason A. Donenfeld
2019-02-07tun_windows: StyleJason A. Donenfeld
2019-02-06tun_windows: Introduce preliminary TUN interface creationSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-06tun_windows: Stop checking minimum size of received TUN packetsSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05Fix up errors and pathsJason A. Donenfeld
2019-02-05Import windows scafoldingJason A. Donenfeld