]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/cifs/cifspdu.h
[XFS] 929045 567344 This mod re-organizes some of the in-core file extent
[linux-2.6-omap-h63xx.git] / fs / cifs / cifspdu.h
index 48a05b9df7eb5f6ef8d66e8b252ee534dbfd257f..cc2471094ca58f38dfbd206005c511e41195d391 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *   fs/cifs/cifspdu.h
  *
- *   Copyright (c) International Business Machines  Corp., 2002
+ *   Copyright (c) International Business Machines  Corp., 2002,2005
  *   Author(s): Steve French (sfrench@us.ibm.com)
  *
  *   This library is free software; you can redistribute it and/or modify
 #define NT_TRANSACT_GET_USER_QUOTA    0x07
 #define NT_TRANSACT_SET_USER_QUOTA    0x08
 
-#define MAX_CIFS_HDR_SIZE 256  /* is future chained NTCreateXReadX bigger? */
+#define MAX_CIFS_SMALL_BUFFER_SIZE 448 /* big enough for most */
+/* future chained NTCreateXReadX bigger, but for time being NTCreateX biggest */
+/* among the requests (NTCreateX response is bigger with wct of 34) */
+#define MAX_CIFS_HDR_SIZE 0x58 /* 4 len + 32 hdr + (2*24 wct) + 2 bct + 2 pad */
+#define CIFS_SMALL_PATH 120 /* allows for (448-88)/3 */
 
 /* internal cifs vfs structures */
 /*****************************************************************
@@ -524,7 +528,7 @@ typedef union smb_com_session_setup_andx {
                /* STRING PrimaryDomain */
                /* STRING NativeOS */
                /* STRING NativeLanMan */
-       } __attribute__((packed)) old_req;              /* pre-NTLM (LANMAN2.1) request format */
+       } __attribute__((packed)) old_req; /* pre-NTLM (LANMAN2.1) req format */
 
        struct {                /* default (NTLM) response format */
                struct smb_hdr hdr;     /* wct = 3 */
@@ -536,7 +540,7 @@ typedef union smb_com_session_setup_andx {
                unsigned char NativeOS[1];      /* followed by */
 /*     unsigned char * NativeLanMan; */
 /*      unsigned char * PrimaryDomain; */
-       } __attribute__((packed)) old_resp;             /* pre-NTLM (LANMAN2.1) response format */
+       } __attribute__((packed)) old_resp; /* pre-NTLM (LANMAN2.1) response */
 } __attribute__((packed)) SESSION_SETUP_ANDX;
 
 #define CIFS_NETWORK_OPSYS "CIFS VFS Client for Linux"
@@ -603,7 +607,9 @@ typedef struct smb_com_logoff_andx_rsp {
        __u16 ByteCount;
 } __attribute__((packed)) LOGOFF_ANDX_RSP;
 
-typedef union smb_com_tree_disconnect {        /* as an altetnative can use flag on tree_connect PDU to effect disconnect *//* probably the simplest SMB PDU */
+typedef union smb_com_tree_disconnect {        /* as an altetnative can use flag on 
+                                       tree_connect PDU to effect disconnect */
+                                       /* tdis is probably simplest SMB PDU */
        struct {
                struct smb_hdr hdr;     /* wct = 0 */
                __u16 ByteCount;        /* bcc = 0 */
@@ -1001,10 +1007,49 @@ typedef struct smb_com_setattr_rsp {
 
 /* empty wct response to setattr */
 
-/***************************************************/
-/* NT Transact structure defintions follow         */
-/* Currently only ioctl and notify are implemented */
-/***************************************************/
+/*******************************************************/
+/* NT Transact structure defintions follow             */
+/* Currently only ioctl, acl (get security descriptor) */  
+/* and notify are implemented                          */
+/*******************************************************/
+typedef struct smb_com_ntransact_req {
+        struct smb_hdr hdr; /* wct >= 19 */
+        __u8 MaxSetupCount;
+        __u16 Reserved;
+        __le32 TotalParameterCount;
+        __le32 TotalDataCount;
+        __le32 MaxParameterCount;
+        __le32 MaxDataCount;
+        __le32 ParameterCount;
+        __le32 ParameterOffset;
+        __le32 DataCount;
+        __le32 DataOffset;
+        __u8 SetupCount; /* four setup words follow subcommand */
+        /* SNIA spec incorrectly included spurious pad here */
+        __le16 SubCommand; /* 2 = IOCTL/FSCTL */
+       /* SetupCount words follow then */ 
+        __le16 ByteCount;
+        __u8 Pad[3];
+        __u8 Parms[0];
+} __attribute__((packed)) NTRANSACT_REQ;
+
+typedef struct smb_com_ntransact_rsp {
+       struct smb_hdr hdr;     /* wct = 18 */
+       __u8 Reserved[3];
+       __le32 TotalParameterCount;
+       __le32 TotalDataCount;
+       __le32 ParameterCount;
+       __le32 ParameterOffset;
+       __le32 ParameterDisplacement;
+       __le32 DataCount;
+       __le32 DataOffset;
+       __le32 DataDisplacement;
+       __u8 SetupCount;   /* 0 */
+       __u16 ByteCount;
+        /* __u8 Pad[3]; */
+       /* parms and data follow */
+} __attribute__((packed)) NTRANSACT_RSP;
+
 typedef struct smb_com_transaction_ioctl_req {
        struct smb_hdr hdr;     /* wct = 23 */
        __u8 MaxSetupCount;
@@ -1019,11 +1064,11 @@ typedef struct smb_com_transaction_ioctl_req {
        __le32 DataOffset;
        __u8 SetupCount; /* four setup words follow subcommand */
        /* SNIA spec incorrectly included spurious pad here */
-       __le16 SubCommand;/* 2 = IOCTL/FSCTL */
+       __le16 SubCommand; /* 2 = IOCTL/FSCTL */
        __le32 FunctionCode;
        __u16 Fid;
-       __u8 IsFsctl;    /* 1 = File System Control, 0 = device control (IOCTL)*/
-       __u8 IsRootFlag; /* 1 = apply command to root of share (must be DFS share)*/
+       __u8 IsFsctl;  /* 1 = File System Control 0 = device control (IOCTL) */
+       __u8 IsRootFlag; /* 1 = apply command to root of share (must be DFS*/
        __le16 ByteCount;
        __u8 Pad[3];
        __u8 Data[1];
@@ -1043,9 +1088,35 @@ typedef struct smb_com_transaction_ioctl_rsp {
        __u8 SetupCount;        /* 1 */
        __le16 ReturnedDataLen;
        __u16 ByteCount;
-       __u8 Pad[3];
 } __attribute__((packed)) TRANSACT_IOCTL_RSP;
 
+#define CIFS_ACL_OWNER 1
+#define CIFS_ACL_GROUP 2
+#define CIFS_ACL_DACL  4
+#define CIFS_ACL_SACL  8
+
+typedef struct smb_com_transaction_qsec_req {
+       struct smb_hdr hdr;     /* wct = 19 */
+       __u8 MaxSetupCount;
+       __u16 Reserved;
+       __le32 TotalParameterCount;
+       __le32 TotalDataCount;
+       __le32 MaxParameterCount;
+       __le32 MaxDataCount;
+       __le32 ParameterCount;
+       __le32 ParameterOffset;
+       __le32 DataCount;
+       __le32 DataOffset;
+       __u8 SetupCount; /* no setup words follow subcommand */
+       /* SNIA spec incorrectly included spurious pad here */
+       __le16 SubCommand; /* 6 = QUERY_SECURITY_DESC */
+       __le16 ByteCount; /* bcc = 3 + 8 */
+       __u8 Pad[3];
+       __u16 Fid;
+       __u16 Reserved2;
+       __le32 AclFlags;
+} __attribute__((packed)) QUERY_SEC_DESC_REQ;
+
 typedef struct smb_com_transaction_change_notify_req {
        struct smb_hdr hdr;     /* wct = 23 */
        __u8 MaxSetupCount;
@@ -1066,10 +1137,12 @@ typedef struct smb_com_transaction_change_notify_req {
        __u8 WatchTree;  /* 1 = Monitor subdirectories */
        __u8 Reserved2;
        __le16 ByteCount;
-/* __u8 Pad[3];*/
+/*     __u8 Pad[3];*/
 /*     __u8 Data[1];*/
 } __attribute__((packed)) TRANSACT_CHANGE_NOTIFY_REQ;
 
+/* BB eventually change to use generic ntransact rsp struct 
+      and validation routine */
 typedef struct smb_com_transaction_change_notify_rsp {
        struct smb_hdr hdr;     /* wct = 18 */
        __u8 Reserved[3];
@@ -2025,6 +2098,12 @@ typedef struct {
 } __attribute__((packed)) FILE_BOTH_DIRECTORY_INFO;   /* level 0x104 FF response data area */
 
 
+struct win_dev {
+       unsigned char type[8]; /* IntxCHR or IntxBLK */
+       __le64 major;
+       __le64 minor;   
+} __attribute__((packed));
+
 struct gea {
        unsigned char name_len;
        char name[1];