fs/smb/client/smb2proto.h

Source file repositories/reference/linux-study-clean/fs/smb/client/smb2proto.h

File Facts

System
Linux kernel
Corpus path
fs/smb/client/smb2proto.h
Extension
.h
Size
13564 bytes
Lines
276
Domain
Core OS
Bucket
VFS And Filesystem Core
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _SMB2PROTO_H
#define _SMB2PROTO_H

#include <linux/nls.h>
#include <linux/key-type.h>
#include "cached_dir.h"

struct smb_rqst;

/*
 *****************************************************************
 * All Prototypes
 *****************************************************************
 */
int map_smb2_to_linux_error(char *buf, bool log_err);
int smb2_init_maperror(void);
#if IS_ENABLED(CONFIG_SMB_KUNIT_TESTS)
const struct status_to_posix_error *smb2_get_err_map_test(__u32 smb2_status);
extern const struct status_to_posix_error *smb2_error_map_table_test;
extern unsigned int smb2_error_map_num;
#endif

int smb2_check_message(char *buf, unsigned int pdu_len, unsigned int len,
		       struct TCP_Server_Info *server);
unsigned int smb2_calc_size(void *buf);
char *smb2_get_data_area_len(int *off, int *len, struct smb2_hdr *shdr);
__le16 *cifs_convert_path_to_utf16(const char *from,
				   struct cifs_sb_info *cifs_sb);

int smb2_verify_signature(struct smb_rqst *rqst,
			  struct TCP_Server_Info *server);
int smb2_check_receive(struct mid_q_entry *mid, struct TCP_Server_Info *server,
		       bool log_error);
struct mid_q_entry *smb2_setup_request(struct cifs_ses *ses,
				       struct TCP_Server_Info *server,
				       struct smb_rqst *rqst);
struct mid_q_entry *smb2_setup_async_request(struct TCP_Server_Info *server,
					     struct smb_rqst *rqst);
struct cifs_tcon *smb2_find_smb_tcon(struct TCP_Server_Info *server,
				     __u64 ses_id, __u32  tid);
__le32 smb2_get_lease_state(struct cifsInodeInfo *cinode, unsigned int oplock);
bool smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server);
int smb3_handle_read_data(struct TCP_Server_Info *server,
			  struct mid_q_entry *mid);
struct inode *smb2_create_reparse_inode(struct cifs_open_info_data *data,
					struct super_block *sb,
					const unsigned int xid,
					struct cifs_tcon *tcon,
					const char *full_path, bool directory,
					struct kvec *reparse_iov,
					struct kvec *xattr_iov);
int smb2_query_reparse_point(const unsigned int xid, struct cifs_tcon *tcon,
			     struct cifs_sb_info *cifs_sb,
			     const char *full_path, u32 *tag, struct kvec *rsp,
			     int *rsp_buftype);
int smb2_query_path_info(const unsigned int xid, struct cifs_tcon *tcon,
			 struct cifs_sb_info *cifs_sb, const char *full_path,
			 struct cifs_open_info_data *data);
int smb2_set_path_size(const unsigned int xid, struct cifs_tcon *tcon,
		       const char *full_path, __u64 size,
		       struct cifs_sb_info *cifs_sb, bool set_alloc,
		       struct dentry *dentry);
int smb2_set_file_info(struct inode *inode, const char *full_path,
		       FILE_BASIC_INFO *buf, const unsigned int xid);
int smb311_posix_mkdir(const unsigned int xid, struct inode *inode,
		       umode_t mode, struct cifs_tcon *tcon,
		       const char *full_path, struct cifs_sb_info *cifs_sb);
int smb2_mkdir(const unsigned int xid, struct inode *parent_inode,
	       umode_t mode, struct cifs_tcon *tcon, const char *name,
	       struct cifs_sb_info *cifs_sb);
void smb2_mkdir_setinfo(struct inode *inode, const char *name,
			struct cifs_sb_info *cifs_sb, struct cifs_tcon *tcon,
			const unsigned int xid);
int smb2_rmdir(const unsigned int xid, struct cifs_tcon *tcon,
	       const char *name, struct cifs_sb_info *cifs_sb);
int smb2_unlink(const unsigned int xid, struct cifs_tcon *tcon,
		const char *name, struct cifs_sb_info *cifs_sb,
		struct dentry *dentry);
int smb2_rename_path(const unsigned int xid, struct cifs_tcon *tcon,
		     struct dentry *source_dentry, const char *from_name,
		     const char *to_name, struct cifs_sb_info *cifs_sb);
int smb2_create_hardlink(const unsigned int xid, struct cifs_tcon *tcon,
			 struct dentry *source_dentry, const char *from_name,
			 const char *to_name, struct cifs_sb_info *cifs_sb);
int smb3_create_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
			   struct cifs_sb_info *cifs_sb,
			   const unsigned char *path, char *pbuf,
			   unsigned int *pbytes_written);
int smb3_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
			  struct cifs_sb_info *cifs_sb,

Annotation

Implementation Notes