summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-11-25 11:20:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:07 -0500
commite547588368b7454a412fb6376a6052fd1e027334 (patch)
tree4dd89855127bcd76fd0d45d16d168dc18c604eef
parenta99bf332940f48ae0a503ad6a4909c490626f612 (diff)
downloadsamba-e547588368b7454a412fb6376a6052fd1e027334.tar.gz
samba-e547588368b7454a412fb6376a6052fd1e027334.tar.bz2
samba-e547588368b7454a412fb6376a6052fd1e027334.zip
r3956: start to decode the repsFrom and repsTo fileds but not ready
metze (This used to be commit 44f168c44de908fdf38b39aae8bf10e80206410a)
-rw-r--r--source4/build/pidl/util.pm1
-rw-r--r--source4/librpc/idl/drsblobs.idl37
-rw-r--r--source4/librpc/idl/idl_types.h5
-rw-r--r--source4/librpc/ndr/libndr.h6
4 files changed, 49 insertions, 0 deletions
diff --git a/source4/build/pidl/util.pm b/source4/build/pidl/util.pm
index 4f4a0d8b6e..7293a903d5 100644
--- a/source4/build/pidl/util.pm
+++ b/source4/build/pidl/util.pm
@@ -233,6 +233,7 @@ sub type_align($)
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");
diff --git a/source4/librpc/idl/drsblobs.idl b/source4/librpc/idl/drsblobs.idl
index 6c998968ac..20b353c1ea 100644
--- a/source4/librpc/idl/drsblobs.idl
+++ b/source4/librpc/idl/drsblobs.idl
@@ -83,4 +83,41 @@ interface drsblobs {
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
+ );
}
diff --git a/source4/librpc/idl/idl_types.h b/source4/librpc/idl/idl_types.h
index 54943ce78c..9463fe0c47 100644
--- a/source4/librpc/idl/idl_types.h
+++ b/source4/librpc/idl/idl_types.h
@@ -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
*/
diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h
index 044b7129f8..be02a8b72a 100644
--- a/source4/librpc/ndr/libndr.h
+++ b/source4/librpc/ndr/libndr.h
@@ -198,9 +198,15 @@ enum ndr_err_code {
#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; \