diff options
author | erdgeist <> | 2007-11-06 17:50:41 +0000 |
---|---|---|
committer | erdgeist <> | 2007-11-06 17:50:41 +0000 |
commit | 41120f6a0da2cd66788635f40d672eefe3c23fee (patch) | |
tree | f29ae287b270cdc89d5af3fc58bd57dcc8619eea /ot_stats.h | |
parent | 7e8d7fb25929acaa1dc625fdc5eff74f300c6750 (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.h | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -5,9 +5,21 @@ | |||
5 | #define __OT_STATS_H__ | 5 | #define __OT_STATS_H__ |
6 | 6 | ||
7 | enum { STATS_CONNS, STATS_PEERS, STATS_TOP5, STATS_DMEM, STATS_TCP, STATS_UDP, STATS_SLASH24S, SYNC_IN, SYNC_OUT, STATS_FULLSCRAPE }; | 7 | enum { STATS_CONNS, STATS_PEERS, STATS_TOP5, STATS_DMEM, STATS_TCP, STATS_UDP, STATS_SLASH24S, SYNC_IN, SYNC_OUT, STATS_FULLSCRAPE }; |
8 | typedef 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 | ||
9 | size_t return_stats_for_tracker( char *reply, int mode ); | 20 | size_t return_stats_for_tracker( char *reply, int mode, int format ); |
10 | size_t return_stats_for_slash24s( char *reply, size_t amount, ot_dword thresh ); | ||
11 | size_t return_memstat_for_tracker( char **reply ); | 21 | size_t return_memstat_for_tracker( char **reply ); |
12 | 22 | ||
23 | void stats_issue_event( ot_status_event event, int is_tcp, size_t event_data ); | ||
24 | |||
13 | #endif | 25 | #endif |