1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 struct smb_mnt_fs_info {
21 __u32 version;
22 __u16 protocol_id;
23 __u16 tcon_flags;
24 __u32 vol_serial_number;
25 __u32 vol_create_time;
26 __u32 share_caps;
27 __u32 share_flags;
28 __u32 sector_flags;
29 __u32 optimal_sector_size;
30 __u32 max_bytes_chunk;
31 __u32 fs_attributes;
32 __u32 max_path_component;
33 __u32 device_type;
34 __u32 device_characteristics;
35 __u32 maximal_access;
36 __u64 cifs_posix_caps;
37 } __packed;
38
39 struct smb_snapshot_array {
40 __u32 number_of_snapshots;
41 __u32 number_of_snapshots_returned;
42 __u32 snapshot_array_size;
43
44 } __packed;
45
46
47 #define PASSTHRU_QUERY_INFO 0x00000000
48 #define PASSTHRU_FSCTL 0x00000001
49 #define PASSTHRU_SET_INFO 0x00000002
50 struct smb_query_info {
51 __u32 info_type;
52 __u32 file_info_class;
53 __u32 additional_information;
54 __u32 flags;
55 __u32 input_buffer_length;
56 __u32 output_buffer_length;
57
58 } __packed;
59
60 struct smb3_key_debug_info {
61 __u64 Suid;
62 __u16 cipher_type;
63 __u8 auth_key[16];
64 __u8 smb3encryptionkey[SMB3_SIGN_KEY_SIZE];
65 __u8 smb3decryptionkey[SMB3_SIGN_KEY_SIZE];
66 } __packed;
67
68 #define CIFS_IOCTL_MAGIC 0xCF
69 #define CIFS_IOC_COPYCHUNK_FILE _IOW(CIFS_IOCTL_MAGIC, 3, int)
70 #define CIFS_IOC_SET_INTEGRITY _IO(CIFS_IOCTL_MAGIC, 4)
71 #define CIFS_IOC_GET_MNT_INFO _IOR(CIFS_IOCTL_MAGIC, 5, struct smb_mnt_fs_info)
72 #define CIFS_ENUMERATE_SNAPSHOTS _IOR(CIFS_IOCTL_MAGIC, 6, struct smb_snapshot_array)
73 #define CIFS_QUERY_INFO _IOWR(CIFS_IOCTL_MAGIC, 7, struct smb_query_info)
74 #define CIFS_DUMP_KEY _IOWR(CIFS_IOCTL_MAGIC, 8, struct smb3_key_debug_info)