lib/util: add function to query the monotonic clock with the required fallback to...
[Samba/gbeck.git] / source3 / libnet / libnet_dssync.h
blob91f48f5e8511dc0e19ab739b59ac6460e19cfd2d
1 /*
2 * Unix SMB/CIFS implementation.
3 * libnet Support
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;
26 struct dssync_ops {
27 NTSTATUS (*startup)(struct dssync_context *ctx, TALLOC_CTX *mem_ctx,
28 struct replUpToDateVectorBlob **pold_utdv);
29 NTSTATUS (*process_objects)(struct dssync_context *ctx,
30 TALLOC_CTX *mem_ctx,
31 struct drsuapi_DsReplicaObjectListItemEx *objects,
32 struct drsuapi_DsReplicaOIDMapping_Ctr *mappings);
33 NTSTATUS (*finish)(struct dssync_context *ctx, TALLOC_CTX *mem_ctx,
34 struct replUpToDateVectorBlob *new_utdv);
37 struct dssync_context {
38 const char *domain_name;
39 const char *dns_domain_name;
40 struct rpc_pipe_client *cli;
41 const char *nc_dn;
42 bool single_object_replication;
43 bool force_full_replication;
44 bool clean_old_entries;
45 uint32_t object_count;
46 const char **object_dns;
47 struct policy_handle bind_handle;
48 DATA_BLOB session_key;
49 const char *output_filename;
50 struct drsuapi_DsBindInfo28 remote_info28;
52 void *private_data;
54 const struct dssync_ops *ops;
56 char *result_message;
57 char *error_message;
60 extern const struct dssync_ops libnet_dssync_keytab_ops;
62 /* The following definitions come from libnet/libnet_dssync.c */
64 NTSTATUS libnet_dssync_init_context(TALLOC_CTX *mem_ctx,
65 struct dssync_context **ctx_p);
66 NTSTATUS libnet_dssync(TALLOC_CTX *mem_ctx,
67 struct dssync_context *ctx);