libcli: created smb_constants.h
authorAndrew Tridgell <tridge@samba.org>
Thu, 24 Mar 2011 04:35:28 +0000 (15:35 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 25 Mar 2011 03:37:06 +0000 (04:37 +0100)
this starts the (long!) process of moving some of the SMB constants
into common files. This just moves the FLAGS2_ defines, which are
needed for common string routines (for FLAGS2_UNICODE_STRINGS)

lib/util/charset/charcnv.c
libcli/smb/smb_common.h
libcli/smb/smb_constants.h [new file with mode: 0644]
source3/include/smb.h
source4/libcli/raw/smb.h

index 1e1f2a350e0ec4a5ce23ddf06585b2569828000d..5489cf739198585e9f7d4b79b651e7be7e3d04bc 100644 (file)
@@ -22,6 +22,7 @@
 */
 #include "includes.h"
 #include "system/iconv.h"
+#include "libcli/smb/smb_common.h"
 
 /**
  * @file
index d6186ab526511d4c8bd204f5d36ae6dfc891f9a7..8fe0623727fa44037fc44d3b193b0acf569bde09 100644 (file)
@@ -24,5 +24,6 @@
 
 #include "../libcli/smb/smb2_constants.h"
 #include "../libcli/smb/smb2_create_blob.h"
+#include "../libcli/smb/smb_constants.h"
 
 #endif
diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h
new file mode 100644 (file)
index 0000000..83e6388
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+   Unix SMB/CIFS implementation.
+
+   SMB parameters and setup, plus a whole lot more.
+
+   Copyright (C) Andrew Tridgell              2011
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _SMB_CONSTANTS_H
+#define _SMB_CONSTANTS_H
+
+/* NT Flags2 bits - cifs6.txt section 3.1.2 */
+#define FLAGS2_LONG_PATH_COMPONENTS    0x0001
+#define FLAGS2_EXTENDED_ATTRIBUTES     0x0002
+#define FLAGS2_SMB_SECURITY_SIGNATURES 0x0004
+#define FLAGS2_UNKNOWN_BIT4            0x0010
+#define FLAGS2_IS_LONG_NAME            0x0040
+#define FLAGS2_EXTENDED_SECURITY       0x0800
+#define FLAGS2_DFS_PATHNAMES           0x1000
+#define FLAGS2_READ_PERMIT_EXECUTE     0x2000
+#define FLAGS2_32_BIT_ERROR_CODES      0x4000
+#define FLAGS2_UNICODE_STRINGS         0x8000
+#define FLAGS2_WIN2K_SIGNATURE         0xC852 /* Hack alert ! For now... JRA. */
+
+
+#endif /* _SMB_CONSTANTS_H */
index 882b23471b07c655c505a82ad12fb4a5ecc629f6..f62da84a4f2630aeaaa97dc79554ad2a3b84d08e 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef _SMB_H
 #define _SMB_H
 
+#include "libcli/smb/smb_common.h"
+
 /* logged when starting the various Samba daemons */
 #define COPYRIGHT_STARTUP_MESSAGE      "Copyright Andrew Tridgell and the Samba Team 1992-2011"
 
@@ -1348,21 +1350,6 @@ char *strdup(char *s);
 #define NEGOTIATE_SECURITY_SIGNATURES_ENABLED  0x04
 #define NEGOTIATE_SECURITY_SIGNATURES_REQUIRED 0x08
 
-/* NT Flags2 bits - cifs6.txt section 3.1.2 */
-   
-#define FLAGS2_LONG_PATH_COMPONENTS    0x0001
-#define FLAGS2_EXTENDED_ATTRIBUTES     0x0002
-#define FLAGS2_SMB_SECURITY_SIGNATURES 0x0004
-#define FLAGS2_UNKNOWN_BIT4            0x0010
-#define FLAGS2_IS_LONG_NAME            0x0040
-#define FLAGS2_EXTENDED_SECURITY       0x0800 
-#define FLAGS2_DFS_PATHNAMES           0x1000
-#define FLAGS2_READ_PERMIT_EXECUTE     0x2000
-#define FLAGS2_32_BIT_ERROR_CODES      0x4000 
-#define FLAGS2_UNICODE_STRINGS         0x8000
-
-#define FLAGS2_WIN2K_SIGNATURE         0xC852 /* Hack alert ! For now... JRA. */
-
 /* TCONX Flag (smb_vwv2). */
 #define TCONX_FLAG_EXTENDED_RESPONSE   0x8
 
index d93ad0d0058a552069316b20dab5f58af8d15e61..05bf91fe3bbf1b4fc38997cd4aa2ee4136fb5186 100644 (file)
 #define NEGOTIATE_SECURITY_SIGNATURES_ENABLED  0x04
 #define NEGOTIATE_SECURITY_SIGNATURES_REQUIRED 0x08
 
-/* NT Flags2 bits - cifs6.txt section 3.1.2 */
-#define FLAGS2_LONG_PATH_COMPONENTS    0x0001
-#define FLAGS2_EXTENDED_ATTRIBUTES     0x0002
-#define FLAGS2_SMB_SECURITY_SIGNATURES 0x0004
-#define FLAGS2_IS_LONG_NAME            0x0040
-#define FLAGS2_EXTENDED_SECURITY       0x0800 
-#define FLAGS2_DFS_PATHNAMES           0x1000
-#define FLAGS2_READ_PERMIT_EXECUTE     0x2000
-#define FLAGS2_32_BIT_ERROR_CODES      0x4000 
-#define FLAGS2_UNICODE_STRINGS         0x8000
-
-
 /* CIFS protocol capabilities */
 #define CAP_RAW_MODE           0x00000001
 #define CAP_MPX_MODE           0x00000002
 
 #include "libcli/raw/trans2.h"
 #include "libcli/raw/interfaces.h"
+#include "libcli/smb/smb_common.h"
 
 #endif /* _SMB_H */