Commit graph

13 commits

Author SHA1 Message Date
Simon Rozman b719a09a26 wintun: Auto-calculate TUN exchange buffer size
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-08 15:21:24 +01:00
Simon Rozman f05f52637f wintun: Simplify Read method()
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-08 14:31:05 +01:00
Simon Rozman 713477cfb1 wintun: Make constants private and adopt Go recommended case
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-08 08:55:23 +01:00
Simon Rozman 5981d5cacf wintun: Check for user close in read loop regardless the load
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-08 08:48:35 +01:00
Simon Rozman b13739ada2 wintun: Adjust tunRWQueue.left member to match Wintun driver
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-08 07:32:12 +01:00
Simon Rozman d87cbeeb2f wintun: Detect if a foreign interface with the same name exists
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-07 22:02:51 +01:00
Jason A. Donenfeld c4b43e35a7 wintun: add FlushInterface stub 2019-02-07 18:24:28 +01:00
Jason A. Donenfeld ea59177f1c wintun: Introduce new package for obscuring Windows bits 2019-02-07 04:39:59 +01:00
Jason A. Donenfeld 306d08e692 tun_windows: Style 2019-02-07 04:08:05 +01:00
Simon Rozman cb2bc4b34c tun_windows: Introduce preliminary TUN interface creation
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-06 22:30:14 +01:00
Simon Rozman 46279ad0f9 tun_windows: Stop checking minimum size of received TUN packets
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-06 20:22:04 +01:00
Jason A. Donenfeld c599bf9497 Fix up errors and paths 2019-02-05 22:06:25 +09:00
Jason A. Donenfeld 6f76edd045 Import windows scafolding 2019-02-05 12:59:42 +01:00