wreplsrv: log a successful replication cycle at level 1
[kai/samba.git] / source4 / wrepl_server / wrepl_server.h
index 1480d2799a3a08206d4edd17502d081ba25031cb..7ee5a806240fc0f3fa61f9bd1471ba3edf2af471 100644 (file)
@@ -7,7 +7,7 @@
    
    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 2 of the License, or
+   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,
@@ -16,8 +16,7 @@
    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, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 struct wreplsrv_service;
@@ -35,7 +34,7 @@ struct wreplsrv_in_call {
        struct wreplsrv_in_connection *wreplconn;
        struct wrepl_packet req_packet;
        struct wrepl_packet rep_packet;
-       BOOL terminate_after_send;
+       bool terminate_after_send;
 };
 
 /*
@@ -56,32 +55,23 @@ struct wreplsrv_in_connection {
         */
        struct wreplsrv_partner *partner;
 
-       /*
-        * we need to take care of our own ip address,
-        * as this is the WINS-Owner ID the peer expect
-        * from us.
-        */
-       const char *our_ip;
-
        /* keep track of the assoc_ctx's */
        struct {
-               BOOL stopped;
+               bool stopped;
                uint32_t our_ctx;
                uint32_t peer_ctx;
        } assoc_ctx;
 };
 
 /*
-  state of an outcoming wrepl connection
+  state of an outgoing 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
+        * the partner we connect
         */
        struct wreplsrv_partner *partner;
 
@@ -164,7 +154,7 @@ struct wreplsrv_partner {
                struct wreplsrv_pull_cycle_io *cycle_io;
 
                /* the current timed_event to the next pull cycle */
-               struct timed_event *te;
+               struct tevent_timer *te;
        } pull;
 
        /* push specific options */
@@ -172,11 +162,11 @@ struct wreplsrv_partner {
                /* change count till push notification */
                uint32_t change_count;
 
-               /* the last wins db seqnumber we know about */
-               uint64_t seqnumber;
+               /* the last wins db maxVersion have reported to the partner */
+               uint64_t maxVersionID;
 
                /* we should use WREPL_REPL_INFORM* messages to this partner */
-               BOOL use_inform;
+               bool use_inform;
 
                /* the error count till the last success */
                uint32_t error_count;
@@ -223,6 +213,9 @@ struct wreplsrv_service {
                /* the wins config db handle */
                struct ldb_context *ldb;
 
+               /* the last wins config db seqnumber we know about */
+               uint64_t seqnumber;
+
                /* 
                 * the interval (in secs) till an active record will be marked as RELEASED 
                 */
@@ -296,7 +289,7 @@ struct wreplsrv_service {
                struct timeval next_event;
 
                /* here we have a reference to the timed event the schedules the periodic stuff */
-               struct timed_event *te;
+               struct tevent_timer *te;
        } periodic;
 
        /* some stuff for scavenging processing */
@@ -310,8 +303,11 @@ struct wreplsrv_service {
                /*
                 * are we currently inside a scavenging run
                 */
-               BOOL processing;        
+               bool processing;        
        } scavenging;
 };
 
+struct socket_context;
+struct wrepl_name;
+#include "wrepl_server/wrepl_out_helpers.h"
 #include "wrepl_server/wrepl_server_proto.h"