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>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user