162306a36Sopenharmony_ci/* SPDX-License-Identifier: LGPL-2.1 */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci *
462306a36Sopenharmony_ci *   Copyright (c) International Business Machines  Corp., 2002, 2011
562306a36Sopenharmony_ci *                 Etersoft, 2012
662306a36Sopenharmony_ci *   Author(s): Steve French (sfrench@us.ibm.com)
762306a36Sopenharmony_ci *              Pavel Shilovsky (pshilovsky@samba.org) 2012
862306a36Sopenharmony_ci *
962306a36Sopenharmony_ci */
1062306a36Sopenharmony_ci#ifndef _SMB2PROTO_H
1162306a36Sopenharmony_ci#define _SMB2PROTO_H
1262306a36Sopenharmony_ci#include <linux/nls.h>
1362306a36Sopenharmony_ci#include <linux/key-type.h>
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_cistruct statfs;
1662306a36Sopenharmony_cistruct smb_rqst;
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci/*
1962306a36Sopenharmony_ci *****************************************************************
2062306a36Sopenharmony_ci * All Prototypes
2162306a36Sopenharmony_ci *****************************************************************
2262306a36Sopenharmony_ci */
2362306a36Sopenharmony_ciextern int map_smb2_to_linux_error(char *buf, bool log_err);
2462306a36Sopenharmony_ciextern int smb2_check_message(char *buf, unsigned int length,
2562306a36Sopenharmony_ci			      struct TCP_Server_Info *server);
2662306a36Sopenharmony_ciextern unsigned int smb2_calc_size(void *buf);
2762306a36Sopenharmony_ciextern char *smb2_get_data_area_len(int *off, int *len,
2862306a36Sopenharmony_ci				    struct smb2_hdr *shdr);
2962306a36Sopenharmony_ciextern __le16 *cifs_convert_path_to_utf16(const char *from,
3062306a36Sopenharmony_ci					  struct cifs_sb_info *cifs_sb);
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ciextern int smb2_verify_signature(struct smb_rqst *, struct TCP_Server_Info *);
3362306a36Sopenharmony_ciextern int smb2_check_receive(struct mid_q_entry *mid,
3462306a36Sopenharmony_ci			      struct TCP_Server_Info *server, bool log_error);
3562306a36Sopenharmony_ciextern struct mid_q_entry *smb2_setup_request(struct cifs_ses *ses,
3662306a36Sopenharmony_ci					      struct TCP_Server_Info *,
3762306a36Sopenharmony_ci					      struct smb_rqst *rqst);
3862306a36Sopenharmony_ciextern struct mid_q_entry *smb2_setup_async_request(
3962306a36Sopenharmony_ci			struct TCP_Server_Info *server, struct smb_rqst *rqst);
4062306a36Sopenharmony_ciextern struct cifs_ses *smb2_find_smb_ses(struct TCP_Server_Info *server,
4162306a36Sopenharmony_ci					   __u64 ses_id);
4262306a36Sopenharmony_ciextern struct cifs_tcon *smb2_find_smb_tcon(struct TCP_Server_Info *server,
4362306a36Sopenharmony_ci						__u64 ses_id, __u32  tid);
4462306a36Sopenharmony_ciextern int smb2_calc_signature(struct smb_rqst *rqst,
4562306a36Sopenharmony_ci				struct TCP_Server_Info *server,
4662306a36Sopenharmony_ci				bool allocate_crypto);
4762306a36Sopenharmony_ciextern int smb3_calc_signature(struct smb_rqst *rqst,
4862306a36Sopenharmony_ci				struct TCP_Server_Info *server,
4962306a36Sopenharmony_ci				bool allocate_crypto);
5062306a36Sopenharmony_ciextern void smb2_echo_request(struct work_struct *work);
5162306a36Sopenharmony_ciextern __le32 smb2_get_lease_state(struct cifsInodeInfo *cinode);
5262306a36Sopenharmony_ciextern bool smb2_is_valid_oplock_break(char *buffer,
5362306a36Sopenharmony_ci				       struct TCP_Server_Info *srv);
5462306a36Sopenharmony_ciextern int smb3_handle_read_data(struct TCP_Server_Info *server,
5562306a36Sopenharmony_ci				 struct mid_q_entry *mid);
5662306a36Sopenharmony_ciextern int smb2_query_reparse_tag(const unsigned int xid, struct cifs_tcon *tcon,
5762306a36Sopenharmony_ci				struct cifs_sb_info *cifs_sb, const char *path,
5862306a36Sopenharmony_ci				__u32 *reparse_tag);
5962306a36Sopenharmony_ciint smb2_query_path_info(const unsigned int xid,
6062306a36Sopenharmony_ci			 struct cifs_tcon *tcon,
6162306a36Sopenharmony_ci			 struct cifs_sb_info *cifs_sb,
6262306a36Sopenharmony_ci			 const char *full_path,
6362306a36Sopenharmony_ci			 struct cifs_open_info_data *data);
6462306a36Sopenharmony_ciextern int smb2_set_path_size(const unsigned int xid, struct cifs_tcon *tcon,
6562306a36Sopenharmony_ci			      const char *full_path, __u64 size,
6662306a36Sopenharmony_ci			      struct cifs_sb_info *cifs_sb, bool set_alloc);
6762306a36Sopenharmony_ciextern int smb2_set_file_info(struct inode *inode, const char *full_path,
6862306a36Sopenharmony_ci			      FILE_BASIC_INFO *buf, const unsigned int xid);
6962306a36Sopenharmony_ciextern int smb311_posix_mkdir(const unsigned int xid, struct inode *inode,
7062306a36Sopenharmony_ci			       umode_t mode, struct cifs_tcon *tcon,
7162306a36Sopenharmony_ci			       const char *full_path,
7262306a36Sopenharmony_ci			       struct cifs_sb_info *cifs_sb);
7362306a36Sopenharmony_ciextern int smb2_mkdir(const unsigned int xid, struct inode *inode,
7462306a36Sopenharmony_ci		      umode_t mode, struct cifs_tcon *tcon,
7562306a36Sopenharmony_ci		      const char *name, struct cifs_sb_info *cifs_sb);
7662306a36Sopenharmony_ciextern void smb2_mkdir_setinfo(struct inode *inode, const char *full_path,
7762306a36Sopenharmony_ci			       struct cifs_sb_info *cifs_sb,
7862306a36Sopenharmony_ci			       struct cifs_tcon *tcon, const unsigned int xid);
7962306a36Sopenharmony_ciextern int smb2_rmdir(const unsigned int xid, struct cifs_tcon *tcon,
8062306a36Sopenharmony_ci		      const char *name, struct cifs_sb_info *cifs_sb);
8162306a36Sopenharmony_ciextern int smb2_unlink(const unsigned int xid, struct cifs_tcon *tcon,
8262306a36Sopenharmony_ci		       const char *name, struct cifs_sb_info *cifs_sb);
8362306a36Sopenharmony_ciint smb2_rename_path(const unsigned int xid,
8462306a36Sopenharmony_ci		     struct cifs_tcon *tcon,
8562306a36Sopenharmony_ci		     struct dentry *source_dentry,
8662306a36Sopenharmony_ci		     const char *from_name, const char *to_name,
8762306a36Sopenharmony_ci		     struct cifs_sb_info *cifs_sb);
8862306a36Sopenharmony_ciint smb2_create_hardlink(const unsigned int xid,
8962306a36Sopenharmony_ci			 struct cifs_tcon *tcon,
9062306a36Sopenharmony_ci			 struct dentry *source_dentry,
9162306a36Sopenharmony_ci			 const char *from_name, const char *to_name,
9262306a36Sopenharmony_ci			 struct cifs_sb_info *cifs_sb);
9362306a36Sopenharmony_ciextern int smb3_create_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
9462306a36Sopenharmony_ci			struct cifs_sb_info *cifs_sb, const unsigned char *path,
9562306a36Sopenharmony_ci			char *pbuf, unsigned int *pbytes_written);
9662306a36Sopenharmony_ciextern int smb3_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
9762306a36Sopenharmony_ci			  struct cifs_sb_info *cifs_sb,
9862306a36Sopenharmony_ci			  const unsigned char *path, char *pbuf,
9962306a36Sopenharmony_ci			  unsigned int *pbytes_read);
10062306a36Sopenharmony_ciint smb2_parse_symlink_response(struct cifs_sb_info *cifs_sb, const struct kvec *iov, char **path);
10162306a36Sopenharmony_ciint smb2_open_file(const unsigned int xid, struct cifs_open_parms *oparms, __u32 *oplock,
10262306a36Sopenharmony_ci		   void *buf);
10362306a36Sopenharmony_ciextern int smb2_unlock_range(struct cifsFileInfo *cfile,
10462306a36Sopenharmony_ci			     struct file_lock *flock, const unsigned int xid);
10562306a36Sopenharmony_ciextern int smb2_push_mandatory_locks(struct cifsFileInfo *cfile);
10662306a36Sopenharmony_ciextern void smb2_reconnect_server(struct work_struct *work);
10762306a36Sopenharmony_ciextern int smb3_crypto_aead_allocate(struct TCP_Server_Info *server);
10862306a36Sopenharmony_ciextern unsigned long smb_rqst_len(struct TCP_Server_Info *server,
10962306a36Sopenharmony_ci				  struct smb_rqst *rqst);
11062306a36Sopenharmony_ciextern void smb2_set_next_command(struct cifs_tcon *tcon,
11162306a36Sopenharmony_ci				  struct smb_rqst *rqst);
11262306a36Sopenharmony_ciextern void smb2_set_related(struct smb_rqst *rqst);
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_ci/*
11562306a36Sopenharmony_ci * SMB2 Worker functions - most of protocol specific implementation details
11662306a36Sopenharmony_ci * are contained within these calls.
11762306a36Sopenharmony_ci */
11862306a36Sopenharmony_ciextern int SMB2_negotiate(const unsigned int xid,
11962306a36Sopenharmony_ci			  struct cifs_ses *ses,
12062306a36Sopenharmony_ci			  struct TCP_Server_Info *server);
12162306a36Sopenharmony_ciextern int SMB2_sess_setup(const unsigned int xid, struct cifs_ses *ses,
12262306a36Sopenharmony_ci			   struct TCP_Server_Info *server,
12362306a36Sopenharmony_ci			   const struct nls_table *nls_cp);
12462306a36Sopenharmony_ciextern int SMB2_logoff(const unsigned int xid, struct cifs_ses *ses);
12562306a36Sopenharmony_ciextern int SMB2_tcon(const unsigned int xid, struct cifs_ses *ses,
12662306a36Sopenharmony_ci		     const char *tree, struct cifs_tcon *tcon,
12762306a36Sopenharmony_ci		     const struct nls_table *);
12862306a36Sopenharmony_ciextern int SMB2_tdis(const unsigned int xid, struct cifs_tcon *tcon);
12962306a36Sopenharmony_ciextern int SMB2_open(const unsigned int xid, struct cifs_open_parms *oparms,
13062306a36Sopenharmony_ci		     __le16 *path, __u8 *oplock,
13162306a36Sopenharmony_ci		     struct smb2_file_all_info *buf,
13262306a36Sopenharmony_ci		     struct create_posix_rsp *posix,
13362306a36Sopenharmony_ci		     struct kvec *err_iov, int *resp_buftype);
13462306a36Sopenharmony_ciextern int SMB2_open_init(struct cifs_tcon *tcon,
13562306a36Sopenharmony_ci			  struct TCP_Server_Info *server,
13662306a36Sopenharmony_ci			  struct smb_rqst *rqst,
13762306a36Sopenharmony_ci			  __u8 *oplock, struct cifs_open_parms *oparms,
13862306a36Sopenharmony_ci			  __le16 *path);
13962306a36Sopenharmony_ciextern void SMB2_open_free(struct smb_rqst *rqst);
14062306a36Sopenharmony_ciextern int SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon,
14162306a36Sopenharmony_ci		     u64 persistent_fid, u64 volatile_fid, u32 opcode,
14262306a36Sopenharmony_ci		     char *in_data, u32 indatalen, u32 maxoutlen,
14362306a36Sopenharmony_ci		     char **out_data, u32 *plen /* returned data len */);
14462306a36Sopenharmony_ciextern int SMB2_ioctl_init(struct cifs_tcon *tcon,
14562306a36Sopenharmony_ci			   struct TCP_Server_Info *server,
14662306a36Sopenharmony_ci			   struct smb_rqst *rqst,
14762306a36Sopenharmony_ci			   u64 persistent_fid, u64 volatile_fid, u32 opcode,
14862306a36Sopenharmony_ci			   char *in_data, u32 indatalen,
14962306a36Sopenharmony_ci			   __u32 max_response_size);
15062306a36Sopenharmony_ciextern void SMB2_ioctl_free(struct smb_rqst *rqst);
15162306a36Sopenharmony_ciextern int SMB2_change_notify(const unsigned int xid, struct cifs_tcon *tcon,
15262306a36Sopenharmony_ci			u64 persistent_fid, u64 volatile_fid, bool watch_tree,
15362306a36Sopenharmony_ci			u32 completion_filter, u32 max_out_data_len,
15462306a36Sopenharmony_ci			char **out_data, u32 *plen /* returned data len */);
15562306a36Sopenharmony_ci
15662306a36Sopenharmony_ciextern int __SMB2_close(const unsigned int xid, struct cifs_tcon *tcon,
15762306a36Sopenharmony_ci			u64 persistent_fid, u64 volatile_fid,
15862306a36Sopenharmony_ci			struct smb2_file_network_open_info *pbuf);
15962306a36Sopenharmony_ciextern int SMB2_close(const unsigned int xid, struct cifs_tcon *tcon,
16062306a36Sopenharmony_ci		      u64 persistent_file_id, u64 volatile_file_id);
16162306a36Sopenharmony_ciextern int SMB2_close_init(struct cifs_tcon *tcon,
16262306a36Sopenharmony_ci			   struct TCP_Server_Info *server,
16362306a36Sopenharmony_ci			   struct smb_rqst *rqst,
16462306a36Sopenharmony_ci			   u64 persistent_fid, u64 volatile_fid,
16562306a36Sopenharmony_ci			   bool query_attrs);
16662306a36Sopenharmony_ciextern void SMB2_close_free(struct smb_rqst *rqst);
16762306a36Sopenharmony_ciextern int SMB2_flush(const unsigned int xid, struct cifs_tcon *tcon,
16862306a36Sopenharmony_ci		      u64 persistent_file_id, u64 volatile_file_id);
16962306a36Sopenharmony_ciextern int SMB2_flush_init(const unsigned int xid, struct smb_rqst *rqst,
17062306a36Sopenharmony_ci			   struct cifs_tcon *tcon,
17162306a36Sopenharmony_ci			   struct TCP_Server_Info *server,
17262306a36Sopenharmony_ci			   u64 persistent_file_id, u64 volatile_file_id);
17362306a36Sopenharmony_ciextern void SMB2_flush_free(struct smb_rqst *rqst);
17462306a36Sopenharmony_ciextern int SMB311_posix_query_info(const unsigned int xid, struct cifs_tcon *tcon,
17562306a36Sopenharmony_ci		u64 persistent_fid, u64 volatile_fid, struct smb311_posix_qinfo *data, u32 *plen);
17662306a36Sopenharmony_ciextern int SMB2_query_info(const unsigned int xid, struct cifs_tcon *tcon,
17762306a36Sopenharmony_ci			   u64 persistent_file_id, u64 volatile_file_id,
17862306a36Sopenharmony_ci			   struct smb2_file_all_info *data);
17962306a36Sopenharmony_ciextern int SMB2_query_info_init(struct cifs_tcon *tcon,
18062306a36Sopenharmony_ci				struct TCP_Server_Info *server,
18162306a36Sopenharmony_ci				struct smb_rqst *rqst,
18262306a36Sopenharmony_ci				u64 persistent_fid, u64 volatile_fid,
18362306a36Sopenharmony_ci				u8 info_class, u8 info_type,
18462306a36Sopenharmony_ci				u32 additional_info, size_t output_len,
18562306a36Sopenharmony_ci				size_t input_len, void *input);
18662306a36Sopenharmony_ciextern void SMB2_query_info_free(struct smb_rqst *rqst);
18762306a36Sopenharmony_ciextern int SMB2_query_acl(const unsigned int xid, struct cifs_tcon *tcon,
18862306a36Sopenharmony_ci			  u64 persistent_file_id, u64 volatile_file_id,
18962306a36Sopenharmony_ci			  void **data, unsigned int *plen, u32 info);
19062306a36Sopenharmony_ciextern int SMB2_get_srv_num(const unsigned int xid, struct cifs_tcon *tcon,
19162306a36Sopenharmony_ci			    u64 persistent_fid, u64 volatile_fid,
19262306a36Sopenharmony_ci			    __le64 *uniqueid);
19362306a36Sopenharmony_ciextern int smb2_async_readv(struct cifs_readdata *rdata);
19462306a36Sopenharmony_ciextern int SMB2_read(const unsigned int xid, struct cifs_io_parms *io_parms,
19562306a36Sopenharmony_ci		     unsigned int *nbytes, char **buf, int *buf_type);
19662306a36Sopenharmony_ciextern int smb2_async_writev(struct cifs_writedata *wdata,
19762306a36Sopenharmony_ci			     void (*release)(struct kref *kref));
19862306a36Sopenharmony_ciextern int SMB2_write(const unsigned int xid, struct cifs_io_parms *io_parms,
19962306a36Sopenharmony_ci		      unsigned int *nbytes, struct kvec *iov, int n_vec);
20062306a36Sopenharmony_ciextern int SMB2_echo(struct TCP_Server_Info *server);
20162306a36Sopenharmony_ciextern int SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
20262306a36Sopenharmony_ci				u64 persistent_fid, u64 volatile_fid, int index,
20362306a36Sopenharmony_ci				struct cifs_search_info *srch_inf);
20462306a36Sopenharmony_ciextern int SMB2_query_directory_init(unsigned int xid, struct cifs_tcon *tcon,
20562306a36Sopenharmony_ci				     struct TCP_Server_Info *server,
20662306a36Sopenharmony_ci				     struct smb_rqst *rqst,
20762306a36Sopenharmony_ci				     u64 persistent_fid, u64 volatile_fid,
20862306a36Sopenharmony_ci				     int index, int info_level);
20962306a36Sopenharmony_ciextern void SMB2_query_directory_free(struct smb_rqst *rqst);
21062306a36Sopenharmony_ciextern int SMB2_set_eof(const unsigned int xid, struct cifs_tcon *tcon,
21162306a36Sopenharmony_ci			u64 persistent_fid, u64 volatile_fid, u32 pid,
21262306a36Sopenharmony_ci			__le64 *eof);
21362306a36Sopenharmony_ciextern int SMB2_set_info_init(struct cifs_tcon *tcon,
21462306a36Sopenharmony_ci			      struct TCP_Server_Info *server,
21562306a36Sopenharmony_ci			      struct smb_rqst *rqst,
21662306a36Sopenharmony_ci			      u64 persistent_fid, u64 volatile_fid, u32 pid,
21762306a36Sopenharmony_ci			      u8 info_class, u8 info_type, u32 additional_info,
21862306a36Sopenharmony_ci			      void **data, unsigned int *size);
21962306a36Sopenharmony_ciextern void SMB2_set_info_free(struct smb_rqst *rqst);
22062306a36Sopenharmony_ciextern int SMB2_set_acl(const unsigned int xid, struct cifs_tcon *tcon,
22162306a36Sopenharmony_ci			u64 persistent_fid, u64 volatile_fid,
22262306a36Sopenharmony_ci			struct cifs_ntsd *pnntsd, int pacllen, int aclflag);
22362306a36Sopenharmony_ciextern int SMB2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
22462306a36Sopenharmony_ci		       u64 persistent_fid, u64 volatile_fid,
22562306a36Sopenharmony_ci		       struct smb2_file_full_ea_info *buf, int len);
22662306a36Sopenharmony_ciextern int SMB2_set_compression(const unsigned int xid, struct cifs_tcon *tcon,
22762306a36Sopenharmony_ci				u64 persistent_fid, u64 volatile_fid);
22862306a36Sopenharmony_ciextern int SMB2_oplock_break(const unsigned int xid, struct cifs_tcon *tcon,
22962306a36Sopenharmony_ci			     const u64 persistent_fid, const u64 volatile_fid,
23062306a36Sopenharmony_ci			     const __u8 oplock_level);
23162306a36Sopenharmony_ciextern int smb2_handle_cancelled_close(struct cifs_tcon *tcon,
23262306a36Sopenharmony_ci				       __u64 persistent_fid,
23362306a36Sopenharmony_ci				       __u64 volatile_fid);
23462306a36Sopenharmony_ciextern int smb2_handle_cancelled_mid(struct mid_q_entry *mid, struct TCP_Server_Info *server);
23562306a36Sopenharmony_civoid smb2_cancelled_close_fid(struct work_struct *work);
23662306a36Sopenharmony_ciextern int SMB2_QFS_info(const unsigned int xid, struct cifs_tcon *tcon,
23762306a36Sopenharmony_ci			 u64 persistent_file_id, u64 volatile_file_id,
23862306a36Sopenharmony_ci			 struct kstatfs *FSData);
23962306a36Sopenharmony_ciextern int SMB311_posix_qfs_info(const unsigned int xid, struct cifs_tcon *tcon,
24062306a36Sopenharmony_ci			 u64 persistent_file_id, u64 volatile_file_id,
24162306a36Sopenharmony_ci			 struct kstatfs *FSData);
24262306a36Sopenharmony_ciextern int SMB2_QFS_attr(const unsigned int xid, struct cifs_tcon *tcon,
24362306a36Sopenharmony_ci			 u64 persistent_file_id, u64 volatile_file_id, int lvl);
24462306a36Sopenharmony_ciextern int SMB2_lock(const unsigned int xid, struct cifs_tcon *tcon,
24562306a36Sopenharmony_ci		     const __u64 persist_fid, const __u64 volatile_fid,
24662306a36Sopenharmony_ci		     const __u32 pid, const __u64 length, const __u64 offset,
24762306a36Sopenharmony_ci		     const __u32 lockFlags, const bool wait);
24862306a36Sopenharmony_ciextern int smb2_lockv(const unsigned int xid, struct cifs_tcon *tcon,
24962306a36Sopenharmony_ci		      const __u64 persist_fid, const __u64 volatile_fid,
25062306a36Sopenharmony_ci		      const __u32 pid, const __u32 num_lock,
25162306a36Sopenharmony_ci		      struct smb2_lock_element *buf);
25262306a36Sopenharmony_ciextern int SMB2_lease_break(const unsigned int xid, struct cifs_tcon *tcon,
25362306a36Sopenharmony_ci			    __u8 *lease_key, const __le32 lease_state);
25462306a36Sopenharmony_ciextern int smb3_validate_negotiate(const unsigned int, struct cifs_tcon *);
25562306a36Sopenharmony_ci
25662306a36Sopenharmony_ciextern enum securityEnum smb2_select_sectype(struct TCP_Server_Info *,
25762306a36Sopenharmony_ci					enum securityEnum);
25862306a36Sopenharmony_ciint smb2_parse_contexts(struct TCP_Server_Info *server,
25962306a36Sopenharmony_ci			struct kvec *rsp_iov,
26062306a36Sopenharmony_ci			unsigned int *epoch,
26162306a36Sopenharmony_ci			char *lease_key, __u8 *oplock,
26262306a36Sopenharmony_ci			struct smb2_file_all_info *buf,
26362306a36Sopenharmony_ci			struct create_posix_rsp *posix);
26462306a36Sopenharmony_ci
26562306a36Sopenharmony_ciextern int smb3_encryption_required(const struct cifs_tcon *tcon);
26662306a36Sopenharmony_ciextern int smb2_validate_iov(unsigned int offset, unsigned int buffer_length,
26762306a36Sopenharmony_ci			     struct kvec *iov, unsigned int min_buf_size);
26862306a36Sopenharmony_ciextern int smb2_validate_and_copy_iov(unsigned int offset,
26962306a36Sopenharmony_ci				      unsigned int buffer_length,
27062306a36Sopenharmony_ci				      struct kvec *iov,
27162306a36Sopenharmony_ci				      unsigned int minbufsize, char *data);
27262306a36Sopenharmony_ciextern void smb2_copy_fs_info_to_kstatfs(
27362306a36Sopenharmony_ci	 struct smb2_fs_full_size_info *pfs_inf,
27462306a36Sopenharmony_ci	 struct kstatfs *kst);
27562306a36Sopenharmony_ciextern int smb311_crypto_shash_allocate(struct TCP_Server_Info *server);
27662306a36Sopenharmony_ciextern int smb311_update_preauth_hash(struct cifs_ses *ses,
27762306a36Sopenharmony_ci				      struct TCP_Server_Info *server,
27862306a36Sopenharmony_ci				      struct kvec *iov, int nvec);
27962306a36Sopenharmony_ciextern int smb2_query_info_compound(const unsigned int xid,
28062306a36Sopenharmony_ci				    struct cifs_tcon *tcon,
28162306a36Sopenharmony_ci				    const char *path, u32 desired_access,
28262306a36Sopenharmony_ci				    u32 class, u32 type, u32 output_len,
28362306a36Sopenharmony_ci				    struct kvec *rsp, int *buftype,
28462306a36Sopenharmony_ci				    struct cifs_sb_info *cifs_sb);
28562306a36Sopenharmony_ci/* query path info from the server using SMB311 POSIX extensions*/
28662306a36Sopenharmony_ciint smb311_posix_query_path_info(const unsigned int xid,
28762306a36Sopenharmony_ci				 struct cifs_tcon *tcon,
28862306a36Sopenharmony_ci				 struct cifs_sb_info *cifs_sb,
28962306a36Sopenharmony_ci				 const char *full_path,
29062306a36Sopenharmony_ci				 struct cifs_open_info_data *data,
29162306a36Sopenharmony_ci				 struct cifs_sid *owner,
29262306a36Sopenharmony_ci				 struct cifs_sid *group);
29362306a36Sopenharmony_ciint posix_info_parse(const void *beg, const void *end,
29462306a36Sopenharmony_ci		     struct smb2_posix_info_parsed *out);
29562306a36Sopenharmony_ciint posix_info_sid_size(const void *beg, const void *end);
29662306a36Sopenharmony_ci#endif			/* _SMB2PROTO_H */
297