X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fstatistics%2Fstatistics.h;h=3aa59da9ddd119167b4eb2025302fe618fca8297;hb=f57cbab24fb7a22fc982eb8b6c4a2d18402be460;hp=6eedd4d34200f094ab372d065ac45b3f2fb494c9;hpb=0a217a8df1657b4334b55b0e4a6c7837a8dbcfd9;p=oweals%2Fgnunet.git diff --git a/src/statistics/statistics.h b/src/statistics/statistics.h index 6eedd4d34..3aa59da9d 100644 --- a/src/statistics/statistics.h +++ b/src/statistics/statistics.h @@ -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 - 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 @@ -27,7 +27,8 @@ #include "gnunet_common.h" -#define DEBUG_STATISTICS 0 + +GNUNET_NETWORK_STRUCT_BEGIN /** * 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