pub struct SmbHeader {
pub protocol_id: u32,
pub struct_size: u16,
pub credit_charge: u16,
pub status: NtStatus,
pub command: SmbCommand,
pub credit_req_grant: u16,
pub flags: u32,
pub next_command: u32,
pub message_id: u64,
pub tree_id: u32,
pub session_id: u64,
pub signature: [u8; 16],
}Expand description
SMB2/3 packet header (64 bytes).
Fields§
§protocol_id: u32Protocol ID (0xFE534D42).
struct_size: u16Structure size (always 64).
credit_charge: u16Credit charge.
status: NtStatusNT status code.
command: SmbCommandCommand code.
credit_req_grant: u16Credits requested/granted.
flags: u32Flags.
next_command: u32Chain offset to next command (0 if last).
message_id: u64Message ID.
tree_id: u32Tree ID.
session_id: u64Session ID.
signature: [u8; 16]Message signature.
Implementations§
Source§impl SmbHeader
impl SmbHeader
Sourcepub fn new_request(command: SmbCommand, message_id: u64) -> Self
pub fn new_request(command: SmbCommand, message_id: u64) -> Self
Create a new header for a request.
Sourcepub fn deserialize(data: &[u8]) -> Option<Self>
pub fn deserialize(data: &[u8]) -> Option<Self>
Deserialize header from bytes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SmbHeader
impl RefUnwindSafe for SmbHeader
impl Send for SmbHeader
impl Sync for SmbHeader
impl Unpin for SmbHeader
impl UnwindSafe for SmbHeader
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)