From: Stefan Metzmacher Date: Thu, 25 Nov 2004 11:20:09 +0000 (+0000) Subject: r3956: start to decode the repsFrom and repsTo fileds but not ready X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=e547588368b7454a412fb6376a6052fd1e027334;p=abartlet%2Fsamba.git%2F.git r3956: start to decode the repsFrom and repsTo fileds but not ready metze (This used to be commit 44f168c44de908fdf38b39aae8bf10e80206410a) --- diff --git a/source4/build/pidl/util.pm b/source4/build/pidl/util.pm index 4f4a0d8b6e4..7293a903d59 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 6c998968ac5..20b353c1eab 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 54943ce78cf..9463fe0c47e 100644 --- a/source4/librpc/idl/idl_types.h +++ b/source4/librpc/idl/idl_types.h @@ -48,6 +48,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 044b7129f84..be02a8b72a0 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; \