summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-07-02 09:02:08 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-07-02 09:02:08 +0000
commit76df6221392b5d56fecf7de4ad7d5e2c7cfb3722 (patch)
tree5b918bcb44ec7a52ee402c1cb934f5e2638f9a7c /src/transport
parenta8ac22b369ad152cc2422b738997768cc1761fc9 (diff)
- some docu and new testing lib
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/Makefile.am1
-rw-r--r--src/transport/transport-testing.h62
2 files changed, 62 insertions, 1 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index c571364ab..24984a957 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -73,6 +73,7 @@ libgnunettransporttesting_la_LIBADD = \
$(top_builddir)/src/transport/libgnunettransport.la \
$(top_builddir)/src/hello/libgnunethello.la \
$(top_builddir)/src/util/libgnunetutil.la \
+ $(top_builddir)/src/testing/libgnunettesting.la \
$(GN_LIBINTL)
libgnunettransporttesting_la_DEPENDENCIES = \
libgnunettransport.la
diff --git a/src/transport/transport-testing.h b/src/transport/transport-testing.h
index 20e802dfa..639eff018 100644
--- a/src/transport/transport-testing.h
+++ b/src/transport/transport-testing.h
@@ -33,6 +33,7 @@
#include "gnunet_program_lib.h"
#include "gnunet_container_lib.h"
#include "gnunet_transport_service.h"
+#include "gnunet_testing_lib-new.h"
#define GNUNET_TRANSPORT_TESTING_ConnectRequest void *
@@ -59,7 +60,9 @@ typedef void (*GNUNET_TRANSPORT_TESTING_connect_cb) (struct PeerContext * p1,
void *cls);
-
+/**
+ * Definition for a transport testing handle
+ */
struct GNUNET_TRANSPORT_TESTING_handle;
/**
@@ -67,37 +70,94 @@ struct GNUNET_TRANSPORT_TESTING_handle;
*/
struct PeerContext
{
+ /**
+ * Next element in the DLL
+ */
struct PeerContext *next;
+
+ /**
+ * Previous element in the DLL
+ */
struct PeerContext *prev;
+ /**
+ * Transport testing handle this peer belongs to
+ */
struct GNUNET_TRANSPORT_TESTING_handle *tth;
+ /**
+ * Peer's configuration
+ */
struct GNUNET_CONFIGURATION_Handle *cfg;
+ /**
+ * Peer's transport service handle
+ */
struct GNUNET_TRANSPORT_Handle *th;
+ /**
+ * Peer's transport get hello handle to retrieve peer's HELLO message
+ */
struct GNUNET_TRANSPORT_GetHelloHandle *ghh;
+ /**
+ * Peer's testing handle
+ */
+ struct GNUNET_TESTING_Peer *peer;
+
+ /**
+ * Peer identity
+ */
struct GNUNET_PeerIdentity id;
+ /**
+ * Handle for the peer's ARM process
+ */
struct GNUNET_OS_Process *arm_proc;
+ /**
+ * Receive callback
+ */
GNUNET_TRANSPORT_ReceiveCallback rec;
+ /**
+ * Notify connect callback
+ */
GNUNET_TRANSPORT_NotifyConnect nc;
+ /**
+ * Notify disconnect callback
+ */
GNUNET_TRANSPORT_NotifyDisconnect nd;
+ /**
+ * Startup completed callback
+ */
GNUNET_TRANSPORT_TESTING_start_cb start_cb;
+ /**
+ * Peers HELLO Message
+ */
struct GNUNET_HELLO_Message *hello;
+ /**
+ * Closure for the callbacks
+ */
void *cb_cls;
+ /**
+ * Peer's service home directory
+ */
char *servicehome;
+ /**
+ * Hostkey file
+ */
char *hostkeyfile;
+ /**
+ * An unique number to identify the peer
+ */
unsigned int no;
};