2 * Unix SMB/CIFS implementation.
4 * Copyright (C) Guenther Deschner 2008
5 * Copyright (C) Michael Adam 2008
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, see <http://www.gnu.org/licenses/>.
21 #include "../librpc/gen_ndr/drsuapi.h"
22 #include "../librpc/gen_ndr/drsblobs.h"
24 struct dssync_context
;
27 NTSTATUS (*startup
)(struct dssync_context
*ctx
, TALLOC_CTX
*mem_ctx
,
28 struct replUpToDateVectorBlob
**pold_utdv
);
29 NTSTATUS (*process_objects
)(struct dssync_context
*ctx
,
31 struct drsuapi_DsReplicaObjectListItemEx
*objects
,
32 struct drsuapi_DsReplicaOIDMapping_Ctr
*mappings
);
33 NTSTATUS (*process_links
)(struct dssync_context
*ctx
,
36 struct drsuapi_DsReplicaLinkedAttribute
*links
,
37 struct drsuapi_DsReplicaOIDMapping_Ctr
*mappings
);
38 NTSTATUS (*finish
)(struct dssync_context
*ctx
, TALLOC_CTX
*mem_ctx
,
39 struct replUpToDateVectorBlob
*new_utdv
);
42 struct dssync_context
{
43 const char *domain_name
;
44 const char *dns_domain_name
;
45 struct rpc_pipe_client
*cli
;
47 bool single_object_replication
;
48 bool force_full_replication
;
49 bool clean_old_entries
;
50 uint32_t object_count
;
51 const char **object_dns
;
52 struct policy_handle bind_handle
;
53 DATA_BLOB session_key
;
54 const char *output_filename
;
55 struct drsuapi_DsBindInfo28 remote_info28
;
59 const struct dssync_ops
*ops
;
65 extern const struct dssync_ops libnet_dssync_keytab_ops
;
66 extern const struct dssync_ops libnet_dssync_passdb_ops
;
68 /* The following definitions come from libnet/libnet_dssync.c */
70 NTSTATUS
libnet_dssync_init_context(TALLOC_CTX
*mem_ctx
,
71 struct dssync_context
**ctx_p
);
72 NTSTATUS
libnet_dssync(TALLOC_CTX
*mem_ctx
,
73 struct dssync_context
*ctx
);