aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel/winipcfg/zwinipcfg_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'tunnel/winipcfg/zwinipcfg_windows.go')
-rw-r--r--tunnel/winipcfg/zwinipcfg_windows.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/tunnel/winipcfg/zwinipcfg_windows.go b/tunnel/winipcfg/zwinipcfg_windows.go
index 8f37ac26..cc4c3f70 100644
--- a/tunnel/winipcfg/zwinipcfg_windows.go
+++ b/tunnel/winipcfg/zwinipcfg_windows.go
@@ -68,6 +68,7 @@ var (
procNotifyUnicastIpAddressChange = modiphlpapi.NewProc("NotifyUnicastIpAddressChange")
procNotifyRouteChange2 = modiphlpapi.NewProc("NotifyRouteChange2")
procCancelMibChangeNotify2 = modiphlpapi.NewProc("CancelMibChangeNotify2")
+ procSetInterfaceDnsSettings = modiphlpapi.NewProc("SetInterfaceDnsSettings")
)
func freeMibTable(memory unsafe.Pointer) {
@@ -307,3 +308,11 @@ func cancelMibChangeNotify2(notificationHandle windows.Handle) (ret error) {
}
return
}
+
+func setInterfaceDnsSettings(guid *windows.GUID, settings *DnsInterfaceSettings) (ret error) {
+ r0, _, _ := syscall.Syscall(procSetInterfaceDnsSettings.Addr(), 2, uintptr(unsafe.Pointer(guid)), uintptr(unsafe.Pointer(settings)), 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}