s4/drs_util: Move DRSUAPI connection data into separate object
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>
Fri, 12 Feb 2010 04:01:06 +0000 (06:01 +0200)
committerAnatoliy Atanasov <anatoliy.atanasov@postpath.com>
Wed, 24 Feb 2010 12:14:07 +0000 (14:14 +0200)
We need this so we can create independent DRS connections to
different DCs.

source4/utils/net/drs/net_drs.h

index 4aeeb6fa4f4d28efa191dd298b8eb4bea727fd0c..dc5bb8c9d012732f076b960ebe92b1a3b5f17e85 100644 (file)
        NET_DRS_CHECK_GOTO(_ptr, _label, "Not enough memory!")
 
 
-
-/* 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 binding context
+ */
+struct net_drs_connection {
        /* DRSUAPI connection context */
        struct dcerpc_binding   *binding;
        struct dcerpc_pipe      *drs_pipe;
@@ -62,6 +58,20 @@ struct net_drs_context {
 
        /* remote DC DRSUAPI capabilities */
        struct drsuapi_DsBindInfo48 info48;
+};
+
+
+/**
+ * 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 to target DC */
+       struct net_drs_connection *drs_conn;
 
        /* LDAP connection to DC */
        struct net_drs_ldap {