Deleted Added
full compact
smb.h (94914) smb.h (103389)
1/*
2 * Copyright (c) 2000-2001 Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
1/*
2 * Copyright (c) 2000-2001 Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/netsmb/smb.h 94914 2002-04-17 03:14:28Z bp $
32 * $FreeBSD: head/sys/netsmb/smb.h 103389 2002-09-16 09:26:07Z bp $
33 */
34
35/*
36 * Common definitions and structures for SMB/CIFS protocol
37 */
38
39#ifndef _NETSMB_SMB_H_
40#define _NETSMB_SMB_H_

--- 52 unchanged lines hidden (view full) ---

93#define SMB_UID_UNKNOWN 0xffff
94#define SMB_TID_UNKNOWN 0xffff
95
96/*
97 * Security mode bits
98 */
99#define SMB_SM_USER 0x01 /* server in the user security mode */
100#define SMB_SM_ENCRYPT 0x02 /* use challenge/response */
33 */
34
35/*
36 * Common definitions and structures for SMB/CIFS protocol
37 */
38
39#ifndef _NETSMB_SMB_H_
40#define _NETSMB_SMB_H_

--- 52 unchanged lines hidden (view full) ---

93#define SMB_UID_UNKNOWN 0xffff
94#define SMB_TID_UNKNOWN 0xffff
95
96/*
97 * Security mode bits
98 */
99#define SMB_SM_USER 0x01 /* server in the user security mode */
100#define SMB_SM_ENCRYPT 0x02 /* use challenge/response */
101#define SMB_SM_SIGS 0x04
102#define SMB_SM_SIGS_REQUIRE 0x08
101
102/*
103 * NTLM capabilities
104 */
103
104/*
105 * NTLM capabilities
106 */
105#define SMB_CAP_RAW_MODE 0x0001
106#define SMB_CAP_MPX_MODE 0x0002
107#define SMB_CAP_UNICODE 0x0004
108#define SMB_CAP_LARGE_FILES 0x0008 /* 64 bit offsets supported */
109#define SMB_CAP_NT_SMBS 0x0010
110#define SMB_CAP_NT_FIND 0x0200
111#define SMB_CAP_EXT_SECURITY 0x80000000
107#define SMB_CAP_RAW_MODE 0x0001
108#define SMB_CAP_MPX_MODE 0x0002
109#define SMB_CAP_UNICODE 0x0004
110#define SMB_CAP_LARGE_FILES 0x0008 /* 64 bit offsets supported */
111#define SMB_CAP_NT_SMBS 0x0010
112#define SMB_CAP_RPC_REMOTE_APIS 0x0020
113#define SMB_CAP_STATUS32 0x0040
114#define SMB_CAP_LEVEL_II_OPLOCKS 0x0080
115#define SMB_CAP_LOCK_AND_READ 0x0100
116#define SMB_CAP_NT_FIND 0x0200
117#define SMB_CAP_DFS 0x1000
118#define SMB_CAP_INFOLEVEL_PASSTHRU 0x2000
119#define SMB_CAP_LARGE_READX 0x4000
120#define SMB_CAP_LARGE_WRITEX 0x8000
121#define SMB_CAP_UNIX 0x00800000
122#define SMB_CAP_BULK_TRANSFER 0x20000000
123#define SMB_CAP_COMPRESSED_DATA 0x40000000
124#define SMB_CAP_EXT_SECURITY 0x80000000
112
113/*
114 * File attributes
115 */
116#define SMB_FA_RDONLY 0x01
117#define SMB_FA_HIDDEN 0x02
118#define SMB_FA_SYSTEM 0x04
119#define SMB_FA_VOLUME 0x08
120#define SMB_FA_DIR 0x10
121#define SMB_FA_ARCHIVE 0x20
122
123/*
124 * Extended file attributes
125 */
126#define SMB_EFA_RDONLY 0x0001
127#define SMB_EFA_HIDDEN 0x0002
128#define SMB_EFA_SYSTEM 0x0004
125
126/*
127 * File attributes
128 */
129#define SMB_FA_RDONLY 0x01
130#define SMB_FA_HIDDEN 0x02
131#define SMB_FA_SYSTEM 0x04
132#define SMB_FA_VOLUME 0x08
133#define SMB_FA_DIR 0x10
134#define SMB_FA_ARCHIVE 0x20
135
136/*
137 * Extended file attributes
138 */
139#define SMB_EFA_RDONLY 0x0001
140#define SMB_EFA_HIDDEN 0x0002
141#define SMB_EFA_SYSTEM 0x0004
142#define SMB_EFA_DIRECTORY 0x0010
129#define SMB_EFA_ARCHIVE 0x0020
130#define SMB_EFA_NORMAL 0x0080
131#define SMB_EFA_TEMPORARY 0x0100
132#define SMB_EFA_COMPRESSED 0x0800
143#define SMB_EFA_ARCHIVE 0x0020
144#define SMB_EFA_NORMAL 0x0080
145#define SMB_EFA_TEMPORARY 0x0100
146#define SMB_EFA_COMPRESSED 0x0800
133#define SMB_EFA_POSIX_SEMANTICS 0x00100000
147#define SMB_EFA_POSIX_SEMANTICS 0x01000000
134#define SMB_EFA_BACKUP_SEMANTICS 0x02000000
135#define SMB_EFA_DELETE_ON_CLOSE 0x04000000
136#define SMB_EFA_SEQUENTIAL_SCAN 0x08000000
137#define SMB_EFA_RANDOM_ACCESS 0x10000000
138#define SMB_EFA_NO_BUFFERING 0x20000000
139#define SMB_EFA_WRITE_THROUGH 0x80000000
140
141/*

--- 106 unchanged lines hidden (view full) ---

248#define SMB_INFO_ALLOCATION 1
249#define SMB_INFO_VOLUME 2
250#define SMB_QUERY_FS_VOLUME_INFO 0x102
251#define SMB_QUERY_FS_SIZE_INFO 0x103
252#define SMB_QUERY_FS_DEVICE_INFO 0x104
253#define SMB_QUERY_FS_ATTRIBUTE_INFO 0x105
254
255/*
148#define SMB_EFA_BACKUP_SEMANTICS 0x02000000
149#define SMB_EFA_DELETE_ON_CLOSE 0x04000000
150#define SMB_EFA_SEQUENTIAL_SCAN 0x08000000
151#define SMB_EFA_RANDOM_ACCESS 0x10000000
152#define SMB_EFA_NO_BUFFERING 0x20000000
153#define SMB_EFA_WRITE_THROUGH 0x80000000
154
155/*

--- 106 unchanged lines hidden (view full) ---

262#define SMB_INFO_ALLOCATION 1
263#define SMB_INFO_VOLUME 2
264#define SMB_QUERY_FS_VOLUME_INFO 0x102
265#define SMB_QUERY_FS_SIZE_INFO 0x103
266#define SMB_QUERY_FS_DEVICE_INFO 0x104
267#define SMB_QUERY_FS_ATTRIBUTE_INFO 0x105
268
269/*
270 * SMB_TRANS2_QUERY_PATH levels
271 */
272#define SMB_QUERY_FILE_STANDARD 1
273#define SMB_QUERY_FILE_EA_SIZE 2
274#define SMB_QUERY_FILE_EAS_FROM_LIST 3
275#define SMB_QUERY_FILE_ALL_EAS 4
276#define SMB_QUERY_FILE_IS_NAME_VALID 6
277#define SMB_QUERY_FILE_BASIC_INFO 0x101
278#define SMB_QUERY_FILE_STANDARD_INFO 0x102
279#define SMB_QUERY_FILE_EA_INFO 0x103
280#define SMB_QUERY_FILE_NAME_INFO 0x104
281#define SMB_QUERY_FILE_ALL_INFO 0x107
282#define SMB_QUERY_FILE_ALT_NAME_INFO 0x108
283#define SMB_QUERY_FILE_STREAM_INFO 0x109
284#define SMB_QUERY_FILE_COMPRESSION_INFO 0x10b
285#define SMB_QUERY_FILE_UNIX_BASIC 0x200
286#define SMB_QUERY_FILE_UNIX_LINK 0x201
287#define SMB_QUERY_FILE_MAC_DT_GET_APPL 0x306
288#define SMB_QUERY_FILE_MAC_DT_GET_ICON 0x307
289#define SMB_QUERY_FILE_MAC_DT_GET_ICON_INFO 0x308
290
291/*
256 * SMB_TRANS2_FIND_FIRST2 information levels
257 */
258#define SMB_INFO_STANDARD 1
259#define SMB_INFO_QUERY_EA_SIZE 2
260#define SMB_INFO_QUERY_EAS_FROM_LIST 3
261#define SMB_FIND_FILE_DIRECTORY_INFO 0x101
262#define SMB_FIND_FULL_DIRECTORY_INFO 0x102
263#define SMB_FIND_FILE_NAMES_INFO 0x103

--- 54 unchanged lines hidden (view full) ---

318#define ERRbadaccess 12 /* Invalid open mode */
319#define ERRbaddata 13 /* Invalid data */
320#define ERRbaddrive 15 /* Invalid drive specified */
321#define ERRremcd 16 /* An attempt to delete current directory */
322#define ERRdiffdevice 17 /* cross fs rename/move */
323#define ERRnofiles 18 /* no more files found in file search */
324#define ERRbadshare 32 /* Share mode can't be granted */
325#define ERRlock 33 /* A lock request conflicts with existing lock */
292 * SMB_TRANS2_FIND_FIRST2 information levels
293 */
294#define SMB_INFO_STANDARD 1
295#define SMB_INFO_QUERY_EA_SIZE 2
296#define SMB_INFO_QUERY_EAS_FROM_LIST 3
297#define SMB_FIND_FILE_DIRECTORY_INFO 0x101
298#define SMB_FIND_FULL_DIRECTORY_INFO 0x102
299#define SMB_FIND_FILE_NAMES_INFO 0x103

--- 54 unchanged lines hidden (view full) ---

354#define ERRbadaccess 12 /* Invalid open mode */
355#define ERRbaddata 13 /* Invalid data */
356#define ERRbaddrive 15 /* Invalid drive specified */
357#define ERRremcd 16 /* An attempt to delete current directory */
358#define ERRdiffdevice 17 /* cross fs rename/move */
359#define ERRnofiles 18 /* no more files found in file search */
360#define ERRbadshare 32 /* Share mode can't be granted */
361#define ERRlock 33 /* A lock request conflicts with existing lock */
362#define ERRunsup 50 /* unsupported - Win 95 */
363#define ERRnoipc 66 /* ipc unsupported */
364#define ERRnosuchshare 67 /* invalid share name */
326#define ERRfilexists 80 /* The file named in the request already exists */
327#define ERRquota 112 /* W2K returns this if quota space exceeds */
365#define ERRfilexists 80 /* The file named in the request already exists */
366#define ERRquota 112 /* W2K returns this if quota space exceeds */
367#define ERRcannotopen 110 /* cannot open the file */
368#define ERRinvalidname 123
369#define ERRunknownlevel 124
370#define ERRnotlocked 158 /* region was not locked by this context */
371#define ERRrename 183
372#define ERRbadpipe 230 /* named pipe invalid */
373#define ERRpipebusy 231 /* all pipe instances are busy */
374#define ERRpipeclosing 232 /* close in progress */
375#define ERRnotconnected 233 /* nobody on other end of pipe */
376#define ERRmoredata 234 /* more data to be returned */
377#define ERRbaddirectory 267 /* invalid directory name */
378#define ERReasunsupported 282 /* extended attributes not supported */
379#define ERRunknownipc 2142
380#define ERRbuftoosmall 2123
381#define ERRnosuchprintjob 2151
328
329/*
330 * Error codes for the ERRSRV class
331 */
332#define ERRerror 1 /* Non-specific error code */
333#define ERRbadpw 2 /* Bad password */
382
383/*
384 * Error codes for the ERRSRV class
385 */
386#define ERRerror 1 /* Non-specific error code */
387#define ERRbadpw 2 /* Bad password */
388#define ERRbadtype 3 /* reserved */
334#define ERRaccess 4 /* The client doesn't have enough access rights */
335#define ERRinvnid 5 /* The Tid specified in a command is invalid */
336#define ERRinvnetname 6 /* Invalid server name in the tree connect */
337#define ERRinvdevice 7 /* Printer and not printer devices are mixed */
338#define ERRqfull 49 /* Print queue full */
339#define ERRqtoobig 50 /* Print queue full - no space */
340#define ERRinvpfid 52 /* Invalid print file FID */
341#define ERRsmbcmd 64 /* The server did not recognize the command */

--- 35 unchanged lines hidden (view full) ---

377#define ERRwrite 29 /* Write fault */
378#define ERRread 30 /* Read fault */
379#define ERRgeneral 31 /* General failure */
380#define ERRbadshare 32 /* A open conflicts with an existing open */
381#define ERRlock 33 /* lock/unlock conflict */
382#define ERRwrongdisk 34 /* The wrong disk was found in a drive */
383#define ERRFCBunavail 35 /* No FCBs available */
384#define ERRsharebufexc 36 /* A sharing buffer has been exceeded */
389#define ERRaccess 4 /* The client doesn't have enough access rights */
390#define ERRinvnid 5 /* The Tid specified in a command is invalid */
391#define ERRinvnetname 6 /* Invalid server name in the tree connect */
392#define ERRinvdevice 7 /* Printer and not printer devices are mixed */
393#define ERRqfull 49 /* Print queue full */
394#define ERRqtoobig 50 /* Print queue full - no space */
395#define ERRinvpfid 52 /* Invalid print file FID */
396#define ERRsmbcmd 64 /* The server did not recognize the command */

--- 35 unchanged lines hidden (view full) ---

432#define ERRwrite 29 /* Write fault */
433#define ERRread 30 /* Read fault */
434#define ERRgeneral 31 /* General failure */
435#define ERRbadshare 32 /* A open conflicts with an existing open */
436#define ERRlock 33 /* lock/unlock conflict */
437#define ERRwrongdisk 34 /* The wrong disk was found in a drive */
438#define ERRFCBunavail 35 /* No FCBs available */
439#define ERRsharebufexc 36 /* A sharing buffer has been exceeded */
440#define ERRdiskfull 39
385
386/*
387 * RAP error codes (it seems that they returned not only by RAP)
388 */
389#define SMB_ERROR_ACCESS_DENIED 5
390#define SMB_ERROR_NETWORK_ACCESS_DENIED 65
391#define SMB_ERROR_MORE_DATA 234
392
393typedef u_int16_t smbfh;
394
395#endif /* _NETSMB_SMB_H_ */
441
442/*
443 * RAP error codes (it seems that they returned not only by RAP)
444 */
445#define SMB_ERROR_ACCESS_DENIED 5
446#define SMB_ERROR_NETWORK_ACCESS_DENIED 65
447#define SMB_ERROR_MORE_DATA 234
448
449typedef u_int16_t smbfh;
450
451#endif /* _NETSMB_SMB_H_ */