Struct IgmpPacket
pub struct IgmpPacket<'a> { /* private fields */ }Expand description
A read/write wrapper around an Internet Group Management Protocol v1/v2 packet buffer.
Implementations§
§impl<'a> Packet<'a>
Internet Group Management Protocol v1/v2 defined in RFC 2236.
impl<'a> Packet<'a>
Internet Group Management Protocol v1/v2 defined in RFC 2236.
pub const fn new_unchecked(buffer: &'a mut [u8]) -> Packet<'a>
pub const fn new_unchecked(buffer: &'a mut [u8]) -> Packet<'a>
Imbue a raw octet buffer with IGMPv2 packet structure.
pub fn new_checked(buffer: &'a mut [u8]) -> Result<Packet<'a>, Malformed>
pub fn new_checked(buffer: &'a mut [u8]) -> Result<Packet<'a>, Malformed>
Shorthand for a combination of new_unchecked and check_len.
pub fn max_resp_code(&self) -> u8
pub fn max_resp_code(&self) -> u8
Return the maximum response time, using the encoding specified in RFC 3376: 4.1.1. Max Resp Code.
pub fn max_resp_time(&self) -> Duration
pub fn max_resp_time(&self) -> Duration
Return the maximum response time, decoded from the max resp code field.
pub fn group_addr(&self) -> Ipv4Addr
pub fn group_addr(&self) -> Ipv4Addr
Return the group address field.
pub fn verify_checksum(&self) -> bool
pub fn verify_checksum(&self) -> bool
pub fn set_msg_type(&mut self, value: Message)
pub fn set_msg_type(&mut self, value: Message)
Set the message type field.
pub fn set_max_resp_code(&mut self, value: u8)
pub fn set_max_resp_code(&mut self, value: u8)
Set the maximum response time, using the encoding specified in RFC 3376: 4.1.1. Max Resp Code.
pub fn set_max_resp_time(&mut self, value: Duration)
pub fn set_max_resp_time(&mut self, value: Duration)
Set the maximum response time, encoding it into the max resp code field.
pub fn set_checksum(&mut self, value: u16)
pub fn set_checksum(&mut self, value: u16)
Set the checksum field.
pub fn set_group_address(&mut self, addr: Ipv4Addr)
pub fn set_group_address(&mut self, addr: Ipv4Addr)
Set the group address field
pub fn fill_checksum(&mut self)
pub fn fill_checksum(&mut self)
Compute and fill in the header checksum.
Trait Implementations§
impl<'a> Eq for Packet<'a>
impl<'a> StructuralPartialEq for Packet<'a>
Auto Trait Implementations§
impl<'a> !UnwindSafe for Packet<'a>
impl<'a> Freeze for Packet<'a>
impl<'a> RefUnwindSafe for Packet<'a>
impl<'a> Send for Packet<'a>
impl<'a> Sync for Packet<'a>
impl<'a> Unpin for Packet<'a>
impl<'a> UnsafeUnpin for Packet<'a>
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