mirror of
git://erdgeist.org/opentracker
synced 2025-01-27 23:26:27 +00:00
9297967f85
Add an iterator for all torrents. It's slower but for stats it's okay. Move some stats collection stuff to the new iterator. More to come. Start a "report all stats" page. Start fixing the code to identify "busy" networks. Add the concept of hosts allowed to proxy. Add a parser for the X-Forwarded-For: HTTP header. Clean up HTTP Header handling code. (Remove some left overs of now vanished sync code).
38 lines
1.0 KiB
C
38 lines
1.0 KiB
C
/* This software was written by Dirk Engling <erdgeist@erdgeist.org>
|
|
It is considered beerware. Prost. Skol. Cheers or whatever.
|
|
|
|
$id$ */
|
|
|
|
#ifndef __OT_ACCESSLIST_H__
|
|
#define __OT_ACCESSLIST_H__
|
|
|
|
#if defined ( WANT_ACCESSLIST_BLACK ) && defined (WANT_ACCESSLIST_WHITE )
|
|
# error WANT_ACCESSLIST_BLACK and WANT_ACCESSLIST_WHITE are exclusive.
|
|
#endif
|
|
|
|
#if defined ( WANT_ACCESSLIST_BLACK ) || defined (WANT_ACCESSLIST_WHITE )
|
|
#define WANT_ACCESSLIST
|
|
void accesslist_init( );
|
|
void accesslist_deinit( );
|
|
int accesslist_hashisvalid( ot_hash hash );
|
|
|
|
extern char *g_accesslist_filename;
|
|
|
|
#else
|
|
#define accesslist_init( accesslist_filename )
|
|
#define accesslist_deinit( )
|
|
#define accesslist_hashisvalid( hash ) 1
|
|
#endif
|
|
|
|
typedef enum {
|
|
OT_PERMISSION_MAY_FULLSCRAPE = 0x1,
|
|
OT_PERMISSION_MAY_STAT = 0x2,
|
|
OT_PERMISSION_MAY_LIVESYNC = 0x4,
|
|
OT_PERMISSION_MAY_PROXY = 0x8
|
|
} ot_permissions;
|
|
|
|
int accesslist_blessip( ot_ip6 ip, ot_permissions permissions );
|
|
int accesslist_isblessed( ot_ip6 ip, ot_permissions permissions );
|
|
|
|
#endif
|