Skip to main content

Module info

Module info 

Source
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§

DecodeSetInfoError
Marker error for decode_set_file_op: the class/buffer was malformed or unsupported. Carries no detail – callers uniformly map it to STATUS_INVALID_PARAMETER.
FindEntry
One directory entry to encode.
QueryMeta
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 buffer into 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 class from 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. ::$DATA for the default data stream or :Zone.Identifier:$DATA for 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 "" when name is already a valid 8.3 name (Windows then reports no short name).