fix #3284: support lib/MULTIARCH/ paths in installation, use GNUNET_PREFIX=@libdir...
[oweals/gnunet.git] / src / statistics / statistics.h
index c4a79765a3d33a47d3dce2e8f62f07025e12b59f..3aa59da9ddd119167b4eb2025302fe618fca8297 100644 (file)
@@ -4,7 +4,7 @@
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
 
      GNUnet 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, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -27,7 +27,8 @@
 
 #include "gnunet_common.h"
 
 
 #include "gnunet_common.h"
 
-#define DEBUG_STATISTICS GNUNET_NO
+
+GNUNET_NETWORK_STRUCT_BEGIN
 
 /**
  * Statistics message. Contains how long the system is up
 
 /**
  * Statistics message. Contains how long the system is up
@@ -91,4 +92,43 @@ struct GNUNET_STATISTICS_SetMessage
 
 };
 
 
 };
 
+
+/**
+ * Message transmitted if a watched value changes.
+ */
+struct GNUNET_STATISTICS_WatchValueMessage
+{
+  /**
+   * Type: GNUNET_MESSAGE_TYPE_STATISTICS_WATCH_VALUE
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * 0 for absolute value, 1 for relative value; 2 to make persistent
+   * (see GNUNET_STATISTICS_SETFLAG_*).
+   */
+  uint32_t flags GNUNET_PACKED;
+
+  /**
+   * Unique watch identification number (watch
+   * requests are enumerated in the order they
+   * are received, the first request having
+   * a wid of zero).
+   */
+  uint32_t wid GNUNET_PACKED;
+
+  /**
+   * Reserved (always 0).
+   */
+  uint32_t reserved GNUNET_PACKED;
+
+  /**
+   * Value. Note that if this is a relative value, it will
+   * be signed even though the type given here is unsigned.
+   */
+  uint64_t value GNUNET_PACKED;
+
+};
+GNUNET_NETWORK_STRUCT_END
+
 #endif
 #endif