pub enum NatType {
None,
FullCone,
AddressRestricted,
PortRestricted,
Symmetric,
Unknown,
}Expand description
Detected NAT type for the node
NAT type affects connectivity - some types are easier to traverse than others. The node automatically detects its NAT type and adjusts traversal strategies.
Variants§
None
No NAT detected - direct public connectivity
The node has a public IP address and can accept connections directly.
FullCone
Full cone NAT - easiest to traverse
Any external host can send packets to the internal IP:port once the internal host has sent a packet to any external host.
AddressRestricted
Address-restricted cone NAT
External hosts can send packets only if the internal host has previously sent to that specific external IP.
PortRestricted
Port-restricted cone NAT
External hosts can send packets only if the internal host has previously sent to that specific external IP:port.
Symmetric
Symmetric NAT - hardest to traverse
Each outgoing connection gets a different external port. Requires prediction algorithms or relay fallback.
Unknown
NAT type not yet determined
The node hasn’t completed NAT detection yet.
Trait Implementations§
impl Copy for NatType
impl Eq for NatType
impl StructuralPartialEq for NatType
Auto Trait Implementations§
impl Freeze for NatType
impl RefUnwindSafe for NatType
impl Send for NatType
impl Sync for NatType
impl Unpin for NatType
impl UnwindSafe for NatType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.