From 509b83053956f719c233632369a0f335fad4d74d Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 1 Mar 2018 23:48:26 +0000 Subject: [PATCH] Updates to PR #37 --- ipv4_test.go | 2 +- params_bsd.go => params_openbsd.go | 2 +- syscalls_bsd.go => syscalls_openbsd.go | 12 +----------- 3 files changed, 3 insertions(+), 13 deletions(-) rename params_bsd.go => params_openbsd.go (95%) rename syscalls_bsd.go => syscalls_openbsd.go (71%) diff --git a/ipv4_test.go b/ipv4_test.go index 9d3790c..ec6d89b 100644 --- a/ipv4_test.go +++ b/ipv4_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "./waterutil" + "github.com/songgao/water/waterutil" ) const BUFFERSIZE = 1522 diff --git a/params_bsd.go b/params_openbsd.go similarity index 95% rename from params_bsd.go rename to params_openbsd.go index d393906..2e77795 100644 --- a/params_bsd.go +++ b/params_openbsd.go @@ -1,4 +1,4 @@ -// +build openbsd freebsd +// +build openbsd package water diff --git a/syscalls_bsd.go b/syscalls_openbsd.go similarity index 71% rename from syscalls_bsd.go rename to syscalls_openbsd.go index 829f66b..259a8df 100644 --- a/syscalls_bsd.go +++ b/syscalls_openbsd.go @@ -1,4 +1,4 @@ -// +build openbsd freebsd +// +build openbsd package water @@ -6,16 +6,6 @@ import ( "os" ) -const bsdTUNSIFINFO = (0x80000000) | ((4 & 0x1fff) << 16) | uint32(byte('t'))<<8 | 91 -const bsdTUNSIFMODE = (0x80000000) | ((4 & 0x1fff) << 16) | uint32(byte('t'))<<8 | 94 - -type tuninfo struct { - BaudRate int - MTU int16 - Type uint8 - Dummy uint8 -} - func newTAP(config Config) (ifce *Interface, err error) { if config.Name[:8] != "/dev/tap" { panic("TUN/TAP name must be in format /dev/tunX or /dev/tapX")