An open and free bittorrent tracker https://erdgeist.org/gitweb/opentracker
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

53 lines
1.2 KiB

  1. /* This software was written by Dirk Engling <erdgeist@erdgeist.org>
  2. It is considered beerware. Prost. Skol. Cheers or whatever.
  3. $id$ */
  4. #ifndef OT_STATS_H__
  5. #define OT_STATS_H__
  6. typedef enum {
  7. EVENT_ACCEPT,
  8. EVENT_READ,
  9. EVENT_CONNECT, /* UDP only */
  10. EVENT_ANNOUNCE,
  11. EVENT_COMPLETED,
  12. EVENT_RENEW,
  13. EVENT_SYNC,
  14. EVENT_SCRAPE,
  15. EVENT_FULLSCRAPE_REQUEST,
  16. EVENT_FULLSCRAPE_REQUEST_GZIP,
  17. EVENT_FULLSCRAPE, /* TCP only */
  18. EVENT_FAILED,
  19. EVENT_BUCKET_LOCKED,
  20. EVENT_WOODPECKER,
  21. EVENT_CONNID_MISSMATCH
  22. } ot_status_event;
  23. enum {
  24. CODE_HTTPERROR_302,
  25. CODE_HTTPERROR_400,
  26. CODE_HTTPERROR_400_PARAM,
  27. CODE_HTTPERROR_400_COMPACT,
  28. CODE_HTTPERROR_402_NOTMODEST,
  29. CODE_HTTPERROR_402_PAYMENT_REQUIRED,
  30. CODE_HTTPERROR_403_IP,
  31. CODE_HTTPERROR_404,
  32. CODE_HTTPERROR_500,
  33. CODE_HTTPERROR_COUNT
  34. };
  35. void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event_data );
  36. void stats_deliver( int64 sock, int tasktype );
  37. void stats_cleanup();
  38. size_t return_stats_for_tracker( char *reply, int mode, int format );
  39. size_t stats_return_tracker_version( char *reply );
  40. void stats_init( );
  41. void stats_deinit( );
  42. extern const char *g_version_rijndael_c;
  43. extern const char *g_version_livesync_c;
  44. #endif