Skip to main content

Crate smb_server_proto_smb2

Crate smb_server_proto_smb2 

Source
Expand description

SMB2 wire structures ([MS-SMB2]).

Pass-2 scaffold. Planned modules against the spec stored at docs/protocol/smb2_3/MS-SMB2.pdf:

  • header: 64-byte SMB2 header (§2.2.1)
  • negotiate: §2.2.3 (dialects 2.0.2/2.1.0/3.x, capabilities, contexts)
  • session: SESSION_SETUP §2.2.5, LOGOFF §2.2.7
  • tree: TREE_CONNECT/CONNECTX/DISCONNECT §2.2.9–2.2.11
  • create/read/write/close/flush: §2.2.13–2.2.17
  • find/query/set info/dir: §2.2.33–2.2.37
  • credits: credit grant/charge accounting (§3.3.1.1)

Modules§

commands
SMB2 command request/response codecs ([MS-SMB2] §2.2.13–§2.2.39).
compress
SMB3 compression: the COMPRESSION_TRANSFORM_HEADER ([MS-SMB2] §2.2.42) and SMB2_COMPRESSION_CAPABILITIES negotiate context ([MS-SMB2] §2.2.3.1.3).
consts
SMB2/3 shared constants.
info
SMB2 information-level payload codecs ([MS-SMB2] §2.2.37/§2.2.39 with [MS-FSCC] §2.4/§2.5/§2.6 structures).
negotiate
NEGOTIATE ([MS-SMB2] §2.2.3).
session_setup
SESSION_SETUP ([MS-SMB2] §2.2.5).

Structs§

Header2
Fixed 64-byte SMB2 header (§2.2.1) — decoded view.

Enums§

Dialect
Known SMB2/3 dialect numbers (§2.2.3.1.1).

Constants§

PROTO_ID_COMPRESSED
First byte of a COMPRESSION_TRANSFORM_HEADER ProtocolId (\xFC, [MS-SMB2] §2.2.42).
PROTO_ID_ENCRYPTED
First byte of an encrypted TRANSFORM_HEADER ProtocolId (\xFD, [MS-SMB2] §2.2.41).
PROTO_ID_SMB2
First byte of a plaintext SMB2 message ProtocolId (SMB2_MAGIC[0], \xFE).
SMB2_MAGIC
SMB2 header magic \xFESMB.