196 lines
7.4 KiB
C
196 lines
7.4 KiB
C
|
|
/* Copyright (c) 2010
|
||
|
|
* The Regents of the University of Michigan
|
||
|
|
* All Rights Reserved
|
||
|
|
*
|
||
|
|
* 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;
|
||
|
|
|
||
|
|
#endif
|