#[repr(C, packed)]
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: An IntermediateBufferHeaderUnion which is a union of HANDLE and ListEntry.
  • device_flags: A DirectionFlags value that indicates the direction of the packet (send or receive).
  • length: A u32 representing the length of the packet data.
  • flags: A u32 value containing various flags related to the packet.
  • vlan_8021q: A u32 value representing the VLAN tag (802.1Q) associated with the packet.
  • filter_id: A u32 value identifying the filter that processed the packet.
  • reserved: A reserved [u32; 4usize] array for future use.
  • buffer: A Buffer 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

source

pub fn new() -> Self

Creates a new IntermediateBuffer with default values.

Returns

A new IntermediateBuffer instance.

source

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).

source

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.

source

pub fn set_length(&mut self, length: u32)

Sets the length of the packet data stored in the IntermediateBuffer.

Arguments
  • length: A u32 value representing the new length of the packet data.

Trait Implementations§

source§

impl Clone for IntermediateBuffer

source§

fn clone(&self) -> IntermediateBuffer

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for IntermediateBuffer

source§

fn default() -> IntermediateBuffer

Returns the “default value” for a type. Read more
source§

impl Copy for IntermediateBuffer

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.