The Samba-Bugzilla – Attachment 722 Details for
Bug 1919
[PATCH] add NT ioctl #defines to ntioctl.h
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch v 0.1
ntioctl.h.patch (text/plain), 11.41 KB, created by
Denis Vlasenko (dead mail address)
on 2004-10-12 00:33:58 UTC
(
hide
)
Description:
patch v 0.1
Filename:
MIME Type:
Creator:
Denis Vlasenko (dead mail address)
Created:
2004-10-12 00:33:58 UTC
Size:
11.41 KB
patch
obsolete
>--- ntioctl.h.org Sun Apr 4 10:37:24 2004 >+++ ntioctl.h Tue Oct 12 10:25:13 2004 >@@ -32,40 +32,129 @@ > /* Some of the following such as the encryption/compression ones would be */ > /* invoked from tools via a specialized hook into the VFS rather than via the */ > /* standard vfs entry points */ >-#define FSCTL_REQUEST_OPLOCK_LEVEL_1 0x00090000 >-#define FSCTL_REQUEST_OPLOCK_LEVEL_2 0x00090004 >-#define FSCTL_REQUEST_BATCH_OPLOCK 0x00090008 >-#define FSCTL_LOCK_VOLUME 0x00090018 >-#define FSCTL_UNLOCK_VOLUME 0x0009001C >-#define FSCTL_GET_COMPRESSION 0x0009003C >-#define FSCTL_SET_COMPRESSION 0x0009C040 >-#define FSCTL_REQUEST_FILTER_OPLOCK 0x0009008C >-#define FSCTL_FIND_FILES_BY_SID 0x0009008F >-#define FSCTL_FILESYS_GET_STATISTICS 0x00090090 >-#define FSCTL_SET_REPARSE_POINT 0x000900A4 >-#define FSCTL_GET_REPARSE_POINT 0x000900A8 >-#define FSCTL_DELETE_REPARSE_POINT 0x000900AC >-#define FSCTL_0x000900C0 0x000900C0 >-#define FSCTL_SET_SPARSE 0x000900C4 >-#define FSCTL_SET_ZERO_DATA 0x000900C8 >-#define FSCTL_SET_ENCRYPTION 0x000900D7 >-#define FSCTL_ENCRYPTION_FSCTL_IO 0x000900DB >-#define FSCTL_WRITE_RAW_ENCRYPTED 0x000900DF >-#define FSCTL_READ_RAW_ENCRYPTED 0x000900E3 >-#define FSCTL_SIS_COPYFILE 0x00090100 >-#define FSCTL_SIS_LINK_FILES 0x0009C104 >- >-#define FSCTL_GET_SHADOW_COPY_DATA 0x00144064 /* KJC -- Shadow Copy information */ >- >-#if 0 >-#define FSCTL_SECURITY_ID_CHECK >-#define FSCTL_DISMOUNT_VOLUME >-#define FSCTL_GET_NTFS_FILE_RECORD >-#define FSCTL_ALLOW_EXTENDED_DASD_IO >-#define FSCTL_RECALL_FILE >-#define FSCTL_QUERY_ALLOCATED_RANGES > >-#endif >+/* Macro definition for IOCTL and FSCTL function control codes */ >+#define CTL_CODE(DeviceType, Function, Method, Access) \ >+ ( ((DeviceType)<<16) | ((Access)<<14) | ((Function)<<2) | (Method) ) >+ >+/* Method codes for how buffers are passed for I/O and FS controls */ >+#define METHOD_BUFFERED 0 >+#define METHOD_IN_DIRECT 1 >+#define METHOD_OUT_DIRECT 2 >+#define METHOD_NEITHER 3 >+ >+/* NB: for *_ACCESS defines there are also *_DATA defines >+ * with same values in windows .h files >+ */ >+#define FILE_ANY_ACCESS 0 >+#define FILE_SPECIAL_ACCESS 0 >+#define FILE_READ_ACCESS 0x0001 /* file & pipe */ >+#define FILE_WRITE_ACCESS 0x0002 /* file & pipe */ >+#define FILE_RW_ACCESS 0x0003 /* file & pipe */ >+ >+/* Look into wine include/winioctl.h to add more */ >+#define FILE_DEVICE_FILE_SYSTEM 0x00000009 >+#define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014 >+ >+/* info below is taken from http://www.insidewindows.info/ntifs.html >+ * things to sort out: >+ * - if samba had different numeric #define before, old define is retained, >+ * with value and define from ntifs.html in //comment >+ * - samba had some defines which weren't listed in ntifs.html >+ * I made up CTL_CODE() defines for them and placed 'em in //comment >+ * below numeric define. >+ * - FSCTL_REQUEST_FILTER_OPLOCK seems to have wrong value >+ * (which is retained for now. FIXME) >+ */ >+#define FSCTL_REQUEST_OPLOCK_LEVEL_1 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_REQUEST_OPLOCK_LEVEL_2 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 1, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_REQUEST_BATCH_OPLOCK CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 2, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_OPLOCK_BREAK_ACKNOWLEDGE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 3, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_OPBATCH_ACK_CLOSE_PENDING CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 4, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_OPLOCK_BREAK_NOTIFY CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 5, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_LOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 6, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_UNLOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 7, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_DISMOUNT_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 8, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_IS_VOLUME_MOUNTED CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 10, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_IS_PATHNAME_VALID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 11, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_MARK_VOLUME_DIRTY CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 12, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_QUERY_RETRIEVAL_POINTERS CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 14, METHOD_NEITHER, FILE_ANY_ACCESS) >+#define FSCTL_GET_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 15, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_SET_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 16, METHOD_BUFFERED, FILE_RW_ACCESS) >+#define FSCTL_MARK_AS_SYSTEM_HIVE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 19, METHOD_NEITHER, FILE_ANY_ACCESS) >+#define FSCTL_OPLOCK_BREAK_ACK_NO_2 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 20, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_INVALIDATE_VOLUMES CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 21, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_QUERY_FAT_BPB CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 22, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_FILESYSTEM_GET_STATISTICS CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 24, METHOD_BUFFERED, FILE_ANY_ACCESS) >+ /* build >= 1381 (win2k+?) */ >+#define FSCTL_GET_NTFS_VOLUME_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 25, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_GET_NTFS_FILE_RECORD CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 26, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_GET_VOLUME_BITMAP CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 27, METHOD_NEITHER, FILE_ANY_ACCESS) >+#define FSCTL_GET_RETRIEVAL_POINTERS CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 28, METHOD_NEITHER, FILE_ANY_ACCESS) >+#define FSCTL_MOVE_FILE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 29, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_IS_VOLUME_DIRTY CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 30, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_GET_HFS_INFORMATION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 31, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_ALLOW_EXTENDED_DASD_IO CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 32, METHOD_NEITHER, FILE_ANY_ACCESS) >+ /* build >= 2195 (winxp+ ?) */ >+#define FSCTL_READ_PROPERTY_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 33, METHOD_NEITHER, FILE_ANY_ACCESS) >+#define FSCTL_WRITE_PROPERTY_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 34, METHOD_NEITHER, FILE_ANY_ACCESS) >+#define FSCTL_FIND_FILES_BY_SID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 35, METHOD_NEITHER, FILE_ANY_ACCESS) >+ >+#define FSCTL_REQUEST_FILTER_OPLOCK 0x0009008C //0x0009005c = #define FSCTL_REQUEST_FILTER_OPLOCK CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 23, METHOD_BUFFERED, FILE_ANY_ACCESS) >+ // 0x0009008C = CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 35, METHOD_BUFFERED, FILE_ANY_ACCESS) >+ >+#define FSCTL_DUMP_PROPERTY_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 37, METHOD_NEITHER, FILE_ANY_ACCESS) >+ >+#define FSCTL_FILESYS_GET_STATISTICS 0x00090090 >+ // CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 36, METHOD_BUFFERED, FILE_ANY_ACCESS) >+ >+#define FSCTL_SET_OBJECT_ID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 38, METHOD_BUFFERED, FILE_WRITE_ACCESS) >+#define FSCTL_GET_OBJECT_ID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 39, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_DELETE_OBJECT_ID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 40, METHOD_BUFFERED, FILE_WRITE_ACCESS) >+ >+#define FSCTL_SET_REPARSE_POINT 0x000900A4 //0x000980a4 = #define FSCTL_SET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 41, METHOD_BUFFERED, FILE_WRITE_ACCESS) >+ >+#define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS) >+ >+#define FSCTL_DELETE_REPARSE_POINT 0x000900AC //0x000980ac = #define FSCTL_DELETE_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 43, METHOD_BUFFERED, FILE_WRITE_ACCESS) >+ >+#define FSCTL_ENUM_USN_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 44, METHOD_NEITHER, FILE_READ_ACCESS) >+#define FSCTL_SECURITY_ID_CHECK CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 45, METHOD_NEITHER, FILE_READ_ACCESS) >+#define FSCTL_READ_USN_JOURNAL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 46, METHOD_NEITHER, FILE_READ_ACCESS) >+#define FSCTL_SET_OBJECT_ID_EXTENDED CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 47, METHOD_BUFFERED, FILE_WRITE_ACCESS) >+#define FSCTL_CREATE_OR_GET_OBJECT_ID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 48, METHOD_BUFFERED, FILE_ANY_ACCESS) >+ >+#define FSCTL_SET_SPARSE 0x000900C4 // 0x000980c4 = #define FSCTL_SET_SPARSE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 49, METHOD_BUFFERED, FILE_WRITE_ACCESS) >+#define FSCTL_SET_ZERO_DATA 0x000900C8 // 0x000980c8 = #define FSCTL_SET_ZERO_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 50, METHOD_BUFFERED, FILE_WRITE_ACCESS) >+ >+#define FSCTL_QUERY_ALLOCATED_RANGES CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 51, METHOD_NEITHER, FILE_READ_ACCESS) >+#define FSCTL_ENABLE_UPGRADE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 52, METHOD_BUFFERED, FILE_WRITE_ACCESS) >+ >+#define FSCTL_SET_ENCRYPTION 0x000900D7 // 0x000900d4 = #define FSCTL_SET_ENCRYPTION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 53, METHOD_BUFFERED, FILE_ANY_ACCESS) >+ >+#define FSCTL_ENCRYPTION_FSCTL_IO CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 54, METHOD_NEITHER, FILE_ANY_ACCESS) >+#define FSCTL_WRITE_RAW_ENCRYPTED CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 55, METHOD_NEITHER, FILE_ANY_ACCESS) >+#define FSCTL_READ_RAW_ENCRYPTED CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 56, METHOD_NEITHER, FILE_ANY_ACCESS) >+#define FSCTL_CREATE_USN_JOURNAL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 57, METHOD_NEITHER, FILE_READ_ACCESS) >+#define FSCTL_READ_FILE_USN_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 58, METHOD_NEITHER, FILE_READ_ACCESS) >+#define FSCTL_WRITE_USN_CLOSE_RECORD CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 59, METHOD_NEITHER, FILE_READ_ACCESS) >+#define FSCTL_EXTEND_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 60, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_QUERY_USN_JOURNAL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 61, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_DELETE_USN_JOURNAL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 62, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_MARK_HANDLE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 63, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_SIS_COPYFILE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 64, METHOD_BUFFERED, FILE_ANY_ACCESS) >+#define FSCTL_SIS_LINK_FILES CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 65, METHOD_BUFFERED, FILE_RW_ACCESS) >+#define FSCTL_HSM_MSG CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 66, METHOD_BUFFERED, FILE_RW_ACCESS) >+#define FSCTL_NSS_CONTROL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 67, METHOD_BUFFERED, FILE_WRITE_ACCESS) >+#define FSCTL_HSM_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 68, METHOD_NEITHER, FILE_RW_ACCESS) >+#define FSCTL_RECALL_FILE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 69, METHOD_NEITHER, FILE_ANY_ACCESS) >+#define FSCTL_NSS_RCONTROL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 70, METHOD_BUFFERED, FILE_READ_ACCESS) >+#define FSCTL_READ_FROM_PLEX CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 71, METHOD_OUT_DIRECT, FILE_READ_ACCESS) >+#define FSCTL_FILE_PREFETCH CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 72, METHOD_BUFFERED, FILE_SPECIAL_ACCESS) >+ >+#define FSCTL_GET_SHADOW_COPY_DATA 0x00144064 >+ // 0x00144064 = CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 25, METHOD_BUFFERED, FILE_READ_ACCESS) >+ > > #define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003 > #define IO_REPARSE_TAG_HSM 0xC0000004
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1919
:
722
|
723