svn commit: samba r3956 - in branches/SAMBA_4_0/source: build/pidl librpc/idl librpc/ndr

metze at samba.org metze at samba.org
Thu Nov 25 11:20:11 GMT 2004


Author: metze
Date: 2004-11-25 11:20:09 +0000 (Thu, 25 Nov 2004)
New Revision: 3956

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3956

Log:
start to decode the repsFrom and repsTo fileds but not ready

metze

Modified:
   branches/SAMBA_4_0/source/build/pidl/util.pm
   branches/SAMBA_4_0/source/librpc/idl/drsblobs.idl
   branches/SAMBA_4_0/source/librpc/idl/idl_types.h
   branches/SAMBA_4_0/source/librpc/ndr/libndr.h


Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/util.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/util.pm	2004-11-25 04:16:16 UTC (rev 3955)
+++ branches/SAMBA_4_0/source/build/pidl/util.pm	2004-11-25 11:20:09 UTC (rev 3956)
@@ -233,6 +233,7 @@
     return 1, if ($type eq "uint8");
     return 2, if ($type eq "uint16");
     return 4, if ($type eq "NTTIME");
+    return 4, if ($type eq "NTTIME_1sec");
     return 4, if ($type eq "time_t");
     return 8, if ($type eq "HYPER_T");
     return 2, if ($type eq "wchar_t");

Modified: branches/SAMBA_4_0/source/librpc/idl/drsblobs.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/drsblobs.idl	2004-11-25 04:16:16 UTC (rev 3955)
+++ branches/SAMBA_4_0/source/librpc/idl/drsblobs.idl	2004-11-25 11:20:09 UTC (rev 3956)
@@ -83,4 +83,41 @@
 	void decode_replUpToDateVector(
 		[in] replUpToDateVectorBlob blob
 		);
+
+	/*
+	 * repsFrom/repsTo
+	 * w2k  uses version 1
+	 * w2k3 uses version 1
+	 */
+	typedef [flag(NDR_PAHEX)] struct {
+		NTTIME_1sec time1;
+		NTTIME_1sec time2;
+		uint32 unknown1[4];
+		uint8 unknown2[84];
+		uint32 unknown3;
+		uint64 usn1;
+		uint32 unknown4;
+		uint32 unknown5;
+		uint64 usn2;
+		GUID guid1;
+		GUID guid2;
+		uint32 unknown6[4];
+		asclstr dns_name;
+	} repsFromTo1;
+
+	typedef [nodiscriminant] union {
+		[case(1)] repsFromTo1 ctr1;
+	} repsFromTo;
+
+	typedef [public,gensize] struct {
+		uint32 version;
+		uint32 unknown1;
+		[value(ndr_size_repsFromToBlob(0, r, ndr->flags))] uint32 blobsize;
+		uint32 unknown2;
+		[switch_is(version)] repsFromTo ctr;
+	} repsFromToBlob;
+
+	void decode_repsFromTo(
+		[in] repsFromToBlob blob
+		);
 }

Modified: branches/SAMBA_4_0/source/librpc/idl/idl_types.h
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/idl_types.h	2004-11-25 04:16:16 UTC (rev 3955)
+++ branches/SAMBA_4_0/source/librpc/idl/idl_types.h	2004-11-25 11:20:09 UTC (rev 3956)
@@ -49,6 +49,11 @@
 #define ascstr2       [flag(STR_ASCII|STR_LEN4)]            string
 
 /*
+  an ascii string prefixed with [size], 32 bits
+*/
+#define asclstr       [flag(STR_ASCII|STR_SIZE4)]                     string
+
+/*
   an ascii string prefixed with [size], 16 bits
   null terminated
 */

Modified: branches/SAMBA_4_0/source/librpc/ndr/libndr.h
===================================================================
--- branches/SAMBA_4_0/source/librpc/ndr/libndr.h	2004-11-25 04:16:16 UTC (rev 3955)
+++ branches/SAMBA_4_0/source/librpc/ndr/libndr.h	2004-11-25 11:20:09 UTC (rev 3956)
@@ -198,9 +198,15 @@
 #define NDR_SIZE_ALIGN(t, n, flags) ((flags & LIBNDR_FLAG_NOALIGN)?(t):(((t) + (n-1)) & ~(n-1)))
 #define ndr_size_uint8(t, p, flags) (NDR_SIZE_ALIGN(t, 1, flags) + 1)
 #define ndr_size_uint16(t, p, flags) (NDR_SIZE_ALIGN(t, 2, flags) + 2)
+#define ndr_size_int32(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 4)
 #define ndr_size_uint32(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 4)
+#define ndr_size_int64(t, p, flags) (NDR_SIZE_ALIGN(t, 8, flags) + 8)
+#define ndr_size_uint64(t, p, flags) (NDR_SIZE_ALIGN(t, 8, flags) + 8)
 #define ndr_size_ptr(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 4)
 
+#define ndr_size_NTTIME(t, p, flags) ndr_size_uint64(t, p, flags)
+#define ndr_size_NTTIME_1sec(t, p, flags) ndr_size_NTTIME(t, p, flags)
+
 /* these are used to make the error checking on each element in libndr
    less tedious, hopefully making the code more readable */
 #define NDR_CHECK(call) do { NTSTATUS _status; \



More information about the samba-cvs mailing list