Extended network options (#2845)
* More network configuration options * Filter UDP requests * Fixed tests * Fixed test warning
This commit is contained in:
committed by
Gav Wood
parent
7f210b05bb
commit
1a5bae8ef1
@@ -56,6 +56,22 @@ impl SocketAddrExt for Ipv6Addr {
|
||||
}
|
||||
}
|
||||
|
||||
impl SocketAddrExt for IpAddr {
|
||||
fn is_unspecified_s(&self) -> bool {
|
||||
match *self {
|
||||
IpAddr::V4(ref ip) => ip.is_unspecified_s(),
|
||||
IpAddr::V6(ref ip) => ip.is_unspecified_s(),
|
||||
}
|
||||
}
|
||||
|
||||
fn is_global_s(&self) -> bool {
|
||||
match *self {
|
||||
IpAddr::V4(ref ip) => ip.is_global_s(),
|
||||
IpAddr::V6(ref ip) => ip.is_global_s(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
mod getinterfaces {
|
||||
use std::{mem, io, ptr};
|
||||
|
||||
Reference in New Issue
Block a user