libcli/raw: fix the special NTCREATE_OPTIONS_*_MASK values
[tprouty/samba.git] / source4 / libcli / raw / smb.h
index 8663792f788c43f91100fecd8b87688380fae0b7..d4091acf488221856c970742a93bbab8b71a140f 100644 (file)
 #define NTCREATEX_OPTIONS_NO_RECALL             0x00400000
 /* Must be ignored by the server, per MS-SMB 2.2.8 */
 #define NTCREATEX_OPTIONS_FREE_SPACE_QUERY      0x00800000
-/* create options these bits are for private use by backends, they are
-   not valid on the wire */
-#define NTCREATEX_OPTIONS_PRIVATE_MASK          0xFF000000
-#define NTCREATEX_OPTIONS_PRIVATE_DENY_DOS      0x01000000
-#define NTCREATEX_OPTIONS_PRIVATE_DENY_FCB      0x02000000
 
-#define NTCREATEX_OPTIONS_MUST_IGNORE_MASK      ( NTCREATEX_OPTIONS_TREE_CONNECTION | NTCREATEX_OPTIONS_COMPLETE_IF_OPLOCKED | NTCREATEX_OPTIONS_OPEN_FOR_RECOVERY | NTCREATEX_OPTIONS_FREE_SPACE_QUERY | NTCREATEX_OPTIONS_OPFILTER )
+#define NTCREATEX_OPTIONS_MUST_IGNORE_MASK      (NTCREATEX_OPTIONS_TREE_CONNECTION | \
+                                                NTCREATEX_OPTIONS_OPEN_FOR_RECOVERY | \
+                                                NTCREATEX_OPTIONS_FREE_SPACE_QUERY | \
+                                                0x000F0000)
 
-#define NTCREATEX_OPTIONS_NOT_SUPPORTED_MASK    (0x000F0000 | NTCREATEX_OPTIONS_OPEN_BY_FILE_ID)
+#define NTCREATEX_OPTIONS_NOT_SUPPORTED_MASK    (NTCREATEX_OPTIONS_OPEN_BY_FILE_ID)
 
+#define NTCREATEX_OPTIONS_INVALID_PARAM_MASK    (NTCREATEX_OPTIONS_OPFILTER | \
+                                                NTCREATEX_OPTIONS_SYNC_ALERT | \
+                                                NTCREATEX_OPTIONS_ASYNC_ALERT | \
+                                                NTCREATEX_OPTIONS_OPFILTER | \
+                                                0xFF000000)
 
+/*
+ * We reuse some ignored flags for private use.
+ * This values have different meaning for some ntvfs backends.
+ *
+ * TODO: use values that are ignore for sure...
+ */
+#define NTCREATEX_OPTIONS_PRIVATE_DENY_DOS      0x00010000
+#define NTCREATEX_OPTIONS_PRIVATE_DENY_FCB      0x00020000
+#define NTCREATEX_OPTIONS_PRIVATE_MASK          (NTCREATEX_OPTIONS_PRIVATE_DENY_DOS | \
+                                                NTCREATEX_OPTIONS_PRIVATE_DENY_FCB)
 
 /* ntcreatex impersonation field */
 #define NTCREATEX_IMPERSONATION_ANONYMOUS      0