pub struct NatProbeResponse {
pub inner_ip_id: u16,
pub inner_udp_checksum: u16,
pub responder_addr: SocketAddr,
pub response_ip_id: u16,
pub received_at: Instant,
pub icmp_type: u8,
pub icmp_code: u8,
}Expand description
Response from a NAT probe.
Fields§
§inner_ip_id: u16IP ID from the response (in ICMP inner packet).
inner_udp_checksum: u16UDP checksum from the response (in ICMP inner packet).
responder_addr: SocketAddrSource IP of the ICMP response (the responding hop).
response_ip_id: u16Response IP ID (for NAT loop detection).
received_at: InstantTime received.
icmp_type: u8ICMP type (11 = TTL exceeded, 3 = unreachable).
icmp_code: u8ICMP code.
Implementations§
Source§impl NatProbeResponse
impl NatProbeResponse
Sourcepub fn nat_id(&self, original_checksum: u16) -> NatId
pub fn nat_id(&self, original_checksum: u16) -> NatId
Calculate NAT ID by comparing with original probe.
Sourcepub fn is_ttl_exceeded(&self) -> bool
pub fn is_ttl_exceeded(&self) -> bool
Check if this is a TTL exceeded response.
Sourcepub fn is_destination(&self) -> bool
pub fn is_destination(&self) -> bool
Check if this is the final destination (port unreachable).
Trait Implementations§
Source§impl Clone for NatProbeResponse
impl Clone for NatProbeResponse
Source§fn clone(&self) -> NatProbeResponse
fn clone(&self) -> NatProbeResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NatProbeResponse
impl RefUnwindSafe for NatProbeResponse
impl Send for NatProbeResponse
impl Sync for NatProbeResponse
impl Unpin for NatProbeResponse
impl UnwindSafe for NatProbeResponse
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
Mutably borrows from an owned value. Read more