Compartir a través de


2.2.4.9.2 Server Response Extensions

A successful response takes the following format. If the server receives more than one SMB_COM_NT_CREATE_ANDX request from a client before it sends back any response, then the server can respond to these requests in any order.

When a client requests extended information, then the response takes the form described below. Aside from the WordCount, ResourceType, NMPipeStatus_or_FileStatusFlags, FileId, VolumeGUID, FileId, MaximalAccessRights, and GuestMaximalAccessRights fields, all other fields are as specified in [MS-CIFS] section 2.2.4.64.2.

 SMB_Parameters
   {
     UCHAR WordCount;
     Words
       {
       UCHAR          AndXCommand;
       UCHAR          AndXReserved;
       USHORT         AndXOffset;
       UCHAR          OplockLevel;
       USHORT         FID;
       ULONG          CreateDisposition;
       FILETIME       CreateTime;
       FILETIME       LastAccessTime;
       FILETIME       LastWriteTime;
       FILETIME       LastChangeTime;
       SMB_EXT_FILE_ATTR      ExtFileAttributes;
       LARGE_INTERGER AllocationSize;
       LARGE_INTERGER EndOfFile;
       USHORT         ResourceType;
       USHORT         NMPipeStatus_or_FileStatusFlags;
       UCHAR          Directory;
       GUID           VolumeGUID;
       ULONGLONG      FileId;
       ACCESS_MASK    MaximalAccessRights;
       ACCESS_MASK    GuestMaximalAccessRights;
       }
   }
 SMB_Data
   {
     USHORT ByteCount;
   }

SMB_Parameters:

WordCount (1 bytes): This field SHOULD<50> be 0x2A.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

AndXCommand

AndXReserved

AndXOffset

OplockLevel

FID

CreateDisposition

...

CreateTime

...

...

LastAccessTime

...

...

LastWriteTime

...

...

LastChangeTime

...

...

ExtFileAttributes

...

AllocationSize

...

...

EndOfFile

...

...

ResourceType

...

NMPipeStatus_or_FileStatusFlags

Directory

VolumeGUID (16 bytes)

...

...

FileId

...

MaximalAccessRights

GuestMaximalAccessRights

ResourceType (2 bytes): The file type. This field MUST be interpreted as follows:

Name & value

Meaning

FileTypeDisk

0x0000

File or Directory

FileTypeByteModePipe

0x0001

Byte mode named pipe

FileTypeMessageModePipe

0x0002

Message mode named pipe

FileTypePrinter

0x0003

Printer Device

NMPipeStatus_or_FileStatusFlags (2 bytes): A union between the NMPipeStatus field and the new FileStatusFlags field. If the ResourceType field is a named pipe (FileTypeByteModePipe or FileTypeMessageModePipe), then this field MUST be the NMPipeStatus field:


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

NMPipeStatus

FileStatusFlags

NMPipeStatus (2 bytes): A 16-bit field that shows the status of the opened named pipe. This field is formatted as an SMB_NMPIPE_STATUS ([MS-CIFS] section 2.2.1.3).

If the ResourceType field is FileTypeDisk, then this field MUST be the FileStatusFlags field:

FileStatusFlags (2 bytes): A 16-bit field that shows extra information about the opened file or directory. Any combination of the following flags is valid. Unused bit fields SHOULD be set to zero by the server and MUST be ignored by the client.

Name & bitmask

Meaning

NO_EAS

0x0001

The file or directory has no extended attributes.

NO_SUBSTREAMS

0x0002

The file or directory has no data streams other than the main data stream.

NO_REPARSETAG

0x0004

The file or directory is not a reparse point.

For all other values of ResourceType, this field SHOULD be set to zero by the server when sending a response and MUST be ignored when received by the client.

VolumeGUID (16 bytes): This field MUST be a GUID value that uniquely identifies the volume on which the file resides. This field MUST zero if the underlying file system does not support volume GUIDs.<51>

FileId (8 bytes): This field MUST be a 64-bit opaque value that uniquely identifies this file on a volume. This field MUST be set to zero if the underlying file system does not support unique FileId numbers on a volume. If the underlying file system does support unique FileId numbers, then this value SHOULD<52> be set to the unique FileId for this file.

MaximalAccessRights (4 bytes): The maximum access rights that the user opening the file has been granted for this file open. This field MUST be encoded in an ACCESS_MASK format, as specified in section 2.2.1.4.

GuestMaximalAccessRights (4 bytes): The maximum access rights that the guest account has when opening this file. This field MUST be encoded in an ACCESS_MASK format, as specified in section 2.2.1.4. Note that the notion of a guest account is implementation-specific<53>. Implementations that do not support the notion of a guest account MUST set this field to zero.

SMB_Data:

ByteCount (2 bytes): This field SHOULD<54> be zero.