[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r10069 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r10069 - gnunet/src/transport |
Date: |
Wed, 20 Jan 2010 14:18:58 +0100 |
Author: nevans
Date: 2010-01-20 14:18:58 +0100 (Wed, 20 Jan 2010)
New Revision: 10069
Modified:
gnunet/src/transport/Makefile.am
gnunet/src/transport/plugin_transport_udp.c
gnunet/src/transport/test_plugin_transport_udp.c
gnunet/src/transport/test_transport_api.c
Log:
whiny christian fix
Modified: gnunet/src/transport/Makefile.am
===================================================================
--- gnunet/src/transport/Makefile.am 2010-01-20 12:05:53 UTC (rev 10068)
+++ gnunet/src/transport/Makefile.am 2010-01-20 13:18:58 UTC (rev 10069)
@@ -78,19 +78,25 @@
$(GN_PLUGIN_LDFLAGS)
check_PROGRAMS = \
- test_transport_api \
+ test_transport_api_tcp \
+ test_transport_api_udp \
test_plugin_transport \
test_plugin_transport_udp
# TODO: add tests for tcp, udp, http, nat, etc.
TESTS = $(check_PROGRAMS)
-test_transport_api_SOURCES = \
+test_transport_api_tcp_SOURCES = \
test_transport_api.c
-test_transport_api_LDADD = \
+test_transport_api_tcp_LDADD = \
$(top_builddir)/src/transport/libgnunettransport.la \
$(top_builddir)/src/util/libgnunetutil.la
+test_transport_api_udp_SOURCES = \
+ test_transport_api.c
+test_transport_api_udp_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la
test_plugin_transport_SOURCES = \
test_plugin_transport.c
Modified: gnunet/src/transport/plugin_transport_udp.c
===================================================================
--- gnunet/src/transport/plugin_transport_udp.c 2010-01-20 12:05:53 UTC (rev
10068)
+++ gnunet/src/transport/plugin_transport_udp.c 2010-01-20 13:18:58 UTC (rev
10069)
@@ -175,9 +175,7 @@
/**
* Message used to ask a peer to validate receipt (to check an address
- * from a HELLO). Followed by the address used. Note that the
- * recipients response does not affirm that he has this address,
- * only that he got the challenge message.
+ * from a HELLO).
*/
struct UDPPingMessage
{
@@ -192,22 +190,16 @@
*/
uint32_t challenge GNUNET_PACKED;
-
-
};
/**
- * Message used to validate a HELLO. The challenge is included in the
- * confirmation to make matching of replies to requests possible. The
- * signature signs the original challenge number, our public key, the
- * sender's address (so that the sender can check that the address we
- * saw is plausible for him and possibly detect a MiM attack) and a
- * timestamp (to limit replay).<p>
+ * Message used to validate a HELLO. The challenge number
+ * is sent along with whatever address the peer received
+ * the ping from. Used to validate our address (or at
+ * least give us a better idea where we look like we're
+ * coming from).
*
- * This message is followed by the address of the
- * client that we are observing (which is part of what
- * is being signed).
*/
struct UDPPongMessage
{
@@ -499,12 +491,10 @@
buf = GNUNET_malloc (buflen);
fromlen = sizeof (addr);
-
#if DEBUG_UDP
GNUNET_log_from (GNUNET_ERROR_TYPE_INFO, "udp", _
("src_addr_len is %u\n"), fromlen);
#endif
-
memset (&addr, 0, fromlen);
ret =
GNUNET_NETWORK_socket_recvfrom (udp_sock, buf, buflen,
@@ -521,7 +511,6 @@
GNUNET_free (buf);
return;
}
-
msg = (struct UDPMessage *) buf;
#if DEBUG_UDP
Modified: gnunet/src/transport/test_plugin_transport_udp.c
===================================================================
--- gnunet/src/transport/test_plugin_transport_udp.c 2010-01-20 12:05:53 UTC
(rev 10068)
+++ gnunet/src/transport/test_plugin_transport_udp.c 2010-01-20 13:18:58 UTC
(rev 10069)
@@ -244,8 +244,6 @@
env.max_connections = max_connect_per_transport;
}
-static int retx;
-
/**
* Runs the test.
*
Modified: gnunet/src/transport/test_transport_api.c
===================================================================
--- gnunet/src/transport/test_transport_api.c 2010-01-20 12:05:53 UTC (rev
10068)
+++ gnunet/src/transport/test_transport_api.c 2010-01-20 13:18:58 UTC (rev
10069)
@@ -62,6 +62,10 @@
static int ok;
+static int is_tcp;
+
+static int is_udp;
+
#if VERBOSE
#define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok,
__FILE__, __LINE__); } while (0)
#else
@@ -283,6 +287,16 @@
{
int ret;
+ if (strstr(argv[0], "test_transport_api_tcp") == 0)
+ {
+ is_tcp = GNUNET_YES;
+ }
+ else if (strstr(argv[0], "test_transport_api_udp") == 0)
+ {
+ is_udp = GNUNET_NO;
+ }
+
+
GNUNET_log_setup ("test-transport-api",
#if VERBOSE
"DEBUG",
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r10069 - gnunet/src/transport,
gnunet <=