summaryrefslogtreecommitdiffhomepage
path: root/tun
diff options
context:
space:
mode:
Diffstat (limited to 'tun')
-rw-r--r--tun/tun_darwin.go2
-rw-r--r--tun/tun_freebsd.go4
-rw-r--r--tun/tun_linux.go2
-rw-r--r--tun/tun_openbsd.go2
-rw-r--r--tun/tun_windows.go2
-rw-r--r--tun/wintun/wintun_windows.go8
6 files changed, 10 insertions, 10 deletions
diff --git a/tun/tun_darwin.go b/tun/tun_darwin.go
index f7cf8e8..8cd22a8 100644
--- a/tun/tun_darwin.go
+++ b/tun/tun_darwin.go
@@ -286,7 +286,7 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) {
}
func (tun *NativeTun) Flush() error {
- //TODO: can flushing be implemented by buffering and using sendmmsg?
+ // TODO: can flushing be implemented by buffering and using sendmmsg?
return nil
}
diff --git a/tun/tun_freebsd.go b/tun/tun_freebsd.go
index b7c82cf..df43ab7 100644
--- a/tun/tun_freebsd.go
+++ b/tun/tun_freebsd.go
@@ -26,7 +26,7 @@ const (
_TUNSIFPID = 0x2000745f
)
-//TODO: move into x/sys/unix
+// TODO: move into x/sys/unix
const (
SIOCGIFINFO_IN6 = 0xc048696c
SIOCSIFINFO_IN6 = 0xc048696d
@@ -467,7 +467,7 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) {
}
func (tun *NativeTun) Flush() error {
- //TODO: can flushing be implemented by buffering and using sendmmsg?
+ // TODO: can flushing be implemented by buffering and using sendmmsg?
return nil
}
diff --git a/tun/tun_linux.go b/tun/tun_linux.go
index f5f7ec7..2168f5b 100644
--- a/tun/tun_linux.go
+++ b/tun/tun_linux.go
@@ -320,7 +320,7 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) {
}
func (tun *NativeTun) Flush() error {
- //TODO: can flushing be implemented by buffering and using sendmmsg?
+ // TODO: can flushing be implemented by buffering and using sendmmsg?
return nil
}
diff --git a/tun/tun_openbsd.go b/tun/tun_openbsd.go
index a3db83b..b0f5ca4 100644
--- a/tun/tun_openbsd.go
+++ b/tun/tun_openbsd.go
@@ -239,7 +239,7 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) {
}
func (tun *NativeTun) Flush() error {
- //TODO: can flushing be implemented by buffering and using sendmmsg?
+ // TODO: can flushing be implemented by buffering and using sendmmsg?
return nil
}
diff --git a/tun/tun_windows.go b/tun/tun_windows.go
index 7051d61..0b41be9 100644
--- a/tun/tun_windows.go
+++ b/tun/tun_windows.go
@@ -218,7 +218,7 @@ func (tun *NativeTun) MTU() (int, error) {
return tun.forcedMTU, nil
}
-//TODO: This is a temporary hack. We really need to be monitoring the interface in real time and adapting to MTU changes.
+// TODO: This is a temporary hack. We really need to be monitoring the interface in real time and adapting to MTU changes.
func (tun *NativeTun) ForceMTU(mtu int) {
tun.forcedMTU = mtu
}
diff --git a/tun/wintun/wintun_windows.go b/tun/wintun/wintun_windows.go
index ac811af..ec7f8ea 100644
--- a/tun/wintun/wintun_windows.go
+++ b/tun/wintun/wintun_windows.go
@@ -122,7 +122,7 @@ func GetInterface(ifname string, hwndParent uintptr) (*Wintun, error) {
continue
}
- //TODO: is there a better way than comparing ifnames?
+ // TODO: is there a better way than comparing ifnames?
// Get interface name.
ifname2, err := wintun.InterfaceName()
if err != nil {
@@ -225,7 +225,7 @@ func CreateInterface(description string, hwndParent uintptr) (*Wintun, bool, err
// Search for the driver.
const driverType = setupapi.SPDIT_COMPATDRIVER
- err = devInfoList.BuildDriverInfoList(deviceData, driverType) //TODO: This takes ~510ms
+ err = devInfoList.BuildDriverInfoList(deviceData, driverType) // TODO: This takes ~510ms
if err != nil {
return nil, false, fmt.Errorf("SetupDiBuildDriverInfoList failed: %v", err)
}
@@ -233,7 +233,7 @@ func CreateInterface(description string, hwndParent uintptr) (*Wintun, bool, err
driverDate := windows.Filetime{}
driverVersion := uint64(0)
- for index := 0; ; index++ { //TODO: This loop takes ~600ms
+ for index := 0; ; index++ { // TODO: This loop takes ~600ms
// Get a driver from the list.
driverData, err := devInfoList.EnumDriverInfo(deviceData, driverType, index)
if err != nil {
@@ -572,7 +572,7 @@ func (wintun *Wintun) deviceData(hwndParent uintptr) (setupapi.DevInfo, *setupap
}
// Get interface ID.
- //TODO: Store some ID in the Wintun object such that this call isn't required.
+ // TODO: Store some ID in the Wintun object such that this call isn't required.
wintun2, err := makeWintun(devInfoList, deviceData)
if err != nil {
continue