Struct ndisapi::IntermediateBuffer
source · #[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: AnIntermediateBufferHeaderUnionwhich is a union ofHANDLEandListEntry.device_flags: ADirectionFlagsvalue that indicates the direction of the packet (send or receive).length: Au32representing the length of the packet data.flags: Au32value containing various flags related to the packet.vlan_8021q: Au32value representing the VLAN tag (802.1Q) associated with the packet.filter_id: Au32value identifying the filter that processed the packet.reserved: A reserved[u32; 4usize]array for future use.buffer: ABufferstructure 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: BufferImplementations§
source§impl IntermediateBuffer
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: Au32value 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