diff options
author | Simon Rozman <simon@rozman.si> | 2019-05-24 09:08:59 +0200 |
---|---|---|
committer | Simon Rozman <simon@rozman.si> | 2019-05-24 11:27:40 +0200 |
commit | 86bd1abf9b2ec61dfc6413ed2cdb7292acf3e21c (patch) | |
tree | 5ff178881bc53c5486f901f69f402e4759c6d93a /tunnel/winipcfg/winipcfg.go | |
parent | manager: don't forget to close pipe in runtime config (diff) | |
download | wireguard-windows-86bd1abf9b2ec61dfc6413ed2cdb7292acf3e21c.tar.xz wireguard-windows-86bd1abf9b2ec61dfc6413ed2cdb7292acf3e21c.zip |
winipcfg: switch to windows.GetAdaptersAddresses
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'tunnel/winipcfg/winipcfg.go')
-rw-r--r-- | tunnel/winipcfg/winipcfg.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tunnel/winipcfg/winipcfg.go b/tunnel/winipcfg/winipcfg.go index bc878606..5af9f1aa 100644 --- a/tunnel/winipcfg/winipcfg.go +++ b/tunnel/winipcfg/winipcfg.go @@ -21,7 +21,6 @@ import ( // Interface-related functions // -//sys getAdaptersAddresses(family uint32, flags GAAFlags, reserved uintptr, adapterAddresses *IPAdapterAddresses, sizePointer *uint32) (ret error) = iphlpapi.GetAdaptersAddresses //sys initializeIPInterfaceEntry(row *MibIPInterfaceRow) = iphlpapi.InitializeIpInterfaceEntry //sys getIPInterfaceTable(family AddressFamily, table **mibIPInterfaceTable) (ret error) = iphlpapi.GetIpInterfaceTable //sys getIPInterfaceEntry(row *MibIPInterfaceRow) (ret error) = iphlpapi.GetIpInterfaceEntry @@ -39,7 +38,7 @@ func GetAdaptersAddresses(family uint32, flags GAAFlags) ([]*IPAdapterAddresses, for { b = make([]byte, size) - err := getAdaptersAddresses(family, flags, 0, (*IPAdapterAddresses)(unsafe.Pointer(&b[0])), &size) + err := windows.GetAdaptersAddresses(family, uint32(flags), 0, (*windows.IpAdapterAddresses)(unsafe.Pointer(&b[0])), &size) if err == nil { break } |