aboutsummaryrefslogtreecommitdiffstats
path: root/tun/tun.go
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-03-20 21:45:40 +0100
committerSimon Rozman <simon@rozman.si>2019-03-21 00:56:45 +0100
commit91b4e909bb5fe6980ec56983247e2bfb9fb70ee6 (patch)
treeff282bf8eba704fdbb861d3fb4fce579439d9e11 /tun/tun.go
parentuapi: report endpoint error (diff)
downloadwireguard-go-91b4e909bb5fe6980ec56983247e2bfb9fb70ee6.tar.xz
wireguard-go-91b4e909bb5fe6980ec56983247e2bfb9fb70ee6.zip
wintun: Use native Win32 API for I/O
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'tun/tun.go')
-rw-r--r--tun/tun.go13
1 files changed, 0 insertions, 13 deletions
diff --git a/tun/tun.go b/tun/tun.go
index f38ee31..c4b6cac 100644
--- a/tun/tun.go
+++ b/tun/tun.go
@@ -6,7 +6,6 @@
package tun
import (
- "fmt"
"os"
)
@@ -27,15 +26,3 @@ type TUNDevice interface {
Events() chan TUNEvent // returns a constant channel of events related to the device
Close() error // stops the device and closes the event channel
}
-
-func (tun *NativeTun) operateOnFd(fn func(fd uintptr)) {
- sysconn, err := tun.tunFile.SyscallConn()
- if err != nil {
- tun.errors <- fmt.Errorf("unable to find sysconn for tunfile: %s", err.Error())
- return
- }
- err = sysconn.Control(fn)
- if err != nil {
- tun.errors <- fmt.Errorf("unable to control sysconn for tunfile: %s", err.Error())
- }
-}