[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6624 - GNUnet/src/applications/testing
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6624 - GNUnet/src/applications/testing |
Date: |
Tue, 25 Mar 2008 15:01:31 -0600 (MDT) |
Author: nevans
Date: 2008-03-25 15:01:31 -0600 (Tue, 25 Mar 2008)
New Revision: 6624
Added:
GNUnet/src/applications/testing/remote.h
Modified:
GNUnet/src/applications/testing/remotetopologies.c
Log:
Added: GNUnet/src/applications/testing/remote.h
===================================================================
--- GNUnet/src/applications/testing/remote.h (rev 0)
+++ GNUnet/src/applications/testing/remote.h 2008-03-25 21:01:31 UTC (rev
6624)
@@ -0,0 +1,77 @@
+/*
+ This file is part of GNUnet.
+ (C) 2008 Christian Grothoff (and other contributing authors)
+
+ GNUnet is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 2, or (at your
+ option) any later version.
+
+ GNUnet is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNUnet; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file applications/testing/remote.h
+ * @brief header for remote.c
+ * @author Nathan Evans
+ */
+
+#ifndef REMOTE_H_
+#define REMOTE_H_
+
+#include "platform.h"
+#include "gnunet_protocols.h"
+#include "gnunet_identity_lib.h"
+#include "gnunet_util.h"
+#include "gnunet_testing_lib.h"
+
+typedef enum
+{
+ GNUNET_REMOTE_CLIQUE = 0,
+ GNUNET_REMOTE_SMALL_WORLD = 1,
+ GNUNET_REMOTE_RING = 2,
+ GNUNET_REMOTE_2D_TORUS,
+
+} GNUNET_REMOTE_TOPOLOGIES;
+
+struct GNUNET_REMOTE_daemon_list
+{
+ struct GNUNET_REMOTE_daemon_list *next;
+ char *hostname;
+ unsigned long long port;
+
+};
+
+
+
+
+/**
+ * Establish a connection between two GNUnet daemons
+ *
+ * @param port1 client port of the first daemon
+ * @param port2 client port of the second daemon
+ * @param ip1 client ip or hostname for the first daemon
+ * @param ip2 client ip or hostname for the second daemon
+ * @return GNUNET_OK on success, GNUNET_SYSERR on failure
+ */
+int
+GNUNET_REMOTE_connect_daemons ( char * ip1, unsigned short port1, char * ip2,
unsigned short port2);
+
+/**
+ * Create a topology (connect the running gnunetd's) that corresponds
+ * to the type specified in t.
+ */
+int
+GNUNET_REMOTE_create_topology(GNUNET_REMOTE_TOPOLOGIES t,int
number_of_daemons);
+
+#endif /*REMOTE_H_*/
+
+/* end of remote.h */
Modified: GNUnet/src/applications/testing/remotetopologies.c
===================================================================
--- GNUnet/src/applications/testing/remotetopologies.c 2008-03-25 20:45:02 UTC
(rev 6623)
+++ GNUnet/src/applications/testing/remotetopologies.c 2008-03-25 21:01:31 UTC
(rev 6624)
@@ -77,7 +77,7 @@
*/
int
-GNUNET_REMOTE_connect_daemons ( char * ip1, unsigned short port1, char * ip2,
unsigned short port2)
+GNUNET_REMOTE_connect_daemons ( char * hostname1, unsigned short port1, char *
hostname2, unsigned short port2)
{
char host[128];
struct GNUNET_GC_Configuration *cfg1 = GNUNET_GC_create ();
@@ -89,11 +89,11 @@
GNUNET_MessageHello *h2;
ret = GNUNET_SYSERR;
- GNUNET_snprintf (host, 128, "%s:%u", ip1, port1);
+ GNUNET_snprintf (host, 128, "%s:%u", hostname1, port1);
GNUNET_GC_set_configuration_value_string (cfg1, NULL, "NETWORK", "HOST",
host);
fprintf(stderr,"host1 is %s\n",host);
- GNUNET_snprintf (host, 128, "%s:%u", ip2, port2);
+ GNUNET_snprintf (host, 128, "%s:%u", hostname2, port2);
GNUNET_GC_set_configuration_value_string (cfg2, NULL, "NETWORK", "HOST",
host);
fprintf(stderr,"host2 is %s\n",host);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6624 - GNUnet/src/applications/testing,
gnunet <=