diff options
author | erdgeist <> | 2012-05-28 19:05:02 +0000 |
---|---|---|
committer | erdgeist <> | 2012-05-28 19:05:02 +0000 |
commit | dc90c8867cd39a42c85ee15d711b84c7206677cf (patch) | |
tree | a62737b79841d32b2eb9f441935ccf0334195040 | |
parent | 37db5f94fadae6993585d447b4faa00cacca49a2 (diff) |
Report connection id missmatch count
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | ot_stats.c | 6 | ||||
-rw-r--r-- | ot_udp.c | 2 |
3 files changed, 5 insertions, 5 deletions
@@ -35,7 +35,7 @@ BINDIR?=$(PREFIX)/bin | |||
35 | #FEATURES+=-DWANT_MODEST_FULLSCRAPES | 35 | #FEATURES+=-DWANT_MODEST_FULLSCRAPES |
36 | #FEATURES+=-DWANT_SPOT_WOODPECKER | 36 | #FEATURES+=-DWANT_SPOT_WOODPECKER |
37 | #FEATURES+=-DWANT_SYSLOGS | 37 | #FEATURES+=-DWANT_SYSLOGS |
38 | #FEATURES+=-DWANT_DEV_RANDOM | 38 | FEATURES+=-DWANT_DEV_RANDOM |
39 | FEATURES+=-DWANT_FULLSCRAPE | 39 | FEATURES+=-DWANT_FULLSCRAPE |
40 | 40 | ||
41 | #FEATURES+=-D_DEBUG_HTTPERROR | 41 | #FEATURES+=-D_DEBUG_HTTPERROR |
@@ -48,6 +48,7 @@ static unsigned long long ot_overall_tcp_successfulannounces = 0; | |||
48 | static unsigned long long ot_overall_udp_successfulannounces = 0; | 48 | static unsigned long long ot_overall_udp_successfulannounces = 0; |
49 | static unsigned long long ot_overall_tcp_successfulscrapes = 0; | 49 | static unsigned long long ot_overall_tcp_successfulscrapes = 0; |
50 | static unsigned long long ot_overall_udp_successfulscrapes = 0; | 50 | static unsigned long long ot_overall_udp_successfulscrapes = 0; |
51 | static unsigned long long ot_overall_udp_connectionidmissmatches = 0; | ||
51 | static unsigned long long ot_overall_tcp_connects = 0; | 52 | static unsigned long long ot_overall_tcp_connects = 0; |
52 | static unsigned long long ot_overall_udp_connects = 0; | 53 | static unsigned long long ot_overall_udp_connects = 0; |
53 | static unsigned long long ot_overall_completed = 0; | 54 | static unsigned long long ot_overall_completed = 0; |
@@ -59,7 +60,6 @@ static char * ot_failed_request_names[] = { "302 Redirect", "400 Par | |||
59 | static unsigned long long ot_renewed[OT_PEER_TIMEOUT]; | 60 | static unsigned long long ot_renewed[OT_PEER_TIMEOUT]; |
60 | static unsigned long long ot_overall_sync_count; | 61 | static unsigned long long ot_overall_sync_count; |
61 | static unsigned long long ot_overall_stall_count; | 62 | static unsigned long long ot_overall_stall_count; |
62 | static unsigned long long g_stats_connid_missmatches; | ||
63 | 63 | ||
64 | static time_t ot_start_time; | 64 | static time_t ot_start_time; |
65 | 65 | ||
@@ -539,7 +539,7 @@ static size_t stats_return_everything( char * reply ) { | |||
539 | r += sprintf( r, " <completed>\n <count>%llu</count>\n </completed>\n", ot_overall_completed ); | 539 | r += sprintf( r, " <completed>\n <count>%llu</count>\n </completed>\n", ot_overall_completed ); |
540 | r += sprintf( r, " <connections>\n" ); | 540 | r += sprintf( r, " <connections>\n" ); |
541 | r += sprintf( r, " <tcp>\n <accept>%llu</accept>\n <announce>%llu</announce>\n <scrape>%llu</scrape>\n </tcp>\n", ot_overall_tcp_connections, ot_overall_tcp_successfulannounces, ot_overall_udp_successfulscrapes ); | 541 | r += sprintf( r, " <tcp>\n <accept>%llu</accept>\n <announce>%llu</announce>\n <scrape>%llu</scrape>\n </tcp>\n", ot_overall_tcp_connections, ot_overall_tcp_successfulannounces, ot_overall_udp_successfulscrapes ); |
542 | r += sprintf( r, " <udp>\n <overall>%llu</overall>\n <connect>%llu</connect>\n <announce>%llu</announce>\n <scrape>%llu</scrape>\n </udp>\n", ot_overall_udp_connections, ot_overall_udp_connects, ot_overall_udp_successfulannounces, ot_overall_udp_successfulscrapes ); | 542 | r += sprintf( r, " <udp>\n <overall>%llu</overall>\n <connect>%llu</connect>\n <announce>%llu</announce>\n <scrape>%llu</scrape>\n <missmatch>%llu</missmatch>\n </udp>\n", ot_overall_udp_connections, ot_overall_udp_connects, ot_overall_udp_successfulannounces, ot_overall_udp_successfulscrapes, ot_overall_udp_connectionidmissmatches ); |
543 | r += sprintf( r, " <livesync>\n <count>%llu</count>\n </livesync>\n", ot_overall_sync_count ); | 543 | r += sprintf( r, " <livesync>\n <count>%llu</count>\n </livesync>\n", ot_overall_sync_count ); |
544 | r += sprintf( r, " </connections>\n" ); | 544 | r += sprintf( r, " </connections>\n" ); |
545 | r += sprintf( r, " <debug>\n" ); | 545 | r += sprintf( r, " <debug>\n" ); |
@@ -725,7 +725,7 @@ void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event | |||
725 | break; | 725 | break; |
726 | #endif | 726 | #endif |
727 | case EVENT_CONNID_MISSMATCH: | 727 | case EVENT_CONNID_MISSMATCH: |
728 | ++g_stats_connid_missmatches; | 728 | ++ot_overall_udp_connectionidmissmatches; |
729 | default: | 729 | default: |
730 | break; | 730 | break; |
731 | } | 731 | } |
@@ -38,7 +38,7 @@ static void udp_generate_rijndael_round_key() { | |||
38 | static void udp_make_connectionid( uint32_t connid[4], const ot_ip6 remoteip ) { | 38 | static void udp_make_connectionid( uint32_t connid[4], const ot_ip6 remoteip ) { |
39 | uint32_t plain[4], crypt[4]; | 39 | uint32_t plain[4], crypt[4]; |
40 | int age, i; | 40 | int age, i; |
41 | 41 | for( i=0; i<16; ++i ) fprintf( stderr, "%02uX ", (uint8_t)remoteip[i] ); fprintf(stderr, "\n" ); | |
42 | if( g_now_minutes + 60 > g_hour_of_the_key ) { | 42 | if( g_now_minutes + 60 > g_hour_of_the_key ) { |
43 | g_hour_of_the_key = g_now_minutes; | 43 | g_hour_of_the_key = g_now_minutes; |
44 | g_key_of_the_hour[1] = g_key_of_the_hour[0]; | 44 | g_key_of_the_hour[1] = g_key_of_the_hour[0]; |