libcli/smb: move CAP_* defines to smb_constants.h
[bbaumbach/samba-autobuild/.git] / source3 / include / smb.h
index 3242c604d60f9e89fb306cc133673bf059943910..b1d333cbb6d7c01f8f418f6599ff5fa4d493eb5d 100644 (file)
@@ -305,7 +305,7 @@ typedef struct files_struct {
 #include "sysquotas.h"
 
 struct vuid_cache_entry {
-       struct auth3_session_info *session_info;
+       struct auth_session_info *session_info;
        uint16_t vuid;
        bool read_only;
 };
@@ -403,7 +403,7 @@ typedef struct connection_struct {
         * This represents the user information on this connection. Depending
         * on the vuid using this tid, this might change per SMB request.
         */
-       struct auth3_session_info *session_info;
+       struct auth_session_info *session_info;
 
        /*
         * If the "force group" parameter is set, this is the primary gid that
@@ -693,38 +693,43 @@ struct connections_data {
 };
 
 /* offsets into message for common items */
-#define smb_com 8
-#define smb_rcls 9
-#define smb_reh 10
-#define smb_err 11
-#define smb_flg 13
-#define smb_flg2 14
-#define smb_pidhigh 16
-#define smb_ss_field 18
-#define smb_tid 28
-#define smb_pid 30
-#define smb_uid 32
-#define smb_mid 34
-#define smb_wct 36
-#define smb_vwv 37
-#define smb_vwv0 37
-#define smb_vwv1 39
-#define smb_vwv2 41
-#define smb_vwv3 43
-#define smb_vwv4 45
-#define smb_vwv5 47
-#define smb_vwv6 49
-#define smb_vwv7 51
-#define smb_vwv8 53
-#define smb_vwv9 55
-#define smb_vwv10 57
-#define smb_vwv11 59
-#define smb_vwv12 61
-#define smb_vwv13 63
-#define smb_vwv14 65
-#define smb_vwv15 67
-#define smb_vwv16 69
-#define smb_vwv17 71
+#define smb_com                (NBT_HDR_SIZE+HDR_COM)
+#define smb_rcls       (NBT_HDR_SIZE+HDR_RCLS)
+#define smb_reh                (NBT_HDR_SIZE+HDR_REH)
+#define smb_err                (NBT_HDR_SIZE+HDR_ERR)
+#define smb_flg                (NBT_HDR_SIZE+HDR_FLG)
+#define smb_flg2       (NBT_HDR_SIZE+HDR_FLG2)
+#define smb_pidhigh    (NBT_HDR_SIZE+HDR_PIDHIGH)
+#define smb_ss_field   (NBT_HDR_SIZE+HDR_SS_FIELD)
+#define smb_tid                (NBT_HDR_SIZE+HDR_TID)
+#define smb_pid                (NBT_HDR_SIZE+HDR_PID)
+#define smb_uid                (NBT_HDR_SIZE+HDR_UID)
+#define smb_mid                (NBT_HDR_SIZE+HDR_MID)
+#define smb_wct                (NBT_HDR_SIZE+HDR_WCT)
+#define smb_vwv                (NBT_HDR_SIZE+HDR_VWV)
+#define smb_vwv0       (smb_vwv+( 0*2))
+#define smb_vwv1       (smb_vwv+( 1*2))
+#define smb_vwv2       (smb_vwv+( 2*2))
+#define smb_vwv3       (smb_vwv+( 3*2))
+#define smb_vwv4       (smb_vwv+( 4*2))
+#define smb_vwv5       (smb_vwv+( 5*2))
+#define smb_vwv6       (smb_vwv+( 6*2))
+#define smb_vwv7       (smb_vwv+( 7*2))
+#define smb_vwv8       (smb_vwv+( 8*2))
+#define smb_vwv9       (smb_vwv+( 9*2))
+#define smb_vwv10      (smb_vwv+(10*2))
+#define smb_vwv11      (smb_vwv+(11*2))
+#define smb_vwv12      (smb_vwv+(12*2))
+#define smb_vwv13      (smb_vwv+(13*2))
+#define smb_vwv14      (smb_vwv+(14*2))
+#define smb_vwv15      (smb_vwv+(15*2))
+#define smb_vwv16      (smb_vwv+(16*2))
+#define smb_vwv17      (smb_vwv+(17*2))
+
+/* types of buffers in core SMB protocol */
+#define SMB_DATA_BLOCK 0x1
+#define SMB_ASCII4     0x4
+
 
 /* flag defines. CIFS spec 3.1.1 */
 #define FLAG_SUPPORT_LOCKREAD       0x01
@@ -824,6 +829,9 @@ struct connections_data {
 #define SMBntcancel      0xA4   /* NT cancel */
 #define SMBntrename      0xA5   /* NT rename */
 
+/* used to indicate end of chain */
+#define SMB_CHAIN_NONE   0xFF
+
 /* These are the trans subcommands */
 #define TRANSACT_SETNAMEDPIPEHANDLESTATE  0x01 
 #define TRANSACT_DCERPCCMD                0x26
@@ -1183,25 +1191,6 @@ http://msdn.microsoft.com/en-us/library/cc246334(PROT.13).aspx
 #define NO_SUBSTREAMS          0x2
 #define NO_REPARSETAG          0x4
 
-/* Capabilities.  see ftp.microsoft.com/developr/drg/cifs/cifs/cifs4.txt */
-
-#define CAP_RAW_MODE         0x0001
-#define CAP_MPX_MODE         0x0002
-#define CAP_UNICODE          0x0004
-#define CAP_LARGE_FILES      0x0008
-#define CAP_NT_SMBS          0x0010
-#define CAP_RPC_REMOTE_APIS  0x0020
-#define CAP_STATUS32         0x0040
-#define CAP_LEVEL_II_OPLOCKS 0x0080
-#define CAP_LOCK_AND_READ    0x0100
-#define CAP_NT_FIND          0x0200
-#define CAP_DFS              0x1000
-#define CAP_W2K_SMBS         0x2000
-#define CAP_LARGE_READX      0x4000
-#define CAP_LARGE_WRITEX     0x8000
-#define CAP_UNIX             0x800000 /* Capabilities for UNIX extensions. Created by HP. */
-#define CAP_EXTENDED_SECURITY 0x80000000
-
 /* printing types */
 enum printing_types {PRINT_BSD,PRINT_SYSV,PRINT_AIX,PRINT_HPUX,
                     PRINT_QNX,PRINT_PLP,PRINT_LPRNG,PRINT_SOFTQ,
@@ -1447,7 +1436,7 @@ typedef struct user_struct {
                                 TDB key string */
        int homes_snum;
 
-       struct auth3_session_info *session_info;
+       struct auth_session_info *session_info;
 
        struct auth_ntlmssp_state *auth_ntlmssp_state;
 } user_struct;
@@ -1568,6 +1557,7 @@ struct smb_file_time {
 #define UCF_ALWAYS_ALLOW_WCARD_LCOMP   0x00000002
 #define UCF_COND_ALLOW_WCARD_LCOMP     0x00000004
 #define UCF_POSIX_PATHNAMES            0x00000008
+#define UCF_UNIX_NAME_LOOKUP           0x00000010
 
 /*
  * smb_filename
@@ -1588,12 +1578,6 @@ struct child_pid {
 /* Used to keep track of deferred opens. */
 struct deferred_open_record;
 
-/* Client-side offline caching policy types */
-#define CSC_POLICY_MANUAL 0
-#define CSC_POLICY_DOCUMENTS 1
-#define CSC_POLICY_PROGRAMS 2
-#define CSC_POLICY_DISABLE 3
-
 /* Used inside aio code. */
 struct aio_extra;