共用方式為


2.2.14.2.11 SMB2_CREATE_RESPONSE_LEASE_V2

The server responds with a lease that is granted for this open. The data in the Buffer field of the SMB2_CREATE_CONTEXT structure MUST contain the following structure. The SMB2_CREATE_RESPONSE_LEASE_V2 context is only valid for the SMB 3.x dialect family.


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): The client-generated key that identifies the owner of the lease.

LeaseState (4 bytes): The granted lease state. This field MUST be constructed by using the following values.

Value

Meaning

SMB2_LEASE_NONE

0x00000000

No lease is granted.

SMB2_LEASE_READ_CACHING

0x00000001

A read caching lease is granted.

SMB2_LEASE_HANDLE_CACHING

0x00000002

A handle caching lease is granted.

SMB2_LEASE_WRITE_CACHING

0x00000004

A write caching lease is granted.

Flags (4 bytes): This field MUST be set to zero or the following value.

Value

Meaning

SMB2_LEASE_FLAG_BREAK_IN_PROGRESS

0x00000002

A break for the lease identified by the lease key is in progress.

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 server MUST set this to zero, and the client 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 incremented by the server on a lease state change.

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