Lines Matching +full:0 +full:x103

16 #define CIFS_PROT   0
18 #define BAD_PROT 0xFFFF
21 * Note some commands have minimal (wct=0,bcc=0), or uninteresting, responses
25 #define SMB_COM_CREATE_DIRECTORY 0x00 /* trivial response */
26 #define SMB_COM_DELETE_DIRECTORY 0x01 /* trivial response */
27 #define SMB_COM_CLOSE 0x04 /* triv req/rsp, timestamp ignored */
28 #define SMB_COM_FLUSH 0x05 /* triv req/rsp */
29 #define SMB_COM_DELETE 0x06 /* trivial response */
30 #define SMB_COM_RENAME 0x07 /* trivial response */
31 #define SMB_COM_QUERY_INFORMATION 0x08 /* aka getattr */
32 #define SMB_COM_SETATTR 0x09 /* trivial response */
33 #define SMB_COM_LOCKING_ANDX 0x24 /* trivial response */
34 #define SMB_COM_COPY 0x29 /* trivial rsp, fail filename ignrd*/
35 #define SMB_COM_ECHO 0x2B /* echo request */
36 #define SMB_COM_OPEN_ANDX 0x2D /* Legacy open for old servers */
37 #define SMB_COM_READ_ANDX 0x2E
38 #define SMB_COM_WRITE_ANDX 0x2F
39 #define SMB_COM_TRANSACTION2 0x32
40 #define SMB_COM_TRANSACTION2_SECONDARY 0x33
41 #define SMB_COM_FIND_CLOSE2 0x34 /* trivial response */
42 #define SMB_COM_TREE_DISCONNECT 0x71 /* trivial response */
43 #define SMB_COM_NEGOTIATE 0x72
44 #define SMB_COM_SESSION_SETUP_ANDX 0x73
45 #define SMB_COM_LOGOFF_ANDX 0x74 /* trivial response */
46 #define SMB_COM_TREE_CONNECT_ANDX 0x75
47 #define SMB_COM_NT_TRANSACT 0xA0
48 #define SMB_COM_NT_TRANSACT_SECONDARY 0xA1
49 #define SMB_COM_NT_CREATE_ANDX 0xA2
50 #define SMB_COM_NT_CANCEL 0xA4 /* no response */
51 #define SMB_COM_NT_RENAME 0xA5 /* trivial response */
54 #define TRANS2_OPEN 0x00
55 #define TRANS2_FIND_FIRST 0x01
56 #define TRANS2_FIND_NEXT 0x02
57 #define TRANS2_QUERY_FS_INFORMATION 0x03
58 #define TRANS2_SET_FS_INFORMATION 0x04
59 #define TRANS2_QUERY_PATH_INFORMATION 0x05
60 #define TRANS2_SET_PATH_INFORMATION 0x06
61 #define TRANS2_QUERY_FILE_INFORMATION 0x07
62 #define TRANS2_SET_FILE_INFORMATION 0x08
63 #define TRANS2_GET_DFS_REFERRAL 0x10
64 #define TRANS2_REPORT_DFS_INCOSISTENCY 0x11
67 #define TRANS_SET_NMPIPE_STATE 0x0001
68 #define TRANS_RAW_READ_NMPIPE 0x0011
69 #define TRANS_QUERY_NMPIPE_STATE 0x0021
70 #define TRANS_QUERY_NMPIPE_INFO 0x0022
71 #define TRANS_PEEK_NMPIPE 0x0023
72 #define TRANS_TRANSACT_NMPIPE 0x0026
73 #define TRANS_RAW_WRITE_NMPIPE 0x0031
74 #define TRANS_READ_NMPIPE 0x0036
75 #define TRANS_WRITE_NMPIPE 0x0037
76 #define TRANS_WAIT_NMPIPE 0x0053
77 #define TRANS_CALL_NMPIPE 0x0054
80 #define NT_TRANSACT_CREATE 0x01
81 #define NT_TRANSACT_IOCTL 0x02
82 #define NT_TRANSACT_SET_SECURITY_DESC 0x03
83 #define NT_TRANSACT_NOTIFY_CHANGE 0x04
84 #define NT_TRANSACT_RENAME 0x05
85 #define NT_TRANSACT_QUERY_SECURITY_DESC 0x06
86 #define NT_TRANSACT_GET_USER_QUOTA 0x07
87 #define NT_TRANSACT_SET_USER_QUOTA 0x08
92 #define MAX_CIFS_HDR_SIZE 0x58 /* 4 len + 32 hdr + (2*24 wct) + 2 bct + 2 pad */
139 #define SMBOPEN_WRITE_THROUGH 0x4000
140 #define SMBOPEN_DENY_ALL 0x0010
141 #define SMBOPEN_DENY_WRITE 0x0020
142 #define SMBOPEN_DENY_READ 0x0030
143 #define SMBOPEN_DENY_NONE 0x0040
144 #define SMBOPEN_READ 0x0000
145 #define SMBOPEN_WRITE 0x0001
146 #define SMBOPEN_READWRITE 0x0002
147 #define SMBOPEN_EXECUTE 0x0003
149 #define SMBOPEN_OCREATE 0x0010
150 #define SMBOPEN_OTRUNC 0x0002
151 #define SMBOPEN_OAPPEND 0x0001
156 #define SMBFLG_EXTD_LOCK 0x01 /* server supports lock-read write-unlock smb */
157 #define SMBFLG_RCV_POSTED 0x02 /* obsolete */
158 #define SMBFLG_RSVD 0x04
159 #define SMBFLG_CASELESS 0x08 /* all pathnames treated as caseless (off
161 #define SMBFLG_CANONICAL_PATH_FORMAT 0x10 /* obsolete */
162 #define SMBFLG_OLD_OPLOCK 0x20 /* obsolete */
163 #define SMBFLG_OLD_OPLOCK_NOTIFY 0x40 /* obsolete */
164 #define SMBFLG_RESPONSE 0x80 /* this PDU is a response from server */
174 #define SMBFLG2_SECURITY_SIGNATURE_REQUIRED (0x10)
175 #define SMBFLG2_IS_LONG_NAME cpu_to_le16(0x40)
176 #define SMBFLG2_REPARSE_PATH (0x400)
177 #define SMBFLG2_EXT_SEC cpu_to_le16(0x800)
178 #define SMBFLG2_DFS cpu_to_le16(0x1000)
179 #define SMBFLG2_PAGING_IO cpu_to_le16(0x2000)
180 #define SMBFLG2_ERR_STATUS cpu_to_le16(0x4000)
181 #define SMBFLG2_UNICODE cpu_to_le16(0x8000)
185 * NTCreateAndX as well as the level 0x107
186 * TRANS2_QUERY_PATH_INFORMATION API. The level 0x107, SMB_QUERY_FILE_ALL_INFO
192 #define FILE_READ_DATA 0x00000001 /* Data can be read from the file */
193 #define FILE_WRITE_DATA 0x00000002 /* Data can be written to the file */
194 #define FILE_APPEND_DATA 0x00000004 /* Data can be appended to the file */
195 #define FILE_READ_EA 0x00000008 /* Extended attributes associated */
197 #define FILE_WRITE_EA 0x00000010 /* Extended attributes associated */
199 #define FILE_EXECUTE 0x00000020 /*Data can be read into memory from */
201 #define FILE_DELETE_CHILD 0x00000040
202 #define FILE_READ_ATTRIBUTES 0x00000080 /* Attributes associated with the */
204 #define FILE_WRITE_ATTRIBUTES 0x00000100 /* Attributes associated with the */
206 #define DELETE 0x00010000 /* The file can be deleted */
207 #define READ_CONTROL 0x00020000 /* The access control list and */
210 #define WRITE_DAC 0x00040000 /* The access control list and */
213 #define WRITE_OWNER 0x00080000 /* Ownership information associated */
215 #define SYNCHRONIZE 0x00100000 /* The file handle can waited on to */
218 #define SYSTEM_SECURITY 0x01000000 /* The system access control list */
220 #define GENERIC_ALL 0x10000000
221 #define GENERIC_EXECUTE 0x20000000
222 #define GENERIC_WRITE 0x40000000
223 #define GENERIC_READ 0x80000000
259 #define CIFS_NO_HANDLE 0xFFFF
261 #define NO_CHANGE_64 0xFFFFFFFFFFFFFFFFULL
269 /* Unicode Null terminate 2 bytes of 0 */
271 #define ASCII_NULL 0x00
276 #define CIFS_SV_TYPE_DC 0x00000008
277 #define CIFS_SV_TYPE_BACKDC 0x00000010
282 #define CIFS_ALIAS_TYPE_FILE 0x0001
283 #define CIFS_SHARE_TYPE_FILE 0x0000
288 #define ATTR_READONLY 0x0001
289 #define ATTR_HIDDEN 0x0002
290 #define ATTR_SYSTEM 0x0004
291 #define ATTR_VOLUME 0x0008
292 #define ATTR_DIRECTORY 0x0010
293 #define ATTR_ARCHIVE 0x0020
294 #define ATTR_DEVICE 0x0040
295 #define ATTR_NORMAL 0x0080
296 #define ATTR_TEMPORARY 0x0100
297 #define ATTR_SPARSE 0x0200
298 #define ATTR_REPARSE 0x0400
299 #define ATTR_COMPRESSED 0x0800
300 #define ATTR_OFFLINE 0x1000 /* ie file not immediately available -
302 #define ATTR_NOT_CONTENT_INDEXED 0x2000
303 #define ATTR_ENCRYPTED 0x4000
304 #define ATTR_POSIX_SEMANTICS 0x01000000
305 #define ATTR_BACKUP_SEMANTICS 0x02000000
306 #define ATTR_DELETE_ON_CLOSE 0x04000000
307 #define ATTR_SEQUENTIAL_SCAN 0x08000000
308 #define ATTR_RANDOM_ACCESS 0x10000000
309 #define ATTR_NO_BUFFERING 0x20000000
310 #define ATTR_WRITE_THROUGH 0x80000000
313 #define FILE_NO_SHARE 0x00000000
314 #define FILE_SHARE_READ 0x00000001
315 #define FILE_SHARE_WRITE 0x00000002
316 #define FILE_SHARE_DELETE 0x00000004
317 #define FILE_SHARE_ALL 0x00000007
320 #define FILE_SUPERSEDE 0x00000000
321 #define FILE_OPEN 0x00000001
322 #define FILE_CREATE 0x00000002
323 #define FILE_OPEN_IF 0x00000003
324 #define FILE_OVERWRITE 0x00000004
325 #define FILE_OVERWRITE_IF 0x00000005
328 #define CREATE_NOT_FILE 0x00000001 /* if set must not be file */
329 #define CREATE_WRITE_THROUGH 0x00000002
330 #define CREATE_SEQUENTIAL 0x00000004
331 #define CREATE_NO_BUFFER 0x00000008 /* should not buffer on srv */
332 #define CREATE_SYNC_ALERT 0x00000010 /* MBZ */
333 #define CREATE_ASYNC_ALERT 0x00000020 /* MBZ */
334 #define CREATE_NOT_DIR 0x00000040 /* if set must not be directory */
335 #define CREATE_TREE_CONNECTION 0x00000080 /* should be zero */
336 #define CREATE_COMPLETE_IF_OPLK 0x00000100 /* should be zero */
337 #define CREATE_NO_EA_KNOWLEDGE 0x00000200
338 #define CREATE_EIGHT_DOT_THREE 0x00000400 /* doc says this is obsolete
341 #define CREATE_OPEN_FOR_RECOVERY 0x00000400
342 #define CREATE_RANDOM_ACCESS 0x00000800
343 #define CREATE_DELETE_ON_CLOSE 0x00001000
344 #define CREATE_OPEN_BY_ID 0x00002000
345 #define CREATE_OPEN_BACKUP_INTENT 0x00004000
346 #define CREATE_NO_COMPRESSION 0x00008000
347 #define CREATE_RESERVE_OPFILTER 0x00100000 /* should be zero */
348 #define OPEN_REPARSE_POINT 0x00200000
349 #define OPEN_NO_RECALL 0x00400000
350 #define OPEN_FREE_SPACE_QUERY 0x00800000 /* should be zero */
351 #define CREATE_OPTIONS_MASK 0x007FFFFF
352 #define CREATE_OPTION_READONLY 0x10000000
353 #define CREATE_OPTION_SPECIAL 0x20000000 /* system. NB not sent over wire */
356 #define SECURITY_ANONYMOUS 0
362 #define SECURITY_CONTEXT_TRACKING 0x01
363 #define SECURITY_EFFECTIVE_ONLY 0x02
368 #define CIFS_DFT_PID 0x1234
441 * Computer Name Length (since Netbios name was length 16 with last byte 0x20)
484 struct smb_hdr hdr; /* wct = 0 */
497 __le16 DialectIndex; /* 0xFFFF = no dialect acceptable */
524 #define SECMODE_USER 0x01 /* off indicates share level security */
525 #define SECMODE_PW_ENCRYPT 0x02
526 #define SECMODE_SIGN_ENABLED 0x04 /* SMB security signatures enabled */
527 #define SECMODE_SIGN_REQUIRED 0x08 /* SMB security signatures required */
530 #define CAP_RAW_MODE 0x00000001
531 #define CAP_MPX_MODE 0x00000002
532 #define CAP_UNICODE 0x00000004
533 #define CAP_LARGE_FILES 0x00000008
534 #define CAP_NT_SMBS 0x00000010 /* implies CAP_NT_FIND */
535 #define CAP_RPC_REMOTE_APIS 0x00000020
536 #define CAP_STATUS32 0x00000040
537 #define CAP_LEVEL_II_OPLOCKS 0x00000080
538 #define CAP_LOCK_AND_READ 0x00000100
539 #define CAP_NT_FIND 0x00000200
540 #define CAP_DFS 0x00001000
541 #define CAP_INFOLEVEL_PASSTHRU 0x00002000
542 #define CAP_LARGE_READ_X 0x00004000
543 #define CAP_LARGE_WRITE_X 0x00008000
544 #define CAP_LWIO 0x00010000 /* support fctl_srv_req_resume_key */
545 #define CAP_UNIX 0x00800000
546 #define CAP_COMPRESSED_DATA 0x02000000
547 #define CAP_DYNAMIC_REAUTH 0x20000000
548 #define CAP_PERSISTENT_HANDLES 0x40000000
549 #define CAP_EXTENDED_SECURITY 0x80000000
675 #define CAP_UNICODE 0x00000004
676 #define CAP_LARGE_FILES 0x00000008
677 #define CAP_NT_SMBS 0x00000010
678 #define CAP_STATUS32 0x00000040
679 #define CAP_LEVEL_II_OPLOCKS 0x00000080
680 #define CAP_NT_FIND 0x00000200 /* reserved should be zero
682 #define CAP_BULK_TRANSFER 0x20000000
683 #define CAP_EXTENDED_SECURITY 0x80000000
727 #define DISCONNECT_TID 0x0001
728 #define TCON_EXTENDED_SIGNATURES 0x0004
729 #define TCON_EXTENDED_SECINFO 0x0008
732 #define SMB_SUPPORT_SEARCH_BITS 0x0001 /* "must have" directory search bits
734 #define SMB_SHARE_IS_IN_DFS 0x0002
735 #define SMB_CSC_MASK 0x000C
737 #define SMB_CSC_CACHE_MANUAL_REINT 0x0000
738 #define SMB_CSC_CACHE_AUTO_REINT 0x0004
739 #define SMB_CSC_CACHE_VDO 0x0008
740 #define SMB_CSC_NO_CACHING 0x000C
741 #define SMB_UNIQUE_FILE_NAME 0x0010
742 #define SMB_EXTENDED_SIGNATURES 0x0020
788 struct smb_hdr hdr; /* wct = 0 */
789 __u16 ByteCount; /* bcc = 0 */
792 struct smb_hdr hdr; /* wct = 0 */
793 __u16 ByteCount; /* bcc = 0 */
801 __u16 ByteCount; /* 0 */
805 struct smb_hdr hdr; /* wct = 0 */
806 __u16 ByteCount; /* bct = 0 */
812 __u16 ByteCount; /* 0 */
818 __u16 ByteCount; /* 0 */
822 #define REQ_MORE_INFO 0x00000001 /* legacy (OPEN_AND_X) only */
823 #define REQ_OPLOCK 0x00000002
824 #define REQ_BATCHOPLOCK 0x00000004
825 #define REQ_OPENDIRONLY 0x00000008
826 #define REQ_EXTENDED_INFO 0x00000010
829 #define DISK_TYPE 0x0000
830 #define BYTE_PIPE_TYPE 0x0001
831 #define MESSAGE_PIPE_TYPE 0x0002
832 #define PRINTER_TYPE 0x0003
833 #define COMM_DEV_TYPE 0x0004
834 #define UNKNOWN_TYPE 0xFFFF
837 #define NO_EAS 0x0001
838 #define NO_SUBSTREAMS 0x0002
839 #define NO_REPARSETAG 0x0004
841 #define ICOUNT_MASK 0x00FF
842 #define PIPE_READ_MODE 0x0100
843 #define NAMED_PIPE_TYPE 0x0400
844 #define PIPE_END_POINT 0x4000
845 #define BLOCKING_NAMED_PIPE 0x8000
869 #define OPLOCK_NONE 0
875 #define CIFS_CREATE_ACTION 0x20000 /* file created */
897 __u16 ByteCount; /* bct = 0 */
922 __u16 ByteCount; /* bct = 0 */
963 /* For encoding of POSIX Open Request - see trans2 function 0x209 data struct */
1072 #define LOCKING_ANDX_SHARED_LOCK 0x01
1073 #define LOCKING_ANDX_OPLOCK_RELEASE 0x02
1074 #define LOCKING_ANDX_CHANGE_LOCKTYPE 0x04
1075 #define LOCKING_ANDX_CANCEL_LOCK 0x08
1076 #define LOCKING_ANDX_LARGE_FILES 0x10 /* always on for us */
1094 #define CIFS_RDLCK 0
1098 __le16 lock_type; /* 0 = Read, 1 = Write, 2 = Unlock */
1125 #define COPY_MUST_BE_FILE 0x0001
1126 #define COPY_MUST_BE_DIR 0x0002
1127 #define COPY_TARGET_MODE_ASCII 0x0004 /* if not set, binary */
1128 #define COPY_SOURCE_MODE_ASCII 0x0008 /* if not set, binary */
1129 #define COPY_VERIFY_WRITES 0x0010
1130 #define COPY_TREE 0x0020
1148 __u8 BufferFormat; /* 0x04 - only present if errored file follows */
1152 #define CREATE_HARD_LINK 0x103
1153 #define MOVEFILE_COPY_ALLOWED 0x0002
1154 #define MOVEFILE_REPLACE_EXISTING 0x0001
1169 struct smb_hdr hdr; /* wct = 0 */
1170 __u16 ByteCount; /* bct = 0 */
1182 struct smb_hdr hdr; /* wct = 0 */
1183 __u16 ByteCount; /* bct = 0 */
1187 struct smb_hdr hdr; /* wct = 0 */
1194 struct smb_hdr hdr; /* wct = 0 */
1195 __u16 ByteCount; /* bct = 0 */
1199 struct smb_hdr hdr; /* wct = 0 */
1206 struct smb_hdr hdr; /* wct = 0 */
1207 __u16 ByteCount; /* bct = 0 */
1211 struct smb_hdr hdr; /* wct = 0 */
1223 __le16 ByteCount; /* bcc = 0 */
1238 struct smb_hdr hdr; /* wct = 0 */
1239 __u16 ByteCount; /* bct = 0 */
1281 __u8 SetupCount; /* 0 */
1312 __u8 IsFsctl; /* 1 = File System Control 0 = device control (IOCTL) */
1336 __u8 IsFsctl; /* 1 = File System Control 0 = device control (IOCTL) */
1344 #define COMPRESSION_FORMAT_NONE 0x0000
1345 #define COMPRESSION_FORMAT_DEFAULT 0x0001
1346 #define COMPRESSION_FORMAT_LZNT1 0x0002
1451 __u8 SetupCount; /* 0 */
1456 #define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
1457 #define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
1458 #define FILE_NOTIFY_CHANGE_NAME 0x00000003
1459 #define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
1460 #define FILE_NOTIFY_CHANGE_SIZE 0x00000008
1461 #define FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
1462 #define FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
1463 #define FILE_NOTIFY_CHANGE_CREATION 0x00000040
1464 #define FILE_NOTIFY_CHANGE_EA 0x00000080
1465 #define FILE_NOTIFY_CHANGE_SECURITY 0x00000100
1466 #define FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
1467 #define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
1468 #define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
1470 #define FILE_ACTION_ADDED 0x00000001
1471 #define FILE_ACTION_REMOVED 0x00000002
1472 #define FILE_ACTION_MODIFIED 0x00000003
1473 #define FILE_ACTION_RENAMED_OLD_NAME 0x00000004
1474 #define FILE_ACTION_RENAMED_NEW_NAME 0x00000005
1475 #define FILE_ACTION_ADDED_STREAM 0x00000006
1476 #define FILE_ACTION_REMOVED_STREAM 0x00000007
1477 #define FILE_ACTION_MODIFIED_STREAM 0x00000008
1501 #define SYMLINK_FLAG_RELATIVE 0x00000001
1504 #define NFS_SPECFILE_LNK 0x00000000014B4E4C
1505 #define NFS_SPECFILE_CHR 0x0000000000524843
1506 #define NFS_SPECFILE_BLK 0x00000000004B4C42
1507 #define NFS_SPECFILE_FIFO 0x000000004F464946
1508 #define NFS_SPECFILE_SOCK 0x000000004B434F53
1518 __u32 rsrvd1; /* 0 */
1520 __u64 rsrvd2; /* 0 */
1528 #define QUOTA_LIST_CONTINUE 0
1529 #define QUOTA_LIST_START 0x100
1530 #define QUOTA_FOR_SID 0x101
1589 #define SMB_QUERY_FILE_BASIC_INFO 0x101
1590 #define SMB_QUERY_FILE_STANDARD_INFO 0x102
1591 #define SMB_QUERY_FILE_EA_INFO 0x103
1592 #define SMB_QUERY_FILE_NAME_INFO 0x104
1593 #define SMB_QUERY_FILE_ALLOCATION_INFO 0x105
1594 #define SMB_QUERY_FILE_END_OF_FILEINFO 0x106
1595 #define SMB_QUERY_FILE_ALL_INFO 0x107
1596 #define SMB_QUERY_ALT_NAME_INFO 0x108
1597 #define SMB_QUERY_FILE_STREAM_INFO 0x109
1598 #define SMB_QUERY_FILE_COMPRESSION_INFO 0x10B
1599 #define SMB_QUERY_FILE_UNIX_BASIC 0x200
1600 #define SMB_QUERY_FILE_UNIX_LINK 0x201
1601 #define SMB_QUERY_POSIX_ACL 0x204
1602 #define SMB_QUERY_XATTR 0x205 /* e.g. system EA name space */
1603 #define SMB_QUERY_ATTR_FLAGS 0x206 /* append,immutable etc. */
1604 #define SMB_QUERY_POSIX_PERMISSION 0x207
1605 #define SMB_QUERY_POSIX_LOCK 0x208
1606 /* #define SMB_POSIX_OPEN 0x209 */
1607 /* #define SMB_POSIX_UNLINK 0x20a */
1608 #define SMB_QUERY_FILE__UNIX_INFO2 0x20b
1609 #define SMB_QUERY_FILE_INTERNAL_INFO 0x3ee
1610 #define SMB_QUERY_FILE_ACCESS_INFO 0x3f0
1611 #define SMB_QUERY_FILE_NAME_INFO2 0x3f1 /* 0x30 bytes */
1612 #define SMB_QUERY_FILE_POSITION_INFO 0x3f6
1613 #define SMB_QUERY_FILE_MODE_INFO 0x3f8
1614 #define SMB_QUERY_FILE_ALGN_INFO 0x3f9
1617 #define SMB_SET_FILE_BASIC_INFO 0x101
1618 #define SMB_SET_FILE_DISPOSITION_INFO 0x102
1619 #define SMB_SET_FILE_ALLOCATION_INFO 0x103
1620 #define SMB_SET_FILE_END_OF_FILE_INFO 0x104
1621 #define SMB_SET_FILE_UNIX_BASIC 0x200
1622 #define SMB_SET_FILE_UNIX_LINK 0x201
1623 #define SMB_SET_FILE_UNIX_HLINK 0x203
1624 #define SMB_SET_POSIX_ACL 0x204
1625 #define SMB_SET_XATTR 0x205
1626 #define SMB_SET_ATTR_FLAGS 0x206 /* append, immutable etc. */
1627 #define SMB_SET_POSIX_LOCK 0x208
1628 #define SMB_POSIX_OPEN 0x209
1629 #define SMB_POSIX_UNLINK 0x20a
1630 #define SMB_SET_FILE_UNIX_INFO2 0x20b
1631 #define SMB_SET_FILE_BASIC_INFO2 0x3ec
1632 #define SMB_SET_FILE_RENAME_INFORMATION 0x3f2 /* BB check if qpathinfo too */
1633 #define SMB_FILE_ALL_INFO2 0x3fa
1634 #define SMB_SET_FILE_ALLOCATION_INFO2 0x3fb
1635 #define SMB_SET_FILE_END_OF_FILE_INFO2 0x3fc
1636 #define SMB_FILE_MOVE_CLUSTER_INFO 0x407
1637 #define SMB_FILE_QUOTA_INFO 0x408
1638 #define SMB_FILE_REPARSEPOINT_INFO 0x409
1639 #define SMB_FILE_MAXIMUM_INFO 0x40d
1642 #define SMB_FIND_FILE_INFO_STANDARD 0x001
1643 #define SMB_FIND_FILE_QUERY_EA_SIZE 0x002
1644 #define SMB_FIND_FILE_QUERY_EAS_FROM_LIST 0x003
1645 #define SMB_FIND_FILE_DIRECTORY_INFO 0x101
1646 #define SMB_FIND_FILE_FULL_DIRECTORY_INFO 0x102
1647 #define SMB_FIND_FILE_NAMES_INFO 0x103
1648 #define SMB_FIND_FILE_BOTH_DIRECTORY_INFO 0x104
1649 #define SMB_FIND_FILE_ID_FULL_DIR_INFO 0x105
1650 #define SMB_FIND_FILE_ID_BOTH_DIR_INFO 0x106
1651 #define SMB_FIND_FILE_UNIX 0x202
1652 /* #define SMB_FIND_FILE_POSIX_INFO 0x064 */
1778 #define CIFS_SEARCH_CLOSE_ALWAYS 0x0001
1779 #define CIFS_SEARCH_CLOSE_AT_END 0x0002
1780 #define CIFS_SEARCH_RETURN_RESUME 0x0004
1781 #define CIFS_SEARCH_CONTINUE_FROM_LAST 0x0008
1782 #define CIFS_SEARCH_BACKUP_SEARCH 0x0010
1875 #define SMB_QUERY_FS_VOLUME_INFO 0x102
1876 #define SMB_QUERY_FS_SIZE_INFO 0x103
1877 #define SMB_QUERY_FS_DEVICE_INFO 0x104
1878 #define SMB_QUERY_FS_ATTRIBUTE_INFO 0x105
1879 #define SMB_QUERY_CIFS_UNIX_INFO 0x200
1880 #define SMB_QUERY_POSIX_FS_INFO 0x201
1881 #define SMB_QUERY_POSIX_WHO_AM_I 0x202
1882 #define SMB_REQUEST_TRANSPORT_ENCRYPTION 0x203
1883 #define SMB_QUERY_FS_PROXY 0x204 /* WAFS enabled. Returns structure
1886 (0xACE) for WAN friendly SMB
1888 #define SMB_QUERY_LABEL_INFO 0x3ea
1889 #define SMB_QUERY_FS_QUOTA_INFO 0x3ee
1890 #define SMB_QUERY_FS_FULL_SIZE_INFO 0x3ef
1891 #define SMB_QUERY_OBJECTID_INFO 0x3f0
1923 typedef struct whoami_rsp_data { /* Query level 0x202 */
1924 __u32 flags; /* 0 = Authenticated user 1 = GUEST */
1925 __u32 mask; /* which flags bits server understands ie 0x0001 */
1932 /* __u64 gid_array[0]; */ /* may be empty */
1937 #define SMB_SET_CIFS_UNIX_INFO 0x200
1938 /* level 0x203 is defined above in list of QFS info levels */
1939 /* #define SMB_REQUEST_TRANSPORT_ENCRYPTION 0x203 */
1941 /* Level 0x200 request structure follows */
1969 /* level 0x203 request structure follows */
1995 /* response for setfsinfo levels 0x200 and 0x203 */
2021 __u8 Pad[3]; /* Win2K has sent 0x0F01 (max response length
2028 #define DFS_VERSION cpu_to_le16(0x0003)
2031 #define DFS_TYPE_LINK 0x0000 /* also for sysvol targets */
2032 #define DFS_TYPE_ROOT 0x0001
2035 #define DFS_NAME_LIST_REF 0x0200 /* set for domain or DC referral responses */
2036 #define DFS_TARGET_SET_BOUNDARY 0x0400 /* only valid with version 4 dfs req */
2041 __le16 ServerType; /* 0x0001 = root targets; 0x0000 = link targets */
2067 #define DFSREF_REFERRAL_SERVER 0x00000001 /* all targets are DFS roots */
2068 #define DFSREF_STORAGE_SERVER 0x00000002 /* no further ref requests needed */
2069 #define DFSREF_TARGET_FAILBACK 0x00000004 /* only for DFS referral version 4 */
2120 } __attribute__((packed)) FILE_SYSTEM_INFO; /* size info, level 0x103 */
2134 } __attribute__((packed)) FILE_SYSTEM_UNIX_INFO; /* Unix extension level 0x200*/
2138 #define CIFS_UNIX_MINOR_VERSION 0
2141 #define CIFS_UNIX_FCNTL_CAP 0x00000001 /* support for fcntl locks */
2142 #define CIFS_UNIX_POSIX_ACL_CAP 0x00000002 /* support getfacl/setfacl */
2143 #define CIFS_UNIX_XATTR_CAP 0x00000004 /* support new namespace */
2144 #define CIFS_UNIX_EXTATTR_CAP 0x00000008 /* support chattr/chflag */
2145 #define CIFS_UNIX_POSIX_PATHNAMES_CAP 0x00000010 /* Allow POSIX path chars */
2146 #define CIFS_UNIX_POSIX_PATH_OPS_CAP 0x00000020 /* Allow new POSIX path based
2149 #define CIFS_UNIX_LARGE_READ_CAP 0x00000040 /* support reads >128K (up to 0xFFFF00 */
2150 #define CIFS_UNIX_LARGE_WRITE_CAP 0x00000080
2151 #define CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP 0x00000100 /* can do SPNEGO crypt */
2152 #define CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP 0x00000200 /* must do */
2153 #define CIFS_UNIX_PROXY_CAP 0x00000400 /* Proxy cap: 0xACE ioctl and QFS PROXY call */
2155 /* presumably don't need the 0x20 POSIX_PATH_OPS_CAP since we never send
2160 /* #define CIFS_UNIX_CAP_MASK 0x000000fb */
2161 #define CIFS_UNIX_CAP_MASK 0x000003db
2163 #define CIFS_UNIX_CAP_MASK 0x00000013
2167 #define CIFS_POSIX_EXTENSIONS 0x00000010 /* support for new QFSInfo */
2177 to make a second call (to QFSInfo level 0x103 to get this info.
2192 #define FILE_DEVICE_CD_ROM 0x00000002
2193 #define FILE_DEVICE_CD_ROM_FILE_SYSTEM 0x00000003
2194 #define FILE_DEVICE_DFS 0x00000006
2195 #define FILE_DEVICE_DISK 0x00000007
2196 #define FILE_DEVICE_DISK_FILE_SYSTEM 0x00000008
2197 #define FILE_DEVICE_FILE_SYSTEM 0x00000009
2198 #define FILE_DEVICE_NAMED_PIPE 0x00000011
2199 #define FILE_DEVICE_NETWORK 0x00000012
2200 #define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014
2201 #define FILE_DEVICE_NULL 0x00000015
2202 #define FILE_DEVICE_PARALLEL_PORT 0x00000016
2203 #define FILE_DEVICE_PRINTER 0x00000018
2204 #define FILE_DEVICE_SERIAL_PORT 0x0000001b
2205 #define FILE_DEVICE_STREAMS 0x0000001e
2206 #define FILE_DEVICE_TAPE 0x0000001f
2207 #define FILE_DEVICE_TAPE_FILE_SYSTEM 0x00000020
2208 #define FILE_DEVICE_VIRTUAL_DISK 0x00000024
2209 #define FILE_DEVICE_NETWORK_REDIRECTOR 0x00000028
2212 #define FILE_REMOVABLE_MEDIA 0x00000001
2213 #define FILE_READ_ONLY_DEVICE 0x00000002
2214 #define FILE_FLOPPY_DISKETTE 0x00000004
2215 #define FILE_WRITE_ONCE_MEDIA 0x00000008
2216 #define FILE_REMOTE_DEVICE 0x00000010
2217 #define FILE_DEVICE_IS_MOUNTED 0x00000020
2218 #define FILE_VIRTUAL_VOLUME 0x00000040
2219 #define FILE_DEVICE_SECURE_OPEN 0x00000100
2220 #define FILE_CHARACTERISTIC_TS_DEVICE 0x00001000
2221 #define FILE_CHARACTERISTIC_WEBDAV_DEVICE 0x00002000
2222 #define FILE_PORTABLE_DEVICE 0x00004000
2223 #define FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL 0x00020000
2228 } __attribute__((packed)) FILE_SYSTEM_DEVICE_INFO; /* device info level 0x104 */
2235 #define FILE_SUPPORTS_SPARSE_VDL 0x10000000 /* faster nonsparse extend */
2236 #define FILE_SUPPORTS_BLOCK_REFCOUNTING 0x08000000 /* allow ioctl dup extents */
2237 #define FILE_SUPPORT_INTEGRITY_STREAMS 0x04000000
2238 #define FILE_SUPPORTS_USN_JOURNAL 0x02000000
2239 #define FILE_SUPPORTS_OPEN_BY_FILE_ID 0x01000000
2240 #define FILE_SUPPORTS_EXTENDED_ATTRIBUTES 0x00800000
2241 #define FILE_SUPPORTS_HARD_LINKS 0x00400000
2242 #define FILE_SUPPORTS_TRANSACTIONS 0x00200000
2243 #define FILE_SEQUENTIAL_WRITE_ONCE 0x00100000
2244 #define FILE_READ_ONLY_VOLUME 0x00080000
2245 #define FILE_NAMED_STREAMS 0x00040000
2246 #define FILE_SUPPORTS_ENCRYPTION 0x00020000
2247 #define FILE_SUPPORTS_OBJECT_IDS 0x00010000
2248 #define FILE_VOLUME_IS_COMPRESSED 0x00008000
2249 #define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100
2250 #define FILE_SUPPORTS_REPARSE_POINTS 0x00000080
2251 #define FILE_SUPPORTS_SPARSE_FILES 0x00000040
2252 #define FILE_VOLUME_QUOTAS 0x00000020
2253 #define FILE_FILE_COMPRESSION 0x00000010
2254 #define FILE_PERSISTENT_ACLS 0x00000008
2255 #define FILE_UNICODE_ON_DISK 0x00000004
2256 #define FILE_CASE_PRESERVED_NAMES 0x00000002
2257 #define FILE_CASE_SENSITIVE_SEARCH 0x00000001
2295 } __attribute__((packed)) FILE_ALL_INFO; /* level 0x107 QPathInfo */
2304 } __attribute__((packed)) FILE_STANDARD_INFO; /* level 0x102 QPathInfo */
2308 #define UNIX_FILE 0
2329 } __attribute__((packed)) FILE_UNIX_BASIC_INFO; /* level 0x200 QPathInfo */
2333 } __attribute__((packed)) FILE_UNIX_LINK_INFO; /* level 0x201 QPathInfo */
2370 } __attribute__((packed)) FILE_BASIC_INFO; /* size info, level 0x101 */
2374 } __packed; /* size used on disk, for level 0x103 for set, 0x105 for query */
2378 } __attribute__((packed)); /* size info, level 0x104 for set, 0x106 for query */
2382 } __attribute__((packed)); /* level 0x0108 */
2390 }; /* level 0x109 */
2399 } __attribute__((packed)); /* level 0x10b */
2415 } __attribute__((packed)); /* level 0x204 */
2418 /* #define CIFS_POSIX_ACL_USER_OBJ 0x01
2419 #define CIFS_POSIX_ACL_USER 0x02
2420 #define CIFS_POSIX_ACL_GROUP_OBJ 0x04
2421 #define CIFS_POSIX_ACL_GROUP 0x08
2422 #define CIFS_POSIX_ACL_MASK 0x10
2423 #define CIFS_POSIX_ACL_OTHER 0x20 */
2426 /* #define CIFS_POSIX_ACL_EXECUTE 0x01
2427 #define CIFS_POSIX_ACL_WRITE 0x02
2428 #define CIFS_POSIX_ACL_READ 0x04 */
2433 #define SMB_O_RDONLY 0x1
2434 #define SMB_O_WRONLY 0x2
2435 #define SMB_O_RDWR 0x4
2436 #define SMB_O_CREAT 0x10
2437 #define SMB_O_EXCL 0x20
2438 #define SMB_O_TRUNC 0x40
2439 #define SMB_O_APPEND 0x80
2440 #define SMB_O_SYNC 0x100
2441 #define SMB_O_DIRECTORY 0x200
2442 #define SMB_O_NOFOLLOW 0x400
2443 #define SMB_O_DIRECT 0x800
2450 } __attribute__((packed)) OPEN_PSX_REQ; /* level 0x209 SetPathInfo data */
2459 } __attribute__((packed)) OPEN_PSX_RSP; /* level 0x209 SetPathInfo data */
2461 #define SMB_POSIX_UNLINK_FILE_TARGET 0
2464 struct unlink_psx_rq { /* level 0x20a SetPathInfo */
2470 } __attribute__((packed)); /* level 0x3ee */
2474 } __attribute__((packed)); /* level 0x3f8 */
2479 } __attribute__((packed)); /* level 0x40b */
2494 } __attribute__((packed)) FILE_UNIX_INFO; /* level 0x202 */
2508 } __attribute__((packed)) FILE_DIRECTORY_INFO; /* level 0x101 FF resp data */
2523 } __attribute__((packed)) FILE_FULL_DIRECTORY_INFO; /* level 0x102 rsp data */
2540 } __attribute__((packed)) SEARCH_ID_FULL_DIR_INFO; /* level 0x105 FF rsp data */
2558 } __attribute__((packed)) FILE_BOTH_DIRECTORY_INFO; /* level 0x104 FFrsp data */
2573 } __attribute__((packed)) FIND_FILE_STANDARD_INFO; /* level 0x1 FF resp data */
2584 #define FEA_NEEDEA 0x80 /* need EA bit */
2694 /* md5 of valid subset of path ie path[0] through path[length-1] */
2697 /* if room left, then end with \n then 0x20s by convention but not required */
2707 } __packed FILE_XATTR_INFO; /* extended attribute info level 0x205 */
2714 } __packed FILE_CHATTR_INFO; /* ext attributes (chattr, chflags) level 0x206 */