summaryrefslogtreecommitdiff
path: root/ot_stats.h
diff options
context:
space:
mode:
authorerdgeist <>2007-11-06 17:50:41 +0000
committererdgeist <>2007-11-06 17:50:41 +0000
commit41120f6a0da2cd66788635f40d672eefe3c23fee (patch)
treef29ae287b270cdc89d5af3fc58bd57dcc8619eea /ot_stats.h
parent7e8d7fb25929acaa1dc625fdc5eff74f300c6750 (diff)
Move stats out of opentracker.c, also have an own file handle udp requests.
Diffstat (limited to 'ot_stats.h')
-rw-r--r--ot_stats.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/ot_stats.h b/ot_stats.h
index e4d7c06..58eec71 100644
--- a/ot_stats.h
+++ b/ot_stats.h
@@ -5,9 +5,21 @@
5#define __OT_STATS_H__ 5#define __OT_STATS_H__
6 6
7enum { STATS_CONNS, STATS_PEERS, STATS_TOP5, STATS_DMEM, STATS_TCP, STATS_UDP, STATS_SLASH24S, SYNC_IN, SYNC_OUT, STATS_FULLSCRAPE }; 7enum { STATS_CONNS, STATS_PEERS, STATS_TOP5, STATS_DMEM, STATS_TCP, STATS_UDP, STATS_SLASH24S, SYNC_IN, SYNC_OUT, STATS_FULLSCRAPE };
8typedef enum {
9 EVENT_ACCEPT,
10 EVENT_READ,
11 EVENT_CONNECT, /* UDP only */
12 EVENT_ANNOUNCE,
13 EVENT_SCRAPE,
14 EVENT_FULLSCRAPE, /* TCP only */
15 EVENT_FAILED_400,
16 EVENT_FAILED_404,
17 EVENT_FAILED_505
18} ot_status_event;
8 19
9size_t return_stats_for_tracker( char *reply, int mode ); 20size_t return_stats_for_tracker( char *reply, int mode, int format );
10size_t return_stats_for_slash24s( char *reply, size_t amount, ot_dword thresh );
11size_t return_memstat_for_tracker( char **reply ); 21size_t return_memstat_for_tracker( char **reply );
12 22
23void stats_issue_event( ot_status_event event, int is_tcp, size_t event_data );
24
13#endif 25#endif