summaryrefslogtreecommitdiff
path: root/source4/utils/net/drs/net_drs.h
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>2010-02-05 22:36:10 +0200
committerAndrew Tridgell <tridge@samba.org>2010-02-11 21:59:38 +1100
commit61246da63cb280b6b3e277583b84c2dfacb6be68 (patch)
tree67e22e287a3600e84988aa5fa5f16a42b727a2b7 /source4/utils/net/drs/net_drs.h
parent0a05af92778666e869dfd41d20b24b46d069e3ec (diff)
downloadsamba-61246da63cb280b6b3e277583b84c2dfacb6be68.tar.gz
samba-61246da63cb280b6b3e277583b84c2dfacb6be68.tar.bz2
samba-61246da63cb280b6b3e277583b84c2dfacb6be68.zip
s4/net_drs: 'net drs' utility initial creation
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source4/utils/net/drs/net_drs.h')
-rw-r--r--source4/utils/net/drs/net_drs.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/source4/utils/net/drs/net_drs.h b/source4/utils/net/drs/net_drs.h
new file mode 100644
index 0000000000..f5f362077d
--- /dev/null
+++ b/source4/utils/net/drs/net_drs.h
@@ -0,0 +1,56 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ Implements functions offered by repadmin.exe tool under Windows
+
+ Copyright (C) Kamen Mazdrashki <kamen.mazdrashki@postpath.com> 2010
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef NET_DRS_H_
+#define NET_DRS_H_
+
+#include "librpc/gen_ndr/ndr_drsuapi_c.h"
+
+/* net drs commands context */
+struct net_drs_context {
+ struct net_context *net_ctx;
+
+ /* remote DC name supplied from command line */
+ const char *dc_name;
+
+ /* DRSUAPI connection context */
+ struct dcerpc_binding *binding;
+ struct dcerpc_pipe *drs_pipe;
+ struct policy_handle bind_handle;
+
+ /* length of bind info structure returned by remote DC
+ * 'net drs bind' command make use of this value */
+ uint32_t bind_info_len;
+
+ /* remote DC DRSUAPI capabilities */
+ struct drsuapi_DsBindInfo48 info48;
+
+ /* LDAP connection to DC */
+ struct net_drs_ldap {
+ struct ldb_context *ldb;
+ const struct ldb_message *rootdse;
+ } ldap;
+};
+
+
+#include "net_drs_proto.h"
+
+#endif /* NET_DRS_H_ */