pub struct PingManager<'d> { /* private fields */ }
Expand description
Manages ICMP ping operations.
This struct provides functionality to send ICMP echo requests (pings) to a specified target and measure the round-trip time for the requests. It supports both IPv4 and IPv6, depending on the enabled features.
§Fields
stack
- The network stack instance used for managing network operations.rx_meta
- Metadata buffer for receiving packets.rx_buffer
- Buffer for receiving packets.tx_meta
- Metadata buffer for transmitting packets.tx_buffer
- Buffer for transmitting packets.ident
- Identifier for the ICMP echo requests.
§Methods
Implementations§
Source§impl<'d> PingManager<'d>
impl<'d> PingManager<'d>
Sourcepub fn new(
stack: Stack<'d>,
rx_meta: &'d mut [PacketMetadata],
rx_buffer: &'d mut [u8],
tx_meta: &'d mut [PacketMetadata],
tx_buffer: &'d mut [u8],
) -> Self
pub fn new( stack: Stack<'d>, rx_meta: &'d mut [PacketMetadata], rx_buffer: &'d mut [u8], tx_meta: &'d mut [PacketMetadata], tx_buffer: &'d mut [u8], ) -> Self
Creates a new instance of PingManager
with a Stack
instance
and the buffers used for RX and TX.
note: This does not yet creates the ICMP socket.
Auto Trait Implementations§
impl<'d> Freeze for PingManager<'d>
impl<'d> !RefUnwindSafe for PingManager<'d>
impl<'d> !Send for PingManager<'d>
impl<'d> !Sync for PingManager<'d>
impl<'d> Unpin for PingManager<'d>
impl<'d> !UnwindSafe for PingManager<'d>
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