pub struct IoctlResponse {
pub ctl_code: u32,
pub file_id: FileId,
pub in_buffer: Vec<u8>,
pub out_buffer: Vec<u8>,
}Expand description
SMB2 IOCTL response packet containing results of an IOCTL request.
Sent by server to transmit the results of a client SMB2 IOCTL request. The structure size is fixed at 49 bytes regardless of the buffer size.
MS-SMB2 2.2.32
Fields§
§ctl_code: u32Control code of the FSCTL/IOCTL method that was executed
file_id: FileIdFile identifier on which the command was performed
in_buffer: Vec<u8>Input data buffer (typically empty for responses except pass-through operations)
out_buffer: Vec<u8>Output data buffer containing results of the FSCTL/IOCTL operation
Implementations§
Source§impl IoctlResponse
impl IoctlResponse
Sourcepub fn parse_fsctl<T>(&self) -> Result<T, SmbMsgError>where
T: FsctlResponseContent,
pub fn parse_fsctl<T>(&self) -> Result<T, SmbMsgError>where
T: FsctlResponseContent,
Parses the FSCTL response output buffer into the specified response type.
Validates that the control code matches the expected FSCTL codes for the response type before attempting to parse the output buffer.
§Errors
Returns MissingFsctlDefinition if the control code doesn’t match
any of the expected FSCTL codes for the response type.
Trait Implementations§
Source§impl BinRead for IoctlResponse
impl BinRead for IoctlResponse
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
T from the reader assuming native-endian byte order. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl BinWrite for IoctlResponse
impl BinWrite for IoctlResponse
Source§fn write_options<W: Write + Seek>(
&self,
__binrw_generated_var_writer: &mut W,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<()>
fn write_options<W: Write + Seek>( &self, __binrw_generated_var_writer: &mut W, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<()>
Source§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer assuming big-endian byte order. Read moreSource§fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer assuming little-endian byte order. Read moreSource§fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer assuming native-endian byte order. Read moreSource§fn write_be_args<W>(
&self,
writer: &mut W,
args: Self::Args<'_>,
) -> Result<(), Error>
fn write_be_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
Self to the writer, assuming big-endian byte order, using the
given arguments. Read more