linux/fs/smb/server/smbfsctl.h

/* SPDX-License-Identifier: LGPL-2.1+ */
/*
 *   fs/smb/server/smbfsctl.h: SMB, CIFS, SMB2 FSCTL definitions
 *
 *   Copyright (c) International Business Machines  Corp., 2002,2009
 *   Author(s): Steve French ([email protected])
 */

/* IOCTL information */
/*
 * List of ioctl/fsctl function codes that are or could be useful in the
 * future to remote clients like cifs or SMB2 client.  There is probably
 * a slightly larger set of fsctls that NTFS local filesystem could handle,
 * including the seven below that we do not have struct definitions for.
 * Even with protocol definitions for most of these now available, we still
 * need to do some experimentation to identify which are practical to do
 * remotely.  Some of the following, such as the encryption/compression ones
 * could be invoked from tools via a specialized hook into the VFS rather
 * than via the standard vfs entry points
 */

#ifndef __KSMBD_SMBFSCTL_H
#define __KSMBD_SMBFSCTL_H

#define FSCTL_DFS_GET_REFERRALS
#define FSCTL_DFS_GET_REFERRALS_EX
#define FSCTL_REQUEST_OPLOCK_LEVEL_1
#define FSCTL_REQUEST_OPLOCK_LEVEL_2
#define FSCTL_REQUEST_BATCH_OPLOCK
#define FSCTL_LOCK_VOLUME
#define FSCTL_UNLOCK_VOLUME
#define FSCTL_IS_PATHNAME_VALID
#define FSCTL_GET_COMPRESSION
#define FSCTL_SET_COMPRESSION
#define FSCTL_QUERY_FAT_BPB
/* Verify the next FSCTL number, we had it as 0x00090090 before */
#define FSCTL_FILESYSTEM_GET_STATS
#define FSCTL_GET_NTFS_VOLUME_DATA
#define FSCTL_GET_RETRIEVAL_POINTERS
#define FSCTL_IS_VOLUME_DIRTY
#define FSCTL_ALLOW_EXTENDED_DASD_IO
#define FSCTL_REQUEST_FILTER_OPLOCK
#define FSCTL_FIND_FILES_BY_SID
#define FSCTL_SET_OBJECT_ID
#define FSCTL_GET_OBJECT_ID
#define FSCTL_DELETE_OBJECT_ID
#define FSCTL_SET_REPARSE_POINT
#define FSCTL_GET_REPARSE_POINT
#define FSCTL_DELETE_REPARSE_POINT
#define FSCTL_SET_OBJECT_ID_EXTENDED
#define FSCTL_CREATE_OR_GET_OBJECT_ID
#define FSCTL_SET_SPARSE
#define FSCTL_SET_ZERO_DATA
#define FSCTL_SET_ENCRYPTION
#define FSCTL_ENCRYPTION_FSCTL_IO
#define FSCTL_WRITE_RAW_ENCRYPTED
#define FSCTL_READ_RAW_ENCRYPTED
#define FSCTL_READ_FILE_USN_DATA
#define FSCTL_WRITE_USN_CLOSE_RECORD
#define FSCTL_SIS_COPYFILE
#define FSCTL_RECALL_FILE
#define FSCTL_QUERY_SPARING_INFO
#define FSCTL_SET_ZERO_ON_DEALLOC
#define FSCTL_SET_SHORT_NAME_BEHAVIOR
#define FSCTL_QUERY_ALLOCATED_RANGES
#define FSCTL_SET_DEFECT_MANAGEMENT
#define FSCTL_DUPLICATE_EXTENTS_TO_FILE
#define FSCTL_SIS_LINK_FILES
#define FSCTL_PIPE_PEEK
#define FSCTL_PIPE_TRANSCEIVE
/* strange that the number for this op is not sequential with previous op */
#define FSCTL_PIPE_WAIT
#define FSCTL_REQUEST_RESUME_KEY
#define FSCTL_LMR_GET_LINK_TRACK_INF
#define FSCTL_LMR_SET_LINK_TRACK_INF
#define FSCTL_VALIDATE_NEGOTIATE_INFO
#define FSCTL_QUERY_NETWORK_INTERFACE_INFO
#define FSCTL_COPYCHUNK
#define FSCTL_COPYCHUNK_WRITE

#define IO_REPARSE_TAG_MOUNT_POINT
#define IO_REPARSE_TAG_HSM
#define IO_REPARSE_TAG_SIS

/* WSL reparse tags */
#define IO_REPARSE_TAG_LX_SYMLINK_LE
#define IO_REPARSE_TAG_AF_UNIX_LE
#define IO_REPARSE_TAG_LX_FIFO_LE
#define IO_REPARSE_TAG_LX_CHR_LE
#define IO_REPARSE_TAG_LX_BLK_LE
#endif /* __KSMBD_SMBFSCTL_H */