set: more statistics
[oweals/gnunet.git] / src / set / set.h
index 0dccf2a513ab37b11090e02b3b287968350cfdd3..258e2bff9de2c69abf40c03fddab46aeef18743e 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2012-2014 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2012-2014 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -28,6 +28,7 @@
 
 #include "platform.h"
 #include "gnunet_common.h"
+#include "gnunet_set_service.h"
 
 GNUNET_NETWORK_STRUCT_BEGIN
 
@@ -101,6 +102,30 @@ struct GNUNET_SET_AcceptMessage
    * See `enum GNUNET_SET_ResultMode`.
    */
   uint32_t result_mode GNUNET_PACKED;
+
+  /**
+   * Always use delta operation instead of sending full sets,
+   * even it it's less efficient.
+   */
+  uint8_t force_delta;
+
+  /**
+   * Always send full sets, even if delta operations would
+   * be more efficient.
+   */
+  uint8_t force_full;
+
+  /**
+   * #GNUNET_YES to fail operations where Byzantine faults
+   * are suspected
+   */
+  uint8_t byzantine;
+
+  /**
+   * Lower bound for the set size, used only when
+   * byzantine mode is enabled.
+   */
+  uint8_t byzantine_lower_bound;
 };
 
 
@@ -183,6 +208,30 @@ struct GNUNET_SET_EvaluateMessage
    */
   uint32_t request_id GNUNET_PACKED;
 
+  /**
+   * Always use delta operation instead of sending full sets,
+   * even it it's less efficient.
+   */
+  uint8_t force_delta;
+
+  /**
+   * Always send full sets, even if delta operations would
+   * be more efficient.
+   */
+  uint8_t force_full;
+
+  /**
+   * #GNUNET_YES to fail operations where Byzantine faults
+   * are suspected
+   */
+  uint8_t byzantine;
+
+  /**
+   * Lower bound for the set size, used only when
+   * byzantine mode is enabled.
+   */
+  uint8_t byzantine_lower_bound;
+
   /* rest: context message, that is, application-specific
      message to convince listener to pick up */
 };
@@ -201,6 +250,11 @@ struct GNUNET_SET_ResultMessage
    */
   struct GNUNET_MessageHeader header;
 
+  /**
+   * Current set size.
+   */
+  uint64_t current_size;
+
   /**
    * id the result belongs to
    */