summaryrefslogtreecommitdiffhomepage
path: root/tun/wintun/wintun_windows.go
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-06-04 14:54:56 +0200
committerSimon Rozman <simon@rozman.si>2019-06-04 14:54:56 +0200
commit625e445b22afbb4dab20eed07640388ea36b332d (patch)
tree26c2d133e06cb4f10f99a7280049e78a12848401 /tun/wintun/wintun_windows.go
parent85b85e62e52198045ed853b81617db1f8c83c65f (diff)
setupapi, wintun: replace syscall with golang.org/x/sys/windows
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'tun/wintun/wintun_windows.go')
-rw-r--r--tun/wintun/wintun_windows.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/tun/wintun/wintun_windows.go b/tun/wintun/wintun_windows.go
index 9dc4030..6daa4d7 100644
--- a/tun/wintun/wintun_windows.go
+++ b/tun/wintun/wintun_windows.go
@@ -9,7 +9,6 @@ import (
"errors"
"fmt"
"strings"
- "syscall"
"time"
"unsafe"
@@ -112,7 +111,7 @@ func GetInterface(ifname string, hwndParent uintptr) (*Wintun, error) {
// Get the device from the list. Should anything be wrong with this device, continue with next.
deviceData, err := devInfoList.EnumDeviceInfo(index)
if err != nil {
- if errWin, ok := err.(syscall.Errno); ok && errWin == windows.ERROR_NO_MORE_ITEMS {
+ if errWin, ok := err.(windows.Errno); ok && errWin == windows.ERROR_NO_MORE_ITEMS {
break
}
continue
@@ -144,7 +143,7 @@ func GetInterface(ifname string, hwndParent uintptr) (*Wintun, error) {
// Get a driver from the list.
driverData, err := devInfoList.EnumDriverInfo(deviceData, driverType, index)
if err != nil {
- if errWin, ok := err.(syscall.Errno); ok && errWin == windows.ERROR_NO_MORE_ITEMS {
+ if errWin, ok := err.(windows.Errno); ok && errWin == windows.ERROR_NO_MORE_ITEMS {
break
}
// Something is wrong with this driver. Skip it.
@@ -239,7 +238,7 @@ func CreateInterface(description string, hwndParent uintptr) (*Wintun, bool, err
// Get a driver from the list.
driverData, err := devInfoList.EnumDriverInfo(deviceData, driverType, index)
if err != nil {
- if errWin, ok := err.(syscall.Errno); ok && errWin == windows.ERROR_NO_MORE_ITEMS {
+ if errWin, ok := err.(windows.Errno); ok && errWin == windows.ERROR_NO_MORE_ITEMS {
break
}
// Something is wrong with this driver. Skip it.
@@ -434,7 +433,7 @@ func (wintun *Wintun) DeleteInterface(hwndParent uintptr) (bool, bool, error) {
// Get the device from the list. Should anything be wrong with this device, continue with next.
deviceData, err := devInfoList.EnumDeviceInfo(index)
if err != nil {
- if errWin, ok := err.(syscall.Errno); ok && errWin == windows.ERROR_NO_MORE_ITEMS {
+ if errWin, ok := err.(windows.Errno); ok && errWin == windows.ERROR_NO_MORE_ITEMS {
break
}
continue