pub struct CreateRequest {Show 17 fields
pub structure_size: u16,
pub security_flags: u8,
pub requested_oplock_level: u8,
pub impersonation_level: u32,
pub smb_create_flags: u64,
pub reserved: u64,
pub desired_access: u32,
pub file_attributes: u32,
pub share_access: u32,
pub create_disposition: u32,
pub create_options: u32,
pub name_offset: u16,
pub name_length: u16,
pub create_contexts_offset: u32,
pub create_contexts_length: u32,
pub name: Vec<u8>,
pub create_contexts: Vec<u8>,
}Expand description
MS-SMB2 §2.2.13 CREATE Request — fixed prefix.
Variable-length tail: the file name (UTF-16LE) and create_contexts
blob, each at absolute offsets from the start of the SMB2 header. We hold
them as length-counted byte buffers immediately following the fixed
portion. The server crate parses contexts with CreateContext::parse_chain.
Fields§
§structure_size: u16§security_flags: u8§requested_oplock_level: u8§impersonation_level: u32§smb_create_flags: u64§reserved: u64§desired_access: u32§file_attributes: u32§create_disposition: u32§create_options: u32§name_offset: u16§name_length: u16§create_contexts_offset: u32§create_contexts_length: u32§name: Vec<u8>UTF-16LE filename.
create_contexts: Vec<u8>Raw create-contexts chain bytes; parse with
CreateContext::parse_chain.
Implementations§
Trait Implementations§
Source§impl BinRead for CreateRequest
impl BinRead for CreateRequest
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<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments. Read moreSource§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Read
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>
Read
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>
Read
T from the reader assuming native-endian byte order. Read moreSource§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self from the reader using the given arguments. 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>
Read
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl BinWrite for CreateRequest
impl BinWrite for CreateRequest
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<W>(&self, writer: &mut W) -> Result<(), Error>
fn write<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer using default arguments. Read moreSource§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Write
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>
Write
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>
Write
Self to the writer assuming native-endian byte order. Read moreSource§fn write_args<W>(
&self,
writer: &mut W,
args: Self::Args<'_>,
) -> Result<(), Error>
fn write_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
Write
Self to the writer using the given arguments. 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>
Write
Self to the writer, assuming big-endian byte order, using the
given arguments. Read moreSource§impl Clone for CreateRequest
impl Clone for CreateRequest
Source§impl Debug for CreateRequest
impl Debug for CreateRequest
impl Eq for CreateRequest
Source§impl PartialEq for CreateRequest
impl PartialEq for CreateRequest
Source§impl ReadEndian for CreateRequest
impl ReadEndian for CreateRequest
Source§const ENDIAN: EndianKind
const ENDIAN: EndianKind
The endianness of the type.
impl StructuralPartialEq for CreateRequest
Source§impl WriteEndian for CreateRequest
impl WriteEndian for CreateRequest
Source§const ENDIAN: EndianKind
const ENDIAN: EndianKind
The endianness of the type.
Auto Trait Implementations§
impl Freeze for CreateRequest
impl RefUnwindSafe for CreateRequest
impl Send for CreateRequest
impl Sync for CreateRequest
impl Unpin for CreateRequest
impl UnsafeUnpin for CreateRequest
impl UnwindSafe for CreateRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more