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 */ 57