#[repr(C)]pub struct EthRequestMut<'a> {
pub adapter_handle: HANDLE,
pub packet: EthPacketMut<'a>,
}Expand description
This structure represents a request for an Ethernet packet, containing a network adapter handle and an EthPacketMut.
A Rust equivalent for the _ETH_REQUEST structure.
adapter_handle is a handle to the network adapter associated with this request. The packet field is an EthPacketMut that represents the Ethernet packet for this request.
Fields§
§adapter_handle: HANDLEA handle to the network adapter associated with this request.
packet: EthPacketMut<'a>An EthPacketMut representing the Ethernet packet for this request.
Implementations§
Source§impl<'a> EthRequestMut<'a>
Provides methods for manipulating the EthPacketMut within an EthRequestMut.
impl<'a> EthRequestMut<'a>
Provides methods for manipulating the EthPacketMut within an EthRequestMut.
Sourcepub fn take_packet(&mut self) -> Option<&'a mut IntermediateBuffer>
pub fn take_packet(&mut self) -> Option<&'a mut IntermediateBuffer>
Takes the EthPacketMut out from the EthRequestMut, replacing it with None.
This is useful when you want to use the packet’s buffer elsewhere, while ensuring that the EthRequestMut no longer has access to it.
Sourcepub fn set_packet(&mut self, buffer: &'a mut IntermediateBuffer)
pub fn set_packet(&mut self, buffer: &'a mut IntermediateBuffer)
Sets the EthPacketMut for the EthRequestMut using a mutable reference to an IntermediateBuffer.
This method allows you to associate a new buffer with the EthRequestMut. This is useful when you have a buffer that you want to send with the EthRequestMut.