2.2.35 SMB2 CHANGE_NOTIFY Request
The SMB2 CHANGE_NOTIFY Request packet is sent by the client to request change notifications on a directory. This request consists of an SMB2 header, as specified in section 2.2.1, followed by this request structure:
StructureSize (2 bytes): The client MUST set this field to 32, indicating the size of the request structure, not including the header.
Flags (2 bytes): Flags indicating how the operation MUST be processed. This field MUST be either zero or the following value:
The request MUST monitor changes on any file or directory contained beneath the directory specified by FileId.
OutputBufferLength (4 bytes): The maximum number of bytes the server is allowed to return in the SMB2 CHANGE_NOTIFY Response (section 2.2.36).
FileId (16 bytes): An SMB2_FILEID identifier of the directory to monitor for changes.
CompletionFilter (4 bytes): Specifies the types of changes to monitor. It is valid to choose multiple trigger conditions. In this case, if any condition is met, the client is notified of the change and the CHANGE_NOTIFY operation is completed. This field MUST be constructed using the following values:
The client is notified if a file-name changes.
The client is notified if a directory name changes.
The client is notified if a file's size changes.
The client is notified if the last write time of a file changes.
The client is notified if the last access time of a file changes.
The client is notified if the creation time of a file changes.
The client is notified if a file's extended attributes (EAs) change.
The client is notified of a file's access control list (ACL) settings change.
The client is notified if a named stream is added to a file.
The client is notified if the size of a named stream is changed.
The client is notified if a named stream is modified.
Reserved (4 bytes): This field MUST NOT be used and MUST be reserved. The client MUST set this field to 0, and the server MUST ignore it on receipt.