From 2f4246396ed39878a744100aeb06fe8aedf5a79a Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Sat, 15 Dec 2007 17:35:27 +0000 Subject: more udp debugging --- ot_udp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ot_udp.c b/ot_udp.c index 7915528..ad389e3 100644 --- a/ot_udp.c +++ b/ot_udp.c @@ -57,6 +57,8 @@ void handle_udp4( int64 serversocket ) { if( r < 16 ) return; + fprintf( stderr, "UDP Connection id: %16llX\n", *(uint64_t*)inpacket ); + switch( ntohl( inpacket[2] ) ) { case 0: /* This is a connect action */ /* look for udp bittorrent magic id */ @@ -76,7 +78,7 @@ void handle_udp4( int64 serversocket ) { return; if( !udp_test_connectionid( inpacket, remoteip )) - fprintf( stderr, "UDP Connection id missmatch, %16llX\n", *(uint64_t*)inpacket ); + fprintf( stderr, "UDP Connection id missmatch.\n" ); numwant = 200; /* We do only want to know, if it is zero */ @@ -118,7 +120,7 @@ void handle_udp4( int64 serversocket ) { case 2: /* This is a scrape action */ if( !udp_test_connectionid( inpacket, remoteip )) - fprintf( stderr, "UDP Connection id missmatch, %16llX\n", *(uint64_t*)inpacket ); + fprintf( stderr, "UDP Connection id missmatch.\n" ); outpacket[0] = htonl( 2 ); /* scrape action */ outpacket[1] = inpacket[12/4]; -- cgit v1.2.3