gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r28666 - in gnunet/src: include testbed


From: gnunet
Subject: [GNUnet-SVN] r28666 - in gnunet/src: include testbed
Date: Thu, 15 Aug 2013 18:28:51 +0200

Author: harsha
Date: 2013-08-15 18:28:50 +0200 (Thu, 15 Aug 2013)
New Revision: 28666

Modified:
   gnunet/src/include/gnunet_protocols.h
   gnunet/src/testbed/gnunet-service-testbed.c
   gnunet/src/testbed/gnunet-service-testbed_oc.c
   gnunet/src/testbed/gnunet-service-testbed_peers.c
   gnunet/src/testbed/test_testbed_api.conf
   gnunet/src/testbed/testbed.h
   gnunet/src/testbed/testbed_api.c
   gnunet/src/testbed/testbed_api_peers.c
Log:
- rename PEER_GET_CONFIGURATION to PEER_GET_INFORMATION


Modified: gnunet/src/include/gnunet_protocols.h
===================================================================
--- gnunet/src/include/gnunet_protocols.h       2013-08-15 16:27:27 UTC (rev 
28665)
+++ gnunet/src/include/gnunet_protocols.h       2013-08-15 16:28:50 UTC (rev 
28666)
@@ -1509,14 +1509,14 @@
 #define GNUNET_MESSAGE_TYPE_TESTBED_GENERIC_OPERATION_SUCCESS 475
 
 /**
- * Message to get the configuration of a peer
+ * Message to get a peer's information
  */
-#define GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_CONFIGURATION 476
+#define GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_INFORMATION 476
 
 /**
- * Message containing the peer configuration
+ * Message containing the peer's information
  */
-#define GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONFIGURATION 477
+#define GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION 477
 
 /**
  * Message to request a controller to make one of its peer to connect to 
another

Modified: gnunet/src/testbed/gnunet-service-testbed.c
===================================================================
--- gnunet/src/testbed/gnunet-service-testbed.c 2013-08-15 16:27:27 UTC (rev 
28665)
+++ gnunet/src/testbed/gnunet-service-testbed.c 2013-08-15 16:28:50 UTC (rev 
28666)
@@ -882,7 +882,7 @@
     {&GST_handle_peer_stop, NULL, GNUNET_MESSAGE_TYPE_TESTBED_STOP_PEER,
      sizeof (struct GNUNET_TESTBED_PeerStopMessage)},
     {&GST_handle_peer_get_config, NULL,
-     GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_CONFIGURATION,
+     GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_INFORMATION,
      sizeof (struct GNUNET_TESTBED_PeerGetConfigurationMessage)},
     {&GST_handle_overlay_connect, NULL,
      GNUNET_MESSAGE_TYPE_TESTBED_OVERLAY_CONNECT,

Modified: gnunet/src/testbed/gnunet-service-testbed_oc.c
===================================================================
--- gnunet/src/testbed/gnunet-service-testbed_oc.c      2013-08-15 16:27:27 UTC 
(rev 28665)
+++ gnunet/src/testbed/gnunet-service-testbed_oc.c      2013-08-15 16:28:50 UTC 
(rev 28666)
@@ -1112,7 +1112,7 @@
   rp2c = &occ->p2ctx.remote;
   rp2c->opc = NULL;
   GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != occ->timeout_task);
-  if (GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONFIGURATION != ntohs (msg->type))
+  if (GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION != ntohs (msg->type))
   {
     GNUNET_SCHEDULER_cancel (occ->timeout_task);
     occ->timeout_task =
@@ -1353,7 +1353,7 @@
   cmsg.header.size =
       htons (sizeof (struct GNUNET_TESTBED_PeerGetConfigurationMessage));
   cmsg.header.type =
-      htons (GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_CONFIGURATION);
+      htons (GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_INFORMATION);
   cmsg.peer_id = htonl (occ->other_peer_id);
   cmsg.operation_id = GNUNET_htonll (occ->op_id);
   rp2c->opc =
@@ -1690,6 +1690,8 @@
   const struct GNUNET_TESTBED_RemoteOverlayConnectMessage *msg;
   struct RemoteOverlayConnectCtx *rocc;
   struct Peer *peer;
+  struct GNUNET_PeerIdentity pid;
+  static char pid_str[16];
   uint32_t peer_id;
   uint16_t msize;
   uint16_t hsize;
@@ -1740,13 +1742,15 @@
   GNUNET_CONTAINER_DLL_insert_tail (roccq_head, roccq_tail, rocc);
   memcpy (&rocc->a_id, &msg->peer_identity,
           sizeof (struct GNUNET_PeerIdentity));
-  LOG_DEBUG ("Received request for overlay connection with op_id: 0x%llx "
-             "from local peer %u to peer %4s with hello size: %u\n",
-             rocc->op_id, peer_id, GNUNET_i2s (&rocc->a_id), hsize);
+  GNUNET_TESTING_peer_get_identity (peer->details.local.peer, &pid);
+  (void) strncpy (pid_str, GNUNET_i2s (&pid), 15);
+  LOG_DEBUG ("0x%llx: Remote overlay connect %4s to peer %4s with hello size: 
%u\n",
+             rocc->op_id, pid_str, GNUNET_i2s (&rocc->a_id), hsize);
   rocc->peer = peer;
   rocc->peer->reference_cnt++;
   rocc->hello = GNUNET_malloc (hsize);
   memcpy (rocc->hello, msg->hello, hsize);
+  rocc->tcc.op_id = rocc->op_id;
   rocc->tcc.cgh_th =
       GST_cache_get_handle_transport (peer_id, rocc->peer->details.local.cfg,
                                       &rocc_cache_get_handle_transport_cb, 
rocc,

Modified: gnunet/src/testbed/gnunet-service-testbed_peers.c
===================================================================
--- gnunet/src/testbed/gnunet-service-testbed_peers.c   2013-08-15 16:27:27 UTC 
(rev 28665)
+++ gnunet/src/testbed/gnunet-service-testbed_peers.c   2013-08-15 16:28:50 UTC 
(rev 28666)
@@ -721,7 +721,7 @@
   reply = GNUNET_realloc (xconfig, msize);
   (void) memmove (&reply[1], reply, xc_size);
   reply->header.size = htons (msize);
-  reply->header.type = htons (GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONFIGURATION);
+  reply->header.type = htons (GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION);
   reply->peer_id = msg->peer_id;
   reply->operation_id = msg->operation_id;
   GNUNET_TESTING_peer_get_identity (GST_peer_list[peer_id]->details.local.peer,

Modified: gnunet/src/testbed/test_testbed_api.conf
===================================================================
--- gnunet/src/testbed/test_testbed_api.conf    2013-08-15 16:27:27 UTC (rev 
28665)
+++ gnunet/src/testbed/test_testbed_api.conf    2013-08-15 16:28:50 UTC (rev 
28666)
@@ -3,7 +3,6 @@
 PORT = 12113
 ACCEPT_FROM = 127.0.0.1;
 HOSTNAME = localhost
-NEIGHBOUR_LIMIT = 100
 TOPOLOGY = RANDOM
 #PREFIX = xterm -geometry 100x85 -T peer1 -e libtool --mode=execute gdb --args
 

Modified: gnunet/src/testbed/testbed.h
===================================================================
--- gnunet/src/testbed/testbed.h        2013-08-15 16:27:27 UTC (rev 28665)
+++ gnunet/src/testbed/testbed.h        2013-08-15 16:28:50 UTC (rev 28666)
@@ -614,7 +614,7 @@
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_CONFIGURATION
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_INFORMATION
    */
   struct GNUNET_MessageHeader header;
 
@@ -638,7 +638,7 @@
 {
 
   /**
-   * Type is GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONFIGURATION
+   * Type is GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION
    */
   struct GNUNET_MessageHeader header;
 

Modified: gnunet/src/testbed/testbed_api.c
===================================================================
--- gnunet/src/testbed/testbed_api.c    2013-08-15 16:27:27 UTC (rev 28665)
+++ gnunet/src/testbed/testbed_api.c    2013-08-15 16:28:50 UTC (rev 28666)
@@ -1127,7 +1127,7 @@
                            msg);
 
     break;
-  case GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONFIGURATION:
+  case GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION:
     GNUNET_assert (msize >=
                    sizeof (struct
                            
GNUNET_TESTBED_PeerConfigurationInformationMessage));
@@ -1875,7 +1875,7 @@
 /**
  * Generates configuration by uncompressing configuration in given message. The
  * given message should be of the following types:
- * GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONFIGURATION,
+ * GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION,
  * GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_CONFIGURATION,
  * GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST,
  * GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS,
@@ -1896,7 +1896,7 @@
 
   switch (ntohs (msg->type))
   {
-  case GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONFIGURATION:
+  case GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION:
   {
     const struct GNUNET_TESTBED_PeerConfigurationInformationMessage *imsg;
 

Modified: gnunet/src/testbed/testbed_api_peers.c
===================================================================
--- gnunet/src/testbed/testbed_api_peers.c      2013-08-15 16:27:27 UTC (rev 
28665)
+++ gnunet/src/testbed/testbed_api_peers.c      2013-08-15 16:28:50 UTC (rev 
28666)
@@ -325,7 +325,7 @@
                      (struct GNUNET_TESTBED_PeerGetConfigurationMessage));
   msg->header.size =
       htons (sizeof (struct GNUNET_TESTBED_PeerGetConfigurationMessage));
-  msg->header.type = htons 
(GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_CONFIGURATION);
+  msg->header.type = htons (GNUNET_MESSAGE_TYPE_TESTBED_GET_PEER_INFORMATION);
   msg->peer_id = htonl (peer_id);
   msg->operation_id = GNUNET_htonll (operation_id);
   return msg;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]