summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-03-16 09:25:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:11:04 -0500
commitd7b5a565efac8bae48acf57e5d7fc53c3173240f (patch)
tree4ec1e114fd41992051e555a1b997b69d506e111a
parent1d642039547dfca8edcee69998d9b61655668bcb (diff)
downloadsamba-d7b5a565efac8bae48acf57e5d7fc53c3173240f.tar.gz
samba-d7b5a565efac8bae48acf57e5d7fc53c3173240f.tar.bz2
samba-d7b5a565efac8bae48acf57e5d7fc53c3173240f.zip
r5828: add some idl for DsAddEntry()
metze (This used to be commit 3e6ec811288d74921bf3e393213e75d928156772)
-rw-r--r--source4/include/structs.h3
-rw-r--r--source4/librpc/idl/drsuapi.idl55
-rw-r--r--source4/librpc/ndr/ndr_drsuapi.c21
3 files changed, 68 insertions, 11 deletions
diff --git a/source4/include/structs.h b/source4/include/structs.h
index 5395eebf60..c11a2a054b 100644
--- a/source4/include/structs.h
+++ b/source4/include/structs.h
@@ -29,7 +29,8 @@ struct spoolss_EnumJobs;
struct spoolss_EnumPrinterDrivers;
struct spoolss_EnumPorts;
-struct drsuapi_DsGetNCChangesInfo1;
+struct drsuapi_DsReplicaObjectListItem;
+struct drsuapi_DsReplicaObjectListItemEx;
struct MULTI_QI;
struct COSERVERINFO;
diff --git a/source4/librpc/idl/drsuapi.idl b/source4/librpc/idl/drsuapi.idl
index 1329332d6b..dbeaa3ccab 100644
--- a/source4/librpc/idl/drsuapi.idl
+++ b/source4/librpc/idl/drsuapi.idl
@@ -114,7 +114,7 @@ interface drsuapi
/*****************/
/* Function 0x02 */
- typedef [gensize,flag(NDR_PAHEX)] struct {
+ typedef [gensize] struct {
[value(ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags)-4)] uint32 __ndr_size;
[value(ndr_length_dom_sid(&r->sid))] uint32 __ndr_size_sid;
GUID guid;
@@ -295,12 +295,12 @@ interface drsuapi
} drsuapi_DsReplicaObject;
typedef [noprint] struct {
- drsuapi_DsGetNCChangesInfo1 *next;
+ drsuapi_DsReplicaObjectListItemEx *next_object;
drsuapi_DsReplicaObject object;
uint32 unknown1;
GUID *guid;
drsuapi_DsReplicaMetaDataCtr *meta_data_ctr;
- } drsuapi_DsGetNCChangesInfo1;
+ } drsuapi_DsReplicaObjectListItemEx;
typedef struct {
GUID guid1;
@@ -311,7 +311,7 @@ interface drsuapi
drsuapi_DsReplicaCoursorEx05Ctr *coursor_ex;
drsuapi_DsGetNCChangesRequest_Ctr12 ctr12;
uint32 u1[3];
- drsuapi_DsGetNCChangesInfo1 *info1;
+ drsuapi_DsReplicaObjectListItemEx *first_object;
uint32 u2;
} drsuapi_DsGetNCChangesCtr1;
@@ -630,7 +630,52 @@ interface drsuapi
/*****************/
/* Function 0x11 */
- WERROR drsuapi_DsAddEntry();
+ typedef [noprint] struct {
+ drsuapi_DsReplicaObjectListItem *next_object;
+ drsuapi_DsReplicaObject object;
+ } drsuapi_DsReplicaObjectListItem;
+
+ typedef struct {
+ drsuapi_DsReplicaObjectListItem first_object;
+ } drsuapi_DsAddEntryRequest2;
+
+ typedef [switch_type(int32)] union {
+ [case(2)] drsuapi_DsAddEntryRequest2 req2;
+ } drsuapi_DsAddEntryRequest;
+
+ typedef struct {
+ uint32 unknown1;
+ uint32 unknown2;
+ uint32 unknown3;
+ } drsuapi_DsAddEntryCtr3Info1;
+
+ typedef [switch_type(uint32)] union {
+ [case(1)] drsuapi_DsAddEntryCtr3Info1 info1;
+ } drsuapi_DsAddEntryCtr3Info;
+
+ typedef struct {
+ GUID guid;
+ [subcontext_size(28),subcontext(0)] dom_sid sid;
+ } drsuapi_DsReplicaObjectIdentifier2;
+
+ typedef struct {
+ drsuapi_DsReplicaObjectIdentifier *id;
+ uint32 level;
+ [switch_is(level)] drsuapi_DsAddEntryCtr3Info *info;
+ [range(0,10000)] uint32 count;
+ [size_is(count)] drsuapi_DsReplicaObjectIdentifier2 *objects[];
+ } drsuapi_DsAddEntryCtr3;
+
+ typedef [switch_type(int32)] union {
+ [case(3)] drsuapi_DsAddEntryCtr3 ctr3;
+ } drsuapi_DsAddEntryCtr;
+
+ WERROR drsuapi_DsAddEntry(
+ [in,ref] policy_handle *bind_handle,
+ [in,out] int32 level,
+ [in,switch_is(level)] drsuapi_DsAddEntryRequest req,
+ [out,switch_is(level)] drsuapi_DsAddEntryCtr ctr
+ );
/*****************/
/* Function 0x12 */
diff --git a/source4/librpc/ndr/ndr_drsuapi.c b/source4/librpc/ndr/ndr_drsuapi.c
index 5a39c9c5e5..9654e63720 100644
--- a/source4/librpc/ndr/ndr_drsuapi.c
+++ b/source4/librpc/ndr/ndr_drsuapi.c
@@ -24,12 +24,23 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_drsuapi.h"
+void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name, struct drsuapi_DsReplicaObjectListItem *r)
+{
+ ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectListItem");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "next_object", r->next_object);
+ ndr_print_drsuapi_DsReplicaObject(ndr, "object", &r->object);
+ ndr->depth--;
+ if (r->next_object) {
+ ndr_print_drsuapi_DsReplicaObjectListItem(ndr, "next_object", r->next_object);
+ }
+}
-void ndr_print_drsuapi_DsGetNCChangesInfo1(struct ndr_print *ndr, const char *name, struct drsuapi_DsGetNCChangesInfo1 *r)
+void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name, struct drsuapi_DsReplicaObjectListItemEx *r)
{
- ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesInfo1");
+ ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectListItemEx");
ndr->depth++;
- ndr_print_ptr(ndr, "next", r->next);
+ ndr_print_ptr(ndr, "next_object", r->next_object);
ndr_print_drsuapi_DsReplicaObject(ndr, "object", &r->object);
ndr_print_uint32(ndr, "unknown1", r->unknown1);
ndr_print_ptr(ndr, "guid", r->guid);
@@ -45,7 +56,7 @@ void ndr_print_drsuapi_DsGetNCChangesInfo1(struct ndr_print *ndr, const char *na
}
ndr->depth--;
ndr->depth--;
- if (r->next) {
- ndr_print_drsuapi_DsGetNCChangesInfo1(ndr, "next", r->next);
+ if (r->next_object) {
+ ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, "next_object", r->next_object);
}
}