fs/smb/client/cifsglob.h

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

File Facts

System
Linux kernel
Corpus path
fs/smb/client/cifsglob.h
Extension
.h
Size
82022 bytes
Lines
2401
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

struct session_key {
	unsigned int len;
	char *response;
};

/* encryption related structure/fields, not specific to a sec mech */
struct cifs_secmech {
	struct crypto_aead *enc; /* smb3 encryption AEAD TFM (AES-CCM and AES-GCM) */
	struct crypto_aead *dec; /* smb3 decryption AEAD TFM (AES-CCM and AES-GCM) */
};

/* per smb session structure/fields */
struct ntlmssp_auth {
	bool sesskey_per_smbsess; /* whether session key is per smb session */
	__u32 client_flags; /* sent by client in type 1 ntlmsssp exchange */
	__u32 server_flags; /* sent by server in type 2 ntlmssp exchange */
	unsigned char ciphertext[CIFS_CPHTXT_SIZE]; /* sent to server */
	char cryptkey[CIFS_CRYPTO_KEY_SIZE]; /* used by ntlmssp */
};

struct cifs_cred {
	int uid;
	int gid;
	int mode;
	int cecount;
	struct smb_sid osid;
	struct smb_sid gsid;
	struct cifs_ntace *ntaces;
	struct smb_ace *aces;
};

struct cifs_open_info_data {
	bool adjust_tz;
	bool reparse_point;
	bool contains_posix_file_info;
	struct {
		/* ioctl response buffer */
		struct {
			int buftype;
			struct kvec iov;
		} io;
		__u32 tag;
		struct reparse_data_buffer *buf;
	} reparse;
	struct {
		__u8		eas[SMB2_WSL_MAX_QUERY_EA_RESP_SIZE];
		unsigned int	eas_len;
	} wsl;
	char *symlink_target;
	struct smb_sid posix_owner;
	struct smb_sid posix_group;
	union {
		struct smb2_file_all_info fi;
		struct smb311_posix_qinfo posix_fi;
	};
};

/*
 *****************************************************************
 * Except the CIFS PDUs themselves all the
 * globally interesting structs should go here
 *****************************************************************
 */

/*
 * A smb_rqst represents a complete request to be issued to a server. It's
 * formed by a kvec array, followed by an array of pages. Page data is assumed
 * to start at the beginning of the first page.
 */
struct smb_rqst {
	struct kvec	*rq_iov;	/* array of kvecs */
	unsigned int	rq_nvec;	/* number of kvecs in array */
	struct iov_iter	rq_iter;	/* Data iterator */
	struct folio_queue *rq_buffer;	/* Buffer for encryption */
};

struct mid_q_entry;
struct TCP_Server_Info;
struct cifsFileInfo;
struct cifs_ses;
struct cifs_tcon;
struct dfs_info3_param;
struct cifs_fattr;
struct smb3_fs_context;
struct cifs_fid;
struct cifs_io_subrequest;
struct cifs_io_parms;
struct cifs_search_info;
struct cifsInodeInfo;
struct cifs_open_parms;

Annotation

Implementation Notes