libctdb: add ctdb arg to more functions.
[metze/ctdb/wip.git] / libctdb / libctdb_private.h
index f016be0c68daf0a779f711b6092db61aaae601eb..b3486d2070f90eec161b526570e394a0051fcd87 100644 (file)
@@ -7,6 +7,10 @@
 #include <ctdb.h>
 #include <ctdb_protocol.h>
 
+#ifndef offsetof
+#define offsetof(t,f) ((unsigned int)&((t *)0)->f)
+#endif
+
 struct message_handler_info;
 struct ctdb_reply_call;
 
@@ -29,7 +33,8 @@ struct ctdb_request {
        void *priv_data;
 
        /* Extra per-request info. */
-       void (*extra_destructor)(struct ctdb_request *);
+       void (*extra_destructor)(struct ctdb_connection *,
+                                struct ctdb_request *);
        void *extra;
 };
 
@@ -62,7 +67,8 @@ struct ctdb_request *new_ctdb_control_request(struct ctdb_connection *ctdb,
                                              ctdb_callback_t, void *);
 uint32_t new_reqid(struct ctdb_connection *ctdb);
 
-struct ctdb_reply_control *unpack_reply_control(struct ctdb_request *req,
+struct ctdb_reply_control *unpack_reply_control(struct ctdb_connection *ctdb,
+                                               struct ctdb_request *req,
                                                enum ctdb_controls control);
 void ctdb_cancel_callback(struct ctdb_connection *ctdb,
                          struct ctdb_request *req,