/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
*/
#ifndef _SMBSRV_WINIOCTL_H
#define _SMBSRV_WINIOCTL_H
/*
* include file of the same name).
*/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _DEVIOCTL_
#define _DEVIOCTL_
/*
* begin_ntddk begin_wdm begin_nthal begin_ntifs
*
* Define the various device type values. Note that values used by Microsoft
* Corporation are in the range 0-32767, and 32768-65535 are reserved for use
* by customers.
*/
/*
* Macro definition for defining IOCTL and FSCTL function control codes. Note
* that function codes 0-2047 are reserved for Microsoft Corporation, and
* 2048-4095 are reserved for customers.
*/
/*
* Define the method codes for how buffers are passed for I/O and FS controls
*/
#define METHOD_BUFFERED 0
/*
* Define the access check value for any access
*/
#define FILE_ANY_ACCESS 0
/* end_ntddk end_wdm end_nthal end_ntifs */
#endif /* _DEVIOCTL_ */
#ifndef _NTDDSTOR_H_
#define _NTDDSTOR_H_
#ifdef __cplusplus
extern "C" {
#endif
/*
* IoControlCode values for storage devices
*/
/*
* The following device control codes are common for all class drivers. They
* should be used in place of the older IOCTL_DISK, IOCTL_CDROM and IOCTL_TAPE
* common codes
*/
#define IOCTL_STORAGE_CHECK_VERIFY \
#define IOCTL_STORAGE_MEDIA_REMOVAL \
#define IOCTL_STORAGE_EJECT_MEDIA \
#define IOCTL_STORAGE_LOAD_MEDIA \
#define IOCTL_STORAGE_RESERVE \
#define IOCTL_STORAGE_RELEASE \
#define IOCTL_STORAGE_FIND_NEW_DEVICES \
#define IOCTL_STORAGE_GET_MEDIA_TYPES \
#define IOCTL_STORAGE_GET_MEDIA_TYPES_EX \
#define IOCTL_STORAGE_RESET_BUS \
#define IOCTL_STORAGE_RESET_DEVICE \
#define IOCTL_STORAGE_GET_DEVICE_NUMBER \
#ifdef __cplusplus
}
#endif
#endif /* _NTDDSTOR_H_ */
/*
* IoControlCode values for disk devices.
*/
#define IOCTL_DISK_GET_DRIVE_GEOMETRY \
#define IOCTL_DISK_GET_PARTITION_INFO \
#define IOCTL_DISK_SET_PARTITION_INFO \
#define IOCTL_DISK_GET_DRIVE_LAYOUT \
#define IOCTL_DISK_SET_DRIVE_LAYOUT \
#define IOCTL_DISK_VERIFY \
#define IOCTL_DISK_FORMAT_TRACKS \
#define IOCTL_DISK_REASSIGN_BLOCKS \
#define IOCTL_DISK_PERFORMANCE \
#define IOCTL_DISK_IS_WRITABLE \
#define IOCTL_DISK_LOGGING \
#define IOCTL_DISK_FORMAT_TRACKS_EX \
#define IOCTL_DISK_HISTOGRAM_STRUCTURE \
#define IOCTL_DISK_HISTOGRAM_DATA \
#define IOCTL_DISK_HISTOGRAM_RESET \
#define IOCTL_DISK_REQUEST_STRUCTURE \
#define IOCTL_DISK_REQUEST_DATA \
#define IOCTL_DISK_CONTROLLER_NUMBER \
/*
* IOCTL support for SMART drive fault prediction.
*/
#define SMART_GET_VERSION \
#define SMART_SEND_DRIVE_COMMAND \
#define SMART_RCV_DRIVE_DATA \
/*
* The following device control codes are common for all class drivers. The
* functions codes defined here must match all of the other class drivers.
*
* Warning: these codes will be replaced in the future by equivalent
* IOCTL_STORAGE codes
*/
#define IOCTL_DISK_CHECK_VERIFY \
#define IOCTL_DISK_MEDIA_REMOVAL \
#define IOCTL_DISK_EJECT_MEDIA \
#define IOCTL_DISK_LOAD_MEDIA \
#define IOCTL_DISK_RESERVE \
#define IOCTL_DISK_RELEASE \
#define IOCTL_DISK_FIND_NEW_DEVICES \
#define IOCTL_DISK_GET_MEDIA_TYPES \
#define IOCTL_CHANGER_GET_PARAMETERS \
#define IOCTL_CHANGER_GET_STATUS \
#define IOCTL_CHANGER_GET_PRODUCT_DATA \
#define IOCTL_CHANGER_SET_ACCESS \
#define IOCTL_CHANGER_GET_ELEMENT_STATUS \
#define IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS \
#define IOCTL_CHANGER_SET_POSITION \
#define IOCTL_CHANGER_EXCHANGE_MEDIUM \
#define IOCTL_CHANGER_MOVE_MEDIUM \
#define IOCTL_CHANGER_REINITIALIZE_TRANSPORT \
#define IOCTL_CHANGER_QUERY_VOLUME_TAGS \
#ifndef _FILESYSTEMFSCTL_
#define _FILESYSTEMFSCTL_
/*
* The following is a list of the native file system fsctls followed by
* additional network file system fsctls, DFS fsctls and Named Pipe fsctls.
* Some values have been decommissioned.
*/
/* FILE_DEVICE_FILE_SYSTEM */
#define FSCTL_REQUEST_OPLOCK_LEVEL_1 \
#define FSCTL_REQUEST_OPLOCK_LEVEL_2 \
#define FSCTL_REQUEST_BATCH_OPLOCK \
#define FSCTL_OPLOCK_BREAK_ACKNOWLEDGE \
#define FSCTL_OPBATCH_ACK_CLOSE_PENDING \
#define FSCTL_OPLOCK_BREAK_NOTIFY \
#define FSCTL_LOCK_VOLUME \
#define FSCTL_UNLOCK_VOLUME \
#define FSCTL_DISMOUNT_VOLUME \
/* decommissioned fsctl value 9 */
#define FSCTL_IS_VOLUME_MOUNTED \
/* PATHNAME_BUFFER, */
#define FSCTL_IS_PATHNAME_VALID \
#define FSCTL_MARK_VOLUME_DIRTY \
/* decommissioned fsctl value 13 */
#define FSCTL_QUERY_RETRIEVAL_POINTERS \
#define FSCTL_GET_COMPRESSION \
#define FSCTL_SET_COMPRESSION \
/* decommissioned fsctl value 17 */
/* decommissioned fsctl value 18 */
#define FSCTL_MARK_AS_SYSTEM_HIVE \
#define FSCTL_OPLOCK_BREAK_ACK_NO_2 \
#define FSCTL_INVALIDATE_VOLUMES \
/* FSCTL_QUERY_FAT_BPB_BUFFER */
#define FSCTL_QUERY_FAT_BPB \
#define FSCTL_REQUEST_FILTER_OPLOCK \
/* FILESYSTEM_STATISTICS */
#define FSCTL_FILESYSTEM_GET_STATISTICS \
/* NTFS_VOLUME_DATA_BUFFER */
#define FSCTL_GET_NTFS_VOLUME_DATA \
/* NTFS_FILE_RECORD_INPUT_BUFFER, NTFS_FILE_RECORD_OUTPUT_BUFFER */
#define FSCTL_GET_NTFS_FILE_RECORD \
/* STARTING_LCN_INPUT_BUFFER, VOLUME_BITMAP_BUFFER */
#define FSCTL_GET_VOLUME_BITMAP \
/* STARTING_VCN_INPUT_BUFFER, RETRIEVAL_POINTERS_BUFFER */
#define FSCTL_GET_RETRIEVAL_POINTERS \
/* MOVE_FILE_DATA, */
#define FSCTL_MOVE_FILE \
#define FSCTL_IS_VOLUME_DIRTY \
#define FSCTL_GET_HFS_INFORMATION \
#define FSCTL_ALLOW_EXTENDED_DASD_IO \
#define FSCTL_READ_PROPERTY_DATA \
#define FSCTL_WRITE_PROPERTY_DATA \
#define FSCTL_FIND_FILES_BY_SID \
/* decommissioned fsctl value 36 */
#define FSCTL_DUMP_PROPERTY_DATA \
/* FILE_OBJECTID_BUFFER */
#define FSCTL_SET_OBJECT_ID \
/* FILE_OBJECTID_BUFFER */
#define FSCTL_GET_OBJECT_ID \
#define FSCTL_DELETE_OBJECT_ID \
/* REPARSE_DATA_BUFFER, */
#define FSCTL_SET_REPARSE_POINT \
/* REPARSE_DATA_BUFFER */
#define FSCTL_GET_REPARSE_POINT \
/* REPARSE_DATA_BUFFER, */
#define FSCTL_DELETE_REPARSE_POINT \
/* MFT_ENUM_DATA, */
#define FSCTL_ENUM_USN_DATA \
/* BULK_SECURITY_TEST_DATA, */
#define FSCTL_SECURITY_ID_CHECK \
/* READ_USN_JOURNAL_DATA, USN */
#define FSCTL_READ_USN_JOURNAL \
#define FSCTL_SET_OBJECT_ID_EXTENDED \
/* FILE_OBJECTID_BUFFER */
#define FSCTL_CREATE_OR_GET_OBJECT_ID \
#define FSCTL_SET_SPARSE \
/* FILE_ZERO_DATA_INFORMATION, */
#define FSCTL_SET_ZERO_DATA \
/* FILE_ALLOCATED_RANGE_BUFFER, FILE_ALLOCATED_RANGE_BUFFER */
#define FSCTL_QUERY_ALLOCATED_RANGES \
#define FSCTL_ENABLE_UPGRADE \
/* ENCRYPTION_BUFFER, */
#define FSCTL_SET_ENCRYPTION \
#define FSCTL_ENCRYPTION_FSCTL_IO \
/* ENCRYPTED_DATA_INFO, */
#define FSCTL_WRITE_RAW_ENCRYPTED \
/* REQUEST_RAW_ENCRYPTED_DATA, ENCRYPTED_DATA_INFO */
#define FSCTL_READ_RAW_ENCRYPTED \
/* CREATE_USN_JOUNRAL_DATA, */
#define FSCTL_CREATE_USN_JOURNAL \
/* Read the Usn Record for a file */
#define FSCTL_READ_FILE_USN_DATA \
/* Generate Close Usn Record */
#define FSCTL_WRITE_USN_CLOSE_RECORD \
#define FSCTL_EXTEND_VOLUME \
#define FSCTL_SIS_COPYFILE \
#define FSCTL_RECALL_FILE \
#define FSCTL_SET_DEFECT_MANAGEMENT \
#define FSCTL_QUERY_SPARING_INFO \
#define FSCTL_QUERY_ON_DISK_VOLUME_INFO \
#define FSCTL_SET_ZERO_ON_DEALLOCATION \
#define FSCTL_SET_SHORT_NAME_BEHAVIOR \
#define FSCTL_FILE_LEVEL_TRIM \
#define FSCTL_OFFLOAD_READ \
#define FSCTL_OFFLOAD_WRITE \
#define FSCTL_GET_INTEGRITY_INFORMATION \
#define FSCTL_SET_INTEGRITY_INFORMATION \
/* FILE_DEVICE_NETWORK_FILE_SYSTEM */
/* Read the snapshot info for Volume Shadow Copy Services */
#define FSCTL_SRV_ENUMERATE_SNAPSHOTS \
/* Retrieve an opaque file reference for server-side data movement */
#define FSCTL_SRV_REQUEST_RESUME_KEY \
#define FSCTL_LMR_GET_LINK_TRACKING_INFORMATION \
#define FSCTL_LMR_SET_LINK_TRACKING_INFORMATION \
/* server-side data movement */
#define FSCTL_SRV_COPYCHUNK \
/* server-side data movement */
#define FSCTL_SRV_COPYCHUNK_WRITE \
#define FSCTL_SRV_NOTIFY_TRANSACTION \
#define FSCTL_SRV_READ_HASH \
#define FSCTL_SRV_UNKNOWN_x71 \
#define FSCTL_LMR_REQUEST_RESILIENCY \
#define FSCTL_QUERY_NETWORK_INTERFACE_INFO \
#define FSCTL_VALIDATE_NEGOTIATE_INFO \
/* FILE_DEVICE_DFS */
#define FSCTL_DFS_GET_REFERRALS \
#define FSCTL_DFS_GET_REFERRALS_EX \
/* FILE_DEVICE_NAMED_PIPE */
#define FSCTL_PIPE_PEEK \
#define FSCTL_PIPE_TRANSCEIVE \
#define FSCTL_PIPE_WAIT \
#endif /* _FILESYSTEMFSCTL_ */
#ifdef __cplusplus
}
#endif
#endif /* _SMBSRV_WINIOCTL_H */