pub struct NetworkInterfaceAddressState {
pub gateway_addresses: Vec<IpAddr>,
pub interface_addresses: Vec<IfAddr>,
pub own_addresses: Vec<IpAddr>,
pub egress_v4: Option<EgressIdentity>,
pub egress_v6: Option<EgressIdentity>,
}Expand description
The gateway, publication, identity and egress addresses distilled from all interfaces.
Fields§
§gateway_addresses: Vec<IpAddr>Gateway addresses across all interfaces, sorted and deduplicated.
interface_addresses: Vec<IfAddr>PUBLICATION set: best routable interface addresses, sorted by preference and deduplicated. Privacy, CLAT and CGNAT addresses are excluded from peer info.
own_addresses: Vec<IpAddr>IDENTITY set: every address on a running non-loopback interface, sorted and deduplicated. Includes privacy addresses, which a peer may report back as our external address. Not part of change detection.
egress_v4: Option<EgressIdentity>The interface the kernel sends IPv4 from, the address veilid sends from there and its
gateways; None without an IPv4 default route.
egress_v6: Option<EgressIdentity>The IPv6 egress, as egress_v4.
Implementations§
Source§impl NetworkInterfaceAddressState
impl NetworkInterfaceAddressState
Sourcepub fn is_own_address(&self, addr: IpAddr) -> bool
pub fn is_own_address(&self, addr: IpAddr) -> bool
True when the address belongs to one of our interfaces. Identity, not publishability: matches privacy (RFC 4941) and CLAT addresses that publication excludes.
Trait Implementations§
Source§impl Clone for NetworkInterfaceAddressState
impl Clone for NetworkInterfaceAddressState
Source§impl Debug for NetworkInterfaceAddressState
impl Debug for NetworkInterfaceAddressState
impl Eq for NetworkInterfaceAddressState
Source§impl Hash for NetworkInterfaceAddressState
impl Hash for NetworkInterfaceAddressState
Source§impl Ord for NetworkInterfaceAddressState
impl Ord for NetworkInterfaceAddressState
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for NetworkInterfaceAddressState
impl PartialOrd for NetworkInterfaceAddressState
impl StructuralPartialEq for NetworkInterfaceAddressState
Auto Trait Implementations§
impl Freeze for NetworkInterfaceAddressState
impl RefUnwindSafe for NetworkInterfaceAddressState
impl Send for NetworkInterfaceAddressState
impl Sync for NetworkInterfaceAddressState
impl Unpin for NetworkInterfaceAddressState
impl UnsafeUnpin for NetworkInterfaceAddressState
impl UnwindSafe for NetworkInterfaceAddressState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CmpAssign for Twhere
T: Ord,
impl<T> CmpAssign for Twhere
T: Ord,
Source§fn min_assign(&mut self, other: T)
fn min_assign(&mut self, other: T)
self with other if other is smaller.Source§fn max_assign(&mut self, other: T)
fn max_assign(&mut self, other: T)
self with other if other is larger.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more