From cffd522b5c806508dfacfb10234e4c0a115c0a98 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 14 Oct 2005 14:02:47 +0000 Subject: r11052: bring samba4 uptodate with the samba4-winsrepl branch, before the bad merge metze (This used to be commit 471c0ca4abb17fb5f73c0efed195c67628c1c06e) --- source4/wrepl_server/wrepl_server.h | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) (limited to 'source4/wrepl_server/wrepl_server.h') diff --git a/source4/wrepl_server/wrepl_server.h b/source4/wrepl_server/wrepl_server.h index 278b15fbb7c..63603c823dc 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 { -- cgit