summaryrefslogtreecommitdiff
path: root/ot_udp.c
diff options
context:
space:
mode:
authorerdgeist <>2007-12-20 05:59:34 +0000
committererdgeist <>2007-12-20 05:59:34 +0000
commitc28cf398fd956eb467612eec4b31e1df371b9636 (patch)
tree8ea7885c689844d06aa59a420fbaf06fee5ded19 /ot_udp.c
parentd9ed6c22bd26268b8ae51cc062e41f20e2dc68bd (diff)
Introduce some kind of versioning
Diffstat (limited to 'ot_udp.c')
-rw-r--r--ot_udp.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/ot_udp.c b/ot_udp.c
index 786855b..e1af2fe 100644
--- a/ot_udp.c
+++ b/ot_udp.c
@@ -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
23static void udp_make_connectionid( uint32_t * connid, const char * remoteip ) { 25static 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
31static int udp_test_connectionid( const uint32_t * const connid, const char * remoteip ) { 34static 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 */
40void handle_udp4( int64 serversocket ) { 44void handle_udp4( int64 serversocket ) {
@@ -133,3 +137,5 @@ void handle_udp4( int64 serversocket ) {
133 break; 137 break;
134 } 138 }
135} 139}
140
141const char *g_version_udp_c = "$Source$: $Revision$\n";