3 import "server_id.idl";
6 import "smb2_lease_struct.idl";
10 pointer_default(unique)
15 typedef [public,flag(NDR_PAHEX)] struct {
17 smb2_lease_key lease_key;
18 smb2_lease_state current_state;
20 * 'breaking' indicates that we're waiting
21 * for a lease break ack from the client
22 * and breaking_to_requested and breaking_to_required
25 * breaking_to_requested is the value already sent to
26 * the client, the client needs to ack to this (or less).
28 * breaking_to_required is the internal value that needs to
29 * be reached before we can reset breaking = false, this
30 * may requires multiple roundtrips to the client, e.g.
31 * when the lease broken to a more reduced value, while
32 * the lease break is still in progress.
34 * The following can be assumed (if breaking == true):
36 * current_state > breaking_to_requested >= breaking_to_required
39 smb2_lease_state breaking_to_requested;
40 smb2_lease_state breaking_to_required;
45 typedef [public] struct {
52 uint32 private_options;
60 * In-memory flag indicating a non-existing pid. We don't want
61 * to store this share_mode_entry on disk.
63 [skip] boolean8 stale;
66 typedef [public] struct {
68 security_token *delete_nt_token;
69 security_unix_token *delete_token;
72 typedef [public] struct {
73 hyper sequence_number;
74 [string,charset(UTF8)] char *servicepath;
75 [string,charset(UTF8)] char *base_name;
76 [string,charset(UTF8)] char *stream_name;
77 uint32 num_share_modes;
78 [size_is(num_share_modes)] share_mode_entry share_modes[];
80 [size_is(num_leases)] share_mode_lease leases[];
81 uint32 num_delete_tokens;
82 [size_is(num_delete_tokens)] delete_token delete_tokens[];
83 timespec old_write_time;
84 timespec changed_write_time;
85 [skip] boolean8 fresh;
86 [skip] boolean8 modified;
87 [ignore] db_record *record;
88 [ignore] file_id id; /* In memory key used to lookup cache. */
91 /* these are 0x30 (48) characters */
92 const string VFS_DEFAULT_DURABLE_COOKIE_MAGIC =
93 "VFS_DEFAULT_DURABLE_COOKIE_MAGIC ";
94 const uint32 VFS_DEFAULT_DURABLE_COOKIE_VERSION = 0;
96 /* this corresponds to struct stat_ex (SMB_STRUCT_STAT) */
106 timespec st_ex_atime;
107 timespec st_ex_mtime;
108 timespec st_ex_ctime;
109 timespec st_ex_btime;
110 boolean8 st_ex_calculated_birthtime;
115 } vfs_default_durable_stat;
117 typedef [public] struct {
118 [value(VFS_DEFAULT_DURABLE_COOKIE_MAGIC),charset(DOS)] uint8 magic[0x30];
119 [value(VFS_DEFAULT_DURABLE_COOKIE_VERSION)] uint32 version;
120 boolean8 allow_reconnect;
122 [string,charset(UTF8)] char *servicepath;
123 [string,charset(UTF8)] char *base_name;
124 hyper initial_allocation_size;
125 hyper position_information;
126 boolean8 update_write_time_triggered;
127 boolean8 update_write_time_on_close;
128 boolean8 write_time_forced;
129 timespec close_write_time;
130 vfs_default_durable_stat stat_info;
131 } vfs_default_durable_cookie;