2007-11-06 11:58:32 +00:00
|
|
|
/* This software was written by Dirk Engling <erdgeist@erdgeist.org>
|
2007-12-20 05:59:34 +00:00
|
|
|
It is considered beerware. Prost. Skol. Cheers or whatever.
|
2008-10-28 01:27:22 +00:00
|
|
|
|
2007-12-20 05:59:34 +00:00
|
|
|
$id$ */
|
2007-11-06 11:58:32 +00:00
|
|
|
|
2017-04-28 13:41:24 +00:00
|
|
|
#ifndef OT_STATS_H__
|
|
|
|
#define OT_STATS_H__
|
2007-11-06 11:58:32 +00:00
|
|
|
|
2007-11-06 17:50:41 +00:00
|
|
|
typedef enum {
|
|
|
|
EVENT_ACCEPT,
|
|
|
|
EVENT_READ,
|
|
|
|
EVENT_CONNECT, /* UDP only */
|
|
|
|
EVENT_ANNOUNCE,
|
2009-03-24 16:55:28 +00:00
|
|
|
EVENT_COMPLETED,
|
2008-11-03 01:26:38 +00:00
|
|
|
EVENT_RENEW,
|
2008-12-03 20:36:16 +00:00
|
|
|
EVENT_SYNC,
|
2007-11-06 17:50:41 +00:00
|
|
|
EVENT_SCRAPE,
|
2007-12-03 01:07:41 +00:00
|
|
|
EVENT_FULLSCRAPE_REQUEST,
|
|
|
|
EVENT_FULLSCRAPE_REQUEST_GZIP,
|
2007-11-06 17:50:41 +00:00
|
|
|
EVENT_FULLSCRAPE, /* TCP only */
|
2009-03-04 14:35:21 +00:00
|
|
|
EVENT_FAILED,
|
2009-09-02 02:18:36 +00:00
|
|
|
EVENT_BUCKET_LOCKED,
|
2012-05-28 15:15:32 +00:00
|
|
|
EVENT_WOODPECKER,
|
|
|
|
EVENT_CONNID_MISSMATCH
|
2007-11-06 17:50:41 +00:00
|
|
|
} ot_status_event;
|
2007-11-06 11:58:32 +00:00
|
|
|
|
2007-12-04 23:57:29 +00:00
|
|
|
enum {
|
2007-12-05 01:40:24 +00:00
|
|
|
CODE_HTTPERROR_302,
|
2007-12-04 23:57:29 +00:00
|
|
|
CODE_HTTPERROR_400,
|
|
|
|
CODE_HTTPERROR_400_PARAM,
|
|
|
|
CODE_HTTPERROR_400_COMPACT,
|
2009-08-29 13:55:59 +00:00
|
|
|
CODE_HTTPERROR_402_NOTMODEST,
|
2015-08-30 21:56:56 +00:00
|
|
|
CODE_HTTPERROR_402_PAYMENT_REQUIRED,
|
2007-12-04 23:57:29 +00:00
|
|
|
CODE_HTTPERROR_403_IP,
|
|
|
|
CODE_HTTPERROR_404,
|
|
|
|
CODE_HTTPERROR_500,
|
2008-10-28 01:27:22 +00:00
|
|
|
|
2007-12-04 23:57:29 +00:00
|
|
|
CODE_HTTPERROR_COUNT
|
|
|
|
};
|
|
|
|
|
2009-01-13 22:41:17 +00:00
|
|
|
void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event_data );
|
2009-01-15 23:01:36 +00:00
|
|
|
void stats_deliver( int64 sock, int tasktype );
|
2012-06-03 04:06:32 +00:00
|
|
|
void stats_cleanup();
|
2007-11-06 17:50:41 +00:00
|
|
|
size_t return_stats_for_tracker( char *reply, int mode, int format );
|
2007-12-20 05:59:34 +00:00
|
|
|
size_t stats_return_tracker_version( char *reply );
|
2007-12-03 01:07:41 +00:00
|
|
|
void stats_init( );
|
|
|
|
void stats_deinit( );
|
2007-11-06 17:50:41 +00:00
|
|
|
|
2017-04-28 13:41:24 +00:00
|
|
|
extern const char *g_version_rijndael_c;
|
|
|
|
extern const char *g_version_livesync_c;
|
|
|
|
|
2007-11-06 11:58:32 +00:00
|
|
|
#endif
|