From 5b4391e864f3630662cac53be97a60ad4a1157c5 Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Thu, 22 Apr 2010 14:59:35 +0000 Subject: [PATCH] dht and testing lib stuff --- src/include/gnunet_protocols.h | 20 +++++++++++++------- src/include/gnunet_testing_lib.h | 13 +++++++++++++ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index 72fcccf94..dfa25fc29 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h @@ -183,6 +183,7 @@ extern "C" */ #define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_QUERY 30 + /** * Reply from blacklisting client (answer to blacklist query). */ @@ -494,37 +495,42 @@ extern "C" /** * Local and P2P generic DHT message start type */ -#define GNUNET_MESSAGE_TYPE_DHT 142 +#define GNUNET_MESSAGE_TYPE_DHT_ROUTE 142 + +/** + * Local and P2P generic DHT message start type + */ +#define GNUNET_MESSAGE_TYPE_DHT_ROUTE_RESULT 143 /** * Local and P2P generic DHT message stop type */ -#define GNUNET_MESSAGE_TYPE_DHT_STOP 143 +#define GNUNET_MESSAGE_TYPE_DHT_STOP 144 /** * Local and message acknowledgment */ -#define GNUNET_MESSAGE_TYPE_DHT_ACK 144 +#define GNUNET_MESSAGE_TYPE_DHT_ACK 145 /** * Local DHT Put message, from API to service */ -#define GNUNET_MESSAGE_TYPE_DHT_PUT 145 +#define GNUNET_MESSAGE_TYPE_DHT_PUT 146 /** * Local DHT Get message, from API to service */ -#define GNUNET_MESSAGE_TYPE_DHT_GET 146 +#define GNUNET_MESSAGE_TYPE_DHT_GET 147 /** * Local DHT Get stop message, from API to service */ -#define GNUNET_MESSAGE_TYPE_DHT_GET_STOP 147 +#define GNUNET_MESSAGE_TYPE_DHT_GET_STOP 148 /** * Local DHT Get result message, from service to API */ -#define GNUNET_MESSAGE_TYPE_DHT_GET_RESULT 148 +#define GNUNET_MESSAGE_TYPE_DHT_GET_RESULT 149 /** * Local DHT Get message, from API to service diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h index de7a01ea1..3047319e4 100644 --- a/src/include/gnunet_testing_lib.h +++ b/src/include/gnunet_testing_lib.h @@ -175,12 +175,15 @@ GNUNET_TESTING_daemon_get_config (struct GNUNET_TESTING_Daemon *d); * @param d2 handle for the second daemon * @param timeout how long is the connection attempt * allowed to take? + * @param max_connect_attempts how many times should we try to reconnect + * (within timeout) * @param cb function to call at the end * @param cb_cls closure for cb */ void GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1, struct GNUNET_TESTING_Daemon *d2, struct GNUNET_TIME_Relative timeout, + unsigned int max_connect_attempts, GNUNET_TESTING_NotifyConnection cb, void *cb_cls); @@ -393,6 +396,16 @@ struct GNUNET_TESTING_Daemon * Handle to the server. */ struct GNUNET_CORE_Handle *server; + + /** + * Handle to the transport service of this peer + */ + struct GNUNET_TRANSPORT_Handle *th; + + /** + * HELLO message for this peer + */ + struct GNUNET_HELLO_Message *hello; }; /** -- 2.25.1