Fix SMB2_CAP_DFS
[ira/wip.git] / source4 / libcli / smb2 / smb2.h
index fd961ce5f3988241d82749be9edfb70967e76feb..98e3c5b9316167dca5b51302b2e18393b06a5891 100644 (file)
@@ -26,6 +26,7 @@
 #include "libcli/raw/libcliraw.h"
 
 struct smb2_handle;
+struct smb2_lease_break;
 
 /*
   information returned from the negotiate process
@@ -73,6 +74,15 @@ struct smb2_transport {
                void *private_data;
        } oplock;
 
+       struct {
+               /* a lease break request handler */
+               bool (*handler)(struct smb2_transport *transport,
+                               const struct smb2_lease_break *lease_break,
+                               void *private_data);
+               /* private data passed to the oplock handler */
+               void *private_data;
+       } lease;
+
        struct smbcli_options options;
 
        bool signing_required;
@@ -237,7 +247,7 @@ struct smb2_request {
 #define SMB2_NEGOTIATE_SIGNING_REQUIRED  0x02
 
 /* SMB2 capabilities - only 1 so far. I'm sure more will be added */
-#define SMB2_CAP_DFS                     0x0
+#define SMB2_CAP_DFS                     0x00000001
 /* so we can spot new caps as added */
 #define SMB2_CAP_ALL                     SMB2_CAP_DFS 
 
@@ -271,6 +281,9 @@ struct smb2_request {
 #define SMB2_LEASE_HANDLE                                0x02
 #define SMB2_LEASE_WRITE                                 0x04
 
+/* SMB2 lease break flags */
+#define SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED        0x01
+
 /* SMB2 impersonation levels */
 #define SMB2_IMPERSONATION_ANONYMOUS                     0x00
 #define SMB2_IMPERSONATION_IDENTIFICATION                0x01