From 3e08b8aee0f6ae038f6316ca1bb84e5214db318f Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Wed, 22 Jul 2020 09:15:49 +0200 Subject: wintun: migrate to wintun.dll API Rather than having every application using Wintun driver reinvent the wheel, the Wintun device/adapter/interface management has been moved from wireguard-go to wintun.dll deployed with Wintun itself. Signed-off-by: Simon Rozman --- tun/wintun/ring_windows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tun/wintun/ring_windows.go') diff --git a/tun/wintun/ring_windows.go b/tun/wintun/ring_windows.go index 4d2fab6..ed460fb 100644 --- a/tun/wintun/ring_windows.go +++ b/tun/wintun/ring_windows.go @@ -103,8 +103,8 @@ func (descriptor *RingDescriptor) Close() { } } -func (wintun *Interface) Register(descriptor *RingDescriptor) (windows.Handle, error) { - handle, err := wintun.handle() +func (wintun *Adapter) Register(descriptor *RingDescriptor) (windows.Handle, error) { + handle, err := wintun.OpenAdapterDeviceObject() if err != nil { return 0, err } -- cgit v1.2.3