-
Notifications
You must be signed in to change notification settings - Fork 3
/
ot_stats.h
52 lines (44 loc) · 1.23 KB
/
ot_stats.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* This software was written by Dirk Engling <[email protected]>
It is considered beerware. Prost. Skol. Cheers or whatever.
$id$ */
#ifndef OT_STATS_H__
#define OT_STATS_H__
typedef enum {
EVENT_ACCEPT,
EVENT_READ,
EVENT_CONNECT, /* UDP only */
EVENT_ANNOUNCE,
EVENT_COMPLETED,
EVENT_RENEW,
EVENT_SYNC,
EVENT_SCRAPE,
EVENT_FULLSCRAPE_REQUEST,
EVENT_FULLSCRAPE_REQUEST_GZIP,
EVENT_FULLSCRAPE, /* TCP only */
EVENT_FAILED,
EVENT_BUCKET_LOCKED,
EVENT_WOODPECKER,
EVENT_CONNID_MISSMATCH
} ot_status_event;
enum {
CODE_HTTPERROR_302,
CODE_HTTPERROR_400,
CODE_HTTPERROR_400_PARAM,
CODE_HTTPERROR_400_COMPACT,
CODE_HTTPERROR_402_NOTMODEST,
CODE_HTTPERROR_402_PAYMENT_REQUIRED,
CODE_HTTPERROR_403_IP,
CODE_HTTPERROR_404,
CODE_HTTPERROR_500,
CODE_HTTPERROR_COUNT
};
void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event_data );
void stats_deliver( int64 sock, int tasktype );
void stats_cleanup();
size_t return_stats_for_tracker( char *reply, int mode, int format );
size_t stats_return_tracker_version( char *reply );
void stats_init( );
void stats_deinit( );
extern const char *g_version_rijndael_c;
extern const char *g_version_livesync_c;
#endif