aboutsummaryrefslogtreecommitdiffstats
path: root/tun/wintun/wintun_windows.go
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-05-22 19:31:52 +0200
committerSimon Rozman <simon@rozman.si>2019-05-22 19:31:52 +0200
commitdc9bbec9dbca1daff8265b6e6da6b36185e74660 (patch)
tree937159ea8cdc51fd4f0486630ca2a24ed47fabff /tun/wintun/wintun_windows.go
parentwintun: don't try to flush interface, but rather delete (diff)
downloadwireguard-go-dc9bbec9dbca1daff8265b6e6da6b36185e74660.tar.xz
wireguard-go-dc9bbec9dbca1daff8265b6e6da6b36185e74660.zip
setupapi: trim "Get" from getters
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to '')
-rw-r--r--tun/wintun/wintun_windows.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/tun/wintun/wintun_windows.go b/tun/wintun/wintun_windows.go
index 1eb0dd2..811f53d 100644
--- a/tun/wintun/wintun_windows.go
+++ b/tun/wintun/wintun_windows.go
@@ -125,7 +125,7 @@ func GetInterface(ifname string, hwndParent uintptr) (*Wintun, error) {
//TODO: is there a better way than comparing ifnames?
// Get interface name.
- ifname2, err := wintun.GetInterfaceName()
+ ifname2, err := wintun.InterfaceName()
if err != nil {
continue
}
@@ -151,7 +151,7 @@ func GetInterface(ifname string, hwndParent uintptr) (*Wintun, error) {
}
// Get driver info details.
- driverDetailData, err := devInfoList.GetDriverInfoDetail(deviceData, driverData)
+ driverDetailData, err := devInfoList.DriverInfoDetail(deviceData, driverData)
if err != nil {
// Something is wrong with this driver. Skip it.
continue
@@ -241,7 +241,7 @@ func CreateInterface(description string, hwndParent uintptr) (*Wintun, bool, err
// Check the driver version first, since the check is trivial and will save us iterating over hardware IDs for any driver versioned prior our best match.
if driverData.IsNewer(driverDate, driverVersion) {
// Get driver info details.
- driverDetailData, err := devInfoList.GetDriverInfoDetail(deviceData, driverData)
+ driverDetailData, err := devInfoList.DriverInfoDetail(deviceData, driverData)
if err != nil {
// Something is wrong with this driver. Skip it.
continue
@@ -474,7 +474,7 @@ func (wintun *Wintun) DeleteInterface(hwndParent uintptr) (bool, bool, error) {
// checkReboot checks device install parameters if a system reboot is required.
//
func checkReboot(deviceInfoSet setupapi.DevInfo, deviceInfoData *setupapi.DevInfoData) (bool, error) {
- devInstallParams, err := deviceInfoSet.GetDeviceInstallParams(deviceInfoData)
+ devInstallParams, err := deviceInfoSet.DeviceInstallParams(deviceInfoData)
if err != nil {
return false, err
}
@@ -487,9 +487,9 @@ func checkReboot(deviceInfoSet setupapi.DevInfo, deviceInfoData *setupapi.DevInf
}
//
-// GetInterfaceName returns network interface name.
+// InterfaceName returns network interface name.
//
-func (wintun *Wintun) GetInterfaceName() (string, error) {
+func (wintun *Wintun) InterfaceName() (string, error) {
key, err := registry.OpenKey(registry.LOCAL_MACHINE, wintun.netRegKeyName(), registry.QUERY_VALUE)
if err != nil {
return "", fmt.Errorf("Network-specific registry key open failed: %v", err)