summaryrefslogtreecommitdiff
path: root/ot_stats.h
blob: b3ac1dcfddbef3bed7c83b0c12a4862eded48e4d (plain)
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
/* This software was written by Dirk Engling <erdgeist@erdgeist.org>
   It is considered beerware. Prost. Skol. Cheers or whatever. */

#ifndef __OT_STATS_H__
#define __OT_STATS_H__

typedef enum {
  EVENT_ACCEPT,
  EVENT_READ,
  EVENT_CONNECT,      /* UDP only */
  EVENT_ANNOUNCE,
  EVENT_SCRAPE,
  EVENT_FULLSCRAPE_REQUEST,
  EVENT_FULLSCRAPE_REQUEST_GZIP,
  EVENT_FULLSCRAPE,   /* TCP only */
  EVENT_SYNC_IN_REQUEST,
  EVENT_SYNC_IN,
  EVENT_SYNC_OUT_REQUEST,
  EVENT_SYNC_OUT,
  EVENT_FAILED_400,
  EVENT_FAILED_404,
  EVENT_FAILED_505
} ot_status_event;

void   stats_issue_event( ot_status_event event, int is_tcp, size_t event_data );
size_t return_stats_for_tracker( char *reply, int mode, int format );
void   stats_init( );
void   stats_deinit( );

#endif