Struct icmp_socket::socket::IcmpSocket6
source · [−]pub struct IcmpSocket6 { /* private fields */ }
Expand description
An Icmpv6 socket.
Implementations
sourceimpl IcmpSocket6
impl IcmpSocket6
Trait Implementations
sourceimpl IcmpSocket for IcmpSocket6
impl IcmpSocket for IcmpSocket6
type PacketType = Icmpv6Packet
type PacketType = Icmpv6Packet
The type of packet this socket handles.
sourcefn set_max_hops(&mut self, hops: u32)
fn set_max_hops(&mut self, hops: u32)
Sets the ttl for packets sent on this socket. Controls the number of hops the packet will be allowed to traverse. Read more
sourcefn bind<A: Into<Self::AddrType>>(&mut self, addr: A) -> Result<()>
fn bind<A: Into<Self::AddrType>>(&mut self, addr: A) -> Result<()>
Binds this socket to an address.
sourcefn send_to(
&mut self,
dest: Self::AddrType,
packet: Self::PacketType
) -> Result<()>
fn send_to(
&mut self,
dest: Self::AddrType,
packet: Self::PacketType
) -> Result<()>
Sends the packet to the given destination.
sourcefn rcv_from(&mut self) -> Result<(Self::PacketType, SockAddr)>
fn rcv_from(&mut self) -> Result<(Self::PacketType, SockAddr)>
Receive a packet on this socket.
sourcefn set_timeout(&mut self, timeout: Option<Duration>)
fn set_timeout(&mut self, timeout: Option<Duration>)
Sets the timeout on the socket for rcv_from. A value of None will cause rcv_from to block. Read more
Auto Trait Implementations
impl RefUnwindSafe for IcmpSocket6
impl Send for IcmpSocket6
impl Sync for IcmpSocket6
impl Unpin for IcmpSocket6
impl UnwindSafe for IcmpSocket6
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more