WIP: Windows support #925

Draft
mediocregopher wants to merge 8 commits from mediocregopher/garage:windows-v1 into main
Showing only changes of commit 7221ac5e88 - Show all commits

View file

@ -863,6 +863,15 @@ impl NodeStatus {
/// Obtain the list of currently available IP addresses on all non-loopback
/// interfaces, optionally filtering them to be inside a given IpNet.
fn get_default_ip(filter_ipnet: Option<ipnet::IpNet>) -> Option<IpAddr> {
// pnet creates a dependency on winpcap, which is a giant pain to get working with
// cross-compilation.
#[cfg(windows)]
{
None
}
#[cfg(not(windows))]
{
pnet_datalink::interfaces()
.into_iter()
// filter down and loopback interfaces
@ -875,6 +884,7 @@ fn get_default_ip(filter_ipnet: Option<ipnet::IpNet>) -> Option<IpAddr> {
})
.map(|ipn| ipn.ip())
}
}
fn get_rpc_public_addr(config: &Config) -> Option<SocketAddr> {
match &config.rpc_public_addr {