aboutsummaryrefslogtreecommitdiff
path: root/tun/wintun/wintun_windows.go
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2020-10-24 22:40:46 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-11-07 15:20:49 +0100
commita3b231b31eb58da7cef097b6633bcc97484b550d (patch)
tree5c65dfe2a84948093d4f75ea4ba2c5ea55c1e2f1 /tun/wintun/wintun_windows.go
parent65e03a918274534015ca189bfadc33cbba9e3ec8 (diff)
downloadwireguard-go-a3b231b31eb58da7cef097b6633bcc97484b550d.tar.gz
wireguard-go-a3b231b31eb58da7cef097b6633bcc97484b550d.zip
wintun: ring management moved to wintun.dll
Signed-off-by: Simon Rozman <simon@rozman.si> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--tun/wintun/wintun_windows.go11
1 files changed, 0 insertions, 11 deletions
diff --git a/tun/wintun/wintun_windows.go b/tun/wintun/wintun_windows.go
index ac33579..e7ba8b6 100644
--- a/tun/wintun/wintun_windows.go
+++ b/tun/wintun/wintun_windows.go
@@ -45,7 +45,6 @@ var (
procWintunGetAdapterLUID = modwintun.NewProc("WintunGetAdapterLUID")
procWintunGetAdapterName = modwintun.NewProc("WintunGetAdapterName")
procWintunGetRunningDriverVersion = modwintun.NewProc("WintunGetRunningDriverVersion")
- procWintunOpenAdapterDeviceObject = modwintun.NewProc("WintunOpenAdapterDeviceObject")
procWintunSetAdapterName = modwintun.NewProc("WintunSetAdapterName")
procWintunSetLogger = modwintun.NewProc("WintunSetLogger")
)
@@ -210,16 +209,6 @@ func RunningVersion() (version uint32, err error) {
return
}
-// handle returns a handle to the adapter device object. Release handle with windows.CloseHandle
-func (wintun *Adapter) OpenAdapterDeviceObject() (handle windows.Handle, err error) {
- r0, _, e1 := syscall.Syscall(procWintunOpenAdapterDeviceObject.Addr(), 1, uintptr(wintun.handle), 0, 0)
- handle = windows.Handle(r0)
- if handle == windows.InvalidHandle {
- err = e1
- }
- return
-}
-
// LUID returns the LUID of the adapter.
func (wintun *Adapter) LUID() (luid uint64) {
syscall.Syscall(procWintunGetAdapterLUID.Addr(), 2, uintptr(wintun.handle), uintptr(unsafe.Pointer(&luid)), 0)