mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
8d63b622df
Believe it or not, but without this change "num_files" was first. Thanks Metze for this (to me at least) really, really surprising insight! Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
55 lines
1.4 KiB
Plaintext
55 lines
1.4 KiB
Plaintext
#include "idl_types.h"
|
|
|
|
import "misc.idl";
|
|
import "smb2_lease_struct.idl";
|
|
import "file_id.idl";
|
|
|
|
[
|
|
pointer_default(unique)
|
|
]
|
|
interface leases_db
|
|
{
|
|
typedef [public] struct {
|
|
GUID client_guid;
|
|
smb2_lease_key lease_key;
|
|
} leases_db_key;
|
|
|
|
typedef [public] struct {
|
|
file_id id;
|
|
[string,charset(UTF8)] char *servicepath;
|
|
[string,charset(UTF8)] char *base_name;
|
|
[string,charset(UTF8)] char *stream_name;
|
|
} leases_db_file;
|
|
|
|
typedef [public] struct {
|
|
smb2_lease_state current_state;
|
|
/*
|
|
* 'breaking' indicates that we're waiting
|
|
* for a lease break ack from the client
|
|
* and breaking_to_requested and breaking_to_required
|
|
* have a meaning.
|
|
*
|
|
* breaking_to_requested is the value already sent to
|
|
* the client, the client needs to ack to this (or less).
|
|
*
|
|
* breaking_to_required is the internal value that needs to
|
|
* be reached before we can reset breaking = false, this
|
|
* may requires multiple roundtrips to the client, e.g.
|
|
* when the lease broken to a more reduced value, while
|
|
* the lease break is still in progress.
|
|
*
|
|
* The following can be assumed (if breaking == true):
|
|
*
|
|
* current_state>breaking_to_requested>=breaking_to_required
|
|
*/
|
|
boolean8 breaking;
|
|
smb2_lease_state breaking_to_requested;
|
|
smb2_lease_state breaking_to_required;
|
|
uint16 lease_version;
|
|
uint16 epoch;
|
|
|
|
uint32 num_files;
|
|
leases_db_file files[num_files];
|
|
} leases_db_value;
|
|
}
|