pub struct IgmpMessage<B: SplitByteSlice, M: MessageType<B>> { /* private fields */ }
Expand description
An IGMP message.
An IgmpMessage
is a struct representing an IGMP message in memory;
it holds the 3 IGMP message parts and is characterized by the
MessageType
trait.
Implementations§
Source§impl<B: SplitByteSlice> IgmpMessage<B, IgmpMembershipQueryV2>
impl<B: SplitByteSlice> IgmpMessage<B, IgmpMembershipQueryV2>
Sourcepub fn is_igmpv1_query(&self) -> bool
pub fn is_igmpv1_query(&self) -> bool
Returns true if this is an IGMPv1 query.
Defined in RFC 2236 section 4.1:
The IGMPv1 router will send General Queries with the Max Response Time set to 0…
Source§impl<B: SplitByteSlice> IgmpMessage<B, IgmpMembershipQueryV3>
impl<B: SplitByteSlice> IgmpMessage<B, IgmpMembershipQueryV3>
Sourcepub fn as_v2_query(&self) -> IgmpMessage<&[u8], IgmpMembershipQueryV2>
pub fn as_v2_query(&self) -> IgmpMessage<&[u8], IgmpMembershipQueryV2>
Reinterprets this IgmpMembershipQueryV3
message as an
IgmpMembershipQueryV2
message.
Given this crate parses the version separately, users desiring to operate in IGMPv2 or IGMPv1 modes SHOULD reinterpret V3 queries as the older version.
Source§impl<B: SplitByteSlice, M: MessageType<B>> IgmpMessage<B, M>
impl<B: SplitByteSlice, M: MessageType<B>> IgmpMessage<B, M>
Sourcepub fn builder(&self) -> IgmpPacketBuilder<B, M>
pub fn builder(&self) -> IgmpPacketBuilder<B, M>
Construct a builder with the same contents as this packet.
Sourcepub fn max_response_time(&self) -> M::MaxRespTime
pub fn max_response_time(&self) -> M::MaxRespTime
Gets the interpreted Max Response Time for the message
Sourcepub fn header(&self) -> &M::FixedHeader
pub fn header(&self) -> &M::FixedHeader
Returns the header.
Sourcepub fn body(&self) -> &M::VariableBody
pub fn body(&self) -> &M::VariableBody
Returns the body.
Source§impl<B: SplitByteSlice, M: MessageType<B, FixedHeader = Ipv4Addr>> IgmpMessage<B, M>
impl<B: SplitByteSlice, M: MessageType<B, FixedHeader = Ipv4Addr>> IgmpMessage<B, M>
Sourcepub fn group_addr(&self) -> Ipv4Addr
pub fn group_addr(&self) -> Ipv4Addr
Returns the group address.
Trait Implementations§
Source§impl<B: Debug + SplitByteSlice, M: Debug + MessageType<B>> Debug for IgmpMessage<B, M>
impl<B: Debug + SplitByteSlice, M: Debug + MessageType<B>> Debug for IgmpMessage<B, M>
Source§impl<B: SplitByteSlice, M: MessageType<B>> ParsablePacket<B, ()> for IgmpMessage<B, M>
impl<B: SplitByteSlice, M: MessageType<B>> ParsablePacket<B, ()> for IgmpMessage<B, M>
Auto Trait Implementations§
impl<B, M> Freeze for IgmpMessage<B, M>
impl<B, M> RefUnwindSafe for IgmpMessage<B, M>where
<M as MessageType<B>>::VariableBody: RefUnwindSafe,
B: RefUnwindSafe,
<M as MessageType<B>>::FixedHeader: RefUnwindSafe,
impl<B, M> Send for IgmpMessage<B, M>
impl<B, M> Sync for IgmpMessage<B, M>
impl<B, M> Unpin for IgmpMessage<B, M>where
<M as MessageType<B>>::VariableBody: Unpin,
B: Unpin,
<M as MessageType<B>>::FixedHeader: Unpin,
impl<B, M> UnwindSafe for IgmpMessage<B, M>where
<M as MessageType<B>>::VariableBody: UnwindSafe,
B: UnwindSafe,
<M as MessageType<B>>::FixedHeader: UnwindSafe,
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