Compartir a través de


2.2.13.2.10 SMB2_CREATE_REQUEST_LEASE_V2

The SMB2_CREATE_REQUEST_LEASE_V2 context is specified on an SMB2 CREATE Request when the client is requesting the server to return a lease on a file or a directory. This is valid only for the SMB 3.x dialect family. The data in the Buffer field of the SMB2_CREATE_CONTEXT (section 2.2.13.2) structure MUST contain the following structure.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

LeaseKey

...

...

...

LeaseState

Flags

LeaseDuration

...

ParentLeaseKey

...

...

...

Epoch

Reserved

LeaseKey (16 bytes): A client-generated key that identifies the owner of the lease.

LeaseState (4 bytes): The requested lease state. This field MUST be constructed as a combination of the following values.<56>

Value

Meaning

SMB2_LEASE_NONE

0x00000000

No lease is requested.

SMB2_LEASE_READ_CACHING

0x00000001

A read caching lease is requested.

SMB2_LEASE_HANDLE_CACHING

0x00000002

A handle caching lease is requested.

SMB2_LEASE_WRITE_CACHING

0x00000004

A write caching lease is requested.

Flags (4 bytes): This field MUST be set as a combination of the following values.

Value

Meaning

SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET

0x00000004

When set, indicates that the ParentLeaseKey is set.

LeaseDuration (8 bytes): This field MUST NOT be used and MUST be reserved. The client MUST set this to 0, and the server MUST ignore it on receipt.

ParentLeaseKey (16 bytes): A key that identifies the owner of the lease for the parent directory.

Epoch (2 bytes): A 16-bit unsigned integer used to track lease state changes.

Reserved (2 bytes): This field MUST NOT be used and MUST be reserved. The client MUST set this to 0, and the server MUST ignore it on receipt.