aboutsummaryrefslogtreecommitdiffstats
path: root/src/tun.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-11-14 18:26:28 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-11-14 18:26:28 +0100
commit88801529fd4097993f7c448b1c3eee0abc8cb51c (patch)
treed1750dc52489b7d5c665918ae522aae5b8fc4f6b /src/tun.go
parentInitial working source caching (diff)
downloadwireguard-go-88801529fd4097993f7c448b1c3eee0abc8cb51c.tar.xz
wireguard-go-88801529fd4097993f7c448b1c3eee0abc8cb51c.zip
Moved TUN device creation to pre-fork
Diffstat (limited to 'src/tun.go')
-rw-r--r--src/tun.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tun.go b/src/tun.go
index 9eed987..5bdac0e 100644
--- a/src/tun.go
+++ b/src/tun.go
@@ -1,6 +1,7 @@
package main
import (
+ "os"
"sync/atomic"
)
@@ -15,6 +16,7 @@ const (
)
type TUNDevice interface {
+ File() *os.File // returns the file descriptor of the device
Read([]byte) (int, error) // read a packet from the device (without any additional headers)
Write([]byte) (int, error) // writes a packet to the device (without any additional headers)
MTU() (int, error) // returns the MTU of the device