From 31473fc4f9653b73750d3792ffce6a6e1bdf0da7 Mon Sep 17 00:00:00 2001 From: Pavel Shilovsky Date: Mon, 24 Oct 2016 15:33:04 -0700 Subject: CIFS: Separate SMB2 header structure In order to support compounding and encryption we need to separate RFC1001 length field and SMB2 header structure because the protocol treats them differently. This change will allow to simplify parsing of such complex SMB2 packets further. Signed-off-by: Pavel Shilovsky --- fs/cifs/smb2glob.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fs/cifs/smb2glob.h') diff --git a/fs/cifs/smb2glob.h b/fs/cifs/smb2glob.h index 0ffa18094335..401a5d856636 100644 --- a/fs/cifs/smb2glob.h +++ b/fs/cifs/smb2glob.h @@ -61,4 +61,9 @@ /* Maximum buffer size value we can send with 1 credit */ #define SMB2_MAX_BUFFER_SIZE 65536 +static inline struct smb2_sync_hdr *get_sync_hdr(void *buf) +{ + return &(((struct smb2_hdr *)buf)->sync_hdr); +} + #endif /* _SMB2_GLOB_H */ -- cgit