Skip to main content

Module header

Module header 

Source
Expand description

SMB header codec ([MS-SMB] §2.2.3.1, base layout [MS-CIFS] §2.2.1.1) and AndX-aware response assembly.

Re-exports§

pub use crate::consts::flags;
pub use crate::consts::flags2;

Structs§

Header
The 32-byte SMB header shared by every message.
RespBody
One response body (parameter words + data block). A complete frame carries a header plus one body; AndX chains carry several bodies whose parameter blocks open with AndXCommand/AndXOffset links.

Constants§

HDR_LEN
Size of the fixed SMB header.
SMB_MAGIC
Magic bytes \xFFSMB.

Functions§

build_response
Assemble a complete SMB frame echoing req_hdr, carrying status and the given bodies, wiring AndX offsets between them.
parse_header
Parse a header from the start of buf; returns the header plus the WordCount offset (always HDR_LEN). None on bad magic/size.