Set interface flags properly on OpenBSD

This commit is contained in:
Neil Alexander
2018-03-01 15:02:53 +00:00
parent 9e4d169208
commit 90393ae03b
2 changed files with 45 additions and 18 deletions

View File

@@ -2,6 +2,7 @@ package yggdrasil
// This manages the tun driver to send/recv packets to/from applications
import "os"
import ethernet "github.com/songgao/packets/ethernet"
const IPv6_HEADER_LENGTH = 40
@@ -14,6 +15,7 @@ type tunInterface interface {
Read(to []byte) (int, error)
Write(from []byte) (int, error)
Close() error
FD() *os.File
}
type tunDevice struct {