- some docu and new testing lib
authorMatthias Wachs <wachs@net.in.tum.de>
Mon, 2 Jul 2012 09:02:08 +0000 (09:02 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Mon, 2 Jul 2012 09:02:08 +0000 (09:02 +0000)
src/transport/Makefile.am
src/transport/transport-testing.h

index c571364ab027653cba447696285d64c5e478f6a9..24984a95714c6cd69ccf3821a6dbaf87ad0413e4 100644 (file)
@@ -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
index 20e802dfa78e2c08dbc50e11d2d87223831e6bc3..639eff018e931e98b0971474824db034df7d1f81 100644 (file)
@@ -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;
 };