Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
675c4679
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
675c4679
编写于
4月 17, 2008
作者:
S
Steve French
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CIFS] Add various missing flags and defintions
Signed-off-by:
N
Steve French
<
sfrench@us.ibm.com
>
上级
20e67381
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
105 addition
and
14 deletion
+105
-14
fs/cifs/README
fs/cifs/README
+8
-1
fs/cifs/cifspdu.h
fs/cifs/cifspdu.h
+97
-13
未找到文件。
fs/cifs/README
浏览文件 @
675c4679
...
...
@@ -3,7 +3,14 @@ features such as hierarchical dfs like namespace, hardlinks, locking and more.
It was designed to comply with the SNIA CIFS Technical Reference (which
supersedes the 1992 X/Open SMB Standard) as well as to perform best practice
practical interoperability with Windows 2000, Windows XP, Samba and equivalent
servers.
servers. This code was developed in participation with the Protocol Freedom
Information Foundation.
Please see
http://protocolfreedom.org/ and
http://samba.org/samba/PFIF/
for more details.
For questions or bug reports please contact:
sfrench@samba.org (sfrench@us.ibm.com)
...
...
fs/cifs/cifspdu.h
浏览文件 @
675c4679
/*
* fs/cifs/cifspdu.h
*
* Copyright (c) International Business Machines Corp., 2002,200
7
* Copyright (c) International Business Machines Corp., 2002,200
8
* Author(s): Steve French (sfrench@us.ibm.com)
*
* This library is free software; you can redistribute it and/or modify
...
...
@@ -163,7 +163,10 @@
path names in response */
#define SMBFLG2_KNOWS_EAS cpu_to_le16(2)
#define SMBFLG2_SECURITY_SIGNATURE cpu_to_le16(4)
#define SMBFLG2_COMPRESSED (8)
#define SMBFLG2_SECURITY_SIGNATURE_REQUIRED (0x10)
#define SMBFLG2_IS_LONG_NAME cpu_to_le16(0x40)
#define SMBFLG2_REPARSE_PATH (0x400)
#define SMBFLG2_EXT_SEC cpu_to_le16(0x800)
#define SMBFLG2_DFS cpu_to_le16(0x1000)
#define SMBFLG2_PAGING_IO cpu_to_le16(0x2000)
...
...
@@ -305,7 +308,7 @@
#define FILE_SHARE_DELETE 0x00000004
#define FILE_SHARE_ALL 0x00000007
/* CreateDisposition flags */
/* CreateDisposition flags
, similar to CreateAction as well
*/
#define FILE_SUPERSEDE 0x00000000
#define FILE_OPEN 0x00000001
#define FILE_CREATE 0x00000002
...
...
@@ -317,15 +320,25 @@
#define CREATE_NOT_FILE 0x00000001
/* if set must not be file */
#define CREATE_WRITE_THROUGH 0x00000002
#define CREATE_SEQUENTIAL 0x00000004
#define CREATE_SYNC_ALERT 0x00000010
#define CREATE_ASYNC_ALERT 0x00000020
#define CREATE_NO_BUFFER 0x00000008
/* should not buffer on srv */
#define CREATE_SYNC_ALERT 0x00000010
/* MBZ */
#define CREATE_ASYNC_ALERT 0x00000020
/* MBZ */
#define CREATE_NOT_DIR 0x00000040
/* if set must not be directory */
#define CREATE_TREE_CONNECTION 0x00000080
/* should be zero */
#define CREATE_COMPLETE_IF_OPLK 0x00000100
/* should be zero */
#define CREATE_NO_EA_KNOWLEDGE 0x00000200
#define CREATE_EIGHT_DOT_THREE 0x00000400
#define CREATE_EIGHT_DOT_THREE 0x00000400
/* doc says this is obsolete
open for recovery flag - should
be zero */
#define CREATE_RANDOM_ACCESS 0x00000800
#define CREATE_DELETE_ON_CLOSE 0x00001000
#define CREATE_OPEN_BY_ID 0x00002000
#define CREATE_OPEN_BACKUP_INTN 0x00004000
#define CREATE_NO_COMPRESSION 0x00008000
#define CREATE_RESERVE_OPFILTER 0x00100000
/* should be zero */
#define OPEN_REPARSE_POINT 0x00200000
#define OPEN_NO_RECALL 0x00400000
#define OPEN_FREE_SPACE_QUERY 0x00800000
/* should be zero */
#define CREATE_OPTIONS_MASK 0x007FFFFF
#define CREATE_OPTION_SPECIAL 0x20000000
/* system. NB not sent over wire */
...
...
@@ -470,7 +483,7 @@ typedef struct lanman_neg_rsp {
typedef
struct
negotiate_rsp
{
struct
smb_hdr
hdr
;
/* wct = 17 */
__le16
DialectIndex
;
__le16
DialectIndex
;
/* 0xFFFF = no dialect acceptable */
__u8
SecurityMode
;
__le16
MaxMpxCount
;
__le16
MaxNumberVcs
;
...
...
@@ -516,10 +529,11 @@ typedef struct negotiate_rsp {
#define CAP_INFOLEVEL_PASSTHRU 0x00002000
#define CAP_LARGE_READ_X 0x00004000
#define CAP_LARGE_WRITE_X 0x00008000
#define CAP_LWIO 0x00010000
/* support fctl_srv_req_resume_key */
#define CAP_UNIX 0x00800000
#define CAP_
RESERVED
0x02000000
#define CAP_
BULK_TRANSFER
0x20000000
#define CAP_
COMPRESSED_DATA
0x40000000
#define CAP_
COMPRESSED_DATA
0x02000000
#define CAP_
DYNAMIC_REAUTH
0x20000000
#define CAP_
PERSISTENT_HANDLES
0x40000000
#define CAP_EXTENDED_SECURITY 0x80000000
typedef
union
smb_com_session_setup_andx
{
...
...
@@ -668,9 +682,7 @@ typedef struct smb_com_tconx_req {
}
__attribute__
((
packed
))
TCONX_REQ
;
typedef
struct
smb_com_tconx_rsp
{
struct
smb_hdr
hdr
;
/* wct = 3 note that Win2000 has sent wct = 7
in some cases on responses. Four unspecified
words followed OptionalSupport */
struct
smb_hdr
hdr
;
/* wct = 3 , not extended response */
__u8
AndXCommand
;
__u8
AndXReserved
;
__le16
AndXOffset
;
...
...
@@ -680,13 +692,48 @@ typedef struct smb_com_tconx_rsp {
/* STRING NativeFileSystem */
}
__attribute__
((
packed
))
TCONX_RSP
;
typedef
struct
smb_com_tconx_rsp_ext
{
struct
smb_hdr
hdr
;
/* wct = 7, extended response */
__u8
AndXCommand
;
__u8
AndXReserved
;
__le16
AndXOffset
;
__le16
OptionalSupport
;
/* see below */
__le32
MaximalShareAccessRights
;
__le32
GuestMaximalShareAccessRights
;
__u16
ByteCount
;
unsigned
char
Service
[
1
];
/* always ASCII, not Unicode */
/* STRING NativeFileSystem */
}
__attribute__
((
packed
))
TCONX_RSP_EXT
;
/* tree connect Flags */
#define DISCONNECT_TID 0x0001
#define TCON_EXTENDED_SIGNATURES 0x0004
#define TCON_EXTENDED_SECINFO 0x0008
/* OptionalSupport bits */
#define SMB_SUPPORT_SEARCH_BITS 0x0001
/* "must have" directory search bits
(exclusive searches supported) */
#define SMB_SHARE_IS_IN_DFS 0x0002
#define SMB_CSC_MASK 0x000C
/* CSC flags defined as follows */
#define SMB_CSC_CACHE_MANUAL_REINT 0x0000
#define SMB_CSC_CACHE_AUTO_REINT 0x0004
#define SMB_CSC_CACHE_VDO 0x0008
#define SMB_CSC_NO_CACHING 0x000C
#define SMB_UNIQUE_FILE_NAME 0x0010
#define SMB_EXTENDED_SIGNATURES 0x0020
/* services
*
* A: ie disk
* LPT1: ie printer
* IPC ie named pipe
* COMM
* ????? ie any type
*
*/
typedef
struct
smb_com_logoff_andx_req
{
struct
smb_hdr
hdr
;
/* wct = 2 */
...
...
@@ -750,6 +797,17 @@ typedef struct smb_com_findclose_req {
#define COMM_DEV_TYPE 0x0004
#define UNKNOWN_TYPE 0xFFFF
/* Device Type or File Status Flags */
#define NO_EAS 0x0001
#define NO_SUBSTREAMS 0x0002
#define NO_REPARSETAG 0x0004
/* following flags can apply if pipe */
#define ICOUNT_MASK 0x00FF
#define PIPE_READ_MODE 0x0100
#define NAMED_PIPE_TYPE 0x0400
#define PIPE_END_POINT 0x0800
#define BLOCKING_NAMED_PIPE 0x8000
typedef
struct
smb_com_open_req
{
/* also handles create */
struct
smb_hdr
hdr
;
/* wct = 24 */
__u8
AndXCommand
;
...
...
@@ -758,7 +816,7 @@ typedef struct smb_com_open_req { /* also handles create */
__u8
Reserved
;
/* Must Be Zero */
__le16
NameLength
;
__le32
OpenFlags
;
__
le32
RootDirectoryFid
;
__
u32
RootDirectoryFid
;
__le32
DesiredAccess
;
__le64
AllocationSize
;
__le32
FileAttributes
;
...
...
@@ -801,6 +859,32 @@ typedef struct smb_com_open_rsp {
__u16
ByteCount
;
/* bct = 0 */
}
__attribute__
((
packed
))
OPEN_RSP
;
typedef
struct
smb_com_open_rsp_ext
{
struct
smb_hdr
hdr
;
/* wct = 42 but meaningless due to MS bug? */
__u8
AndXCommand
;
__u8
AndXReserved
;
__le16
AndXOffset
;
__u8
OplockLevel
;
__u16
Fid
;
__le32
CreateAction
;
__le64
CreationTime
;
__le64
LastAccessTime
;
__le64
LastWriteTime
;
__le64
ChangeTime
;
__le32
FileAttributes
;
__le64
AllocationSize
;
__le64
EndOfFile
;
__le16
FileType
;
__le16
DeviceState
;
__u8
DirectoryFlag
;
__u8
VolumeGUID
[
16
];
__u64
FileId
;
/* note no endian conversion - is opaque UniqueID */
__le32
MaximalAccessRights
;
__le32
GuestMaximalAccessRights
;
__u16
ByteCount
;
/* bct = 0 */
}
__attribute__
((
packed
))
OPEN_RSP_EXT
;
/* format of legacy open request */
typedef
struct
smb_com_openx_req
{
struct
smb_hdr
hdr
;
/* wct = 15 */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录