summaryrefslogtreecommitdiffhomepage
path: root/talpid-core/src
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2022-09-27 17:05:00 +0200
committerDavid Lönnhager <david.l@mullvad.net>2022-09-28 16:23:01 +0200
commitd82e3ffe4fdb807ce69ec158d9f4596f76597122 (patch)
tree404b9d27381bef49b26e88681d54df972f1232c4 /talpid-core/src
parent3b2844507e077f33ca4f4b50cbcbc79ca166753c (diff)
downloadmullvadvpn-d82e3ffe4fdb807ce69ec158d9f4596f76597122.tar.xz
mullvadvpn-d82e3ffe4fdb807ce69ec158d9f4596f76597122.zip
Bump windows-sys to 0.42.0
Diffstat (limited to 'talpid-core/src')
-rw-r--r--talpid-core/src/routing/windows.rs2
-rw-r--r--talpid-core/src/split_tunnel/windows/driver.rs7
-rw-r--r--talpid-core/src/split_tunnel/windows/mod.rs2
-rw-r--r--talpid-core/src/tunnel/openvpn/mod.rs2
-rw-r--r--talpid-core/src/tunnel/openvpn/wintun.rs2
-rw-r--r--talpid-core/src/tunnel/windows.rs2
-rw-r--r--talpid-core/src/tunnel/wireguard/wireguard_go.rs6
-rw-r--r--talpid-core/src/tunnel/wireguard/wireguard_nt.rs2
-rw-r--r--talpid-core/src/windows/mod.rs6
9 files changed, 14 insertions, 17 deletions
diff --git a/talpid-core/src/routing/windows.rs b/talpid-core/src/routing/windows.rs
index b391184f1a..fad8540ecd 100644
--- a/talpid-core/src/routing/windows.rs
+++ b/talpid-core/src/routing/windows.rs
@@ -8,7 +8,7 @@ use futures::{
StreamExt,
};
use std::{collections::HashSet, net::IpAddr};
-use windows_sys::Win32::NetworkManagement::IpHelper::NET_LUID_LH;
+use windows_sys::Win32::NetworkManagement::Ndis::NET_LUID_LH;
use winnet::WinNetAddrFamily;
/// Windows routing errors.
diff --git a/talpid-core/src/split_tunnel/windows/driver.rs b/talpid-core/src/split_tunnel/windows/driver.rs
index a3eb338c8c..b03d8b72af 100644
--- a/talpid-core/src/split_tunnel/windows/driver.rs
+++ b/talpid-core/src/split_tunnel/windows/driver.rs
@@ -26,17 +26,14 @@ use talpid_types::ErrorExt;
use windows_sys::Win32::{
Foundation::{
ERROR_ACCESS_DENIED, ERROR_FILE_NOT_FOUND, ERROR_INVALID_PARAMETER, ERROR_IO_PENDING,
- HANDLE, NTSTATUS, WAIT_FAILED,
+ HANDLE, NTSTATUS, WAIT_ABANDONED, WAIT_ABANDONED_0, WAIT_FAILED, WAIT_OBJECT_0,
},
Networking::WinSock::{IN6_ADDR, IN_ADDR},
Storage::FileSystem::FILE_FLAG_OVERLAPPED,
System::{
Diagnostics::ToolHelp::TH32CS_SNAPPROCESS,
Ioctl::{FILE_ANY_ACCESS, METHOD_BUFFERED, METHOD_NEITHER},
- Threading::{
- WaitForMultipleObjects, WaitForSingleObject, WAIT_ABANDONED, WAIT_ABANDONED_0,
- WAIT_OBJECT_0,
- },
+ Threading::{WaitForMultipleObjects, WaitForSingleObject},
WindowsProgramming::INFINITE,
IO::{DeviceIoControl, GetOverlappedResult, OVERLAPPED},
},
diff --git a/talpid-core/src/split_tunnel/windows/mod.rs b/talpid-core/src/split_tunnel/windows/mod.rs
index ed5102ab45..0bde6ac435 100644
--- a/talpid-core/src/split_tunnel/windows/mod.rs
+++ b/talpid-core/src/split_tunnel/windows/mod.rs
@@ -30,7 +30,7 @@ use std::{
};
use talpid_types::{tunnel::ErrorStateCause, ErrorExt};
use windows_sys::Win32::{
- Foundation::ERROR_OPERATION_ABORTED, NetworkManagement::IpHelper::NET_LUID_LH,
+ Foundation::ERROR_OPERATION_ABORTED, NetworkManagement::Ndis::NET_LUID_LH,
};
const DRIVER_EVENT_BUFFER_SIZE: usize = 2048;
diff --git a/talpid-core/src/tunnel/openvpn/mod.rs b/talpid-core/src/tunnel/openvpn/mod.rs
index 9643c83cc2..439427c8e6 100644
--- a/talpid-core/src/tunnel/openvpn/mod.rs
+++ b/talpid-core/src/tunnel/openvpn/mod.rs
@@ -35,7 +35,7 @@ use which;
#[cfg(windows)]
use widestring::U16CString;
#[cfg(windows)]
-use windows_sys::{core::GUID, Win32::NetworkManagement::IpHelper::NET_LUID_LH};
+use windows_sys::{core::GUID, Win32::NetworkManagement::Ndis::NET_LUID_LH};
#[cfg(windows)]
mod wintun;
diff --git a/talpid-core/src/tunnel/openvpn/wintun.rs b/talpid-core/src/tunnel/openvpn/wintun.rs
index 5834587e59..92a670aa66 100644
--- a/talpid-core/src/tunnel/openvpn/wintun.rs
+++ b/talpid-core/src/tunnel/openvpn/wintun.rs
@@ -14,7 +14,7 @@ use windows_sys::{
core::GUID,
Win32::{
Foundation::{HINSTANCE, NO_ERROR},
- NetworkManagement::IpHelper::{ConvertInterfaceLuidToGuid, NET_LUID_LH},
+ NetworkManagement::{IpHelper::ConvertInterfaceLuidToGuid, Ndis::NET_LUID_LH},
System::{
LibraryLoader::{
FreeLibrary, GetProcAddress, LoadLibraryExW, LOAD_WITH_ALTERED_SEARCH_PATH,
diff --git a/talpid-core/src/tunnel/windows.rs b/talpid-core/src/tunnel/windows.rs
index 14206a0d83..cb1cea345c 100644
--- a/talpid-core/src/tunnel/windows.rs
+++ b/talpid-core/src/tunnel/windows.rs
@@ -1,7 +1,7 @@
use crate::windows::{get_ip_interface_entry, set_ip_interface_entry, AddressFamily};
use std::io;
use windows_sys::Win32::{
- Foundation::ERROR_NOT_FOUND, NetworkManagement::IpHelper::NET_LUID_LH,
+ Foundation::ERROR_NOT_FOUND, NetworkManagement::Ndis::NET_LUID_LH,
Networking::WinSock::RouterDiscoveryDisabled,
};
diff --git a/talpid-core/src/tunnel/wireguard/wireguard_go.rs b/talpid-core/src/tunnel/wireguard/wireguard_go.rs
index d78e422697..60705d324f 100644
--- a/talpid-core/src/tunnel/wireguard/wireguard_go.rs
+++ b/talpid-core/src/tunnel/wireguard/wireguard_go.rs
@@ -168,7 +168,7 @@ impl WgGoTunnel {
let has_ipv6 = config.tunnel.addresses.iter().any(|addr| addr.is_ipv6());
let setup_handle = tokio::spawn(async move {
- use windows_sys::Win32::NetworkManagement::IpHelper::NET_LUID_LH;
+ use windows_sys::Win32::NetworkManagement::Ndis::NET_LUID_LH;
let luid = NET_LUID_LH {
Value: interface_luid,
};
@@ -214,8 +214,8 @@ impl WgGoTunnel {
default_route: winnet::WinNetDefaultRoute,
_ctx: *mut libc::c_void,
) {
- use windows_sys::Win32::NetworkManagement::IpHelper::{
- ConvertInterfaceLuidToIndex, NET_LUID_LH,
+ use windows_sys::Win32::NetworkManagement::{
+ IpHelper::ConvertInterfaceLuidToIndex, Ndis::NET_LUID_LH,
};
use winnet::WinNetDefaultRouteChangeEventType::*;
diff --git a/talpid-core/src/tunnel/wireguard/wireguard_nt.rs b/talpid-core/src/tunnel/wireguard/wireguard_nt.rs
index b0ffab20fa..08a75fd887 100644
--- a/talpid-core/src/tunnel/wireguard/wireguard_nt.rs
+++ b/talpid-core/src/tunnel/wireguard/wireguard_nt.rs
@@ -28,7 +28,7 @@ use windows_sys::{
core::GUID,
Win32::{
Foundation::{BOOL, ERROR_MORE_DATA, HINSTANCE},
- NetworkManagement::IpHelper::NET_LUID_LH,
+ NetworkManagement::Ndis::NET_LUID_LH,
Networking::WinSock::{
ADDRESS_FAMILY, AF_INET, AF_INET6, IN6_ADDR, IN_ADDR, SOCKADDR_INET,
},
diff --git a/talpid-core/src/windows/mod.rs b/talpid-core/src/windows/mod.rs
index 13efa824f0..d853991707 100644
--- a/talpid-core/src/windows/mod.rs
+++ b/talpid-core/src/windows/mod.rs
@@ -24,9 +24,9 @@ use windows_sys::{
GetIpInterfaceEntry, GetUnicastIpAddressEntry, GetUnicastIpAddressTable,
InitializeUnicastIpAddressEntry, MibAddInstance, NotifyIpInterfaceChange,
SetIpInterfaceEntry, MIB_IPINTERFACE_ROW, MIB_UNICASTIPADDRESS_ROW,
- MIB_UNICASTIPADDRESS_TABLE, NET_LUID_LH,
+ MIB_UNICASTIPADDRESS_TABLE,
},
- Ndis::NDIS_IF_MAX_STRING_SIZE,
+ Ndis::{IF_MAX_STRING_SIZE, NET_LUID_LH},
},
Networking::WinSock::{
IpDadStateDeprecated, IpDadStateDuplicate, IpDadStateInvalid, IpDadStatePreferred,
@@ -431,7 +431,7 @@ pub fn luid_from_alias<T: AsRef<OsStr>>(alias: T) -> io::Result<NET_LUID_LH> {
/// Returns the alias of an interface given its LUID.
pub fn alias_from_luid(luid: &NET_LUID_LH) -> io::Result<OsString> {
- let mut buffer = [0u16; NDIS_IF_MAX_STRING_SIZE as usize + 1];
+ let mut buffer = [0u16; IF_MAX_STRING_SIZE as usize + 1];
let status =
unsafe { ConvertInterfaceLuidToAlias(luid, &mut buffer[0] as *mut _, buffer.len()) };
if status != NO_ERROR as i32 {