s3:smbXsrv.idl: add smbXsrv_tcon* structures
authorStefan Metzmacher <metze@samba.org>
Fri, 16 Mar 2012 15:18:40 +0000 (16:18 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 25 Jun 2012 18:55:06 +0000 (20:55 +0200)
struct smbXsrv_tcon will represent a SMB 1 or SMB 2
tree connect. It will replace 'struct smbd_smb2_tcon' and
'connection_struct' will be changed to handle just the protocol
independent glue for the SMB_VFS layer.

metze

source3/librpc/idl/smbXsrv.idl

index 407c1de15a5f6ae9cce1991785aaad1335b290c4..44af7c83afa5d841ce6fb7312710d8d83d84e545 100644 (file)
@@ -16,6 +16,18 @@ import "auth.idl";
  */
 cpp_quote("#define smbXsrv_session smbXsrv_session0")
 
+/*
+ * The main server code should just work with
+ * 'struct smbXsrv_tcon' and never use
+ * smbXsrv_tcon0, smbXsrv_tconU
+ * and smbXsrv_tconB directly.
+ *
+ * If we need to change the smbXsrv_tcon,
+ * we can just point it to smbXsrv_tcon1
+ * and could implement transparent mapping.
+ */
+cpp_quote("#define smbXsrv_tcon smbXsrv_tcon0")
+
 [
        uuid("07408340-ae31-11e1-97dc-539f7fddc06f"),
        version(0.0),
@@ -165,4 +177,55 @@ interface smbXsrv
        void smbXsrv_session_decode(
                [in] smbXsrv_sessionB blob
                );
+
+       /* tree connects */
+
+       typedef struct {
+               [ignore] db_record                      *db_rec;
+               uint32                                  tcon_global_id;
+               uint32                                  tcon_wire_id;
+               server_id                               server_id;
+               NTTIME                                  creation_time;
+               [charset(UTF8),string] char             share_name[];
+       } smbXsrv_tcon_global0;
+
+       typedef union {
+               [case(0)] smbXsrv_tcon_global0          *info0;
+               [default] hyper                         *dummy;
+       } smbXsrv_tcon_globalU;
+
+       typedef [public] struct {
+               smbXsrv_version_values                  version;
+               uint32                                  seqnum;
+               [switch_is(version)] smbXsrv_tcon_globalU info;
+       } smbXsrv_tcon_globalB;
+
+       void smbXsrv_tcon_global_decode(
+               [in] smbXsrv_tcon_globalB blob
+               );
+
+       typedef struct {
+               [ignore] smbXsrv_tcon_table             *table;
+               [ignore] db_record                      *db_rec;
+               uint32                                  local_id;
+               [ref] smbXsrv_tcon_global0              *global;
+               NTSTATUS                                status;
+               NTTIME                                  idle_time;
+               [ignore] connection_struct              *compat;
+       } smbXsrv_tcon0;
+
+       typedef union {
+               [case(0)] smbXsrv_tcon0                 *info0;
+               [default] hyper                         *dummy;
+       } smbXsrv_tconU;
+
+       typedef [public] struct {
+               smbXsrv_version_values                  version;
+               [value(0)] uint32                       reserved;
+               [switch_is(version)] smbXsrv_tconU      info;
+       } smbXsrv_tconB;
+
+       void smbXsrv_tcon_decode(
+               [in] smbXsrv_tconB blob
+               );
 }