pub struct Header {
pub credit_charge: CreditCharge,
pub status: NtStatus,
pub command: Command,
pub credits: u16,
pub flags: HeaderFlags,
pub next_command: u32,
pub message_id: MessageId,
pub tree_id: Option<TreeId>,
pub async_id: Option<u64>,
pub session_id: SessionId,
pub signature: [u8; 16],
}Expand description
SMB2 packet header (64 bytes).
Contains both sync and async variants. The flags field determines
which interpretation of bytes 32-39 is correct.
Fields§
§credit_charge: CreditChargeNumber of credits charged for this request.
status: NtStatusIn responses: NtStatus. In requests before SMB 3.x: Reserved. In requests for SMB 3.x: ChannelSequence (u16) + Reserved (u16).
command: CommandThe command code for this packet.
credits: u16In requests: credits requested. In responses: credits granted.
flags: HeaderFlagsFlags indicating how to process the operation.
next_command: u32Offset to the next command in a compound chain (0 = last/only).
message_id: MessageIdUnique message identifier for request/response correlation.
tree_id: Option<TreeId>Sync-only: tree identifier. None if async.
async_id: Option<u64>Async-only: async identifier. None if sync.
session_id: SessionIdSession identifier.
signature: [u8; 16]16-byte message signature.
Implementations§
Source§impl Header
impl Header
pub const STRUCTURE_SIZE: u16 = 64
Sourcepub fn new_request(command: Command) -> Self
pub fn new_request(command: Command) -> Self
Create a new request header for a given command.
Sourcepub fn is_response(&self) -> bool
pub fn is_response(&self) -> bool
Is this a response (vs request)?