aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifspdu.h
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2006-06-06 20:18:43 -0400
committerSteve French <sfrench@us.ibm.com>2006-06-06 20:18:43 -0400
commit5bafd76593f060540acbea3b61e3087e009aa269 (patch)
treeb5baf62243810b7aa36619a8cf64ab24d82952fb /fs/cifs/cifspdu.h
parenta8ee03441f66e0674e641c0cbe1a9534cdee968f (diff)
[CIFS] Add support for readdir to legacy servers
Fixes oops to OS/2 on ls and removes redundant NTCreateX calls to servers which do not support NT SMBs. Key operations to OS/2 work. Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifspdu.h')
-rw-r--r--fs/cifs/cifspdu.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h
index 5250b93d3098..86239023545b 100644
--- a/fs/cifs/cifspdu.h
+++ b/fs/cifs/cifspdu.h
@@ -1374,6 +1374,9 @@ struct smb_t2_rsp {
1374#define SMB_FILE_MAXIMUM_INFO 0x40d 1374#define SMB_FILE_MAXIMUM_INFO 0x40d
1375 1375
1376/* Find File infolevels */ 1376/* Find File infolevels */
1377#define SMB_FIND_FILE_INFO_STANDARD 0x001
1378#define SMB_FIND_FILE_QUERY_EA_SIZE 0x002
1379#define SMB_FIND_FILE_QUERY_EAS_FROM_LIST 0x003
1377#define SMB_FIND_FILE_DIRECTORY_INFO 0x101 1380#define SMB_FIND_FILE_DIRECTORY_INFO 0x101
1378#define SMB_FIND_FILE_FULL_DIRECTORY_INFO 0x102 1381#define SMB_FIND_FILE_FULL_DIRECTORY_INFO 0x102
1379#define SMB_FIND_FILE_NAMES_INFO 0x103 1382#define SMB_FIND_FILE_NAMES_INFO 0x103
@@ -1998,7 +2001,8 @@ typedef struct {
1998 2001
1999struct file_allocation_info { 2002struct file_allocation_info {
2000 __le64 AllocationSize; /* Note old Samba srvr rounds this up too much */ 2003 __le64 AllocationSize; /* Note old Samba srvr rounds this up too much */
2001} __attribute__((packed)); /* size used on disk, level 0x103 for set, 0x105 for query */ 2004} __attribute__((packed)); /* size used on disk, for level 0x103 for set,
2005 0x105 for query */
2002 2006
2003struct file_end_of_file_info { 2007struct file_end_of_file_info {
2004 __le64 FileSize; /* offset to end of file */ 2008 __le64 FileSize; /* offset to end of file */
@@ -2105,7 +2109,7 @@ typedef struct {
2105 __le32 ExtFileAttributes; 2109 __le32 ExtFileAttributes;
2106 __le32 FileNameLength; 2110 __le32 FileNameLength;
2107 char FileName[1]; 2111 char FileName[1];
2108} __attribute__((packed)) FILE_DIRECTORY_INFO; /* level 0x101 FF response data area */ 2112} __attribute__((packed)) FILE_DIRECTORY_INFO; /* level 0x101 FF resp data */
2109 2113
2110typedef struct { 2114typedef struct {
2111 __le32 NextEntryOffset; 2115 __le32 NextEntryOffset;
@@ -2120,7 +2124,7 @@ typedef struct {
2120 __le32 FileNameLength; 2124 __le32 FileNameLength;
2121 __le32 EaSize; /* length of the xattrs */ 2125 __le32 EaSize; /* length of the xattrs */
2122 char FileName[1]; 2126 char FileName[1];
2123} __attribute__((packed)) FILE_FULL_DIRECTORY_INFO; /* level 0x102 FF response data area */ 2127} __attribute__((packed)) FILE_FULL_DIRECTORY_INFO; /* level 0x102 rsp data */
2124 2128
2125typedef struct { 2129typedef struct {
2126 __le32 NextEntryOffset; 2130 __le32 NextEntryOffset;
@@ -2137,7 +2141,7 @@ typedef struct {
2137 __le32 Reserved; 2141 __le32 Reserved;
2138 __u64 UniqueId; /* inode num - le since Samba puts ino in low 32 bit*/ 2142 __u64 UniqueId; /* inode num - le since Samba puts ino in low 32 bit*/
2139 char FileName[1]; 2143 char FileName[1];
2140} __attribute__((packed)) SEARCH_ID_FULL_DIR_INFO; /* level 0x105 FF response data area */ 2144} __attribute__((packed)) SEARCH_ID_FULL_DIR_INFO; /* level 0x105 FF rsp data */
2141 2145
2142typedef struct { 2146typedef struct {
2143 __le32 NextEntryOffset; 2147 __le32 NextEntryOffset;
@@ -2155,7 +2159,22 @@ typedef struct {
2155 __u8 Reserved; 2159 __u8 Reserved;
2156 __u8 ShortName[12]; 2160 __u8 ShortName[12];
2157 char FileName[1]; 2161 char FileName[1];
2158} __attribute__((packed)) FILE_BOTH_DIRECTORY_INFO; /* level 0x104 FF response data area */ 2162} __attribute__((packed)) FILE_BOTH_DIRECTORY_INFO; /* level 0x104 FFrsp data */
2163
2164typedef struct {
2165 __u32 ResumeKey;
2166 __le16 CreationDate; /* SMB Date */
2167 __le16 CreationTime; /* SMB Time */
2168 __le16 LastAccessDate;
2169 __le16 LastAccessTime;
2170 __le16 LastWriteDate;
2171 __le16 LastWriteTime;
2172 __le32 DataSize; /* File Size (EOF) */
2173 __le32 AllocationSize;
2174 __le16 Attributes; /* verify not u32 */
2175 __u8 FileNameLength;
2176 char FileName[1];
2177} __attribute__((packed)) FIND_FILE_STANDARD_INFO; /* level 0x1 FF resp data */
2159 2178
2160 2179
2161struct win_dev { 2180struct win_dev {