00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _if_core_hsep_h_
00027 #define _if_core_hsep_h_
00028
00029 #include "common.h"
00030
00031 #include "lib/event.h"
00032
00033 typedef guint64 hsep_triple[3];
00034
00035 #define HSEP_N_MAX 7
00037 enum {
00038 HSEP_IDX_NODES = 0,
00039 HSEP_IDX_FILES = 1,
00040 HSEP_IDX_KIB = 2
00041 };
00042
00043
00044
00045
00046
00047 #ifdef CORE_SOURCES
00048
00049 typedef struct {
00050 hsep_triple table[HSEP_N_MAX + 1];
00051 hsep_triple sent_table[HSEP_N_MAX];
00052 time_t last_sent;
00053 time_t last_received;
00054 guint32 msgs_received;
00055 guint32 triples_received;
00056 guint32 msgs_sent;
00057 guint32 triples_sent;
00058 gint random_skew;
00059 } hsep_ctx_t;
00060
00061 const gchar *hsep_get_static_str(gint row, gint column);
00062 gint hsep_get_table_size(void);
00063 void hsep_get_non_hsep_triple(hsep_triple *tripledest);
00064 void hsep_add_global_table_listener(GCallback cb,
00065 frequency_t type, guint32 interval);
00066 void hsep_remove_global_table_listener(GCallback cb);
00067
00068 #endif
00069 #endif
00070
00071