#[repr(C, packed(1))]pub struct IntermediateBuffer {
pub header: IntermediateBufferHeaderUnion,
pub device_flags: DirectionFlags,
pub length: u32,
pub flags: u32,
pub vlan_8021q: u32,
pub filter_id: u32,
pub reserved: [u32; 4],
pub buffer: Buffer,
}
Expand description
The IntermediateBuffer
structure represents an intermediate buffer that stores packet data along with some
additional information. This structure is used internally by the packet filter driver.
Rust equivalent for _INTERMEDIATE_BUFFER.
§Fields
header
: AnIntermediateBufferHeaderUnion
which is a union ofHANDLE
andListEntry
.device_flags
: ADirectionFlags
value that indicates the direction of the packet (send or receive).length
: Au32
representing the length of the packet data.flags
: Au32
value containing various flags related to the packet.vlan_8021q
: Au32
value representing the VLAN tag (802.1Q) associated with the packet.filter_id
: Au32
value identifying the filter that processed the packet.reserved
: A reserved[u32; 4usize]
array for future use.buffer
: ABuffer
structure containing the actual packet data.
Fields§
§header: IntermediateBufferHeaderUnion
§device_flags: DirectionFlags
§length: u32
§flags: u32
§vlan_8021q: u32
§filter_id: u32
§reserved: [u32; 4]
§buffer: Buffer
Implementations§
Source§impl IntermediateBuffer
IntermediateBuffer implementation
impl IntermediateBuffer
IntermediateBuffer implementation
Sourcepub fn get_device_flags(&self) -> DirectionFlags
pub fn get_device_flags(&self) -> DirectionFlags
Gets the DirectionFlags
value associated with the IntermediateBuffer
.
§Returns
The DirectionFlags
value indicating the direction of the packet (send or receive).
Sourcepub fn get_length(&self) -> u32
pub fn get_length(&self) -> u32
Gets the length of the packet data stored in the IntermediateBuffer
.
§Returns
A u32
value representing the length of the packet data.
Sourcepub fn set_length(&mut self, length: u32)
pub fn set_length(&mut self, length: u32)
Sets the length of the packet data stored in the IntermediateBuffer
.
§Arguments
length
: Au32
value representing the new length of the packet data.
Sourcepub fn get_data(&self) -> &[u8] ⓘ
pub fn get_data(&self) -> &[u8] ⓘ
Returns a reference to the data stored in the buffer.
This method returns a reference to the data stored in the buffer as a slice of bytes.
The length of the slice is determined by the length
field of the buffer
struct.
Sourcepub fn get_data_mut(&mut self) -> &mut [u8] ⓘ
pub fn get_data_mut(&mut self) -> &mut [u8] ⓘ
Returns a mutable reference to the data stored in the buffer.
This method returns a mutable reference to the data stored in the buffer as a slice of bytes.
The length of the slice is determined by the length
field of the buffer
struct.
Trait Implementations§
Source§impl Clone for IntermediateBuffer
impl Clone for IntermediateBuffer
Source§fn clone(&self) -> IntermediateBuffer
fn clone(&self) -> IntermediateBuffer
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more