summaryrefslogtreecommitdiffhomepage
path: root/tun/wintun/wintun_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'tun/wintun/wintun_windows.go')
-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)