CIFS Access Mode Encoding
Client requests and server responses, such as SMB_COM_OPEN, pass file access modes encoded into a USHORT value.
The encoding of these file access modes is as follows:
1111 11 5432 1098 7654 3210 rWrC rLLL rSSS rAAA
W
Write through mode.No read ahead or write behind allowed on this file or device. When the response is returned, data is expected to be on the disk or device.
S
Sharing mode for read/write.Code Description 0 Compatibility mode 1 Deny read/write/execute (exclusive) 2 Deny write 3 Deny read/execute 4 Deny none A
Access mode for read/write.Code Description 0 Open for reading 1 Open for writing 2 Open for reading and writing 3 Open for execute C
Cache mode.Code Description 0 Normal file 1 Do not cache this file L
Locality of reference.Code Description 0 Locality unknown 1 Mainly sequential access 2 Mainly random access 3 Random access with some locally 4 to 7 Currently undefined