This transaction requests information about a filesystem on the server.
Client Request ================================== |
Value ================================= |
WordCount; | 15 |
TotalParameterCount; | 2 or 4 |
MaxSetupCount; | 0 |
SetupCount; | 1 or 2 |
Setup[0]; | TRANS2_QUERY_FS_INFORMATION |
Parameter Block Encoding ================================== |
Description ================================= |
USHORT Information Level; | Level of information requested |
The filesystem is identified by Tid in the SMB header.
MaxDataCount in the transaction request must be large enough to accommodate the response.
The encoding of the response parameter block depends on the InformationLevel requested. Information levels whose values are greater than 0x102 are mapped to corresponding calls to NtQueryVolumeInformationFile
calls by the server. The two levels below 0x102 are described below. The requested information is placed in the Data portion of the transaction response.
InformationLevel ============================= |
Value ====== |
SMB_INFO_ALLOCATION | 1 |
SMB_INFO_VOLUME | 2 |
SMB_QUERY_FS_VOLUME_INFO | 0x102 |
SMB_QUERY_FS_SIZE_INFO | 0x103 |
SMB_QUERY_FS_DEVICE_INFO | 0x104 |
SMB_QUERY_FS_ATTRIBUTE_INFO | 0x105 |
The following sections describe the InformationLevel dependent encoding of the data part of the transaction response.
Data Block Encoding =================== |
Description ================================================ |
ULONG idFileSystem; | File system identifier. NT server always returns 0 |
ULONG cSectorUnit; | Number of sectors per allocation unit |
ULONG cUnit; | Total number of allocation units |
ULONG cUnitAvail; | Total number of available allocation units |
USHORT cbSector; | Number of bytes per sector |
Data Block Encoding =================== |
Description ================================================ |
ULONG ulVsn; | Volume serial number |
UCHAR cch; | Number of characters in Label |
STRING Label; | The volume label |
typedef struct {
LARGE_INTEGER VolumeCreationTime;
ULONG VolumeSerialNumber;
ULONG VolumeLabelLength;
BOOLEAN SupportsObjects;
WCHAR VolumeLabel[1];
} FILE_FS_VOLUME_INFORMATION;
typedef struct {
LARGE_INTEGER TotalAllocationUnits;
LARGE_INTEGER AvailableAllocationUnits;
ULONG SectorsPerAllocationUnit;
ULONG BytesPerSector;
} FILE_FS_SIZE_INFORMATION;
typedef struct {
DEVICE_TYPE DeviceType;
ULONG Characteristics;
} FILE_FS_DEVICE_INFORMATION;
Where Characteristics is the sum of any of the following:
FILE_REMOVABLE_MEDIA 0x00000001
FILE_READ_ONLY_DEVICE 0x00000002
FILE_FLOPPY_DISKETTE 0x00000004
FILE_WRITE_ONCE_MEDIA 0x00000008
FILE_REMOTE_DEVICE 0x00000010
FILE_DEVICE_IS_MOUNTED 0x00000020
FILE_VIRTUAL_VOLUME 0x00000040
typedef struct {
ULONG FileSystemAttributes;
LONG MaximumComponentNameLength;
ULONG FileSystemNameLength;
WCHAR FileSystemName[1];
} FILE_FS_ATTRIBUTE_INFORMATION;
Where FileSystemAttributes is the sum of any of the following:
FILE_CASE_SENSITIVE_SEARCH 0x00000001
FILE_CASE_PRESERVED_NAMES 0x00000002
FILE_UNICODE_ON_DISK 0x00000004
FILE_PERSISTENT_ACLS 0x00000008
FILE_FILE_COMPRESSION 0x00000010
FILE_VOLUME_QUOTAS 0x00000020
FILE_VOLUME_IS_COMPRESSED 0x00008000
ERRSRV/invnid - TID was invalid
ERRSRV/baduid - UID was invalid
ERRHRD/ERRnotready - the file system has been removed
ERRHRD/ERRdata - disk I/O error
ERRSRV/ERRaccess - user does not have the right to perform this operation
ERRSRV/ERRinvdevice - resource identified by TID is not a file system