s4:dlz_bind9: avoid some compiler warnings
[Samba.git] / libcli / smb / smb_constants.h
blob175ffafc4d1c805f664481f5b6e4066897d8825d
1 /*
2 Unix SMB/CIFS implementation.
4 SMB parameters and setup, plus a whole lot more.
6 Copyright (C) Andrew Tridgell 2011
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef _SMB_CONSTANTS_H
23 #define _SMB_CONSTANTS_H
26 * Netbios over TCP (rfc 1002)
28 #define NBSSmessage 0x00 /* session message */
29 #define NBSSrequest 0x81 /* session request */
30 #define NBSSpositive 0x82 /* positiv session response */
31 #define NBSSnegative 0x83 /* negativ session response */
32 #define NBSSretarget 0x84 /* retarget session response */
33 #define NBSSkeepalive 0x85 /* keepalive */
35 #define SMB_MAGIC 0x424D53FF /* 0xFF 'S' 'M' 'B' */
37 /* the basic packet size, assuming no words or bytes. Does not include the NBT header */
38 #define MIN_SMB_SIZE 35
40 /* when using NBT encapsulation every packet has a 4 byte header */
41 #define NBT_HDR_SIZE 4
43 /* offsets into message header for common items - NOTE: These have
44 changed from being offsets from the base of the NBT packet to the base of the SMB packet.
45 this has reduced all these values by 4
47 #define HDR_COM 4
48 #define HDR_RCLS 5
49 #define HDR_REH 6
50 #define HDR_ERR 7
51 #define HDR_FLG 9
52 #define HDR_FLG2 10
53 #define HDR_PIDHIGH 12
54 #define HDR_SS_FIELD 14
55 #define HDR_TID 24
56 #define HDR_PID 26
57 #define HDR_UID 28
58 #define HDR_MID 30
59 #define HDR_WCT 32
60 #define HDR_VWV 33
62 #define smb_len_nbt(buf) (RIVAL(buf, 0) & 0x1FFFF)
63 #define _smb_setlen_nbt(buf,len) RSIVAL(buf, 0, (len) & 0x1FFFF)
64 #define smb_setlen_nbt(buf, len) do { \
65 _smb_setlen_nbt(buf, len); \
66 SIVAL(buf, 4, SMB_MAGIC); \
67 } while (0)
69 #define smb_len_tcp(buf) (RIVAL(buf, 0) & 0xFFFFFF)
70 #define _smb_setlen_tcp(buf,len) RSIVAL(buf, 0, (len) & 0xFFFFFF)
71 #define smb_setlen_tcp(buf, len) do { \
72 _smb_setlen_tcp(buf, len); \
73 SIVAL(buf, 4, SMB_MAGIC); \
74 } while (0)
76 /* protocol types. It assumes that higher protocols include lower protocols
77 as subsets. */
78 enum protocol_types {
79 PROTOCOL_NONE,
80 PROTOCOL_CORE,
81 PROTOCOL_COREPLUS,
82 PROTOCOL_LANMAN1,
83 PROTOCOL_LANMAN2,
84 PROTOCOL_NT1,
85 PROTOCOL_SMB2_02,
86 PROTOCOL_SMB2_10,
87 PROTOCOL_SMB2_22,
88 PROTOCOL_SMB2_24,
89 PROTOCOL_SMB3_00
91 #define PROTOCOL_LATEST PROTOCOL_SMB3_00
93 enum smb_signing_setting {
94 SMB_SIGNING_DEFAULT = -1,
95 SMB_SIGNING_OFF = 0,
96 SMB_SIGNING_IF_REQUIRED = 1,
97 SMB_SIGNING_REQUIRED = 3,
100 /* types of buffers in core SMB protocol */
101 #define SMB_DATA_BLOCK 0x1
102 #define SMB_ASCII4 0x4
104 /* flag defines. CIFS spec 3.1.1 */
105 #define FLAG_SUPPORT_LOCKREAD 0x01
106 #define FLAG_CLIENT_BUF_AVAIL 0x02
107 #define FLAG_RESERVED 0x04
108 #define FLAG_CASELESS_PATHNAMES 0x08
109 #define FLAG_CANONICAL_PATHNAMES 0x10
110 #define FLAG_REQUEST_OPLOCK 0x20
111 #define FLAG_REQUEST_BATCH_OPLOCK 0x40
112 #define FLAG_REPLY 0x80
114 /* the complete */
115 #define SMBmkdir 0x00 /* create directory */
116 #define SMBrmdir 0x01 /* delete directory */
117 #define SMBopen 0x02 /* open file */
118 #define SMBcreate 0x03 /* create file */
119 #define SMBclose 0x04 /* close file */
120 #define SMBflush 0x05 /* flush file */
121 #define SMBunlink 0x06 /* delete file */
122 #define SMBmv 0x07 /* rename file */
123 #define SMBgetatr 0x08 /* get file attributes */
124 #define SMBsetatr 0x09 /* set file attributes */
125 #define SMBread 0x0A /* read from file */
126 #define SMBwrite 0x0B /* write to file */
127 #define SMBlock 0x0C /* lock byte range */
128 #define SMBunlock 0x0D /* unlock byte range */
129 #define SMBctemp 0x0E /* create temporary file */
130 #define SMBmknew 0x0F /* make new file */
131 #define SMBcheckpath 0x10 /* check directory path */
132 #define SMBexit 0x11 /* process exit */
133 #define SMBlseek 0x12 /* seek */
134 #define SMBtcon 0x70 /* tree connect */
135 #define SMBtconX 0x75 /* tree connect and X*/
136 #define SMBtdis 0x71 /* tree disconnect */
137 #define SMBnegprot 0x72 /* negotiate protocol */
138 #define SMBdskattr 0x80 /* get disk attributes */
139 #define SMBsearch 0x81 /* search directory */
140 #define SMBsplopen 0xC0 /* open print spool file */
141 #define SMBsplwr 0xC1 /* write to print spool file */
142 #define SMBsplclose 0xC2 /* close print spool file */
143 #define SMBsplretq 0xC3 /* return print queue */
144 #define SMBsends 0xD0 /* send single block message */
145 #define SMBsendb 0xD1 /* send broadcast message */
146 #define SMBfwdname 0xD2 /* forward user name */
147 #define SMBcancelf 0xD3 /* cancel forward */
148 #define SMBgetmac 0xD4 /* get machine name */
149 #define SMBsendstrt 0xD5 /* send start of multi-block message */
150 #define SMBsendend 0xD6 /* send end of multi-block message */
151 #define SMBsendtxt 0xD7 /* send text of multi-block message */
153 /* Core+ protocol */
154 #define SMBlockread 0x13 /* Lock a range and read */
155 #define SMBwriteunlock 0x14 /* Unlock a range then write */
156 #define SMBreadbraw 0x1a /* read a block of data with no smb header */
157 #define SMBwritebraw 0x1d /* write a block of data with no smb header */
158 #define SMBwritec 0x20 /* secondary write request */
159 #define SMBwriteclose 0x2c /* write a file then close it */
161 /* dos extended protocol */
162 #define SMBreadBraw 0x1A /* read block raw */
163 #define SMBreadBmpx 0x1B /* read block multiplexed */
164 #define SMBreadBs 0x1C /* read block (secondary response) */
165 #define SMBwriteBraw 0x1D /* write block raw */
166 #define SMBwriteBmpx 0x1E /* write block multiplexed */
167 #define SMBwriteBs 0x1F /* write block (secondary request) */
168 #define SMBwriteC 0x20 /* write complete response */
169 #define SMBsetattrE 0x22 /* set file attributes expanded */
170 #define SMBgetattrE 0x23 /* get file attributes expanded */
171 #define SMBlockingX 0x24 /* lock/unlock byte ranges and X */
172 #define SMBtrans 0x25 /* transaction - name, bytes in/out */
173 #define SMBtranss 0x26 /* transaction (secondary request/response) */
174 #define SMBioctl 0x27 /* IOCTL */
175 #define SMBioctls 0x28 /* IOCTL (secondary request/response) */
176 #define SMBcopy 0x29 /* copy */
177 #define SMBmove 0x2A /* move */
178 #define SMBecho 0x2B /* echo */
179 #define SMBopenX 0x2D /* open and X */
180 #define SMBreadX 0x2E /* read and X */
181 #define SMBwriteX 0x2F /* write and X */
182 #define SMBsesssetupX 0x73 /* Session Set Up & X (including User Logon) */
183 #define SMBffirst 0x82 /* find first */
184 #define SMBfunique 0x83 /* find unique */
185 #define SMBfclose 0x84 /* find close */
186 #define SMBinvalid 0xFE /* invalid command */
188 /* Extended 2.0 protocol */
189 #define SMBtrans2 0x32 /* TRANS2 protocol set */
190 #define SMBtranss2 0x33 /* TRANS2 protocol set, secondary command */
191 #define SMBfindclose 0x34 /* Terminate a TRANSACT2_FINDFIRST */
192 #define SMBfindnclose 0x35 /* Terminate a TRANSACT2_FINDNOTIFYFIRST */
193 #define SMBulogoffX 0x74 /* user logoff */
195 /* NT SMB extensions. */
196 #define SMBnttrans 0xA0 /* NT transact */
197 #define SMBnttranss 0xA1 /* NT transact secondary */
198 #define SMBntcreateX 0xA2 /* NT create and X */
199 #define SMBntcancel 0xA4 /* NT cancel */
200 #define SMBntrename 0xA5 /* NT rename */
202 /* used to indicate end of chain */
203 #define SMB_CHAIN_NONE 0xFF
205 /* Sercurity mode bits. */
206 #define NEGOTIATE_SECURITY_USER_LEVEL 0x01
207 #define NEGOTIATE_SECURITY_CHALLENGE_RESPONSE 0x02
208 #define NEGOTIATE_SECURITY_SIGNATURES_ENABLED 0x04
209 #define NEGOTIATE_SECURITY_SIGNATURES_REQUIRED 0x08
212 * The negotiated buffer size for non LARGE_READX/WRITEX
213 * should be limited to uint16_t and has to be at least
214 * 500, which is the default for MinClientBufferSize on Windows.
216 #define SMB_BUFFER_SIZE_MIN 500
217 #define SMB_BUFFER_SIZE_MAX 65535
219 /* Capabilities. see ftp.microsoft.com/developr/drg/cifs/cifs/cifs4.txt */
221 #define CAP_RAW_MODE 0x00000001
222 #define CAP_MPX_MODE 0x00000002
223 #define CAP_UNICODE 0x00000004
224 #define CAP_LARGE_FILES 0x00000008
225 #define CAP_NT_SMBS 0x00000010
226 #define CAP_RPC_REMOTE_APIS 0x00000020
227 #define CAP_STATUS32 0x00000040
228 #define CAP_LEVEL_II_OPLOCKS 0x00000080
229 #define CAP_LOCK_AND_READ 0x00000100
230 #define CAP_NT_FIND 0x00000200
231 #define CAP_DFS 0x00001000
232 #define CAP_W2K_SMBS 0x00002000
233 #define CAP_LARGE_READX 0x00004000
234 #define CAP_LARGE_WRITEX 0x00008000
235 #define CAP_LWIO 0x00010000
236 #define CAP_UNIX 0x00800000 /* Capabilities for UNIX extensions. Created by HP. */
237 #define CAP_DYNAMIC_REAUTH 0x20000000
238 #define CAP_EXTENDED_SECURITY 0x80000000
240 #define SMB_CAP_BOTH_MASK ( \
241 CAP_UNICODE | \
242 CAP_NT_SMBS | \
243 CAP_STATUS32 | \
244 CAP_LEVEL_II_OPLOCKS | \
245 CAP_EXTENDED_SECURITY | \
247 #define SMB_CAP_SERVER_MASK ( \
248 CAP_RAW_MODE | \
249 CAP_MPX_MODE | \
250 CAP_LARGE_FILES | \
251 CAP_RPC_REMOTE_APIS | \
252 CAP_LOCK_AND_READ | \
253 CAP_NT_FIND | \
254 CAP_DFS | \
255 CAP_W2K_SMBS | \
256 CAP_LARGE_READX | \
257 CAP_LARGE_WRITEX | \
258 CAP_LWIO | \
259 CAP_UNIX | \
261 #define SMB_CAP_CLIENT_MASK ( \
262 CAP_DYNAMIC_REAUTH | \
265 * Older Samba releases (<= 3.6.x)
266 * expect the client to send CAP_LARGE_READX
267 * in order to let the client use large reads.
269 #define SMB_CAP_LEGACY_CLIENT_MASK ( \
270 SMB_CAP_CLIENT_MASK | \
271 CAP_LARGE_READX | \
272 CAP_LARGE_WRITEX | \
275 /* Client-side offline caching policy types */
276 enum csc_policy {
277 CSC_POLICY_MANUAL=0,
278 CSC_POLICY_DOCUMENTS=1,
279 CSC_POLICY_PROGRAMS=2,
280 CSC_POLICY_DISABLE=3
283 /* TCONX Flag (smb_vwv2). [MS-SMB] 2.2.4.7.1 */
284 #define TCONX_FLAG_DISCONNECT_TID 0x0001
285 #define TCONX_FLAG_EXTENDED_SIGNATURES 0x0004
286 #define TCONX_FLAG_EXTENDED_RESPONSE 0x0008
288 /* this is used on a TConX. [MS-SMB] 2.2.4.7.2 */
289 #define SMB_SUPPORT_SEARCH_BITS 0x0001
290 #define SMB_SHARE_IN_DFS 0x0002
291 #define SMB_CSC_MASK 0x000C
292 #define SMB_CSC_POLICY_SHIFT 2
293 #define SMB_UNIQUE_FILE_NAME 0x0010
294 #define SMB_EXTENDED_SIGNATURES 0x0020
296 /* NT Flags2 bits - cifs6.txt section 3.1.2 */
297 #define FLAGS2_LONG_PATH_COMPONENTS 0x0001
298 #define FLAGS2_EXTENDED_ATTRIBUTES 0x0002
299 #define FLAGS2_SMB_SECURITY_SIGNATURES 0x0004
300 #define FLAGS2_SMB_SECURITY_SIGNATURES_REQUIRED 0x0010
301 #define FLAGS2_IS_LONG_NAME 0x0040
302 #define FLAGS2_EXTENDED_SECURITY 0x0800
303 #define FLAGS2_DFS_PATHNAMES 0x1000
304 #define FLAGS2_READ_PERMIT_EXECUTE 0x2000
305 #define FLAGS2_32_BIT_ERROR_CODES 0x4000
306 #define FLAGS2_UNICODE_STRINGS 0x8000
307 #define FLAGS2_WIN2K_SIGNATURE 0xC852 /* Hack alert ! For now... JRA. */
309 /* FileAttributes (search attributes) field */
310 #define FILE_ATTRIBUTE_READONLY 0x0001L
311 #define FILE_ATTRIBUTE_HIDDEN 0x0002L
312 #define FILE_ATTRIBUTE_SYSTEM 0x0004L
313 #define FILE_ATTRIBUTE_VOLUME 0x0008L
314 #define FILE_ATTRIBUTE_DIRECTORY 0x0010L
315 #define FILE_ATTRIBUTE_ARCHIVE 0x0020L
316 #define FILE_ATTRIBUTE_DEVICE 0x0040L
317 #define FILE_ATTRIBUTE_NORMAL 0x0080L
318 #define FILE_ATTRIBUTE_TEMPORARY 0x0100L
319 #define FILE_ATTRIBUTE_SPARSE 0x0200L
320 #define FILE_ATTRIBUTE_REPARSE_POINT 0x0400L
321 #define FILE_ATTRIBUTE_COMPRESSED 0x0800L
322 #define FILE_ATTRIBUTE_OFFLINE 0x1000L
323 #define FILE_ATTRIBUTE_NONINDEXED 0x2000L
324 #define FILE_ATTRIBUTE_ENCRYPTED 0x4000L
325 #define FILE_ATTRIBUTE_ALL_MASK 0x7FFFL
327 #define SAMBA_ATTRIBUTES_MASK (FILE_ATTRIBUTE_READONLY|\
328 FILE_ATTRIBUTE_HIDDEN|\
329 FILE_ATTRIBUTE_SYSTEM|\
330 FILE_ATTRIBUTE_DIRECTORY|\
331 FILE_ATTRIBUTE_ARCHIVE)
333 /* File type flags */
334 #define FILE_TYPE_DISK 0
335 #define FILE_TYPE_BYTE_MODE_PIPE 1
336 #define FILE_TYPE_MESSAGE_MODE_PIPE 2
337 #define FILE_TYPE_PRINTER 3
338 #define FILE_TYPE_COMM_DEVICE 4
339 #define FILE_TYPE_UNKNOWN 0xFFFF
341 /* Lock types. */
342 #define LOCKING_ANDX_EXCLUSIVE_LOCK 0x00
343 #define LOCKING_ANDX_SHARED_LOCK 0x01
344 #define LOCKING_ANDX_OPLOCK_RELEASE 0x02
345 #define LOCKING_ANDX_CHANGE_LOCKTYPE 0x04
346 #define LOCKING_ANDX_CANCEL_LOCK 0x08
347 #define LOCKING_ANDX_LARGE_FILES 0x10
350 * Bits we test with.
353 #define OPLOCK_NONE 0
354 #define OPLOCK_EXCLUSIVE 1
355 #define OPLOCK_BATCH 2
356 #define OPLOCK_LEVEL_II 4
358 #define CORE_OPLOCK_GRANTED (1<<5)
359 #define EXTENDED_OPLOCK_GRANTED (1<<15)
362 * Return values for oplock types.
365 #define NO_OPLOCK_RETURN 0
366 #define EXCLUSIVE_OPLOCK_RETURN 1
367 #define BATCH_OPLOCK_RETURN 2
368 #define LEVEL_II_OPLOCK_RETURN 3
370 /* oplock levels sent in oplock break */
371 #define OPLOCK_BREAK_TO_NONE 0
372 #define OPLOCK_BREAK_TO_LEVEL_II 1
374 /* Filesystem Attributes. */
375 #define FILE_CASE_SENSITIVE_SEARCH 0x00000001
376 #define FILE_CASE_PRESERVED_NAMES 0x00000002
377 #define FILE_UNICODE_ON_DISK 0x00000004
378 /* According to cifs9f, this is 4, not 8 */
379 /* Acconding to testing, this actually sets the security attribute! */
380 #define FILE_PERSISTENT_ACLS 0x00000008
381 #define FILE_FILE_COMPRESSION 0x00000010
382 #define FILE_VOLUME_QUOTAS 0x00000020
383 #define FILE_SUPPORTS_SPARSE_FILES 0x00000040
384 #define FILE_SUPPORTS_REPARSE_POINTS 0x00000080
385 #define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100
386 #define FS_LFN_APIS 0x00004000
387 #define FILE_VOLUME_IS_COMPRESSED 0x00008000
388 #define FILE_SUPPORTS_OBJECT_IDS 0x00010000
389 #define FILE_SUPPORTS_ENCRYPTION 0x00020000
390 #define FILE_NAMED_STREAMS 0x00040000
391 #define FILE_READ_ONLY_VOLUME 0x00080000
394 /* ioctl codes */
395 #define IOCTL_QUERY_JOB_INFO 0x530060
397 /* filesystem control codes */
398 #define FSCTL_METHOD_BUFFERED 0x00000000
399 #define FSCTL_METHOD_IN_DIRECT 0x00000001
400 #define FSCTL_METHOD_OUT_DIRECT 0x00000002
401 #define FSCTL_METHOD_NEITHER 0x00000003
403 #define FSCTL_ACCESS_ANY 0x00000000
404 #define FSCTL_ACCESS_READ 0x00004000
405 #define FSCTL_ACCESS_WRITE 0x00008000
407 #define IOCTL_DEV_TYPE_MASK 0xFFFF0000
409 #define FSCTL_DFS 0x00060000
410 #define FSCTL_DFS_GET_REFERRALS (FSCTL_DFS | FSCTL_ACCESS_ANY | 0x0194 | FSCTL_METHOD_BUFFERED)
411 #define FSCTL_DFS_GET_REFERRALS_EX (FSCTL_DFS | FSCTL_ACCESS_ANY | 0x01B0 | FSCTL_METHOD_BUFFERED)
413 #define FSCTL_FILESYSTEM 0x00090000
414 #define FSCTL_REQUEST_OPLOCK_LEVEL_1 (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x0000 | FSCTL_METHOD_BUFFERED)
415 #define FSCTL_REQUEST_OPLOCK_LEVEL_2 (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x0004 | FSCTL_METHOD_BUFFERED)
416 #define FSCTL_REQUEST_BATCH_OPLOCK (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x0008 | FSCTL_METHOD_BUFFERED)
417 #define FSCTL_OPLOCK_BREAK_ACKNOWLEDGE (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x000C | FSCTL_METHOD_BUFFERED)
418 #define FSCTL_OPBATCH_ACK_CLOSE_PENDING (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x0010 | FSCTL_METHOD_BUFFERED)
419 #define FSCTL_OPLOCK_BREAK_NOTIFY (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x0014 | FSCTL_METHOD_BUFFERED)
420 #define FSCTL_FILESYS_GET_STATISTICS (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x0060 | FSCTL_METHOD_BUFFERED)
421 #define FSCTL_GET_NTFS_VOLUME_DATA (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x0064 | FSCTL_METHOD_BUFFERED)
422 #define FSCTL_IS_VOLUME_DIRTY (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x0078 | FSCTL_METHOD_BUFFERED)
423 #define FSCTL_FIND_FILES_BY_SID (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x008C | FSCTL_METHOD_NEITHER)
424 #define FSCTL_SET_OBJECT_ID (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x0098 | FSCTL_METHOD_BUFFERED)
425 #define FSCTL_GET_OBJECT_ID (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x009C | FSCTL_METHOD_BUFFERED)
426 #define FSCTL_DELETE_OBJECT_ID (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x00A0 | FSCTL_METHOD_BUFFERED)
427 #define FSCTL_SET_REPARSE_POINT (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x00A4 | FSCTL_METHOD_BUFFERED)
428 #define FSCTL_GET_REPARSE_POINT (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x00A8 | FSCTL_METHOD_BUFFERED)
429 #define FSCTL_DELETE_REPARSE_POINT (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x00AC | FSCTL_METHOD_BUFFERED)
430 #define FSCTL_CREATE_OR_GET_OBJECT_ID (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x00C0 | FSCTL_METHOD_BUFFERED)
431 #define FSCTL_SET_SPARSE (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 0x00C4 | FSCTL_METHOD_BUFFERED)
432 #define FSCTL_QUERY_ALLOCATED_RANGES (FSCTL_FILESYSTEM | FSCTL_ACCESS_READ | 0x00CC | FSCTL_METHOD_NEITHER)
433 #define FSCTL_FILE_LEVEL_TRIM (FSCTL_FILESYSTEM | FSCTL_ACCESS_WRITE | 0x0208 | FSCTL_METHOD_BUFFERED)
434 #define FSCTL_OFFLOAD_READ (FSCTL_FILESYSTEM | FSCTL_ACCESS_READ | 0x0264 | FSCTL_METHOD_BUFFERED)
435 #define FSCTL_OFFLOAD_WRITE (FSCTL_FILESYSTEM | FSCTL_ACCESS_WRITE | 0x0268 | FSCTL_METHOD_BUFFERED)
437 #define FSCTL_NAMED_PIPE 0x00110000
438 #define FSCTL_PIPE_PEEK (FSCTL_NAMED_PIPE | FSCTL_ACCESS_READ | 0x000C | FSCTL_METHOD_BUFFERED)
439 #define FSCTL_NAMED_PIPE_READ_WRITE (FSCTL_NAMED_PIPE | FSCTL_ACCESS_READ \
440 | FSCTL_ACCESS_WRITE | 0x0014 | FSCTL_METHOD_NEITHER)
441 #define FSCTL_PIPE_TRANSCEIVE FSCTL_NAMED_PIPE_READ_WRITE /* SMB2 function name */
442 #define FSCTL_PIPE_WAIT (FSCTL_NAMED_PIPE | FSCTL_ACCESS_ANY | 0x0018 | FSCTL_METHOD_BUFFERED)
444 #define FSCTL_NETWORK_FILESYSTEM 0x00140000
445 #define FSCTL_GET_SHADOW_COPY_DATA (FSCTL_NETWORK_FILESYSTEM | FSCTL_ACCESS_READ | 0x0064 | FSCTL_METHOD_BUFFERED)
446 #define FSCTL_SRV_ENUM_SNAPS FSCTL_GET_SHADOW_COPY_DATA /* SMB2 function name */
447 #define FSCTL_SRV_REQUEST_RESUME_KEY (FSCTL_NETWORK_FILESYSTEM | FSCTL_ACCESS_ANY | 0x0078 | FSCTL_METHOD_BUFFERED)
448 #define FSCTL_SRV_COPYCHUNK (FSCTL_NETWORK_FILESYSTEM | FSCTL_ACCESS_READ | 0x00F0 | FSCTL_METHOD_OUT_DIRECT)
449 #define FSCTL_SRV_COPYCHUNK_WRITE (FSCTL_NETWORK_FILESYSTEM | FSCTL_ACCESS_WRITE | 0x00F0 | FSCTL_METHOD_OUT_DIRECT)
450 #define FSCTL_SRV_READ_HASH (FSCTL_NETWORK_FILESYSTEM | FSCTL_ACCESS_READ| 0x01B8 | FSCTL_METHOD_NEITHER)
451 #define FSCTL_LMR_REQ_RESILIENCY (FSCTL_NETWORK_FILESYSTEM | FSCTL_ACCESS_ANY | 0x01D4 | FSCTL_METHOD_BUFFERED)
452 #define FSCTL_LMR_SET_LINK_TRACKING_INFORMATION \
453 (FSCTL_NETWORK_FILESYSTEM | FSCTL_ACCESS_ANY | 0x00EC | FSCTL_METHOD_BUFFERED)
454 #define FSCTL_QUERY_NETWORK_INTERFACE_INFO \
455 (FSCTL_NETWORK_FILESYSTEM | FSCTL_ACCESS_ANY | 0x01FC | FSCTL_METHOD_BUFFERED)
458 * FSCTL_VALIDATE_NEGOTIATE_INFO_224 was used used in
459 * Windows 8 server beta with SMB 2.24
461 #define FSCTL_VALIDATE_NEGOTIATE_INFO_224 \
462 (FSCTL_NETWORK_FILESYSTEM | FSCTL_ACCESS_ANY | 0x0200 | FSCTL_METHOD_BUFFERED)
463 #define FSCTL_VALIDATE_NEGOTIATE_INFO (FSCTL_NETWORK_FILESYSTEM | FSCTL_ACCESS_ANY | 0x0204 | FSCTL_METHOD_BUFFERED)
465 #endif /* _SMB_CONSTANTS_H */