xref: /kernel/linux/linux-5.10/fs/cifs/smb2glob.h (revision 8c2ecf20)
18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci *   fs/cifs/smb2glob.h
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci *   Definitions for various global variables and structures
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci *   Copyright (C) International Business Machines  Corp., 2002, 2011
78c2ecf20Sopenharmony_ci *                 Etersoft, 2012
88c2ecf20Sopenharmony_ci *   Author(s): Steve French (sfrench@us.ibm.com)
98c2ecf20Sopenharmony_ci *              Jeremy Allison (jra@samba.org)
108c2ecf20Sopenharmony_ci *              Pavel Shilovsky (pshilovsky@samba.org) 2012
118c2ecf20Sopenharmony_ci *
128c2ecf20Sopenharmony_ci *   This library is free software; you can redistribute it and/or modify
138c2ecf20Sopenharmony_ci *   it under the terms of the GNU Lesser General Public License as published
148c2ecf20Sopenharmony_ci *   by the Free Software Foundation; either version 2.1 of the License, or
158c2ecf20Sopenharmony_ci *   (at your option) any later version.
168c2ecf20Sopenharmony_ci *
178c2ecf20Sopenharmony_ci *   This library is distributed in the hope that it will be useful,
188c2ecf20Sopenharmony_ci *   but WITHOUT ANY WARRANTY; without even the implied warranty of
198c2ecf20Sopenharmony_ci *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
208c2ecf20Sopenharmony_ci *   the GNU Lesser General Public License for more details.
218c2ecf20Sopenharmony_ci *
228c2ecf20Sopenharmony_ci */
238c2ecf20Sopenharmony_ci#ifndef _SMB2_GLOB_H
248c2ecf20Sopenharmony_ci#define _SMB2_GLOB_H
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci#define SMB2_MAGIC_NUMBER 0xFE534D42
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci/*
298c2ecf20Sopenharmony_ci *****************************************************************
308c2ecf20Sopenharmony_ci * Constants go here
318c2ecf20Sopenharmony_ci *****************************************************************
328c2ecf20Sopenharmony_ci */
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci/*
358c2ecf20Sopenharmony_ci * Identifiers for functions that use the open, operation, close pattern
368c2ecf20Sopenharmony_ci * in smb2inode.c:smb2_compound_op()
378c2ecf20Sopenharmony_ci */
388c2ecf20Sopenharmony_ci#define SMB2_OP_SET_DELETE 1
398c2ecf20Sopenharmony_ci#define SMB2_OP_SET_INFO 2
408c2ecf20Sopenharmony_ci#define SMB2_OP_QUERY_INFO 3
418c2ecf20Sopenharmony_ci#define SMB2_OP_QUERY_DIR 4
428c2ecf20Sopenharmony_ci#define SMB2_OP_MKDIR 5
438c2ecf20Sopenharmony_ci#define SMB2_OP_RENAME 6
448c2ecf20Sopenharmony_ci#define SMB2_OP_DELETE 7
458c2ecf20Sopenharmony_ci#define SMB2_OP_HARDLINK 8
468c2ecf20Sopenharmony_ci#define SMB2_OP_SET_EOF 9
478c2ecf20Sopenharmony_ci#define SMB2_OP_RMDIR 10
488c2ecf20Sopenharmony_ci#define SMB2_OP_POSIX_QUERY_INFO 11
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci/* Used when constructing chained read requests. */
518c2ecf20Sopenharmony_ci#define CHAINED_REQUEST 1
528c2ecf20Sopenharmony_ci#define START_OF_CHAIN 2
538c2ecf20Sopenharmony_ci#define END_OF_CHAIN 4
548c2ecf20Sopenharmony_ci#define RELATED_REQUEST 8
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci#define SMB2_SIGNATURE_SIZE (16)
578c2ecf20Sopenharmony_ci#define SMB2_NTLMV2_SESSKEY_SIZE (16)
588c2ecf20Sopenharmony_ci#define SMB2_HMACSHA256_SIZE (32)
598c2ecf20Sopenharmony_ci#define SMB2_CMACAES_SIZE (16)
608c2ecf20Sopenharmony_ci#define SMB3_SIGNKEY_SIZE (16)
618c2ecf20Sopenharmony_ci#define SMB3_GCM128_CRYPTKEY_SIZE (16)
628c2ecf20Sopenharmony_ci#define SMB3_GCM256_CRYPTKEY_SIZE (32)
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci/* Maximum buffer size value we can send with 1 credit */
658c2ecf20Sopenharmony_ci#define SMB2_MAX_BUFFER_SIZE 65536
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci#endif	/* _SMB2_GLOB_H */
68