summaryrefslogtreecommitdiff
path: root/source4/wrepl_server/wrepl_server.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-10-14 14:02:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:44:43 -0500
commitcffd522b5c806508dfacfb10234e4c0a115c0a98 (patch)
treeec5271d813d2cb547757732815a434ba27a89582 /source4/wrepl_server/wrepl_server.h
parentd1e6c228692ff8b06d6eecd6be22fe0727e170ac (diff)
downloadsamba-cffd522b5c806508dfacfb10234e4c0a115c0a98.tar.gz
samba-cffd522b5c806508dfacfb10234e4c0a115c0a98.tar.bz2
samba-cffd522b5c806508dfacfb10234e4c0a115c0a98.zip
r11052: bring samba4 uptodate with the samba4-winsrepl branch,
before the bad merge metze (This used to be commit 471c0ca4abb17fb5f73c0efed195c67628c1c06e)
Diffstat (limited to 'source4/wrepl_server/wrepl_server.h')
-rw-r--r--source4/wrepl_server/wrepl_server.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/source4/wrepl_server/wrepl_server.h b/source4/wrepl_server/wrepl_server.h
index 278b15fbb7..63603c823d 100644
--- a/source4/wrepl_server/wrepl_server.h
+++ b/source4/wrepl_server/wrepl_server.h
@@ -92,16 +92,38 @@ struct wreplsrv_in_connection {
state of an outcoming wrepl connection
*/
struct wreplsrv_out_connection {
+ /* our global service context */
+ struct wreplsrv_service *service;
+
+ /*
+ * the partner that connects us,
+ * can be NULL, when we got a connection
+ * from an unknown address
+ */
struct wreplsrv_partner *partner;
+
+ /* keep track of the assoc_ctx's */
+ struct {
+ uint32_t our_ctx;
+ uint32_t peer_ctx;
+ } assoc_ctx;
+
+ /*
+ * the client socket to the partner,
+ * NULL if not yet connected
+ */
+ struct wrepl_socket *sock;
};
enum winsrepl_partner_type {
+ WINSREPL_PARTNER_NONE = 0x0,
WINSREPL_PARTNER_PULL = 0x1,
WINSREPL_PARTNER_PUSH = 0x2,
WINSREPL_PARTNER_BOTH = (WINSREPL_PARTNER_PULL | WINSREPL_PARTNER_PUSH)
};
#define WINSREPL_DEFAULT_PULL_INTERVAL (30*60)
+#define WINSREPL_DEFAULT_PULL_RETRY_INTERVAL (30)
/*
this represents one of our configured partners
@@ -109,6 +131,9 @@ enum winsrepl_partner_type {
struct wreplsrv_partner {
struct wreplsrv_partner *prev,*next;
+ /* our global service context */
+ struct wreplsrv_service *service;
+
/* the netbios name of the partner, mostly just for debugging */
const char *name;
@@ -129,12 +154,51 @@ struct wreplsrv_partner {
/* the interval between 2 pull replications to the partner */
uint32_t interval;
+ /* the retry_interval if a pull cycle failed to the partner */
+ uint32_t retry_interval;
+
+ /* the error count till the last success */
+ uint32_t error_count;
+
+ /* the status of the last pull cycle */
+ NTSTATUS last_status;
+
/* this is a list of each wins_owner the partner knows about */
struct wreplsrv_owner *table;
/* the outgoing connection to the partner */
struct wreplsrv_out_connection *wreplconn;
+
+ /* the current pending pull cycle request */
+ struct composite_context *creq;
+
+ /* the pull cycle io params */
+ struct wreplsrv_pull_cycle_io *cycle_io;
+
+ /* the current timed_event to the next pull cycle */
+ struct timed_event *te;
} pull;
+
+ /* push specific options */
+ struct {
+ /* change count till push notification */
+ uint32_t change_count;
+
+ /* the status of the last push cycle */
+ NTSTATUS last_status;
+
+ /* the outgoing connection to the partner */
+ struct wreplsrv_out_connection *wreplconn;
+
+ /* the current push notification */
+ struct composite_context *creq;
+
+ /* the pull cycle io params */
+ struct wreplsrv_push_notify_io *notify_io;
+
+ /* the current timed_event to the next push notify */
+ struct timed_event *te;
+ } push;
};
struct wreplsrv_owner {