summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-03-23 18:54:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:11:14 -0500
commit01ab1128cedfe3381ba579445e6714152e29add8 (patch)
treeaca6518b1bf08754c180d6b1d3025d7512f44cd2
parentb8f395cf78d6983f6a9ee139e99968bde3455795 (diff)
downloadsamba-01ab1128cedfe3381ba579445e6714152e29add8.tar.gz
samba-01ab1128cedfe3381ba579445e6714152e29add8.tar.bz2
samba-01ab1128cedfe3381ba579445e6714152e29add8.zip
r5998: I was wrong with the highwater mark...
I think I now understand how it works:-) metze (This used to be commit f8add2e66a56896d9bb18991091e1b17c29910b1)
-rw-r--r--source4/librpc/idl/drsblobs.idl7
-rw-r--r--source4/librpc/idl/drsuapi.idl49
-rw-r--r--source4/torture/rpc/drsuapi.c33
3 files changed, 58 insertions, 31 deletions
diff --git a/source4/librpc/idl/drsblobs.idl b/source4/librpc/idl/drsblobs.idl
index ab98c50606..e682de452f 100644
--- a/source4/librpc/idl/drsblobs.idl
+++ b/source4/librpc/idl/drsblobs.idl
@@ -9,6 +9,7 @@
]
interface drsblobs {
declare bitmap drsuapi_DsReplicaSyncOptions;
+ declare bitmap drsuapi_DsReplicaNeighbourFlags;
declare [v1_enum] enum drsuapi_DsAttributeId;
/*
@@ -95,10 +96,10 @@ interface drsblobs {
WERROR result_last_attempt;
[relative] repsFromTo1OtherInfo *other_info;
[value(ndr_size_repsFromTo1OtherInfo(r->other_info, ndr->flags))] uint32 other_info_length;
- drsuapi_DsReplicaSyncOptions replica_flags;
+ drsuapi_DsReplicaNeighbourFlags replica_flags;
uint8 schedule[84];
uint32 reserved;
- drsuapi_DsReplicaUsnCtr replication_state;
+ drsuapi_DsReplicaHighWaterMark highwatermark;
GUID source_dsa_obj_guid; /* the 'objectGuid' field of the CN=NTDS Settings object */
GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
GUID transport_guid;
@@ -125,7 +126,7 @@ interface drsblobs {
uint32 u2;
uint32 u3;
uint32 u4;
- drsuapi_DsReplicaUsnCtr replication_state;
+ drsuapi_DsReplicaHighWaterMark highwatermark;
GUID guid1;
hyper h4;
replUpToDateVectorCtr1 uptodateness_vector;
diff --git a/source4/librpc/idl/drsuapi.idl b/source4/librpc/idl/drsuapi.idl
index 789427222a..4144ced563 100644
--- a/source4/librpc/idl/drsuapi.idl
+++ b/source4/librpc/idl/drsuapi.idl
@@ -172,7 +172,7 @@ interface drsuapi
hyper tmp_highest_usn; /* updated after each object update */
hyper reserved_usn;
hyper highest_usn; /* updated after a full replication cycle */
- } drsuapi_DsReplicaUsnCtr;
+ } drsuapi_DsReplicaHighWaterMark;
typedef [public] struct {
GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
@@ -187,13 +187,31 @@ interface drsuapi
[size_is(count)] drsuapi_DsReplicaCoursor coursors[];
} drsuapi_DsReplicaCoursor05Ctr;
+ typedef [public] bitmap {
+ DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE = 0x00000010,
+ DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP = 0x00000020,
+ DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS = 0x00000040,
+ DRSUAPI_DS_REPLICA_NEIGHBOUR_USE_ASYNC_INTERSIDE_TRANSPORT = 0x00000080,
+ DRSUAPI_DS_REPLICA_NEIGHBOUR_TWO_WAY_SYNC = 0x00000200,
+ DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS = 0x00000800,
+ DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_IN_PROGRESS = 0x00010000,
+ DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_NEXT_PACKET = 0x00020000,
+ DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED = 0x00200000,
+ DRSUAPI_DS_REPLICA_NEIGHBOUR_PREEMPTED = 0x01000000,
+ DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_CHANGE_NOTIFICATIONS = 0x04000000,
+ DRSUAPI_DS_REPLICA_NEIGHBOUR_DISABLE_SCHEDULED_SYNC = 0x08000000,
+ DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES = 0x10000000,
+ DRSUAPI_DS_REPLICA_NEIGHBOUR_NO_CHANGE_NOTIFICATIONS = 0x20000000,
+ DRSUAPI_DS_REPLICA_NEIGHBOUR_PARTIAL_ATTRIBUTE_SET = 0x40000000
+ } drsuapi_DsReplicaNeighbourFlags;
+
typedef struct {
GUID destination_dsa_guid;
GUID source_dsa_guid;
[ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
- drsuapi_DsReplicaUsnCtr replication_state;
- drsuapi_DsReplicaCoursor05Ctr *highwatermark_vector;
- uint32 unknown1;
+ drsuapi_DsReplicaHighWaterMark highwatermark;
+ drsuapi_DsReplicaCoursor05Ctr *uptodateness_vector;
+ drsuapi_DsReplicaNeighbourFlags replica_flags;
uint32 unknown2;
uint32 unknown3;
uint32 unknown4;
@@ -219,9 +237,9 @@ interface drsuapi
GUID destination_dsa_guid;
GUID source_dsa_guid;
[ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
- drsuapi_DsReplicaUsnCtr replication_state;
- drsuapi_DsReplicaCoursor05Ctr *highwatermark_vector;
- uint32 unknown1;
+ drsuapi_DsReplicaHighWaterMark highwatermark;
+ drsuapi_DsReplicaCoursor05Ctr *uptodateness_vector;
+ drsuapi_DsReplicaNeighbourFlags replica_flags;
uint32 unknown2;
uint32 unknown3;
uint32 unknown4;
@@ -448,17 +466,18 @@ interface drsuapi
drsuapi_DsReplicaMetaDataCtr *meta_data_ctr;
} drsuapi_DsReplicaObjectListItemEx;
- typedef struct {
+ typedef [gensize] struct {
GUID guid1;
GUID guid2;
drsuapi_DsReplicaObjectIdentifier *naming_context;
- drsuapi_DsReplicaUsnCtr old_replication_state;
- drsuapi_DsReplicaUsnCtr new_replication_state;
+ drsuapi_DsReplicaHighWaterMark old_highwatermark;
+ drsuapi_DsReplicaHighWaterMark new_highwatermark;
drsuapi_DsReplicaCoursor05Ctr *uptodateness_vector;
drsuapi_DsGetNCChangesRequest_Ctr12 ctr12;
uint32 unknown1;
- uint32 unknown2;
- uint32 unknown3;
+ uint32 object_count;
+ /* this +55 is sometimes +56, so I don't know where this comes from... --metze */
+ [value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->flags)+55)] uint32 __ndr_size;
drsuapi_DsReplicaObjectListItemEx *first_object;
uint32 unknown4;
} drsuapi_DsGetNCChangesCtr1;
@@ -477,8 +496,8 @@ interface drsuapi
GUID guid1;
GUID guid2;
drsuapi_DsReplicaObjectIdentifier *naming_context;
- drsuapi_DsReplicaUsnCtr old_replication_state;
- drsuapi_DsReplicaUsnCtr new_replication_state;
+ drsuapi_DsReplicaHighWaterMark old_highwatermark;
+ drsuapi_DsReplicaHighWaterMark new_highwatermark;
drsuapi_DsReplicaCoursor05Ctr *uptodateness_vector;
drsuapi_DsGetNCChangesRequest_Ctr12 ctr12;
uint32 unknown1;
@@ -889,7 +908,7 @@ interface drsuapi
unistr *source_dsa_obj_dn;
unistr *source_dsa_address;
unistr *transport_obj_dn;
- uint32 replica_flags;
+ drsuapi_DsReplicaNeighbourFlags replica_flags;
uint32 reserved;
GUID naming_context_obj_guid;
GUID source_dsa_obj_guid;
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index 9774a92a8a..8b1cccd1e0 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -902,7 +902,7 @@ static BOOL test_DsGetNCChanges(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
ZERO_STRUCT(null_guid);
ZERO_STRUCT(null_sid);
-
+
for (i=0; i < ARRAY_SIZE(array); i++) {
printf("testing DsGetNCChanges level %d\n",
array[i].level);
@@ -919,13 +919,13 @@ static BOOL test_DsGetNCChanges(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.req.req5.destination_dsa_guid = GUID_random();
r.in.req.req5.source_dsa_guid = null_guid;
r.in.req.req5.naming_context = &nc;
- r.in.req.req5.replication_state.tmp_highest_usn = 0;
- r.in.req.req5.replication_state.reserved_usn = 0;
- r.in.req.req5.replication_state.highest_usn = 0;
- r.in.req.req5.highwatermark_vector = NULL;
- r.in.req.req5.unknown1 = 0;/*0x10201C70;*/
- r.in.req.req5.unknown2 = 402;
- r.in.req.req5.unknown3 = 402116;
+ r.in.req.req5.highwatermark.tmp_highest_usn = 167997;
+ r.in.req.req5.highwatermark.reserved_usn = 0;
+ r.in.req.req5.highwatermark.highest_usn = 0;
+ r.in.req.req5.uptodateness_vector = NULL;
+ r.in.req.req5.replica_flags = 0;
+ r.in.req.req5.unknown2 = 0;
+ r.in.req.req5.unknown3 = 0;
r.in.req.req5.unknown4 = 0;
r.in.req.req5.h1 = 0;
@@ -938,11 +938,18 @@ static BOOL test_DsGetNCChanges(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.req.req8.destination_dsa_guid = GUID_random();
r.in.req.req8.source_dsa_guid = null_guid;
r.in.req.req8.naming_context = &nc;
- r.in.req.req8.replication_state.tmp_highest_usn = 0;
- r.in.req.req8.replication_state.reserved_usn = 0;
- r.in.req.req8.replication_state.highest_usn = 0;
- r.in.req.req8.highwatermark_vector = NULL;
- r.in.req.req8.unknown1 = 0x10201C70;
+ r.in.req.req8.highwatermark.tmp_highest_usn = 0;
+ r.in.req.req8.highwatermark.reserved_usn = 0;
+ r.in.req.req8.highwatermark.highest_usn = 0;
+ r.in.req.req8.uptodateness_vector = NULL;
+ r.in.req.req8.replica_flags = 0
+ | DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE
+ | DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
+ | DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS
+ | DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS
+ | DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED
+ | DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES
+ ;
r.in.req.req8.unknown2 = 402;
r.in.req.req8.unknown3 = 402116;
r.in.req.req8.unknown4 = 0;