pub struct ReportGroupRecordV3Header {
pub record_type: ReportGroupRecordType,
pub aux_data_len: u8,
pub num_of_sources: u16,
pub multicast_address: [u8; 4],
}Expand description
Header part of an “IGMPv3 Report Group Record”.
The header contains the following parts for the group record:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -
| Record Type | Aux Data Len | Number of Sources (N) | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | part of header and this type
| Multicast Address | ↓
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -
| Source Address [1] |
+- -+
| Source Address [2] |
+- -+
. . .
. . .
. . .
+- -+
| Source Address [N] |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. .
. Auxiliary Data .
. .
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Fields§
§record_type: ReportGroupRecordTypeIdentifies what type of record
aux_data_len: u8The Aux Data Len field contains the length of the Auxiliary Data field in this Group Record, in units of 32-bit words. It may contain zero, to indicate the absence of any auxiliary data.
num_of_sources: u16The Number of Sources (N) field specifies how many source addresses are present in this Group Record.
multicast_address: [u8; 4]The Multicast Address field contains the IP multicast address to which this Group Record pertains.
Implementations§
Source§impl ReportGroupRecordV3Header
impl ReportGroupRecordV3Header
Sourcepub const LEN: usize = 8
pub const LEN: usize = 8
Number of bytes/octets an ReportGroupRecordV3Header takes up in serialized form.
Sourcepub fn from_slice(
slice: &[u8],
) -> Result<(ReportGroupRecordV3Header, &[u8]), LenError>
pub fn from_slice( slice: &[u8], ) -> Result<(ReportGroupRecordV3Header, &[u8]), LenError>
Reads an ReportGroupRecordV3Header from a slice and returns a
tuple containing the resulting header and the unused part of the
slice.
The “unused part” is the slice that follows the fixed 8 byte header (i.e. the source addresses and auxiliary data of the group record).
§Errors
err::LenErrorif the slice is shorter thanReportGroupRecordV3Header::LEN(8 bytes).
Trait Implementations§
Source§impl Clone for ReportGroupRecordV3Header
impl Clone for ReportGroupRecordV3Header
Source§fn clone(&self) -> ReportGroupRecordV3Header
fn clone(&self) -> ReportGroupRecordV3Header
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more