1/*
2   Unix SMB/CIFS implementation.
3   NT ioctl code constants
4   Copyright (C) Andrew Tridgell              2002
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2 of the License, or
9   (at your option) any later version.
10
11   This program is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with this program; if not, write to the Free Software
18   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19*/
20
21/*
22  I'm guessing we will need to support a bunch of these eventually. For now
23  we only need the sparse flag
24*/
25
26#ifndef _NTIOCTL_H
27#define _NTIOCTL_H
28
29/* IOCTL information */
30/* List of ioctl function codes that look to be of interest to remote clients like this. */
31/* Need to do some experimentation to make sure they all work remotely.                  */
32/* Some of the following such as the encryption/compression ones would be                */
33/* invoked from tools via a specialized hook into the VFS rather than via the            */
34/* standard vfs entry points */
35#define FSCTL_REQUEST_OPLOCK_LEVEL_1 0x00090000
36#define FSCTL_REQUEST_OPLOCK_LEVEL_2 0x00090004
37#define FSCTL_REQUEST_BATCH_OPLOCK   0x00090008
38#define FSCTL_LOCK_VOLUME            0x00090018
39#define FSCTL_UNLOCK_VOLUME          0x0009001C
40#define FSCTL_GET_COMPRESSION        0x0009003C
41#define FSCTL_SET_COMPRESSION        0x0009C040
42#define FSCTL_REQUEST_FILTER_OPLOCK  0x0009008C
43#define FSCTL_FIND_FILES_BY_SID	     0x0009008F
44#define FSCTL_FILESYS_GET_STATISTICS 0x00090090
45#define FSCTL_SET_REPARSE_POINT      0x000900A4
46#define FSCTL_GET_REPARSE_POINT      0x000900A8
47#define FSCTL_DELETE_REPARSE_POINT   0x000900AC
48#define FSCTL_0x000900C0	     0x000900C0
49#define FSCTL_SET_SPARSE             0x000900C4
50#define FSCTL_SET_ZERO_DATA          0x000900C8
51#define FSCTL_SET_ENCRYPTION         0x000900D7
52#define FSCTL_ENCRYPTION_FSCTL_IO    0x000900DB
53#define FSCTL_WRITE_RAW_ENCRYPTED    0x000900DF
54#define FSCTL_READ_RAW_ENCRYPTED     0x000900E3
55#define FSCTL_SIS_COPYFILE           0x00090100
56#define FSCTL_SIS_LINK_FILES         0x0009C104
57
58#define FSCTL_GET_SHADOW_COPY_DATA   0x00144064   /* KJC -- Shadow Copy information */
59
60#if 0
61#define FSCTL_SECURITY_ID_CHECK
62#define FSCTL_DISMOUNT_VOLUME
63#define FSCTL_GET_NTFS_FILE_RECORD
64#define FSCTL_ALLOW_EXTENDED_DASD_IO
65#define FSCTL_RECALL_FILE
66#define FSCTL_QUERY_ALLOCATED_RANGES
67
68#endif
69
70#define IO_REPARSE_TAG_MOUNT_POINT   0xA0000003
71#define IO_REPARSE_TAG_HSM           0xC0000004
72#define IO_REPARSE_TAG_SIS           0x80000007
73
74
75/* For FSCTL_GET_SHADOW_COPY_DATA ...*/
76typedef char SHADOW_COPY_LABEL[25];
77
78typedef struct shadow_copy_data {
79	TALLOC_CTX *mem_ctx;
80	/* Total number of shadow volumes currently mounted */
81	uint32 num_volumes;
82	/* Concatenated list of labels */
83	SHADOW_COPY_LABEL *labels;
84} SHADOW_COPY_DATA;
85
86
87#endif /* _NTIOCTL_H */
88