Print this page
NEX-14666 Need to provide SMB 2.1 Client
NEX-17187 panic in smbfs_acl_store
NEX-17231 smbfs create xattr files finds wrong file
NEX-17224 smbfs lookup EINVAL should be ENOENT
NEX-17260 SMB1 client fails to list directory after NEX-14666
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Joyce McIntosh <joyce.mcintosh@nexenta.com>
and: (cleanup)
NEX-5665 SMB2 oplock leases
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
NEX-5665 SMB2 oplock leases
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
NEX-4538 SMB1 create file should support extended_response format (2)
NEX-6116 Failures in smbtorture raw.open
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com>
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Include this commit if upstreaming/backporting any of:
NEX-4540 SMB server declines EA support incorrectly
NEX-4239 smbtorture create failures re. allocation size
(illumos) 6398 SMB should support path names longer than 1024
NEX-3906 Prefer that SMB change notify not tie up a worker thread
NEX-5278 SMB notify should buffer per file handle
Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com>
Reviewed by: Matt Barden <Matt.Barden@nexenta.com>
NEX-4538 SMB1 create file should support extended_response format
Reviewed by: Matt Barden <Matt.Barden@nexenta.com>
Reviewed by: Bayard Bell <bayard.bell@nexenta.com>
NEX-4473 SMB1 tree connect missing some features
Reviewed by: Bayard Bell <bayard.bell@nexenta.com>
Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com>
NEX-3611 CLONE NEX-3550 Replace smb2_enable with max_protocol
Reviewed by: Yuri Pankov <Yuri.Pankov@nexenta.com>
SMB-11 SMB2 message parse & dispatch
SMB-12 SMB2 Negotiate Protocol
SMB-13 SMB2 Session Setup
SMB-14 SMB2 Logoff
SMB-15 SMB2 Tree Connect
SMB-16 SMB2 Tree Disconnect
SMB-17 SMB2 Create
SMB-18 SMB2 Close
SMB-19 SMB2 Flush
SMB-20 SMB2 Read
SMB-21 SMB2 Write
SMB-22 SMB2 Lock/Unlock
SMB-23 SMB2 Ioctl
SMB-24 SMB2 Cancel
SMB-25 SMB2 Echo
SMB-26 SMB2 Query Dir
SMB-27 SMB2 Change Notify
SMB-28 SMB2 Query Info
SMB-29 SMB2 Set Info
SMB-30 SMB2 Oplocks
SMB-53 SMB2 Create Context options
(SMB2 code review cleanup 1, 2, 3)
SMB-56 extended security NTLMSSP, inbound
SMB-50 User-mode SMB server
Includes work by these authors:
Thomas Keiser <thomas.keiser@nexenta.com>
Albert Lee <trisk@nexenta.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/smbsrv/smb.h
+++ new/usr/src/uts/common/smbsrv/smb.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
|
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
24 - * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
24 + * Copyright 2018 Nexenta Systems, Inc. All rights reserved.
25 25 */
26 26
27 27 #ifndef _SMBSRV_SMB_H
28 28 #define _SMBSRV_SMB_H
29 29
30 30
31 31 /*
32 32 * SMB definitions and interfaces, mostly defined in the SMB and CIFS specs.
33 33 */
34 34 #include <sys/types.h>
35 35 #include <smbsrv/string.h>
36 36 #include <smbsrv/msgbuf.h>
37 37
38 38 #include <smb/ntstatus.h>
39 39 #include <smb/nterror.h>
40 40 #include <smb/lmerr.h>
41 41 #include <smb/doserror.h>
42 -#include <smbsrv/ntaccess.h>
42 +#include <smb/ntaccess.h>
43 43
44 44 /*
45 45 * Macintosh Extensions for CIFS
46 46 */
47 47 #include <smbsrv/mac_cifs.h>
48 48
49 49 /*
50 50 * NT Installable File System (IFS) interface.
51 51 */
52 52 #include <smbsrv/ntifs.h>
53 53
54 54 #ifdef __cplusplus
55 55 extern "C" {
56 56 #endif
57 57
58 58 /*
59 59 * The msgbuf format and length of an SMB header.
60 60 */
61 61 #define SMB_HEADER_DOS_FMT "Mbbbwbww10.wwww"
62 62 #define SMB_HEADER_NT_FMT "Mblbww#c2.wwww"
63 63 #define SMB_HEADER_LEN 32
64 64 #define SMB_SIG_SIZE 8 /* SMB signature size */
65 65
66 66 #define SMB_HEADER_ED_FMT "Mbbbwbww8c2.wwww"
67 67 #define SMB_HEADER_ED_LEN (4+1+1+1+2+1+2+12+2+2+2+2)
68 68 #define SMB_TRANSHDR_ED_FMT "wwwwb.wl2.wwwwb."
69 69 #define SMB_TRANSHDR_ED_LEN (2+2+2+2+1+1+2+4+2+2+2+2+2+1+1)
70 70 #define SMB_TRANSSHDR_ED_FMT "wwwwwwwww"
71 71 #define SMB_TRANSSHDR_ED_LEN (2+2+2+2+2+2+2+2)
72 72 #define SMB_TRANS2SHDR_ED_FMT "wwwwwwwww"
73 73 #define SMB_TRANS2SHDR_ED_LEN (2+2+2+2+2+2+2+2+2)
74 74 /* There is something wrong with this. Should be 38 bytes. It is 37 bytes */
75 75 #define SMB_NT_TRANSHDR_ED_FMT "b2.llllllllbw"
76 76 #define SMB_NT_TRANSHDR_ED_LEN (1+2+4+4+4+4+4+4+4+4+1+2)
77 77
78 78 /*
79 79 * CIFS definition for the SMB header (CIFS Section 3.2). Note that the
80 80 * pid_high field is not documented in the 1997 CIFS specificaction. This
81 81 * is a decoded or memory-based definition, which may be padded to align
82 82 * its elements on word boundaries. See smb_hdrbuf_t for the network
83 83 * ready structure.
84 84 */
85 85 typedef struct smb_hdr {
86 86 uint8_t protocol[4];
87 87 uint8_t command;
88 88
89 89 union {
90 90 struct {
91 91 uint8_t error_class;
92 92 uint8_t reserved;
93 93 uint16_t error;
94 94 } dos_error;
95 95 uint32_t ntstatus;
96 96 } status;
97 97
98 98 uint8_t flags;
99 99 uint16_t flags2;
100 100 uint16_t pid_high;
101 101
102 102 union {
103 103 uint16_t pad[5];
104 104 struct {
105 105 uint16_t reserved;
106 106 uint8_t security_sig[SMB_SIG_SIZE];
107 107 } extra;
108 108 } extra;
109 109
110 110 uint16_t tid;
111 111 uint16_t pid;
112 112 uint16_t uid;
113 113 uint16_t mid;
114 114 } smb_hdr_t;
115 115
116 116 /*
117 117 * Encoded or packed SMB header in network ready format.
118 118 */
119 119 typedef struct smb_hdrbuf {
120 120 uint8_t hdr[SMB_HEADER_LEN];
121 121 } smb_hdrbuf_t;
122 122
123 123 /*
124 124 * Protocol magic value as a 32-bit. This will be 0xff 0x53 0x4d 0x42 on
125 125 * the wire.
126 126 */
127 127
128 128 #define SMB_PROTOCOL_MAGIC 0x424d53ff
129 129 #define SMB2_PROTOCOL_MAGIC 0x424d53fe
130 130
131 131 /*
132 132 * Time and date encoding (CIFS Section 3.6). The date is encoded such
133 133 * that the year has a range of 0-119, which represents 1980-2099. The
134 134 * month range is 1-12, and the day range is 1-31.
135 135 */
136 136 typedef struct smb_date {
137 137 uint16_t day : 5;
138 138 uint16_t month : 4;
139 139 uint16_t year : 7;
140 140 } smb_date_t;
141 141
142 142 /*
143 143 * The hours range is 0-23, the minutes range is 0-59 and the two_sec
144 144 * range is 0-29.
145 145 */
146 146 typedef struct smb_time {
147 147 uint16_t two_sec : 5;
148 148 uint16_t minutes : 6;
149 149 uint16_t hours : 5;
150 150 } smb_time_t;
151 151
152 152 /*
153 153 * This is a 64-bit signed absolute time representing 100ns increments.
154 154 * A positive value represents the absolute time since 1601AD. A
155 155 * negative value represents a context specific relative time.
156 156 */
157 157 typedef struct smb_time2 {
158 158 uint32_t low_time;
159 159 int32_t high_time;
160 160 } smb_time2_t;
161 161
162 162 /*
163 163 * The number of seconds since Jan 1, 1970, 00:00:00.0.
164 164 */
165 165 typedef uint32_t smb_utime_t;
166 166
167 167 #define SMB_LM_NEGOTIATE_WORDCNT 13
168 168 #define SMB_NT_NEGOTIATE_WORDCNT 17
169 169
170 170 #define SMB_NAME83_EXTLEN 3
171 171 #define SMB_NAME83_BASELEN 8
172 172 #define SMB_NAME83_LEN 12
173 173
174 174 /* Share types */
175 175 #ifndef _SHARE_TYPES_DEFINED_
176 176 #define _SHARE_TYPES_DEFINED_
177 177 #define STYPE_DISKTREE 0x00000000
178 178 #define STYPE_PRINTQ 0x00000001
179 179 #define STYPE_DEVICE 0x00000002
180 180 #define STYPE_IPC 0x00000003
181 181 #define STYPE_MASK 0x0000000F
182 182 #define STYPE_DFS 0x00000064
183 183 #define STYPE_HIDDEN 0x80000000
184 184 #define STYPE_SPECIAL 0x80000000
185 185 #endif /* _SHARE_TYPES_DEFINED_ */
186 186
187 187 #define STYPE_ISDSK(S) (((S) & STYPE_MASK) == STYPE_DISKTREE)
188 188 #define STYPE_ISPRN(S) (((S) & STYPE_MASK) == STYPE_PRINTQ)
189 189 #define STYPE_ISDEV(S) (((S) & STYPE_MASK) == STYPE_DEVICE)
190 190 #define STYPE_ISIPC(S) (((S) & STYPE_MASK) == STYPE_IPC)
191 191
192 192 /*
193 193 * NtCreateAndX and NtTransactCreate creation flags: defined in CIFS
194 194 * section 4.2.2
|
↓ open down ↓ |
142 lines elided |
↑ open up ↑ |
195 195 *
196 196 * Creation Flag Name Value Description
197 197 * ========================== ====== ==================================
198 198 * NT_CREATE_REQUEST_OPLOCK 0x02 Level I oplock requested
199 199 * NT_CREATE_REQUEST_OPBATCH 0x04 Batch oplock requested
200 200 * NT_CREATE_OPEN_TARGET_DIR 0x08 Target for open is a directory
201 201 */
202 202 #define NT_CREATE_FLAG_REQUEST_OPLOCK 0x02
203 203 #define NT_CREATE_FLAG_REQUEST_OPBATCH 0x04
204 204 #define NT_CREATE_FLAG_OPEN_TARGET_DIR 0x08
205 +#define NT_CREATE_FLAG_EXTENDED_RESPONSE 0x10
205 206
207 +/*
208 + * The option flags valid in the SMB nt_create_andx call are a subset of
209 + * those defined in ntifs.h (ditto SMB nt_transact_create)
210 + */
211 +#define SMB_NTCREATE_VALID_OPTIONS (FILE_VALID_OPTION_FLAGS & ~( \
212 + FILE_SYNCHRONOUS_IO_ALERT | FILE_SYNCHRONOUS_IO_NONALERT |\
213 + FILE_RESERVE_OPFILTER))
206 214
207 215 /*
216 + * Oplocks levels as expressed in the SMB procotol, i.e.
217 + * in nt_create_andx and nt_transact_create responses.
218 + * The FS-level oplock interface flags are in ntifs.h
219 + * (See OPLOCK_LEVEL_...)
220 + */
221 +#define SMB_OPLOCK_NONE 0
222 +#define SMB_OPLOCK_EXCLUSIVE 1
223 +#define SMB_OPLOCK_BATCH 2
224 +#define SMB_OPLOCK_LEVEL_II 3
225 +
226 +/*
208 227 * Define the filter flags for NtNotifyChangeDirectoryFile
209 228 */
210 229 #define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
211 230 #define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
212 231 #define FILE_NOTIFY_CHANGE_NAME 0x00000003
213 232 #define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
214 233 #define FILE_NOTIFY_CHANGE_SIZE 0x00000008
215 234 #define FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
216 235 #define FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
217 236 #define FILE_NOTIFY_CHANGE_CREATION 0x00000040
218 237 #define FILE_NOTIFY_CHANGE_EA 0x00000080
219 238 #define FILE_NOTIFY_CHANGE_SECURITY 0x00000100
220 239 #define FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
221 240 #define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
222 241 #define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
223 242 #define FILE_NOTIFY_VALID_MASK 0x00000fff
224 243
225 244
226 245 /*
|
↓ open down ↓ |
9 lines elided |
↑ open up ↑ |
227 246 * Define the file action type codes for NtNotifyChangeDirectoryFile
228 247 */
229 248 #define FILE_ACTION_ADDED 0x00000001
230 249 #define FILE_ACTION_REMOVED 0x00000002
231 250 #define FILE_ACTION_MODIFIED 0x00000003
232 251 #define FILE_ACTION_RENAMED_OLD_NAME 0x00000004
233 252 #define FILE_ACTION_RENAMED_NEW_NAME 0x00000005
234 253 #define FILE_ACTION_ADDED_STREAM 0x00000006
235 254 #define FILE_ACTION_REMOVED_STREAM 0x00000007
236 255 #define FILE_ACTION_MODIFIED_STREAM 0x00000008
237 -/*
238 - * Note: These action values are not from MS-FSCC.
239 - * FILE_ACTION_SUBDIR_CHANGED is used internally for
240 - * "watch tree" support, posted to all parents of a
241 - * directory that had one of the changes above.
242 - * FILE_ACTION_DELETE_PENDING is used internally to tell
243 - * notify change requests when the "delete-on-close" flag
244 - * has been set on the directory being watched.
245 - */
246 -#define FILE_ACTION_SUBDIR_CHANGED 0x00000009
247 -#define FILE_ACTION_DELETE_PENDING 0x0000000a
256 +/* See also: FILE_ACTION_SUBDIR_CHANGED etc. */
248 257
249 -
250 258 /* Lock type flags */
251 259 #define LOCKING_ANDX_NORMAL_LOCK 0x00
252 260 #define LOCKING_ANDX_SHARED_LOCK 0x01
253 261 #define LOCKING_ANDX_OPLOCK_RELEASE 0x02
254 262 #define LOCKING_ANDX_CHANGE_LOCK_TYPE 0x04
255 263 #define LOCKING_ANDX_CANCEL_LOCK 0x08
256 264 #define LOCKING_ANDX_LARGE_FILES 0x10
257 265
258 266 #define SMB_COM_CREATE_DIRECTORY 0x00
259 267 #define SMB_COM_DELETE_DIRECTORY 0x01
260 268 #define SMB_COM_OPEN 0x02
261 269 #define SMB_COM_CREATE 0x03
262 270 #define SMB_COM_CLOSE 0x04
263 271 #define SMB_COM_FLUSH 0x05
264 272 #define SMB_COM_DELETE 0x06
265 273 #define SMB_COM_RENAME 0x07
266 274 #define SMB_COM_QUERY_INFORMATION 0x08
267 275 #define SMB_COM_SET_INFORMATION 0x09
268 276 #define SMB_COM_READ 0x0A
269 277 #define SMB_COM_WRITE 0x0B
270 278 #define SMB_COM_LOCK_BYTE_RANGE 0x0C
271 279 #define SMB_COM_UNLOCK_BYTE_RANGE 0x0D
272 280 #define SMB_COM_CREATE_TEMPORARY 0x0E
273 281 #define SMB_COM_CREATE_NEW 0x0F
274 282 #define SMB_COM_CHECK_DIRECTORY 0x10
275 283 #define SMB_COM_PROCESS_EXIT 0x11
276 284 #define SMB_COM_SEEK 0x12
277 285 #define SMB_COM_LOCK_AND_READ 0x13
278 286 #define SMB_COM_WRITE_AND_UNLOCK 0x14
279 287
280 288 #define SMB_COM_READ_RAW 0x1A
281 289 #define SMB_COM_READ_MPX 0x1B
282 290 #define SMB_COM_READ_MPX_SECONDARY 0x1C
283 291 #define SMB_COM_WRITE_RAW 0x1D
284 292 #define SMB_COM_WRITE_MPX 0x1E
285 293 #define SMB_COM_WRITE_MPX_SECONDARY 0x1F
286 294 #define SMB_COM_WRITE_COMPLETE 0x20
287 295
288 296 #define SMB_COM_SET_INFORMATION2 0x22
289 297 #define SMB_COM_QUERY_INFORMATION2 0x23
290 298 #define SMB_COM_LOCKING_ANDX 0x24
291 299 #define SMB_COM_TRANSACTION 0x25
292 300 #define SMB_COM_TRANSACTION_SECONDARY 0x26
293 301 #define SMB_COM_IOCTL 0x27
294 302 #define SMB_COM_IOCTL_SECONDARY 0x28
295 303 #define SMB_COM_COPY 0x29
296 304 #define SMB_COM_MOVE 0x2A
297 305 #define SMB_COM_ECHO 0x2B
298 306 #define SMB_COM_WRITE_AND_CLOSE 0x2C
299 307 #define SMB_COM_OPEN_ANDX 0x2D
300 308 #define SMB_COM_READ_ANDX 0x2E
301 309 #define SMB_COM_WRITE_ANDX 0x2F
302 310
303 311 #define SMB_COM_CLOSE_AND_TREE_DISC 0x31
304 312 #define SMB_COM_TRANSACTION2 0x32
305 313 #define SMB_COM_TRANSACTION2_SECONDARY 0x33
306 314 #define SMB_COM_FIND_CLOSE2 0x34
307 315 #define SMB_COM_FIND_NOTIFY_CLOSE 0x35
308 316
309 317 #define SMB_COM_TREE_CONNECT 0x70
310 318 #define SMB_COM_TREE_DISCONNECT 0x71
311 319 #define SMB_COM_NEGOTIATE 0x72
312 320 #define SMB_COM_SESSION_SETUP_ANDX 0x73
313 321 #define SMB_COM_LOGOFF_ANDX 0x74
314 322 #define SMB_COM_TREE_CONNECT_ANDX 0x75
315 323
316 324 #define SMB_COM_QUERY_INFORMATION_DISK 0x80
317 325 #define SMB_COM_SEARCH 0x81
318 326 #define SMB_COM_FIND 0x82
319 327 #define SMB_COM_FIND_UNIQUE 0x83
320 328 #define SMB_COM_FIND_CLOSE 0x84
321 329
322 330 #define SMB_COM_NT_TRANSACT 0xA0
323 331 #define SMB_COM_NT_TRANSACT_SECONDARY 0xA1
324 332 #define SMB_COM_NT_CREATE_ANDX 0xA2
325 333 #define SMB_COM_NT_CANCEL 0xA4
326 334
327 335 #define SMB_COM_OPEN_PRINT_FILE 0xC0
328 336 #define SMB_COM_WRITE_PRINT_FILE 0xC1
329 337 #define SMB_COM_CLOSE_PRINT_FILE 0xC2
330 338 #define SMB_COM_GET_PRINT_QUEUE 0xC3
331 339
332 340 #define SMB_COM_NUM 0x100
333 341
334 342 /*
335 343 * Flags field of the SMB header. The names in parenthesis represent
336 344 * alternative names for the flags.
337 345 *
338 346 * SMB_FLAGS_LOCK_AND_READ_OK If the server supports LockAndRead and
339 347 * (SMB_FLAGS_LOCKS_SUBDIALECT) WriteAndUnlock, it sets this bit in the
340 348 * Negotiate response.
341 349 *
342 350 * SMB_FLAGS_SEND_NO_ACK When on, the client guarantees that there
343 351 * (SMB_FLAGS_RCV_BUF_POSTED) is a receive buffer posted such that a
344 352 * "Send-No-Ack" can be used by the server
345 353 * to respond to the client's request.
346 354 *
347 355 * SMB_FLAGS_CASE_INSENSITIVE This is part of the Flags field of every
348 356 * SMB header. If this bit is set, then all
349 357 * pathnames in the SMB should be treated as
350 358 * case-insensitive. Otherwise pathnames are
351 359 * case-sensitive.
352 360 *
353 361 * SMB_FLAGS_CANONICALIZED_PATHS When on in SessionSetupX, this indicates
354 362 * that all paths sent to the server are
355 363 * already in OS/2 canonicalized format.
356 364 *
357 365 * OS/2 canonical format means that file/directory names are in upper case,
358 366 * are valid characters, . and .. have been removed and single backslashes
359 367 * are used as separators.
360 368 *
361 369 * SMB_FLAGS_OPLOCK When set in an open file request SMBs
362 370 * (Open, Create, OpenX, etc.) this bit
363 371 * indicates a request for an oplock on the
364 372 * file. When set in the response, this bit
365 373 * indicates that the oplock was granted.
366 374 *
367 375 * SMB_FLAGS_OPLOCK_NOTIFY_ANY When on, this bit indicates that the server
368 376 * should notify the client on any request
369 377 * that could cause the file to be changed.
370 378 * If not set, the server only notifies the
371 379 * client on other open requests on the file.
372 380 * This bit is only relevant when
373 381 * SMB_FLAGS_OPLOCK is set.
374 382 *
375 383 * SMB_FLAGS_SERVER_TO_REDIR This bit indicates that the SMB is being
376 384 * (SMB_FLAGS_REPLY) sent from server to (client) redirector.
377 385 */
378 386 #define SMB_FLAGS_LOCK_AND_READ_OK 0x01
379 387 #define SMB_FLAGS_SEND_NO_ACK 0x02
380 388 #define SMB_FLAGS_RESERVED 0x04
381 389 #define SMB_FLAGS_CASE_INSENSITIVE 0x08
382 390 #define SMB_FLAGS_CANONICALIZED_PATHS 0x10
383 391 #define SMB_FLAGS_OPLOCK 0x20
384 392 #define SMB_FLAGS_OPLOCK_NOTIFY_ANY 0x40
385 393 #define SMB_FLAGS_REPLY 0x80
386 394
387 395
388 396 /*
389 397 * Flags2 field of the SMB header.
390 398 *
391 399 * SMB_FLAGS2_READ_IF_EXECUTE is also known as SMB_FLAGS2_PAGING_IO
392 400 */
393 401 #define SMB_FLAGS2_KNOWS_LONG_NAMES 0x0001
394 402 #define SMB_FLAGS2_KNOWS_EAS 0x0002
395 403 #define SMB_FLAGS2_SMB_SECURITY_SIGNATURE 0x0004
396 404 #define SMB_FLAGS2_IS_LONG_NAME 0x0040
397 405 #define SMB_FLAGS2_REPARSE_PATH 0x0400
398 406 #define SMB_FLAGS2_EXT_SEC 0x0800
399 407 #define SMB_FLAGS2_DFS 0x1000
400 408 #define SMB_FLAGS2_READ_IF_EXECUTE 0x2000
401 409 #define SMB_FLAGS2_NT_STATUS 0x4000
402 410 #define SMB_FLAGS2_UNICODE 0x8000
403 411
404 412 #define DIALECT_UNKNOWN 0
405 413 #define PC_NETWORK_PROGRAM_1_0 1 /* The original MSNET SMB protocol */
406 414 #define PCLAN1_0 2 /* Some versions of the original MSNET */
407 415 #define MICROSOFT_NETWORKS_1_03 3 /* This is used for the MS-NET 1.03 */
408 416 #define MICROSOFT_NETWORKS_3_0 4 /* This is the DOS LANMAN 1.0 specific */
409 417 #define LANMAN1_0 5 /* This is the first version of the full */
|
↓ open down ↓ |
150 lines elided |
↑ open up ↑ |
410 418 #define LM1_2X002 6 /* This is the first version of the full */
411 419 #define DOS_LM1_2X002 7 /* This is the dos equivalent of the */
412 420 #define DOS_LANMAN2_1 8 /* DOS LANMAN2.1 */
413 421 #define LANMAN2_1 9 /* OS/2 LANMAN2.1 */
414 422 #define Windows_for_Workgroups_3_1a 10 /* Windows for Workgroups Version 1.0 */
415 423 #define NT_LM_0_12 11 /* The SMB protocol designed for NT */
416 424 #define DIALECT_SMB2002 12 /* SMB 2.002 (switch to SMB2) */
417 425 #define DIALECT_SMB2XXX 13 /* SMB 2.??? (switch to SMB2) */
418 426
419 427 /*
428 + * SMB_TREE_CONNECT_ANDX request flags
429 + *
430 + * The tree specified by TID in the SMB header
431 + * should be disconnected - disconnect errors
432 + * should be ignored.
433 + */
434 +#define SMB_TCONX_DISCONECT_TID 0x0001
435 +/*
436 + * Client request for signing key protection.
437 + */
438 +#define SMB_TCONX_EXTENDED_SIGNATURES 0x0004
439 +/*
440 + * Client request for extended information.
441 + */
442 +#define SMB_TCONX_EXTENDED_RESPONSE 0x0008
443 +
444 +/*
420 445 * SMB_TREE_CONNECT_ANDX OptionalSupport flags
421 446 *
422 447 * SMB_SUPPORT_SEARCH_BITS The server supports SearchAttributes.
423 448 * SMB_SHARE_IS_IN_DFS The share is managed by DFS.
424 449 * SMB_CSC_MASK Offline-caching mask - see CSC values.
425 450 * SMB_UNIQUE_FILE_NAME The server uses long names and does not support
426 451 * short names. This indicates to clients that
427 452 * they may perform directory name-space caching.
428 453 * SMB_EXTENDED_SIGNATURES The server will use signing key protection.
429 454 *
430 455 * SMB_CSC_CACHE_MANUAL_REINT Clients are allowed to cache files for offline
431 456 * use as requested by users but automatic
432 457 * file-by-file reintegration is not allowed.
433 458 * SMB_CSC_CACHE_AUTO_REINT Clients are allowed to automatically cache
434 459 * files for offline use and file-by-file
435 460 * reintegration is allowed.
436 461 * SMB_CSC_CACHE_VDO Clients are allowed to automatically cache files
437 462 * for offline use, file-by-file reintegration is
438 463 * allowed and clients are permitted to work from
439 464 * their local cache even while offline.
440 465 * SMB_CSC_CACHE_NONE Client-side caching is disabled for this share.
441 466 *
442 467 * SHI1005_FLAGS_ACCESS_BASED_DIRECTORY_ENUM
443 468 * The server will filter directory entries based
444 469 * on the access permissions of the client.
445 470 */
446 471 #define SMB_SUPPORT_SEARCH_BITS 0x0001
447 472 #define SMB_SHARE_IS_IN_DFS 0x0002
448 473 #define SMB_CSC_MASK 0x000C
449 474 #define SMB_UNIQUE_FILE_NAME 0x0010
450 475 #define SMB_EXTENDED_SIGNATURES 0x0020
451 476
452 477 #define SMB_CSC_CACHE_MANUAL_REINT 0x0000
453 478 #define SMB_CSC_CACHE_AUTO_REINT 0x0004
454 479 #define SMB_CSC_CACHE_VDO 0x0008
455 480 #define SMB_CSC_CACHE_NONE 0x000C
456 481
457 482 #define SHI1005_FLAGS_ACCESS_BASED_DIRECTORY_ENUM 0x0800
458 483 #define SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING 0x0400
459 484
460 485 /*
461 486 * The subcommand codes, placed in SETUP[0], for named pipe operations are:
462 487 * SubCommand Code Value Description
463 488 * =================== ===== =========================================
464 489 */
465 490
466 491 #define CallNamedPipe 0x54 /* open/write/read/close pipe */
467 492 #define WaitNamedPipe 0x53 /* wait for pipe to be nonbusy */
468 493 #define PeekNmPipe 0x23 /* read but don't remove data */
469 494 #define QNmPHandState 0x21 /* query pipe handle modes */
470 495 #define SetNmPHandState 0x01 /* set pipe handle modes */
471 496 #define QNmPipeInfo 0x22 /* query pipe attributes */
472 497 #define TransactNmPipe 0x26 /* write/read operation on pipe */
473 498 #define RawReadNmPipe 0x11 /* read pipe in "raw" (non message mode) */
474 499 #define RawWriteNmPipe 0x31 /* write pipe "raw" (non message mode) */
475 500
476 501
477 502
478 503 /*
479 504 * Setup[0] Transaction2 Value Description
480 505 * Subcommand Code
481 506 * ========================== ===== =============================
482 507 */
483 508
484 509 #define TRANS2_OPEN2 0x00 /* Create file, extended attributes */
485 510 #define TRANS2_FIND_FIRST2 0x01 /* Begin search for files */
486 511 #define TRANS2_FIND_NEXT2 0x02 /* Resume search for files */
487 512 #define TRANS2_QUERY_FS_INFORMATION 0x03 /* Get file system information */
488 513 #define TRANS2_SET_FS_INFORMATION 0x04 /* Set file system info. */
489 514 #define TRANS2_QUERY_PATH_INFORMATION 0x05 /* Get info, named file or dir */
490 515 #define TRANS2_SET_PATH_INFORMATION 0x06 /* Set info, named file or dir */
491 516 #define TRANS2_QUERY_FILE_INFORMATION 0x07 /* Get info, handle */
492 517 #define TRANS2_SET_FILE_INFORMATION 0x08 /* Set info, handle */
493 518 #define TRANS2_FSCTL 0x09 /* Not implemented by NT server */
494 519 #define TRANS2_IOCTL2 0x0A /* Not implemented by NT server */
495 520 #define TRANS2_FIND_NOTIFY_FIRST 0x0B /* Not implemented by NT server */
496 521 #define TRANS2_FIND_NOTIFY_NEXT 0x0C /* Not implemented by NT server */
497 522 #define TRANS2_CREATE_DIRECTORY 0x0D /* Create dir, extended attributes */
498 523 #define TRANS2_SESSION_SETUP 0x0E /* Session setup, extended security */
499 524 #define TRANS2_GET_DFS_REFERRAL 0x10 /* Get a Dfs referral */
500 525 #define TRANS2_REPORT_DFS_INCONSISTENCY 0x11 /* Report a Dfs inconsistency */
501 526
502 527 /*
503 528 * Access Mode Encoding (CIFS/1.0 1996 Section 3.8).
504 529 *
505 530 * The desired access mode passed in SmbOpen and SmbOpenAndX has the following
506 531 * mapping:
507 532 *
508 533 * 1111 11
509 534 * 5432 1098 7654 3210
510 535 * rWrC rLLL rSSS rAAA
511 536 *
512 537 * where:
513 538 *
514 539 * W - Write through mode. No read ahead or write behind allowed on
515 540 * this file or device. When protocol is returned, data is expected
516 541 * to be on the disk or device.
517 542 *
518 543 * S - Sharing mode:
519 544 * 0 - Compatibility mode (as in core open)
520 545 * 1 - Deny read/write/execute (exclusive)
521 546 * 2 - Deny write
522 547 * 3 - Deny read/execute
523 548 * 4 - Deny none
524 549 *
525 550 * A - Access mode
526 551 * 0 - Open for reading
527 552 * 1 - Open for writing
528 553 * 2 - Open for reading and writing
529 554 * 3 - Open for execute
530 555 *
531 556 * rSSSrAAA = 11111111 (hex FF) indicates FCB open (as in core protocol)
532 557 *
533 558 * C - Cache mode
534 559 * 0 - Normal file
535 560 * 1 - Do not cache this file
536 561 *
537 562 * L - Locality of reference
538 563 * 0 - Locality of reference is unknown
539 564 * 1 - Mainly sequential access
540 565 * 2 - Mainly random access
541 566 * 3 - Random access with some locality
542 567 * 4 to 7 - Currently undefined
543 568 */
544 569
545 570
546 571 #define SMB_DA_SHARE_MASK 0x70
547 572 #define SMB_DA_ACCESS_MASK 0x07
548 573 #define SMB_DA_FCB_MASK (UCHAR)0xFF
549 574
550 575 #define SMB_DA_ACCESS_READ 0x00
551 576 #define SMB_DA_ACCESS_WRITE 0x01
552 577 #define SMB_DA_ACCESS_READ_WRITE 0x02
553 578 #define SMB_DA_ACCESS_EXECUTE 0x03
554 579
555 580 #define SMB_DA_SHARE_COMPATIBILITY 0x00
556 581 #define SMB_DA_SHARE_EXCLUSIVE 0x10
557 582 #define SMB_DA_SHARE_DENY_WRITE 0x20
558 583 #define SMB_DA_SHARE_DENY_READ 0x30
559 584 #define SMB_DA_SHARE_DENY_NONE 0x40
560 585
561 586 #define SMB_DA_FCB (UCHAR)0xFF
562 587
563 588 #define SMB_CACHE_NORMAL 0x0000
564 589 #define SMB_DO_NOT_CACHE 0x1000
565 590
566 591 #define SMB_LR_UNKNOWN 0x0000
567 592 #define SMB_LR_SEQUENTIAL 0x0100
568 593 #define SMB_LR_RANDOM 0x0200
569 594 #define SMB_LR_RANDOM_WITH_LOCALITY 0x0300
570 595 #define SMB_LR_MASK 0x0F00
571 596
572 597 #define SMB_DA_WRITE_THROUGH 0x4000
573 598
574 599 /*
575 600 * Macros used for share reservation rule checking
576 601 */
577 602
578 603 #define SMB_DENY_READ(share_access) ((share_access & FILE_SHARE_READ) == 0)
579 604
580 605 #define SMB_DENY_WRITE(share_access) ((share_access & FILE_SHARE_WRITE) == 0)
581 606
582 607 #define SMB_DENY_DELETE(share_access) ((share_access & FILE_SHARE_DELETE) == 0)
583 608
584 609 #define SMB_DENY_RW(share_access) \
585 610 ((share_access & (FILE_SHARE_READ | FILE_SHARE_WRITE)) == 0)
586 611
587 612 #define SMB_DENY_ALL(share_access) (share_access == 0)
588 613
589 614 #define SMB_DENY_NONE(share_access) (share_access == FILE_SHARE_ALL)
590 615
591 616 /*
592 617 * The SMB open function determines what action should be taken depending
593 618 * on the existence or lack thereof of files used in the operation. It
594 619 * has the following mapping:
595 620 *
596 621 * 1111 1
597 622 * 5432 1098 7654 3210
598 623 * rrrr rrrr rrrC rrOO
599 624 *
600 625 * where:
601 626 *
602 627 * O - Open (action to be taken if the target file exists)
603 628 * 0 - Fail
604 629 * 1 - Open or Append file
605 630 * 2 - Truncate file
606 631 *
607 632 * C - Create (action to be taken if the target file does not exist)
608 633 * 0 - Fail
609 634 * 1 - Create file
610 635 */
611 636
612 637 #define SMB_OFUN_OPEN_MASK 0x3
613 638 #define SMB_OFUN_CREATE_MASK 0x10
614 639
615 640 #define SMB_OFUN_OPEN_FAIL 0
616 641 #define SMB_OFUN_OPEN_APPEND 1
617 642 #define SMB_OFUN_OPEN_OPEN 1
618 643 #define SMB_OFUN_OPEN_TRUNCATE 2
619 644
620 645 #define SMB_OFUN_CREATE_FAIL 0x00
621 646 #define SMB_OFUN_CREATE_CREATE 0x10
622 647
623 648 /*
624 649 * The Action field of OpenAndX has the following format:
625 650 *
626 651 * 1111 11
627 652 * 5432 1098 7654 3210
628 653 * Lrrr rrrr rrrr rrOO
629 654 *
|
↓ open down ↓ |
200 lines elided |
↑ open up ↑ |
630 655 * where:
631 656 *
632 657 * L - Opportunistic lock. 1 if lock granted, else 0.
633 658 *
634 659 * O - Open action:
635 660 * 1 - The file existed and was opened
636 661 * 2 - The file did not exist but was created
637 662 * 3 - The file existed and was truncated
638 663 */
639 664
640 -#define SMB_OACT_LOCK 0x8000
641 665 #define SMB_OACT_OPENED 0x01
642 666 #define SMB_OACT_CREATED 0x02
643 667 #define SMB_OACT_TRUNCATED 0x03
644 -
645 668 #define SMB_OACT_OPLOCK 0x8000
646 669
647 670 #define SMB_FTYPE_DISK 0
648 671 #define SMB_FTYPE_BYTE_PIPE 1
649 672 #define SMB_FTYPE_MESG_PIPE 2
650 673 #define SMB_FTYPE_PRINTER 3
651 674 #define SMB_FTYPE_UNKNOWN 0xFFFF
652 675
653 676 #define SMB_DEVST_BLOCKING 0x8000
654 677 #define SMB_DEVST_ENDPOINT 0x4000
655 678 #define SMB_DEVST_TYPE_MASK 0x0C00
656 679 #define SMB_DEVST_TYPE_BYTE_PIPE 0x0000
657 680 #define SMB_DEVST_TYPE_MESG_PIPE 0x0400
658 681 #define SMB_DEVST_RMODE_MASK 0x0300
659 682 #define SMB_DEVST_RMODE_BYTES 0x0000
660 683 #define SMB_DEVST_RMODE_MESGS 0x0100
661 684 #define SMB_DEVST_ICOUNT_MASK 0x00FF /* not used */
662 685
663 686 #define SMB_FTYPE_IS_DISK(F) ((F) == SMB_FTYPE_DISK)
664 687 #define SMB_FTYPE_IS_PIPE(F) \
665 688 (((F) == SMB_FTYPE_BYTE_PIPE) || ((F) == SMB_FTYPE_MESG_PIPE))
666 689 #define SMB_FTYPE_IS_PRINTER(F) ((F) == SMB_FTYPE_PRINTER)
667 690
668 691 /*
669 692 * TRANS2_FIND
670 693 */
671 694 #define SMB_FIND_FILE_DIRECTORY_INFO 0x101
672 695 #define SMB_FIND_FILE_FULL_DIRECTORY_INFO 0x102
673 696 #define SMB_FIND_FILE_NAMES_INFO 0x103
674 697 #define SMB_FIND_FILE_BOTH_DIRECTORY_INFO 0x104
675 698 #define SMB_FIND_FILE_ID_FULL_DIRECTORY_INFO 0x105
676 699 #define SMB_FIND_FILE_ID_BOTH_DIRECTORY_INFO 0x106
677 700 #define SMB_MAC_FIND_BOTH_HFS_INFO MAC_FIND_BOTH_HFS_INFO
678 701
679 702
680 703 /*
681 704 * Flags for TRANS2_FIND_FIRST2 and TRANS2_FIND_NEXT2 (NTDDK).
682 705 *
683 706 * If SMB_FIND_RETURN_RESUME_KEYS was set in the request parameters,
684 707 * each entry is preceded by a four-byte resume key.
685 708 */
686 709 #define SMB_FIND_CLOSE_AFTER_REQUEST 0x01
687 710 #define SMB_FIND_CLOSE_AT_EOS 0x02
688 711 #define SMB_FIND_RETURN_RESUME_KEYS 0x04
689 712 #define SMB_FIND_CONTINUE_FROM_LAST 0x08
690 713 #define SMB_FIND_WITH_BACKUP_INTENT 0x10
691 714
692 715
693 716 /*
694 717 * TRANS2_QUERY_FS_INFORMATION
695 718 *
696 719 * SMB_QUERY_FS_QUOTA_INFO, SMB_QUERY_FS_CONTROL_INFO are not used in Windows
697 720 * NT, and are not used in any post NT Windows operating systems. If a server
698 721 * receives these information levels from a client, it should handle them as
699 722 * invalid information levels.
700 723 */
701 724 #define SMB_INFO_ALLOCATION 1
702 725 #define SMB_INFO_VOLUME 2
703 726 #define SMB_QUERY_FS_LABEL_INFO 0x101
704 727 #define SMB_QUERY_FS_VOLUME_INFO 0x102
705 728 #define SMB_QUERY_FS_SIZE_INFO 0x103
706 729 #define SMB_QUERY_FS_DEVICE_INFO 0x104
707 730 #define SMB_QUERY_FS_ATTRIBUTE_INFO 0x105
708 731 #define SMB_QUERY_FS_QUOTA_INFO 0x106
709 732 #define SMB_QUERY_FS_CONTROL_INFO 0x107
710 733
711 734 #define SMB_MAC_QUERY_FS_INFO MAC_QUERY_FS_INFO
712 735
713 736 /*
714 737 * Internal use only.
715 738 * Define information levels to represent the following requests:
716 739 * smb_query_information
717 740 * smb_query_information2
718 741 * smb_set_information
719 742 * smb_set_information2
720 743 */
721 744 #define SMB_QUERY_INFORMATION 0x3001
722 745 #define SMB_QUERY_INFORMATION2 0x3002
723 746 #define SMB_SET_INFORMATION 0x3001
724 747 #define SMB_SET_INFORMATION2 0x3002
725 748
726 749 /* TRANS2_QUERY_{PATH,FILE}_INFORMATION */
727 750 #define SMB_INFO_STANDARD 1 /* query, set */
728 751 #define SMB_INFO_QUERY_EA_SIZE 2 /* query */
729 752 #define SMB_INFO_SET_EAS 2 /* set */
730 753 #define SMB_INFO_QUERY_EAS_FROM_LIST 3 /* query */
731 754 #define SMB_INFO_QUERY_ALL_EAS 4 /* query */
732 755 #define SMB_INFO_QUERY_FULL_NAME 5 /* unused */
733 756 #define SMB_INFO_IS_NAME_VALID 6 /* query */
734 757
735 758 #define SMB_QUERY_FILE_BASIC_INFO 0x101
736 759 #define SMB_QUERY_FILE_STANDARD_INFO 0x102
737 760 #define SMB_QUERY_FILE_EA_INFO 0x103
738 761 #define SMB_QUERY_FILE_NAME_INFO 0x104
739 762 #define SMB_QUERY_FILE_ALLOCATION_INFO 0x105 /* unused */
740 763 #define SMB_QUERY_FILE_END_OF_FILE_INFO 0x106 /* unused */
741 764 #define SMB_QUERY_FILE_ALL_INFO 0x107
742 765 #define SMB_QUERY_FILE_ALT_NAME_INFO 0x108
743 766 #define SMB_QUERY_FILE_STREAM_INFO 0x109
744 767 #define SMB_QUERY_FILE_COMPRESSION_INFO 0x10B
745 768
746 769 #define SMB_MAC_SET_FINDER_INFO MAC_SET_FINDER_INFO
747 770 #define SMB_MAC_DT_ADD_APPL MAC_DT_ADD_APPL
748 771 #define SMB_MAC_DT_REMOVE_APPL MAC_DT_REMOVE_APPL
749 772 #define SMB_MAC_DT_GET_APPL MAC_DT_GET_APPL
750 773 #define SMB_MAC_DT_GET_ICON MAC_DT_GET_ICON
751 774 #define SMB_MAC_DT_GET_ICON_INFO MAC_DT_GET_ICON_INFO
752 775 #define SMB_MAC_DT_ADD_ICON MAC_DT_ADD_ICON
753 776
754 777 #define SMB_SET_FILE_BASIC_INFO 0x101
755 778 #define SMB_SET_FILE_DISPOSITION_INFO 0x102
756 779 #define SMB_SET_FILE_ALLOCATION_INFO 0x103
757 780 #define SMB_SET_FILE_END_OF_FILE_INFO 0x104
758 781
759 782
760 783 /* NT passthrough levels - see ntifs.h FILE_INFORMATION_CLASS */
761 784 #define SMB_FILE_BASIC_INFORMATION 1004
762 785 #define SMB_FILE_STANDARD_INFORMATION 1005
763 786 #define SMB_FILE_INTERNAL_INFORMATION 1006
764 787 #define SMB_FILE_EA_INFORMATION 1007
765 788 #define SMB_FILE_ACCESS_INFORMATION 1008
766 789 #define SMB_FILE_NAME_INFORMATION 1009
767 790 #define SMB_FILE_RENAME_INFORMATION 1010
768 791 #define SMB_FILE_LINK_INFORMATION 1011
769 792 #define SMB_FILE_DISPOSITION_INFORMATION 1013
770 793 #define SMB_FILE_ALL_INFORMATION 1018
771 794 #define SMB_FILE_ALLOCATION_INFORMATION 1019
772 795 #define SMB_FILE_END_OF_FILE_INFORMATION 1020
773 796 #define SMB_FILE_ALT_NAME_INFORMATION 1021
774 797 #define SMB_FILE_STREAM_INFORMATION 1022
775 798 #define SMB_FILE_COMPRESSION_INFORMATION 1028
776 799 #define SMB_FILE_NETWORK_OPEN_INFORMATION 1034
777 800 #define SMB_FILE_ATTR_TAG_INFORMATION 1035
778 801
779 802 /* NT passthrough levels - see ntifs.h FILE_FS_INFORMATION_CLASS */
780 803 #define SMB_FILE_FS_VOLUME_INFORMATION 1001
781 804 #define SMB_FILE_FS_LABEL_INFORMATION 1002
782 805 #define SMB_FILE_FS_SIZE_INFORMATION 1003
783 806 #define SMB_FILE_FS_DEVICE_INFORMATION 1004
784 807 #define SMB_FILE_FS_ATTRIBUTE_INFORMATION 1005
785 808 #define SMB_FILE_FS_CONTROL_INFORMATION 1006
786 809 #define SMB_FILE_FS_FULLSIZE_INFORMATION 1007
787 810 #define SMB_FILE_FS_OBJECTID_INFORMATION 1008
788 811 #define SMB_FILE_FS_DRIVERPATH_INFORMATION 1009
789 812
790 813 /*
791 814 * The following bits may be set in the SecurityMode field of the
792 815 * SMB_COM_NEGOTIATE response.
793 816 *
794 817 * Note: Same as the NTDDK definitions.
795 818 */
796 819 #define NEGOTIATE_USER_SECURITY 0x01
797 820 #define NEGOTIATE_ENCRYPT_PASSWORDS 0x02
798 821 #define NEGOTIATE_SECURITY_SIGNATURES_ENABLED 0x04
799 822 #define NEGOTIATE_SECURITY_SIGNATURES_REQUIRED 0x08
800 823
801 824
802 825 /*
803 826 * Negotiated Capabilities (CIFS/1.0 section 4.1.1)
804 827 *
805 828 * Capabilities allow the server to tell the client what it supports.
806 829 * Undefined bits MUST be set to zero by servers, and MUST be ignored
807 830 * by clients. The bit definitions are:
808 831 *
809 832 * Capability Name Encoding Meaning
810 833 * ==================== ======== ==================================
811 834 * CAP_RAW_MODE 0x0001 The server supports SMB_COM_READ_RAW and
812 835 * SMB_COM_WRITE_RAW (obsolescent)
813 836 * CAP_MPX_MODE 0x0002 The server supports SMB_COM_READ_MPX and
814 837 * SMB_COM_WRITE_MPX (obsolescent)
815 838 * CAP_UNICODE 0x0004 The server supports Unicode strings
816 839 * CAP_LARGE_FILES 0x0008 The server supports large files with 64
817 840 * bit offsets
818 841 * CAP_NT_SMBS 0x0010 The server supports the SMBs particular
819 842 * to the NT LM 0.12 dialect.
820 843 * Implies CAP_NT_FIND.
821 844 * CAP_RPC_REMOTE_APIS 0x0020 The server supports remote admin API
822 845 * requests via DCE RPC
823 846 * CAP_STATUS32 0x0040 The server can respond with 32 bit
824 847 * status codes in Status.Status
825 848 * CAP_LEVEL_II_OPLOCKS 0x0080 The server supports level 2 oplocks
826 849 * CAP_LOCK_AND_READ 0x0100 The server supports the
827 850 * SMB_COM_LOCK_AND_READ SMB
828 851 * CAP_NT_FIND 0x0200
829 852 * CAP_BULK_TRANSFER 0x0400
830 853 * CAP_COMPRESSED_BULK 0x0800
831 854 * CAP_DFS 0x1000 The server is DFS aware
832 855 * CAP_INFOLEVEL_PASSTHRU 0x2000 The server supports passthru information
833 856 * level processing capability.
834 857 * CAP_LARGE_READX 0x4000 The server supports large
835 858 * SMB_COM_READ_ANDX
836 859 * CAP_LARGE_WRITEX 0x8000 The server supports large
837 860 * SMB_COM_WRITE_ANDX
838 861 * CAP_RESERVED 0x02000000 Reserved for future use.
839 862 * CAP_EXTENDED_SECURITY 0x80000000 The server supports extended security
840 863 * exchanges.
841 864 *
842 865 * Extended security exchanges provides a means of supporting arbitrary
843 866 * authentication protocols within CIFS. Security blobs are opaque to the
844 867 * CIFS protocol; they are messages in some authentication protocol that
845 868 * has been agreed upon by client and server by some out of band mechanism,
846 869 * for which CIFS merely functions as a transport. When
847 870 * CAP_EXTENDED_SECURITY is negotiated, the server includes a first
848 871 * security blob in its response; subsequent security blobs are exchanged
849 872 * in SMB_COM_SESSION_SETUP_ANDX requests and responses until the
850 873 * authentication protocol terminates.
851 874 */
852 875 #define CAP_RAW_MODE 0x0001
853 876 #define CAP_MPX_MODE 0x0002
854 877 #define CAP_UNICODE 0x0004
855 878 #define CAP_LARGE_FILES 0x0008
856 879 #define CAP_NT_SMBS 0x0010
857 880 #define CAP_RPC_REMOTE_APIS 0x0020
858 881 #define CAP_STATUS32 0x0040
859 882 #define CAP_LEVEL_II_OPLOCKS 0x0080
860 883 #define CAP_LOCK_AND_READ 0x0100
861 884 #define CAP_NT_FIND 0x0200
862 885 #define CAP_BULK_TRANSFER 0x0400
863 886 #define CAP_COMPRESSED_BULK 0x0800
864 887 #define CAP_DFS 0x1000
865 888 #define CAP_INFOLEVEL_PASSTHRU 0x2000
866 889 #define CAP_LARGE_READX 0x4000
867 890 #define CAP_LARGE_WRITEX 0x8000
868 891 #define CAP_RESERVED 0x02000000
869 892 #define CAP_EXTENDED_SECURITY 0x80000000
870 893
871 894
872 895 /*
873 896 * Different device types according to NT
874 897 */
875 898 #define FILE_DEVICE_BEEP 0x00000001
876 899 #define FILE_DEVICE_CD_ROM 0x00000002
877 900 #define FILE_DEVICE_CD_ROM_FILE_SYSTEM 0x00000003
878 901 #define FILE_DEVICE_CONTROLLER 0x00000004
879 902 #define FILE_DEVICE_DATALINK 0x00000005
880 903 #define FILE_DEVICE_DFS 0x00000006
881 904 #define FILE_DEVICE_DISK 0x00000007
882 905 #define FILE_DEVICE_DISK_FILE_SYSTEM 0x00000008
883 906 #define FILE_DEVICE_FILE_SYSTEM 0x00000009
884 907 #define FILE_DEVICE_INPORT_PORT 0x0000000a
885 908 #define FILE_DEVICE_KEYBOARD 0x0000000b
886 909 #define FILE_DEVICE_MAILSLOT 0x0000000c
887 910 #define FILE_DEVICE_MIDI_IN 0x0000000d
888 911 #define FILE_DEVICE_MIDI_OUT 0x0000000e
889 912 #define FILE_DEVICE_MOUSE 0x0000000f
890 913 #define FILE_DEVICE_MULTI_UNC_PROVIDER 0x00000010
891 914 #define FILE_DEVICE_NAMED_PIPE 0x00000011
892 915 #define FILE_DEVICE_NETWORK 0x00000012
893 916 #define FILE_DEVICE_NETWORK_BROWSER 0x00000013
894 917 #define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014
895 918 #define FILE_DEVICE_NULL 0x00000015
896 919 #define FILE_DEVICE_PARALLEL_PORT 0x00000016
897 920 #define FILE_DEVICE_PHYSICAL_NETCARD 0x00000017
898 921 #define FILE_DEVICE_PRINTER 0x00000018
899 922 #define FILE_DEVICE_SCANNER 0x00000019
900 923 #define FILE_DEVICE_SERIAL_MOUSE_PORT 0x0000001a
901 924 #define FILE_DEVICE_SERIAL_PORT 0x0000001b
902 925 #define FILE_DEVICE_SCREEN 0x0000001c
903 926 #define FILE_DEVICE_SOUND 0x0000001d
904 927 #define FILE_DEVICE_STREAMS 0x0000001e
905 928 #define FILE_DEVICE_TAPE 0x0000001f
906 929 #define FILE_DEVICE_TAPE_FILE_SYSTEM 0x00000020
907 930 #define FILE_DEVICE_TRANSPORT 0x00000021
908 931 #define FILE_DEVICE_UNKNOWN 0x00000022
909 932 #define FILE_DEVICE_VIDEO 0x00000023
910 933 #define FILE_DEVICE_VIRTUAL_DISK 0x00000024
911 934 #define FILE_DEVICE_WAVE_IN 0x00000025
912 935 #define FILE_DEVICE_WAVE_OUT 0x00000026
913 936 #define FILE_DEVICE_8042_PORT 0x00000027
914 937 #define FILE_DEVICE_NETWORK_REDIRECTOR 0x00000028
915 938 #define FILE_DEVICE_BATTERY 0x00000029
916 939 #define FILE_DEVICE_BUS_EXTENDER 0x0000002a
917 940 #define FILE_DEVICE_MODEM 0x0000002b
918 941 #define FILE_DEVICE_VDM 0x0000002c
919 942
920 943 /*
921 944 * Some of these device types are not currently accessible over the network
922 945 * and may never be accessible over the network. Some may change to be
923 946 *
924 947 * accessible over the network. The values for device types that may never
925 948 * be accessible over the network may be redefined to be just reserved at
926 949 * some date in the future.
927 950 *
928 951 * Characteristics is the sum of any of the following:
929 952 */
930 953
931 954 #define FILE_REMOVABLE_MEDIA 0x00000001
932 955 #define FILE_READ_ONLY_DEVICE 0x00000002
933 956 #define FILE_FLOPPY_DISKETTE 0x00000004
934 957 #define FILE_WRITE_ONE_MEDIA 0x00000008
935 958 #define FILE_REMOTE_DEVICE 0x00000010
936 959 #define FILE_DEVICE_IS_MOUNTED 0x00000020
937 960 #define FILE_VIRTUAL_VOLUME 0x00000040
938 961
939 962 /*
940 963 * File System Control Flags for smb_com_trans2_query|set_fs_information
941 964 * level SMB_FILE_FS_CONTROL_INFORMATION
942 965 */
943 966 #define FILE_VC_QUOTA_TRACK 0x00000001
944 967 #define FILE_VC_QUOTA_ENFORCE 0x00000002
945 968 #define FILE_VC_CONTENT_INDEX_DISABLED 0x00000008
946 969 #define FILE_VC_LOG_QUOTA_THRESHOLD 0x00000010
947 970 #define FILE_VC_LOG_QUOTA_LIMIT 0x00000020
948 971 #define FILE_VC_LOG_VOLUME_THRESHOLD 0x00000040
949 972 #define FILE_VC_LOG_VOLUME_LIMIT 0x00000080
950 973 #define FILE_VC_QUOTAS_INCOMPLETE 0x00000100
951 974 #define FILE_VC_QUOTAS_REBUILDING 0x00000200
952 975
953 976 /*
954 977 * CREATE_ANDX ShareAccess Flags
955 978 */
956 979
957 980 #define FILE_SHARE_NONE 0x00000000
958 981 #define FILE_SHARE_READ 0x00000001
959 982 #define FILE_SHARE_WRITE 0x00000002
960 983 #define FILE_SHARE_DELETE 0x00000004
961 984 #define FILE_SHARE_ALL 0x00000007
962 985 #define FILE_SHARE_VALID_FLAGS 0x00000007
963 986
964 987
965 988 /*
966 989 * CREATE_ANDX CreateDisposition flags
967 990 *
968 991 * FILE_SUPERSEDE If the file already exists it should be superseded
969 992 * by the specified file. If the file does not already
970 993 * exist then it should be created.
971 994 *
972 995 * FILE_CREATE If the file already exists the operation should fail.
973 996 * If the file does not already exist then it should be
974 997 * created. (aka CREATE_NEW)
975 998 *
976 999 * FILE_OPEN If the file already exists then it should be opened.
977 1000 * If the file does not already exist then the operation
978 1001 * should fail. (aka OPEN_EXISTING)
979 1002 *
980 1003 * FILE_OPEN_IF If the file already exists then it should be opened.
981 1004 * If the file does not already exist then it should be
982 1005 * created. (aka OPEN_ALWAYS)
983 1006 *
984 1007 * FILE_OVERWRITE If the file already exists, it should be opened and
985 1008 * overwritten. If the file does not already exist then
986 1009 * the operation should fail. (aka TRUNCATE_EXISTING)
987 1010 *
988 1011 * FILE_OVERWRITE_IF If the file already exists, it should be opened and
989 1012 * overwritten. If the file does not already exist then
990 1013 * it should be created. (aka CREATE_ALWAYS)
991 1014 */
992 1015 #define FILE_SUPERSEDE 0x00000000
993 1016 #define FILE_OPEN 0x00000001
994 1017 #define FILE_CREATE 0x00000002
995 1018 #define FILE_OPEN_IF 0x00000003
996 1019 #define FILE_OVERWRITE 0x00000004
997 1020 #define FILE_OVERWRITE_IF 0x00000005
998 1021 #define FILE_MAXIMUM_DISPOSITION 0x00000005
999 1022
1000 1023 /*
1001 1024 * CREATE_ANDX Impersonation levels
1002 1025 */
1003 1026
1004 1027 #define SECURITY_ANONYMOUS 0x00000001
1005 1028 #define SECURITY_IDENTIFICATION 0x00000002
1006 1029 #define SECURITY_IMPERSONATION 0x00000003
1007 1030 #define SECURITY_DELEGATION 0x00000004
1008 1031
1009 1032 /*
1010 1033 * CREATE_ANDX SecurityFlags
1011 1034 */
1012 1035
1013 1036 #define SECURITY_CONTEXT_TRACKING 0x00000001
1014 1037 #define SECURITY_EFFECTIVE_ONLY 0x00000002
1015 1038
1016 1039 /*
1017 1040 * Server types
1018 1041 */
1019 1042 #define SV_WORKSTATION 0x00000001 /* All workstations */
1020 1043 #define SV_SERVER 0x00000002 /* All servers */
1021 1044 #define SV_SQLSERVER 0x00000004 /* running with SQL server */
1022 1045 #define SV_DOMAIN_CTRL 0x00000008 /* Primary domain controller */
1023 1046 #define SV_DOMAIN_BAKCTRL 0x00000010 /* Backup domain controller */
1024 1047 #define SV_TIME_SOURCE 0x00000020 /* running timesource service */
1025 1048 #define SV_AFP 0x00000040 /* Apple File Protocol */
1026 1049 #define SV_NOVELL 0x00000080 /* Novell servers */
1027 1050 #define SV_DOMAIN_MEMBER 0x00000100 /* Domain Member */
1028 1051 #define SV_PRINTQ_SERVER 0x00000200 /* Server sharing print queue */
1029 1052 #define SV_DIALIN_SERVER 0x00000400 /* Server running dialin */
1030 1053 #define SV_XENIX_SERVER 0x00000800 /* Xenix server */
1031 1054 #define SV_NT 0x00001000 /* NT server */
1032 1055 #define SV_WFW 0x00002000 /* Server running Windows for */
1033 1056 #define SV_SERVER_NT 0x00008000 /* Windows NT non DC server */
1034 1057 #define SV_POTENTIAL_BROWSER 0x00010000 /* can run browser service */
1035 1058 #define SV_BACKUP_BROWSER 0x00020000 /* Backup browser server */
1036 1059 #define SV_MASTER_BROWSER 0x00040000 /* Master browser server */
1037 1060 #define SV_DOMAIN_MASTER 0x00080000 /* Domain Master Browser */
1038 1061 #define SV_OSF 0x00100000 /* OSF operating system */
1039 1062 #define SV_VMS 0x00200000 /* VMS operating system */
1040 1063 #define SV_WINDOWS_95_PLUS 0x00400000 /* Windows 95 or better */
1041 1064
1042 1065 #define SV_LOCAL_LIST_ONLY 0x40000000 /* Enumerate only "local" */
1043 1066 #define SV_TYPE_DOMAIN_ENUM 0x80000000 /* Enumerate Domains */
1044 1067
1045 1068 #define MY_SERVER_TYPE (SV_SERVER | SV_NT | SV_SERVER_NT)
1046 1069
1047 1070
1048 1071 #define PRQ_ACTIVE 0 /* Active */
1049 1072 #define PRQ_PAUSE 1 /* Paused */
1050 1073 #define PRQ_ERROR 2 /* Error Occurred */
1051 1074 #define PRQ_PENDING 3 /* Deletion pending */
1052 1075
1053 1076 #define PRJ_QS_QUEUED 0 /* Active */
1054 1077 #define PRJ_QS_PAUSED 1 /* Paused */
1055 1078 #define PRJ_QS_SPOOLING 2 /* Paused */
1056 1079 #define PRJ_QS_PRINTING 3 /* Paused */
1057 1080
1058 1081
1059 1082 #define SHARE_ACCESS_READ 0x01 /* read & execute from resource */
1060 1083 #define SHARE_ACCESS_WRITE 0x02 /* write data to resource */
1061 1084 #define SHARE_ACCESS_CREATE 0x04 /* create an instance of */
1062 1085 #define SHARE_ACCESS_EXEC 0x08 /* execute from resource */
1063 1086 #define SHARE_ACCESS_DELETE 0x10 /* Permission to delete the resource */
1064 1087 #define SHARE_ACCESS_ATTRIB 0x20 /* Permission to modify the resource */
1065 1088 #define SHARE_ACCESS_PERM 0x40 /* Permission to change permissions */
1066 1089 #define SHARE_ACCESS_ALL 0x7F /* All of the above permissions */
1067 1090
1068 1091
1069 1092 /*
1070 1093 * SMB_COM_NT_TRANSACTION sub-command codes (CIFS/1.0 section 5.3)
1071 1094 *
1072 1095 * SubCommand Code Value Description
1073 1096 * =============================== ===== =================================
1074 1097 * NT_TRANSACT_CREATE 1 File open/create
1075 1098 * NT_TRANSACT_IOCTL 2 Device IOCTL
1076 1099 * NT_TRANSACT_SET_SECURITY_DESC 3 Set security descriptor
1077 1100 * NT_TRANSACT_NOTIFY_CHANGE 4 Start directory watch
1078 1101 * NT_TRANSACT_RENAME 5 Reserved (handle-based rename)
1079 1102 * NT_TRANSACT_QUERY_SECURITY_DESC 6 Retrieve security descriptor
1080 1103 * NT_TRANSACT_QUERY_QUOTA 7 Retrieve quota information
1081 1104 * NT_TRANSACT_SET_QUOTA 8 Set quota information
1082 1105 */
1083 1106 #define NT_TRANSACT_MIN_FUNCTION 1
1084 1107
1085 1108 #define NT_TRANSACT_CREATE 1
1086 1109 #define NT_TRANSACT_IOCTL 2
1087 1110 #define NT_TRANSACT_SET_SECURITY_DESC 3
1088 1111 #define NT_TRANSACT_NOTIFY_CHANGE 4
1089 1112 #define NT_TRANSACT_RENAME 5
1090 1113 #define NT_TRANSACT_QUERY_SECURITY_DESC 6
1091 1114 #define NT_TRANSACT_QUERY_QUOTA 7
1092 1115 #define NT_TRANSACT_SET_QUOTA 8
1093 1116
1094 1117 #define NT_TRANSACT_MAX_FUNCTION 8
1095 1118
1096 1119
1097 1120 /*
1098 1121 * Pipe states
1099 1122 */
1100 1123 #define SMB_PIPE_READMODE_BYTE 0x0000
1101 1124 #define SMB_PIPE_READMODE_MESSAGE 0x0100
1102 1125 #define SMB_PIPE_TYPE_BYTE 0x0000
1103 1126 #define SMB_PIPE_TYPE_MESSAGE 0x0400
1104 1127 #define SMB_PIPE_END_CLIENT 0x0000
1105 1128 #define SMB_PIPE_END_SERVER 0x4000
1106 1129 #define SMB_PIPE_WAIT 0x0000
1107 1130 #define SMB_PIPE_NOWAIT 0x8000
1108 1131 #define SMB_PIPE_UNLIMITED_INSTANCES 0x00FF
1109 1132
1110 1133 /*
1111 1134 * smb_com_seek request
1112 1135 */
1113 1136 #define SMB_SEEK_SET 0 /* set file offset to specified offset */
1114 1137 #define SMB_SEEK_CUR 1 /* set file offset to current plus specified offset */
1115 1138 #define SMB_SEEK_END 2 /* set file offset to EOF plus specified offset */
1116 1139
1117 1140 /*
1118 1141 * API Numbers for Transact based RAP (Remote Administration Protocol) calls
1119 1142 */
1120 1143 #define API_WshareEnum 0
1121 1144 #define API_WshareGetInfo 1
1122 1145 #define API_WshareSetInfo 2
1123 1146 #define API_WshareAdd 3
1124 1147 #define API_WshareDel 4
1125 1148 #define API_NetShareCheck 5
1126 1149 #define API_WsessionEnum 6
1127 1150 #define API_WsessionGetInfo 7
1128 1151 #define API_WsessionDel 8
1129 1152 #define API_WconnectionEnum 9
1130 1153 #define API_WfileEnum 10
1131 1154 #define API_WfileGetInfo 11
1132 1155 #define API_WfileClose 12
1133 1156 #define API_WserverGetInfo 13
1134 1157 #define API_WserverSetInfo 14
1135 1158 #define API_WserverDiskEnum 15
1136 1159 #define API_WserverAdminCommand 16
1137 1160 #define API_NetAuditOpen 17
1138 1161 #define API_WauditClear 18
1139 1162 #define API_NetErrorLogOpen 19
1140 1163 #define API_WerrorLogClear 20
1141 1164 #define API_NetCharDevEnum 21
1142 1165 #define API_NetCharDevGetInfo 22
1143 1166 #define API_WCharDevControl 23
1144 1167 #define API_NetCharDevQEnum 24
1145 1168 #define API_NetCharDevQGetInfo 25
1146 1169 #define API_WCharDevQSetInfo 26
1147 1170 #define API_WCharDevQPurge 27
1148 1171 #define API_WCharDevQPurgeSelf 28
1149 1172 #define API_WMessageNameEnum 29
1150 1173 #define API_WMessageNameGetInfo 30
1151 1174 #define API_WMessageNameAdd 31
1152 1175 #define API_WMessageNameDel 32
1153 1176 #define API_WMessageNameFwd 33
1154 1177 #define API_WMessageNameUnFwd 34
1155 1178 #define API_WMessageBufferSend 35
1156 1179 #define API_WMessageFileSend 36
1157 1180 #define API_WMessageLogFileSet 37
1158 1181 #define API_WMessageLogFileGet 38
1159 1182 #define API_WServiceEnum 39
1160 1183 #define API_WServiceInstall 40
1161 1184 #define API_WServiceControl 41
1162 1185 #define API_WAccessEnum 42
1163 1186 #define API_WAccessGetInfo 43
1164 1187 #define API_WAccessSetInfo 44
1165 1188 #define API_WAccessAdd 45
1166 1189 #define API_WAccessDel 46
1167 1190 #define API_WGroupEnum 47
1168 1191 #define API_WGroupAdd 48
1169 1192 #define API_WGroupDel 49
1170 1193 #define API_WGroupAddUser 50
1171 1194 #define API_WGroupDelUser 51
1172 1195 #define API_WGroupGetUsers 52
1173 1196 #define API_WUserEnum 53
1174 1197 #define API_WUserAdd 54
1175 1198 #define API_WUserDel 55
1176 1199 #define API_WUserGetInfo 56
1177 1200 #define API_WUserSetInfo 57
1178 1201 #define API_WUserPasswordSet 58
1179 1202 #define API_WUserGetGroups 59
1180 1203 #define API_DeadTableEntry 60
1181 1204 #define API_WWkstaSetUID 62
1182 1205 #define API_WWkstaGetInfo 63
1183 1206 #define API_WWkstaSetInfo 64
1184 1207 #define API_WUseEnum 65
1185 1208 #define API_WUseAdd 66
1186 1209 #define API_WUseDel 67
1187 1210 #define API_WUseGetInfo 68
1188 1211 #define API_WPrintQEnum 69
1189 1212 #define API_WPrintQGetInfo 70
1190 1213 #define API_WPrintQSetInfo 71
1191 1214 #define API_WPrintQAdd 72
1192 1215 #define API_WPrintQDel 73
1193 1216 #define API_WPrintQPause 74
1194 1217 #define API_WPrintQContinue 75
1195 1218 #define API_WPrintJobEnum 76
1196 1219 #define API_WPrintJobGetInfo 77
1197 1220 #define API_WPrintJobSetInfo_OLD 78
1198 1221 #define API_WPrintJobDel 81
1199 1222 #define API_WPrintJobPause 82
1200 1223 #define API_WPrintJobContinue 83
1201 1224 #define API_WPrintDestEnum 84
1202 1225 #define API_WPrintDestGetInfo 85
1203 1226 #define API_WPrintDestControl 86
1204 1227 #define API_WProfileSave 87
1205 1228 #define API_WProfileLoad 88
1206 1229 #define API_WStatisticsGet 89
1207 1230 #define API_WStatisticsClear 90
1208 1231 #define API_NetRemoteTOD 91
1209 1232 #define API_WNetBiosEnum 92
1210 1233 #define API_WNetBiosGetInfo 93
1211 1234 #define API_NetServerEnum 94
1212 1235 #define API_I_NetServerEnum 95
1213 1236 #define API_WServiceGetInfo 96
1214 1237 #define API_WPrintQPurge 103
1215 1238 #define API_NetServerEnum2 104
1216 1239 #define API_WAccessGetUserPerms 105
1217 1240 #define API_WGroupGetInfo 106
1218 1241 #define API_WGroupSetInfo 107
1219 1242 #define API_WGroupSetUsers 108
1220 1243 #define API_WUserSetGroups 109
1221 1244 #define API_WUserModalsGet 110
1222 1245 #define API_WUserModalsSet 111
1223 1246 #define API_WFileEnum2 112
1224 1247 #define API_WUserAdd2 113
1225 1248 #define API_WUserSetInfo2 114
1226 1249 #define API_WUserPasswordSet2 115
1227 1250 #define API_I_NetServerEnum2 116
1228 1251 #define API_WConfigGet2 117
1229 1252 #define API_WConfigGetAll2 118
1230 1253 #define API_WGetDCName 119
1231 1254 #define API_NetHandleGetInfo 120
1232 1255 #define API_NetHandleSetInfo 121
1233 1256 #define API_WStatisticsGet2 122
1234 1257 #define API_WBuildGetInfo 123
1235 1258 #define API_WFileGetInfo2 124
1236 1259 #define API_WFileClose2 125
1237 1260 #define API_WNetServerReqChallenge 126
1238 1261 #define API_WNetServerAuthenticate 127
1239 1262 #define API_WNetServerPasswordSet 128
1240 1263 #define API_WNetAccountDeltas 129
1241 1264 #define API_WNetAccountSync 130
1242 1265 #define API_WUserEnum2 131
1243 1266 #define API_WWkstaUserLogon 132
1244 1267 #define API_WWkstaUserLogoff 133
1245 1268 #define API_WLogonEnum 134
1246 1269 #define API_WErrorLogRead 135
1247 1270 #define API_WI_NetPathType 136
1248 1271 #define API_WI_NetPathCanonicalize 137
1249 1272 #define API_WI_NetPathCompare 138
1250 1273 #define API_WI_NetNameValidate 139
1251 1274 #define API_WI_NetNameCanonicalize 140
1252 1275 #define API_WI_NetNameCompare 141
1253 1276 #define API_WAuditRead 142
1254 1277 #define API_WPrintDestAdd 143
1255 1278 #define API_WPrintDestSetInfo 144
1256 1279 #define API_WPrintDestDel 145
1257 1280 #define API_WUserValidate2 146
1258 1281 #define API_WPrintJobSetInfo 147
1259 1282 #define API_TI_NetServerDiskEnum 148
1260 1283 #define API_TI_NetServerDiskGetInfo 149
1261 1284 #define API_TI_FTVerifyMirror 150
1262 1285 #define API_TI_FTAbortVerify 151
1263 1286 #define API_TI_FTGetInfo 152
1264 1287 #define API_TI_FTSetInfo 153
1265 1288 #define API_TI_FTLockDisk 154
1266 1289 #define API_TI_FTFixError 155
1267 1290 #define API_TI_FTAbortFix 156
1268 1291 #define API_TI_FTDiagnoseError 157
1269 1292 #define API_TI_FTGetDriveStats 158
1270 1293 #define API_TI_FTErrorGetInfo 160
1271 1294 #define API_NetAccessCheck 163
1272 1295 #define API_NetAlertRaise 164
1273 1296 #define API_NetAlertStart 165
1274 1297 #define API_NetAlertStop 166
1275 1298 #define API_NetAuditWrite 167
1276 1299 #define API_NetIRemoteAPI 168
1277 1300 #define API_NetServiceStatus 169
1278 1301 #define API_I_NetServerRegister 170
1279 1302 #define API_I_NetServerDeregister 171
1280 1303 #define API_I_NetSessionEntryMake 172
1281 1304 #define API_I_NetSessionEntryClear 173
1282 1305 #define API_I_NetSessionEntryGetInfo 174
1283 1306 #define API_I_NetSessionEntrySetInfo 175
1284 1307 #define API_I_NetConnectionEntryMake 176
1285 1308 #define API_I_NetConnectionEntryClear 177
1286 1309 #define API_I_NetConnectionEntrySetInfo 178
1287 1310 #define API_I_NetConnectionEntryGetInfo 179
1288 1311 #define API_I_NetFileEntryMake 180
1289 1312 #define API_I_NetFileEntryClear 181
1290 1313 #define API_I_NetFileEntrySetInfo 182
1291 1314 #define API_I_NetFileEntryGetInfo 183
1292 1315 #define API_AltSrvMessageBufferSend 184
1293 1316 #define API_AltSrvMessageFileSend 185
1294 1317 #define API_wI_NetRplWkstaEnum 186
1295 1318 #define API_wI_NetRplWkstaGetInfo 187
1296 1319 #define API_wI_NetRplWkstaSetInfo 188
1297 1320 #define API_wI_NetRplWkstaAdd 189
1298 1321 #define API_wI_NetRplWkstaDel 190
1299 1322 #define API_wI_NetRplProfileEnum 191
1300 1323 #define API_wI_NetRplProfileGetInfo 192
1301 1324 #define API_wI_NetRplProfileSetInfo 193
1302 1325 #define API_wI_NetRplProfileAdd 194
1303 1326 #define API_wI_NetRplProfileDel 195
1304 1327 #define API_wI_NetRplProfileClone 196
1305 1328 #define API_wI_NetRplBaseProfileEnum 197
1306 1329 #define API_WIServerSetInfo 201
1307 1330 #define API_WPrintDriverEnum 205
1308 1331 #define API_WPrintQProcessorEnum 206
1309 1332 #define API_WPrintPortEnum 207
1310 1333 #define API_WNetWriteUpdateLog 208
1311 1334 #define API_WNetAccountUpdate 209
1312 1335 #define API_WNetAccountConfirmUpdate 210
1313 1336 #define API_WConfigSet 211
1314 1337 #define API_WAccountsReplicate 212
1315 1338 #define API_SamOEMChgPasswordUser2_P 214
1316 1339 #define API_NetServerEnum3 215
1317 1340 #define API_WprintDriverGetInfo 250
1318 1341 #define API_WprintDriverSetInfo 251
1319 1342 #define API_WaliasAdd 252
1320 1343 #define API_WaliasDel 253
1321 1344 #define API_WaliasGetInfo 254
1322 1345 #define API_WaliasSetInfo 255
1323 1346 #define API_WaliasEnum 256
1324 1347 #define API_WuserGetLogonAsn 257
1325 1348 #define API_WuserSetLogonAsn 258
1326 1349 #define API_WuserGetAppSel 259
1327 1350 #define API_WuserSetAppSel 260
1328 1351 #define API_WappAdd 261
1329 1352 #define API_WappDel 262
1330 1353 #define API_WappGetInfo 263
1331 1354 #define API_WappSetInfo 264
1332 1355 #define API_WappEnum 265
1333 1356 #define API_WUserDCDBInit 266
1334 1357 #define API_WDASDAdd 267
1335 1358 #define API_WDASDDel 268
1336 1359 #define API_WDASDGetInfo 269
1337 1360 #define API_WDASDSetInfo 270
1338 1361 #define API_WDASDEnum 271
1339 1362 #define API_WDASDCheck 272
1340 1363 #define API_WDASDCtl 273
1341 1364 #define API_WuserRemoteLogonCheck 274
1342 1365 #define API_WUserPasswordSet3 275
1343 1366 #define API_WCreateRIPLMachine 276
1344 1367 #define API_WDeleteRIPLMachine 277
1345 1368 #define API_WGetRIPLMachineInfo 278
1346 1369 #define API_WSetRIPLMachineInfo 279
1347 1370 #define API_WEnumRIPLMachine 280
1348 1371 #define API_WI_ShareAdd 281
1349 1372 #define API_WI_AliasEnum 282
1350 1373 #define API_WaccessApply 283
1351 1374 #define API_WPrt16Query 284
1352 1375 #define API_WPrt16Set 285
1353 1376 #define API_WUserDel100 286
1354 1377 #define API_WUserRemoteLogonCheck2 287
1355 1378 #define API_WRemoteTODSet 294
1356 1379 #define API_WprintJobMoveAll 295
1357 1380 #define API_W16AppParmAdd 296
1358 1381 #define API_W16AppParmDel 297
1359 1382 #define API_W16AppParmGet 298
1360 1383 #define API_W16AppParmSet 299
1361 1384 #define API_W16RIPLMachineCreate 300
1362 1385 #define API_W16RIPLMachineGetInfo 301
1363 1386 #define API_W16RIPLMachineSetInfo 302
1364 1387 #define API_W16RIPLMachineEnum 303
1365 1388 #define API_W16RIPLMachineListParmEnum 304
1366 1389 #define API_W16RIPLMachClassGetInfo 305
1367 1390 #define API_W16RIPLMachClassEnum 306
1368 1391 #define API_W16RIPLMachClassCreate 307
1369 1392 #define API_W16RIPLMachClassSetInfo 308
1370 1393 #define API_W16RIPLMachClassDelete 309
1371 1394 #define API_W16RIPLMachClassLPEnum 310
1372 1395 #define API_W16RIPLMachineDelete 311
1373 1396 #define API_W16WSLevelGetInfo 312
1374 1397 #define API_WserverNameAdd 313
1375 1398 #define API_WserverNameDel 314
1376 1399 #define API_WserverNameEnum 315
1377 1400 #define API_I_WDASDEnum 316
1378 1401 #define API_I_WDASDEnumTerminate 317
1379 1402 #define API_I_WDASDSetInfo2 318
1380 1403 #define MAX_RAP_API 318
1381 1404
1382 1405 #ifdef __cplusplus
1383 1406 }
1384 1407 #endif
1385 1408
1386 1409 #endif /* _SMBSRV_SMB_H */
|
↓ open down ↓ |
732 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX