#define FILE_READ_DATA 0x00000001 /* Data can be read from the file */ #define FILE_WRITE_DATA 0x00000002 /* Data can be written to the file */ #define FILE_APPEND_DATA 0x00000004 /* Data can be appended to the file */ #define FILE_READ_EA 0x00000008 /* Extended attributes associated */ /* with the file can be read */ #define FILE_WRITE_EA 0x00000010 /* Extended attributes associated */ /* with the file can be written */ #define FILE_EXECUTE 0x00000020 /*Data can be read into memory from */ /* the file using system paging I/O */ #define FILE_DELETE_CHILD 0x00000040 #define FILE_READ_ATTRIBUTES 0x00000080 /* Attributes associated with the */ /* file can be read */ #define FILE_WRITE_ATTRIBUTES 0x00000100 /* Attributes associated with the */ /* file can be written */ #defineDELETE 0x00010000 /* The file can be deleted */ #define READ_CONTROL 0x00020000 /* The access control list and */ /* ownership associated with the */ /* file can be read */ #define WRITE_DAC 0x00040000 /* The access control list and */ /* ownership associated with the */ /* file can be written. */ #define WRITE_OWNER 0x00080000 /* Ownership information associated */ /* with the file can be written */ #define SYNCHRONIZE 0x00100000 /* The file handle can waited on to */ /* synchronize with the completion */ /* of an input/output request */ #define GENERIC_ALL 0x10000000 #define GENERIC_EXECUTE 0x20000000 #define GENERIC_WRITE 0x40000000 #define GENERIC_READ 0x80000000 /* In summary - Relevant file */ /* access flags from CIFS are */ /* file_read_data, file_write_data */ /* file_execute, file_read_attributes*/ /* write_dac, and delete. */
struct filesystem_attribute_info {
__le32 Attributes;
__le32 MaxPathNameComponentLength;
__le32 FileSystemNameLen;
__le16 FileSystemName[]; /* do not have to save this - get subset? */
} __packed;
struct filesystem_posix_info { /* For undefined recommended transfer size return -1 in that field */
__le32 OptimalTransferSize; /* bsize on some os, iosize on other os */
__le32 BlockSize; /* The next three fields are in terms of the block size. * (above). If block size is unknown, 4096 would be a * reasonable block size for a server to report. * Note that returning the blocks/blocksavail removes need * to make a second call (to QFSInfo level 0x103 to get this info. * UserBlockAvail is typically less than or equal to BlocksAvail, * if no distinction is made return the same value in each
*/
__le64 TotalBlocks;
__le64 BlocksAvail; /* bfree */
__le64 UserBlocksAvail; /* bavail */ /* For undefined Node fields or FSID return -1 */
__le64 TotalFileNodes;
__le64 FreeFileNodes;
__le64 FileSysIdentifier; /* fsid */ /* NB Namelen comes from FILE_SYSTEM_ATTRIBUTE_INFO call */ /* NB flags can come from FILE_SYSTEM_DEVICE_INFO call */
} __packed;
struct smb_version_ops {
u16 (*get_cmd_val)(struct ksmbd_work *swork); int (*init_rsp_hdr)(struct ksmbd_work *swork); void (*set_rsp_status)(struct ksmbd_work *swork, __le32 err); int (*allocate_rsp_buf)(struct ksmbd_work *work); int (*set_rsp_credits)(struct ksmbd_work *work); int (*check_user_session)(struct ksmbd_work *work); int (*get_ksmbd_tcon)(struct ksmbd_work *work); bool (*is_sign_req)(struct ksmbd_work *work, unsignedint command); int (*check_sign_req)(struct ksmbd_work *work); void (*set_sign_rsp)(struct ksmbd_work *work); int (*generate_signingkey)(struct ksmbd_session *sess, struct ksmbd_conn *conn); int (*generate_encryptionkey)(struct ksmbd_conn *conn, struct ksmbd_session *sess); bool (*is_transform_hdr)(void *buf); int (*decrypt_req)(struct ksmbd_work *work); int (*encrypt_resp)(struct ksmbd_work *work);
};
struct smb_version_cmds { int (*proc)(struct ksmbd_work *swork);
};
int ksmbd_min_protocol(void); int ksmbd_max_protocol(void);
int ksmbd_lookup_protocol_idx(char *str);
int ksmbd_verify_smb_message(struct ksmbd_work *work); bool ksmbd_smb_request(struct ksmbd_conn *conn);
int ksmbd_lookup_dialect_by_id(__le16 *cli_dialects, __le16 dialects_count);
int ksmbd_init_smb_server(struct ksmbd_conn *conn);
struct ksmbd_kstat; int ksmbd_populate_dot_dotdot_entries(struct ksmbd_work *work, int info_level, struct ksmbd_file *dir, struct ksmbd_dir_info *d_info, char *search_pattern, int (*fn)(struct ksmbd_conn *, int, struct ksmbd_dir_info *, struct ksmbd_kstat *));
int ksmbd_extract_shortname(struct ksmbd_conn *conn, constchar *longname, char *shortname);
int ksmbd_smb_negotiate_common(struct ksmbd_work *work, unsignedint command);
int ksmbd_smb_check_shared_mode(struct file *filp, struct ksmbd_file *curr_fp); int __ksmbd_override_fsids(struct ksmbd_work *work, struct ksmbd_share_config *share); int ksmbd_override_fsids(struct ksmbd_work *work); void ksmbd_revert_fsids(struct ksmbd_work *work);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.