diff options
Diffstat (limited to 'ot_udp.c')
-rw-r--r-- | ot_udp.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1,5 +1,7 @@ | |||
1 | /* This software was written by Dirk Engling <erdgeist@erdgeist.org> | 1 | /* This software was written by Dirk Engling <erdgeist@erdgeist.org> |
2 | It is considered beerware. Prost. Skol. Cheers or whatever. */ | 2 | It is considered beerware. Prost. Skol. Cheers or whatever. |
3 | |||
4 | $id$ */ | ||
3 | 5 | ||
4 | /* System */ | 6 | /* System */ |
5 | #include <string.h> | 7 | #include <string.h> |
@@ -22,19 +24,21 @@ static const uint8_t g_static_connid[8] = { 0x23, 0x42, 0x05, 0x17, 0xde, 0x41, | |||
22 | 24 | ||
23 | static void udp_make_connectionid( uint32_t * connid, const char * remoteip ) { | 25 | static void udp_make_connectionid( uint32_t * connid, const char * remoteip ) { |
24 | /* Touch unused variable */ | 26 | /* Touch unused variable */ |
25 | remoteip = remoteip; | 27 | (void)remoteip; |
26 | 28 | ||
27 | /* Use a static secret for now */ | 29 | /* Use a static secret for now */ |
28 | memcpy( connid, g_static_connid, 8 ); | 30 | memcpy( connid, g_static_connid, 8 ); |
29 | } | 31 | } |
30 | 32 | ||
33 | #if 0 | ||
31 | static int udp_test_connectionid( const uint32_t * const connid, const char * remoteip ) { | 34 | static int udp_test_connectionid( const uint32_t * const connid, const char * remoteip ) { |
32 | /* Touch unused variable */ | 35 | /* Touch unused variable */ |
33 | remoteip = remoteip; | 36 | (void)remoteip; |
34 | 37 | ||
35 | /* Test against our static secret */ | 38 | /* Test against our static secret */ |
36 | return !memcmp( connid, g_static_connid, 8 ); | 39 | return !memcmp( connid, g_static_connid, 8 ); |
37 | } | 40 | } |
41 | #endif | ||
38 | 42 | ||
39 | /* UDP implementation according to http://xbtt.sourceforge.net/udp_tracker_protocol.html */ | 43 | /* UDP implementation according to http://xbtt.sourceforge.net/udp_tracker_protocol.html */ |
40 | void handle_udp4( int64 serversocket ) { | 44 | void handle_udp4( int64 serversocket ) { |
@@ -133,3 +137,5 @@ void handle_udp4( int64 serversocket ) { | |||
133 | break; | 137 | break; |
134 | } | 138 | } |
135 | } | 139 | } |
140 | |||
141 | const char *g_version_udp_c = "$Source$: $Revision$\n"; | ||