libcli:nbt put util_net.c protos in new header file
[ira/wip.git] / source3 / libnet / libnet_dssync.h
1 /*
2  *  Unix SMB/CIFS implementation.
3  *  libnet Support
4  *  Copyright (C) Guenther Deschner 2008
5  *  Copyright (C) Michael Adam 2008
6  *
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.
11  *
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.
16  *
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/>.
19  */
20
21 struct dssync_context;
22
23 struct dssync_ops {
24         NTSTATUS (*startup)(struct dssync_context *ctx, TALLOC_CTX *mem_ctx,
25                             struct replUpToDateVectorBlob **pold_utdv);
26         NTSTATUS (*process_objects)(struct dssync_context *ctx,
27                                     TALLOC_CTX *mem_ctx,
28                                     struct drsuapi_DsReplicaObjectListItemEx *objects,
29                                     struct drsuapi_DsReplicaOIDMapping_Ctr *mappings);
30         NTSTATUS (*finish)(struct dssync_context *ctx, TALLOC_CTX *mem_ctx,
31                            struct replUpToDateVectorBlob *new_utdv);
32 };
33
34 struct dssync_context {
35         const char *domain_name;
36         const char *dns_domain_name;
37         struct rpc_pipe_client *cli;
38         const char *nc_dn;
39         bool single_object_replication;
40         bool force_full_replication;
41         bool clean_old_entries;
42         uint32_t object_count;
43         const char **object_dns;
44         struct policy_handle bind_handle;
45         DATA_BLOB session_key;
46         const char *output_filename;
47         struct drsuapi_DsBindInfo28 remote_info28;
48
49         void *private_data;
50
51         const struct dssync_ops *ops;
52
53         char *result_message;
54         char *error_message;
55 };
56
57 extern const struct dssync_ops libnet_dssync_keytab_ops;