Expand description
SMB2 information-level payload codecs ([MS-SMB2] §2.2.37/§2.2.39 with [MS-FSCC] §2.4/§2.5/§2.6 structures).
Modules§
- file_
class - FileInformationClass values ([MS-FSCC] §2.4).
- find_
class - Directory enumeration classes beyond [MS-FSCC] §2.4 basics ([MS-SMB2] §2.2.33.2 / Windows FILE_INFO_FROM_CLASS numbers).
- fs_
class - FsInformationClass values ([MS-FSCC] §2.5).
Structs§
- Decode
SetInfo Error - Marker error for
decode_set_file_op: the class/buffer was malformed or unsupported. Carries no detail – callers uniformly map it toSTATUS_INVALID_PARAMETER. - Find
Entry - One directory entry to encode.
- Query
Meta - Neutral metadata snapshot fed to the encoders below.
Constants§
- GENERIC_
RW_ ACCESS - Access mask reported by ACCESS/ALL levels for handles opened on this server (read+write generic set).
Functions§
- decode_
set_ file_ op - Decode SET_INFO
bufferinto a neutral [smb_server_vfs::SetOp] where the operation maps onto one;Ok(None)means accepted-but-ignored (e.g. position), and errors mean an unsupported/malformed class. - encode_
file_ info - Encode a QUERY_INFO file payload for
classfrom neutral metadata. - encode_
find_ entries - Encode directory entries into the NextEntryOffset-chained form used by QUERY_DIRECTORY responses. The final entry terminates with offset 0 and intermediate strides are 8-byte aligned ([MS-FSCC] §2.4 requires 8-byte alignment for SMB2 clients).
- encode_
fs_ info - Encode a QUERY_INFO filesystem payload for
class. - encode_
stream_ info - Encode a FILE_STREAM_INFORMATION chain ([MS-FSCC] §2.4.40) from a list of
(stream_name, size)pairs. Names are the full SMB stream syntax, e.g.::$DATAfor the default data stream or:Zone.Identifier:$DATAfor an alternate data stream. An empty list yields an empty buffer (no streams). - short_
name_ 8_ 3 - Generate a DOS 8.3 short name for a long name ([MS-FSCC] §2.1.5.2.1 style):
uppercased, invalid characters dropped, base truncated to 6 plus
~1, and a 3-character extension. Returns""whennameis already a valid 8.3 name (Windows then reports no short name).