File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212#include <net/sock.h>
1313#include <linux/unaligned.h>
1414#include "../common/smbfsctl.h"
15- #include "../common/smb2pdu .h"
15+ #include "../common/smb1pdu .h"
1616
1717#define CIFS_PROT 0
1818#define POSIX_PROT (CIFS_PROT+1)
Original file line number Diff line number Diff line change 1+ /* SPDX-License-Identifier: LGPL-2.1 */
2+ /*
3+ *
4+ * Copyright (C) International Business Machines Corp., 2002,2009
5+ * 2018 Samsung Electronics Co., Ltd.
6+ * Author(s): Steve French <sfrench@us.ibm.com>
7+ * Namjae Jeon <linkinjeon@kernel.org>
8+ *
9+ */
10+
11+ #ifndef _COMMON_SMB1_PDU_H
12+ #define _COMMON_SMB1_PDU_H
13+
14+ #define SMB1_PROTO_NUMBER cpu_to_le32(0x424d53ff)
15+
16+ /*
17+ * See MS-CIFS 2.2.3.1
18+ * MS-SMB 2.2.3.1
19+ */
20+ struct smb_hdr {
21+ __u8 Protocol [4 ];
22+ __u8 Command ;
23+ union {
24+ struct {
25+ __u8 ErrorClass ;
26+ __u8 Reserved ;
27+ __le16 Error ;
28+ } __packed DosError ;
29+ __le32 CifsError ;
30+ } __packed Status ;
31+ __u8 Flags ;
32+ __le16 Flags2 ; /* note: le */
33+ __le16 PidHigh ;
34+ union {
35+ struct {
36+ __le32 SequenceNumber ; /* le */
37+ __u32 Reserved ; /* zero */
38+ } __packed Sequence ;
39+ __u8 SecuritySignature [8 ]; /* le */
40+ } __packed Signature ;
41+ __u8 pad [2 ];
42+ __u16 Tid ;
43+ __le16 Pid ;
44+ __u16 Uid ;
45+ __le16 Mid ;
46+ __u8 WordCount ;
47+ } __packed ;
48+
49+ /* See MS-CIFS 2.2.4.52.1 */
50+ typedef struct smb_negotiate_req {
51+ struct smb_hdr hdr ; /* wct = 0 */
52+ __le16 ByteCount ;
53+ unsigned char DialectsArray [];
54+ } __packed SMB_NEGOTIATE_REQ ;
55+
56+ #endif /* _COMMON_SMB1_PDU_H */
Original file line number Diff line number Diff line change @@ -1986,39 +1986,6 @@ struct smb2_lease_ack {
19861986 __le64 LeaseDuration ;
19871987} __packed ;
19881988
1989- /*
1990- * See MS-CIFS 2.2.3.1
1991- * MS-SMB 2.2.3.1
1992- */
1993- struct smb_hdr {
1994- __u8 Protocol [4 ];
1995- __u8 Command ;
1996- union {
1997- struct {
1998- __u8 ErrorClass ;
1999- __u8 Reserved ;
2000- __le16 Error ;
2001- } __packed DosError ;
2002- __le32 CifsError ;
2003- } __packed Status ;
2004- __u8 Flags ;
2005- __le16 Flags2 ; /* note: le */
2006- __le16 PidHigh ;
2007- union {
2008- struct {
2009- __le32 SequenceNumber ; /* le */
2010- __u32 Reserved ; /* zero */
2011- } __packed Sequence ;
2012- __u8 SecuritySignature [8 ]; /* le */
2013- } __packed Signature ;
2014- __u8 pad [2 ];
2015- __u16 Tid ;
2016- __le16 Pid ;
2017- __u16 Uid ;
2018- __le16 Mid ;
2019- __u8 WordCount ;
2020- } __packed ;
2021-
20221989#define OP_BREAK_STRUCT_SIZE_20 24
20231990#define OP_BREAK_STRUCT_SIZE_21 36
20241991
@@ -2123,11 +2090,4 @@ struct smb_hdr {
21232090#define SET_MINIMUM_RIGHTS (FILE_READ_EA | FILE_READ_ATTRIBUTES \
21242091 | READ_CONTROL | SYNCHRONIZE)
21252092
2126- /* See MS-CIFS 2.2.4.52.1 */
2127- typedef struct smb_negotiate_req {
2128- struct smb_hdr hdr ; /* wct = 0 */
2129- __le16 ByteCount ;
2130- unsigned char DialectsArray [];
2131- } __packed SMB_NEGOTIATE_REQ ;
2132-
21332093#endif /* _COMMON_SMB2PDU_H */
Original file line number Diff line number Diff line change 1111#ifndef _COMMON_SMB_GLOB_H
1212#define _COMMON_SMB_GLOB_H
1313
14- #define SMB1_PROTO_NUMBER cpu_to_le32(0x424d53ff)
15-
1614struct smb_version_values {
1715 char * version_string ;
1816 __u16 protocol_id ;
Original file line number Diff line number Diff line change 1010
1111#include "glob.h"
1212#include "../common/smbglob.h"
13+ #include "../common/smb1pdu.h"
1314#include "../common/smb2pdu.h"
1415#include "../common/fscc.h"
1516#include "smb2pdu.h"
You can’t perform that action at this time.
0 commit comments