2011-08-12 13:20:12 -04:00
|
|
|
/* Copyright (c) 2010, 2011
|
2010-10-11 14:59:26 -04:00
|
|
|
* The Regents of the University of Michigan
|
|
|
|
|
* All Rights Reserved
|
2011-08-12 13:20:12 -04:00
|
|
|
*
|
|
|
|
|
* Olga Kornievskaia <aglo@umich.edu>
|
|
|
|
|
* Casey Bodley <cbodley@umich.edu>
|
2010-10-11 14:59:26 -04:00
|
|
|
*
|
|
|
|
|
* Permission is granted to use, copy and redistribute this software
|
|
|
|
|
* for noncommercial education and research purposes, so long as no
|
|
|
|
|
* fee is charged, and so long as the name of the University of Michigan
|
|
|
|
|
* is not used in any advertising or publicity pertaining to the use
|
|
|
|
|
* or distribution of this software without specific, written prior
|
|
|
|
|
* authorization. Permission to modify or otherwise create derivative
|
|
|
|
|
* works of this software is not granted.
|
|
|
|
|
*
|
|
|
|
|
* This software is provided as is, without representation or warranty
|
|
|
|
|
* of any kind either express or implied, including without limitation
|
|
|
|
|
* the implied warranties of merchantability, fitness for a particular
|
|
|
|
|
* purpose, or noninfringement. The Regents of the University of
|
|
|
|
|
* Michigan shall not be liable for any damages, including special,
|
|
|
|
|
* indirect, incidental, or consequential damages, with respect to any
|
|
|
|
|
* claim arising out of or in connection with the use of the software,
|
|
|
|
|
* even if it has been or is hereafter advised of the possibility of
|
|
|
|
|
* such damages.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _NFS41_DAEMON_
|
|
|
|
|
#define _NFS41_DAEMON_
|
|
|
|
|
|
|
|
|
|
#define FILE_DIRECTORY_FILE 0x00000001
|
|
|
|
|
#define FILE_WRITE_THROUGH 0x00000002
|
|
|
|
|
#define FILE_SEQUENTIAL_ONLY 0x00000004
|
|
|
|
|
#define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
|
|
|
|
|
|
|
|
|
|
#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
|
|
|
|
|
#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
|
|
|
|
|
#define FILE_NON_DIRECTORY_FILE 0x00000040
|
|
|
|
|
#define FILE_CREATE_TREE_CONNECTION 0x00000080
|
|
|
|
|
|
|
|
|
|
#define FILE_COMPLETE_IF_OPLOCKED 0x00000100
|
|
|
|
|
#define FILE_NO_EA_KNOWLEDGE 0x00000200
|
|
|
|
|
#define FILE_OPEN_REMOTE_INSTANCE 0x00000400
|
|
|
|
|
#define FILE_RANDOM_ACCESS 0x00000800
|
|
|
|
|
|
|
|
|
|
#define FILE_DELETE_ON_CLOSE 0x00001000
|
|
|
|
|
#define FILE_OPEN_BY_FILE_ID 0x00002000
|
|
|
|
|
#define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
|
|
|
|
|
#define FILE_NO_COMPRESSION 0x00008000
|
|
|
|
|
|
|
|
|
|
#define FILE_RESERVE_OPFILTER 0x00100000
|
|
|
|
|
#define FILE_OPEN_REPARSE_POINT 0x00200000
|
|
|
|
|
#define FILE_OPEN_NO_RECALL 0x00400000
|
|
|
|
|
#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
|
|
|
|
|
|
|
|
|
|
#define FILE_COPY_STRUCTURED_STORAGE 0x00000041
|
|
|
|
|
#define FILE_STRUCTURED_STORAGE 0x00000441
|
|
|
|
|
|
|
|
|
|
#define FILE_SUPERSEDE 0x00000000
|
|
|
|
|
#define FILE_OPEN 0x00000001
|
|
|
|
|
#define FILE_CREATE 0x00000002
|
|
|
|
|
#define FILE_OPEN_IF 0x00000003
|
|
|
|
|
#define FILE_OVERWRITE 0x00000004
|
|
|
|
|
#define FILE_OVERWRITE_IF 0x00000005
|
|
|
|
|
#define FILE_MAXIMUM_DISPOSITION 0x00000005
|
|
|
|
|
|
|
|
|
|
typedef enum _FILE_INFORMATION_CLASS {
|
|
|
|
|
FileDirectoryInformation = 1,
|
|
|
|
|
FileFullDirectoryInformation, // 2
|
|
|
|
|
FileBothDirectoryInformation, // 3
|
|
|
|
|
FileBasicInformation, // 4
|
|
|
|
|
FileStandardInformation, // 5
|
|
|
|
|
FileInternalInformation, // 6
|
|
|
|
|
FileEaInformation, // 7
|
|
|
|
|
FileAccessInformation, // 8
|
|
|
|
|
FileNameInformation, // 9
|
|
|
|
|
FileRenameInformation, // 10
|
|
|
|
|
FileLinkInformation, // 11
|
|
|
|
|
FileNamesInformation, // 12
|
|
|
|
|
FileDispositionInformation, // 13
|
|
|
|
|
FilePositionInformation, // 14
|
|
|
|
|
FileFullEaInformation, // 15
|
|
|
|
|
FileModeInformation, // 16
|
|
|
|
|
FileAlignmentInformation, // 17
|
|
|
|
|
FileAllInformation, // 18
|
|
|
|
|
FileAllocationInformation, // 19
|
|
|
|
|
FileEndOfFileInformation, // 20
|
|
|
|
|
FileAlternateNameInformation, // 21
|
|
|
|
|
FileStreamInformation, // 22
|
|
|
|
|
FilePipeInformation, // 23
|
|
|
|
|
FilePipeLocalInformation, // 24
|
|
|
|
|
FilePipeRemoteInformation, // 25
|
|
|
|
|
FileMailslotQueryInformation, // 26
|
|
|
|
|
FileMailslotSetInformation, // 27
|
|
|
|
|
FileCompressionInformation, // 28
|
|
|
|
|
FileObjectIdInformation, // 29
|
|
|
|
|
FileCompletionInformation, // 30
|
|
|
|
|
FileMoveClusterInformation, // 31
|
|
|
|
|
FileQuotaInformation, // 32
|
|
|
|
|
FileReparsePointInformation, // 33
|
|
|
|
|
FileNetworkOpenInformation, // 34
|
|
|
|
|
FileAttributeTagInformation, // 35
|
|
|
|
|
FileTrackingInformation, // 36
|
|
|
|
|
FileIdBothDirectoryInformation, // 37
|
|
|
|
|
FileIdFullDirectoryInformation, // 38
|
|
|
|
|
FileValidDataLengthInformation, // 39
|
|
|
|
|
FileShortNameInformation, // 40
|
|
|
|
|
FileIoCompletionNotificationInformation, // 41
|
|
|
|
|
FileIoStatusBlockRangeInformation, // 42
|
|
|
|
|
FileIoPriorityHintInformation, // 43
|
|
|
|
|
FileSfioReserveInformation, // 44
|
|
|
|
|
FileSfioVolumeInformation, // 45
|
|
|
|
|
FileHardLinkInformation, // 46
|
|
|
|
|
FileProcessIdsUsingFileInformation, // 47
|
|
|
|
|
FileNormalizedNameInformation, // 48
|
|
|
|
|
FileNetworkPhysicalNameInformation, // 49
|
|
|
|
|
FileIdGlobalTxDirectoryInformation, // 50
|
|
|
|
|
FileMaximumInformation
|
|
|
|
|
} FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* kernel structures for QueryDirectory results */
|
|
|
|
|
typedef struct _FILE_NAMES_INFORMATION {
|
|
|
|
|
ULONG NextEntryOffset;
|
|
|
|
|
ULONG FileIndex;
|
|
|
|
|
ULONG FileNameLength;
|
|
|
|
|
WCHAR FileName[1];
|
|
|
|
|
} FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
|
|
|
|
|
|
|
|
|
|
typedef struct _FILE_DIRECTORY_INFO {
|
|
|
|
|
ULONG NextEntryOffset;
|
|
|
|
|
ULONG FileIndex;
|
|
|
|
|
LARGE_INTEGER CreationTime;
|
|
|
|
|
LARGE_INTEGER LastAccessTime;
|
|
|
|
|
LARGE_INTEGER LastWriteTime;
|
|
|
|
|
LARGE_INTEGER ChangeTime;
|
|
|
|
|
LARGE_INTEGER EndOfFile;
|
|
|
|
|
LARGE_INTEGER AllocationSize;
|
|
|
|
|
ULONG FileAttributes;
|
|
|
|
|
ULONG FileNameLength;
|
|
|
|
|
WCHAR FileName[1];
|
|
|
|
|
} FILE_DIRECTORY_INFO, *PFILE_DIRECTORY_INFO;
|
|
|
|
|
|
|
|
|
|
typedef struct _FILE_BOTH_DIR_INFORMATION {
|
|
|
|
|
ULONG NextEntryOffset;
|
|
|
|
|
ULONG FileIndex;
|
|
|
|
|
LARGE_INTEGER CreationTime;
|
|
|
|
|
LARGE_INTEGER LastAccessTime;
|
|
|
|
|
LARGE_INTEGER LastWriteTime;
|
|
|
|
|
LARGE_INTEGER ChangeTime;
|
|
|
|
|
LARGE_INTEGER EndOfFile;
|
|
|
|
|
LARGE_INTEGER AllocationSize;
|
|
|
|
|
ULONG FileAttributes;
|
|
|
|
|
ULONG FileNameLength;
|
|
|
|
|
ULONG EaSize;
|
|
|
|
|
CCHAR ShortNameLength;
|
|
|
|
|
WCHAR ShortName[12];
|
|
|
|
|
WCHAR FileName[1];
|
|
|
|
|
} FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
|
|
|
|
|
|
|
|
|
|
typedef struct _FILE_FULL_DIR_INFO {
|
|
|
|
|
ULONG NextEntryOffset;
|
|
|
|
|
ULONG FileIndex;
|
|
|
|
|
LARGE_INTEGER CreationTime;
|
|
|
|
|
LARGE_INTEGER LastAccessTime;
|
|
|
|
|
LARGE_INTEGER LastWriteTime;
|
|
|
|
|
LARGE_INTEGER ChangeTime;
|
|
|
|
|
LARGE_INTEGER EndOfFile;
|
|
|
|
|
LARGE_INTEGER AllocationSize;
|
|
|
|
|
ULONG FileAttributes;
|
|
|
|
|
ULONG FileNameLength;
|
|
|
|
|
ULONG EaSize;
|
|
|
|
|
WCHAR FileName[1];
|
|
|
|
|
} FILE_FULL_DIR_INFO, *PFILE_FULL_DIR_INFO;
|
|
|
|
|
|
|
|
|
|
typedef struct _FILE_ID_FULL_DIR_INFO {
|
|
|
|
|
ULONG NextEntryOffset;
|
|
|
|
|
ULONG FileIndex;
|
|
|
|
|
LARGE_INTEGER CreationTime;
|
|
|
|
|
LARGE_INTEGER LastAccessTime;
|
|
|
|
|
LARGE_INTEGER LastWriteTime;
|
|
|
|
|
LARGE_INTEGER ChangeTime;
|
|
|
|
|
LARGE_INTEGER EndOfFile;
|
|
|
|
|
LARGE_INTEGER AllocationSize;
|
|
|
|
|
ULONG FileAttributes;
|
|
|
|
|
ULONG FileNameLength;
|
|
|
|
|
ULONG EaSize;
|
|
|
|
|
LARGE_INTEGER FileId;
|
|
|
|
|
WCHAR FileName[1];
|
|
|
|
|
} FILE_ID_FULL_DIR_INFO, *PFILE_ID_FULL_DIR_INFO;
|
|
|
|
|
|
|
|
|
|
typedef struct _FILE_LINK_INFORMATION {
|
|
|
|
|
BOOLEAN ReplaceIfExists;
|
|
|
|
|
HANDLE RootDirectory;
|
|
|
|
|
ULONG FileNameLength;
|
|
|
|
|
WCHAR FileName[1];
|
|
|
|
|
} FILE_LINK_INFORMATION, *PFILE_LINK_INFORMATION;
|
|
|
|
|
|
2010-10-11 16:11:27 -04:00
|
|
|
/* wdm.h */
|
|
|
|
|
typedef enum _FSINFOCLASS {
|
|
|
|
|
FileFsVolumeInformation = 1,
|
|
|
|
|
FileFsLabelInformation, // 2
|
|
|
|
|
FileFsSizeInformation, // 3
|
|
|
|
|
FileFsDeviceInformation, // 4
|
|
|
|
|
FileFsAttributeInformation, // 5
|
|
|
|
|
FileFsControlInformation, // 6
|
|
|
|
|
FileFsFullSizeInformation, // 7
|
|
|
|
|
FileFsObjectIdInformation, // 8
|
|
|
|
|
FileFsDriverPathInformation, // 9
|
|
|
|
|
FileFsVolumeFlagsInformation,// 10
|
|
|
|
|
FileFsMaximumInformation
|
|
|
|
|
} FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
|
|
|
|
|
|
2010-10-11 16:12:20 -04:00
|
|
|
/* ntifs.h */
|
|
|
|
|
#define FILE_CASE_SENSITIVE_SEARCH 0x00000001
|
|
|
|
|
#define FILE_CASE_PRESERVED_NAMES 0x00000002
|
|
|
|
|
#define FILE_UNICODE_ON_DISK 0x00000004
|
|
|
|
|
#define FILE_PERSISTENT_ACLS 0x00000008
|
|
|
|
|
#define FILE_FILE_COMPRESSION 0x00000010
|
|
|
|
|
#define FILE_VOLUME_QUOTAS 0x00000020
|
|
|
|
|
#define FILE_SUPPORTS_SPARSE_FILES 0x00000040
|
|
|
|
|
#define FILE_SUPPORTS_REPARSE_POINTS 0x00000080
|
|
|
|
|
#define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100
|
|
|
|
|
#define FILE_VOLUME_IS_COMPRESSED 0x00008000
|
|
|
|
|
#define FILE_SUPPORTS_OBJECT_IDS 0x00010000
|
|
|
|
|
#define FILE_SUPPORTS_ENCRYPTION 0x00020000
|
|
|
|
|
#define FILE_NAMED_STREAMS 0x00040000
|
|
|
|
|
#define FILE_READ_ONLY_VOLUME 0x00080000
|
|
|
|
|
#define FILE_SEQUENTIAL_WRITE_ONCE 0x00100000
|
|
|
|
|
#define FILE_SUPPORTS_TRANSACTIONS 0x00200000
|
|
|
|
|
#define FILE_SUPPORTS_HARD_LINKS 0x00400000
|
|
|
|
|
#define FILE_SUPPORTS_EXTENDED_ATTRIBUTES 0x00800000
|
|
|
|
|
#define FILE_SUPPORTS_OPEN_BY_FILE_ID 0x01000000
|
|
|
|
|
#define FILE_SUPPORTS_USN_JOURNAL 0x02000000
|
|
|
|
|
|
|
|
|
|
typedef struct _FILE_FS_ATTRIBUTE_INFORMATION {
|
|
|
|
|
ULONG FileSystemAttributes;
|
|
|
|
|
LONG MaximumComponentNameLength;
|
|
|
|
|
ULONG FileSystemNameLength;
|
|
|
|
|
WCHAR FileSystemName[1];
|
|
|
|
|
} FILE_FS_ATTRIBUTE_INFORMATION, *PFILE_FS_ATTRIBUTE_INFORMATION;
|
|
|
|
|
|
2010-10-11 16:11:27 -04:00
|
|
|
/* ntddk.h */
|
|
|
|
|
typedef struct _FILE_FS_SIZE_INFORMATION {
|
|
|
|
|
LARGE_INTEGER TotalAllocationUnits;
|
|
|
|
|
LARGE_INTEGER AvailableAllocationUnits;
|
|
|
|
|
ULONG SectorsPerAllocationUnit;
|
|
|
|
|
ULONG BytesPerSector;
|
|
|
|
|
} FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION;
|
|
|
|
|
|
|
|
|
|
typedef struct _FILE_FS_FULL_SIZE_INFORMATION {
|
|
|
|
|
LARGE_INTEGER TotalAllocationUnits;
|
|
|
|
|
LARGE_INTEGER CallerAvailableAllocationUnits;
|
|
|
|
|
LARGE_INTEGER ActualAvailableAllocationUnits;
|
|
|
|
|
ULONG SectorsPerAllocationUnit;
|
|
|
|
|
ULONG BytesPerSector;
|
|
|
|
|
} FILE_FS_FULL_SIZE_INFORMATION, *PFILE_FS_FULL_SIZE_INFORMATION;
|
|
|
|
|
|
2011-03-30 14:21:40 -04:00
|
|
|
typedef struct _FILE_INTERNAL_INFORMATION {
|
|
|
|
|
LARGE_INTEGER IndexNumber;
|
|
|
|
|
} FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
|
2010-10-11 14:59:26 -04:00
|
|
|
#endif
|