aboutsummaryrefslogtreecommitdiffstats
path: root/tun/wintun/ring_windows.go
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2020-07-22 09:15:49 +0200
committerSimon Rozman <simon@rozman.si>2020-11-07 12:46:35 +0100
commit3e08b8aee0f6ae038f6316ca1bb84e5214db318f (patch)
tree34681cb00b6b22bded95e0df6ed271de18983646 /tun/wintun/ring_windows.go
parentdevice: format a few things (diff)
downloadwireguard-go-3e08b8aee0f6ae038f6316ca1bb84e5214db318f.tar.xz
wireguard-go-3e08b8aee0f6ae038f6316ca1bb84e5214db318f.zip
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 <simon@rozman.si>
Diffstat (limited to 'tun/wintun/ring_windows.go')
-rw-r--r--tun/wintun/ring_windows.go4
1 files changed, 2 insertions, 2 deletions
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
}