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
#include "gnunet_common.h"
-#define DEBUG_STATISTICS GNUNET_NO
+
+GNUNET_NETWORK_STRUCT_BEGIN
/**
* Statistics message. Contains how long the system is up
};
+
+/**
+ * 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