mirror of
git://erdgeist.org/opentracker
synced 2025-02-09 21:46:23 +00:00
incorporate a more verbose ascii dump, provided by Tom <tom@foscore.com>
This commit is contained in:
parent
d4598cc930
commit
d1e6e4486c
@ -175,6 +175,10 @@ static void fullscrape_make( int *iovec_entries, struct iovec **iovector, ot_tas
|
|||||||
to_hex( r, *hash ); r+= 2 * sizeof(ot_hash);
|
to_hex( r, *hash ); r+= 2 * sizeof(ot_hash);
|
||||||
r += sprintf( r, ":%zd:%zd\n", peer_list->seed_count, peer_list->peer_count-peer_list->seed_count );
|
r += sprintf( r, ":%zd:%zd\n", peer_list->seed_count, peer_list->peer_count-peer_list->seed_count );
|
||||||
break;
|
break;
|
||||||
|
case TASK_FULLSCRAPE_TPB_ASCII_PLUS:
|
||||||
|
to_hex( r, *hash ); r+= 2 * sizeof(ot_hash);
|
||||||
|
r += sprintf( r, ":%zd:%zd:%zd\n", peer_list->seed_count, peer_list->peer_count-peer_list->seed_count, peer_list->down_count );
|
||||||
|
break;
|
||||||
case TASK_FULLSCRAPE_TPB_BINARY:
|
case TASK_FULLSCRAPE_TPB_BINARY:
|
||||||
memcpy( r, *hash, sizeof(ot_hash) ); r += sizeof(ot_hash);
|
memcpy( r, *hash, sizeof(ot_hash) ); r += sizeof(ot_hash);
|
||||||
*(uint32_t*)(r+0) = htonl( (uint32_t) peer_list->seed_count );
|
*(uint32_t*)(r+0) = htonl( (uint32_t) peer_list->seed_count );
|
||||||
|
@ -184,7 +184,7 @@ static const ot_keywords keywords_mode[] =
|
|||||||
{ NULL, -3 } };
|
{ NULL, -3 } };
|
||||||
static const ot_keywords keywords_format[] =
|
static const ot_keywords keywords_format[] =
|
||||||
{ { "bin", TASK_FULLSCRAPE_TPB_BINARY }, { "ben", TASK_FULLSCRAPE }, { "url", TASK_FULLSCRAPE_TPB_URLENCODED },
|
{ { "bin", TASK_FULLSCRAPE_TPB_BINARY }, { "ben", TASK_FULLSCRAPE }, { "url", TASK_FULLSCRAPE_TPB_URLENCODED },
|
||||||
{ "txt", TASK_FULLSCRAPE_TPB_ASCII }, { NULL, -3 } };
|
{ "txt", TASK_FULLSCRAPE_TPB_ASCII }, { "txtp", TASK_FULLSCRAPE_TPB_ASCII_PLUS }, { NULL, -3 } };
|
||||||
|
|
||||||
int mode = TASK_STATS_PEERS, scanon = 1, format = 0;
|
int mode = TASK_STATS_PEERS, scanon = 1, format = 0;
|
||||||
|
|
||||||
|
@ -47,8 +47,9 @@ typedef enum {
|
|||||||
TASK_FULLSCRAPE = 0x0200, /* Default mode */
|
TASK_FULLSCRAPE = 0x0200, /* Default mode */
|
||||||
TASK_FULLSCRAPE_TPB_BINARY = 0x0201,
|
TASK_FULLSCRAPE_TPB_BINARY = 0x0201,
|
||||||
TASK_FULLSCRAPE_TPB_ASCII = 0x0202,
|
TASK_FULLSCRAPE_TPB_ASCII = 0x0202,
|
||||||
TASK_FULLSCRAPE_TPB_URLENCODED = 0x0203,
|
TASK_FULLSCRAPE_TPB_ASCII_PLUS = 0x0203,
|
||||||
TASK_FULLSCRAPE_TRACKERSTATE = 0x0204,
|
TASK_FULLSCRAPE_TPB_URLENCODED = 0x0204,
|
||||||
|
TASK_FULLSCRAPE_TRACKERSTATE = 0x0205,
|
||||||
|
|
||||||
TASK_DMEM = 0x0300,
|
TASK_DMEM = 0x0300,
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user