[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r8552 - in gnunet: . src src/arm src/core src/hostlist src/
From: |
gnunet |
Subject: |
[GNUnet-SVN] r8552 - in gnunet: . src src/arm src/core src/hostlist src/topology |
Date: |
Thu, 11 Jun 2009 18:34:47 -0600 |
Author: grothoff
Date: 2009-06-11 18:34:47 -0600 (Thu, 11 Jun 2009)
New Revision: 8552
Added:
gnunet/src/hostlist/
gnunet/src/hostlist/Makefile.am
gnunet/src/hostlist/gnunet-daemon-hostlist.c
gnunet/src/topology/
gnunet/src/topology/Makefile.am
gnunet/src/topology/gnunet-daemon-topology.c
Modified:
gnunet/TODO
gnunet/configure.ac
gnunet/src/Makefile.am
gnunet/src/arm/gnunet-service-arm.c
gnunet/src/core/Makefile.am
Log:
removing dead code / unused variables
Modified: gnunet/TODO
===================================================================
--- gnunet/TODO 2009-06-11 17:08:22 UTC (rev 8551)
+++ gnunet/TODO 2009-06-12 00:34:47 UTC (rev 8552)
@@ -1,11 +1,20 @@
PHASE #1: (Goal: settle key design questions)
-Core:
-* Internal: topology
-* Internal: advertising (propagate other peers' HELLOs, find new ones)
-* Internal: bootstrapping
- => bootstrap should use plugins, possible multiple at the same time!
+Hostlist:
+* hostlist server (MHD-side)
+* hostlist client (CURL-side); monitoring of number of active connections (to
establish need for bootstrapping)
+* hostlist server URL advertising & learning via P2P
+Topology:
+* Selecting peers from peerinfo for connects; blacklisting
+* Managing connections, F2F configuration obedience, rejecting prohibited
connections
+* Forwarding of known HELLOs to neighbours (advertising)
+ [ Inbound HELLOs are processed by transport, right?
+ But what about inbound encrypted HELLOs? ]
+
+ARM:
+* Make sure ARM supports daemons (non-service background processes, see
hostlist/topology)
+
Util:
* improve disk API [Nils]
Modified: gnunet/configure.ac
===================================================================
--- gnunet/configure.ac 2009-06-11 17:08:22 UTC (rev 8551)
+++ gnunet/configure.ac 2009-06-12 00:34:47 UTC (rev 8552)
@@ -37,6 +37,7 @@
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
+AM_PROG_CC_C_O
LT_CONFIG_LTDL_DIR([libltdl])
AC_CANONICAL_HOST
LT_INIT([disable-static dlopen win32-dll])
@@ -760,10 +761,12 @@
src/util/Makefile
src/fragmentation/Makefile
src/hello/Makefile
+src/hostlist/Makefile
src/peerinfo/Makefile
src/resolver/Makefile
src/statistics/Makefile
src/template/Makefile
+src/topology/Makefile
src/transport/Makefile
])
AC_OUTPUT
Modified: gnunet/src/Makefile.am
===================================================================
--- gnunet/src/Makefile.am 2009-06-11 17:08:22 UTC (rev 8551)
+++ gnunet/src/Makefile.am 2009-06-12 00:34:47 UTC (rev 8552)
@@ -2,6 +2,11 @@
# INTLEMU_SUBDIRS = intlemu
#endif
+
+if HAVE_MHD
+ HOSTLIST_DIR = hostlist
+endif
+
SUBDIRS = \
include $(INTLEMU_SUBDIRS) \
util \
@@ -13,5 +18,7 @@
statistics \
template \
transport \
- core
+ core \
+ $(HOSTLIST_DIR) \
+ topology
Modified: gnunet/src/arm/gnunet-service-arm.c
===================================================================
--- gnunet/src/arm/gnunet-service-arm.c 2009-06-11 17:08:22 UTC (rev 8551)
+++ gnunet/src/arm/gnunet-service-arm.c 2009-06-12 00:34:47 UTC (rev 8552)
@@ -183,28 +183,6 @@
/**
- * Find the process with the given PID in the
- * given list.
- *
- * @return NULL if it was not found
- */
-static struct ServiceList *
-find_pid (pid_t pid)
-{
- struct ServiceList *pos;
-
- pos = running;
- while (pos != NULL)
- {
- if (pos->pid == pid)
- return pos;
- pos = pos->next;
- }
- return NULL;
-}
-
-
-/**
* Find the process with the given service
* name in the given list, remove it and return it.
*
@@ -548,7 +526,6 @@
maint (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct ServiceList *pos;
- pid_t pid;
const char *statstr;
int statcode;
struct stat sbuf;
Modified: gnunet/src/core/Makefile.am
===================================================================
--- gnunet/src/core/Makefile.am 2009-06-11 17:08:22 UTC (rev 8551)
+++ gnunet/src/core/Makefile.am 2009-06-12 00:34:47 UTC (rev 8552)
@@ -1,7 +1,5 @@
INCLUDES = -I$(top_srcdir)/src/include
-plugindir = $(libdir)/gnunet
-
if MINGW
WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
endif
Added: gnunet/src/hostlist/Makefile.am
===================================================================
--- gnunet/src/hostlist/Makefile.am (rev 0)
+++ gnunet/src/hostlist/Makefile.am 2009-06-12 00:34:47 UTC (rev 8552)
@@ -0,0 +1,29 @@
+INCLUDES = -I$(top_srcdir)/src/include
+
+if USE_COVERAGE
+ AM_CFLAGS = -fprofile-arcs -ftest-coverage
+endif
+
+
+bin_PROGRAMS = \
+ gnunet-daemon-hostlist
+
+gnunet_daemon_hostlist_SOURCES = \
+ gnunet-daemon-hostlist.c
+#
+# hostlist-server.c hostlist-server.h
+# hostlist-client.c hostlist-client.h
+gnunet_daemon_hostlist_LDADD = \
+ $(top_builddir)/src/core/libgnunetcore.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ -lmicrohttpd \
+ @LIBCURL@ \
+ $(GN_LIBINTL)
+
+gnunet_daemon_hostlist_CPPFLAGS = \
+ @LIBCURL_CPPFLAGS@
+
+
Added: gnunet/src/hostlist/gnunet-daemon-hostlist.c
===================================================================
--- gnunet/src/hostlist/gnunet-daemon-hostlist.c
(rev 0)
+++ gnunet/src/hostlist/gnunet-daemon-hostlist.c 2009-06-12 00:34:47 UTC
(rev 8552)
@@ -0,0 +1,137 @@
+/*
+ This file is part of GNUnet.
+ (C) 2007, 2008, 2009 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 hostlist/gnunet-daemon-hostlist.c
+ * @brief code for bootstrapping via hostlist servers
+ * @author Christian Grothoff
+ */
+
+#include <stdlib.h>
+#include "platform.h"
+#include "gnunet_getopt_lib.h"
+#include "gnunet_protocols.h"
+#include "gnunet_program_lib.h"
+#include "gnunet_statistics_service.h"
+#include "gnunet_strings_lib.h"
+#include "gnunet_time_lib.h"
+
+
+/**
+ * Set if we are allowed to learn about peers by accessing
+ * hostlist servers.
+ */
+static int bootstrapping;
+
+/**
+ * Set if the user allows us to learn about new hostlists
+ * from the network.
+ */
+static int learning;
+
+/**
+ * Set if the user wants us to run a hostlist server.
+ */
+static int provide_hostlist;
+
+
+/**
+ * gnunet-daemon-hostlist command line options.
+ */
+static struct GNUNET_GETOPT_CommandLineOption options[] = {
+ { 'b', "bootstrap", NULL, gettext_noop ("bootstrap using hostlists (it is
highly recommended that you always use this option)"),
+ GNUNET_NO, &GNUNET_GETOPT_set_one, &bootstrapping },
+ { 'e', "enable-learning", NULL, gettext_noop ("enable learning about
hostlist servers from other peers"),
+ GNUNET_NO, &GNUNET_GETOPT_set_one, &learning},
+ { 'p', "provide-hostlist", NULL, gettext_noop ("provide a hostlist server"),
+ GNUNET_NO, &GNUNET_GETOPT_set_one, &provide_hostlist},
+ GNUNET_GETOPT_OPTION_END
+};
+
+
+
+/**
+ * Main function that will be run.
+ *
+ * @param cls closure
+ * @param sched the scheduler to use
+ * @param args remaining command-line arguments
+ * @param cfgfile name of the configuration file used (for saving, can be
NULL!)
+ * @param cfg configuration
+ */
+static void
+run (void *cls,
+ struct GNUNET_SCHEDULER_Handle * sched,
+ char *const *args,
+ const char *cfgfile,
+ struct GNUNET_CONFIGURATION_Handle * cfg)
+{
+ if ( (! bootstrapping) &&
+ (! learning) &&
+ (! provide_hostlist) )
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ _("None of the functions for the hostlist daemon were
enabled. I have no reason to run!\n"));
+ return;
+ }
+ if (learning)
+ {
+ // FIXME!
+ // (register handler with core for hostlist ads)
+ }
+ if (bootstrapping)
+ {
+ // FIXME!
+ // (register handler with core to monitor number of active
+ // connections; trigger hostlist download via CURL if
+ // number is low)
+ }
+ if (provide_hostlist)
+ {
+ // FIXME!
+ // (initialize MHD server and run using scheduler;
+ // use peerinfo to gather HELLOs)
+ }
+}
+
+
+/**
+ * The main function for the hostlist daemon.
+ *
+ * @param argc number of arguments from the command line
+ * @param argv command line arguments
+ * @return 0 ok, 1 on error
+ */
+int
+main (int argc, char *const *argv)
+{
+ int ret;
+
+ ret = (GNUNET_OK ==
+ GNUNET_PROGRAM_run (argc,
+ argv,
+ "hostlist",
+ _("GNUnet hostlist server and client"),
+ options,
+ &run, NULL)) ? 0 : 1;
+ return ret;
+}
+
+/* end of gnunet-daemon-hostlist.c */
Added: gnunet/src/topology/Makefile.am
===================================================================
--- gnunet/src/topology/Makefile.am (rev 0)
+++ gnunet/src/topology/Makefile.am 2009-06-12 00:34:47 UTC (rev 8552)
@@ -0,0 +1,19 @@
+INCLUDES = -I$(top_srcdir)/src/include
+
+if USE_COVERAGE
+ AM_CFLAGS = -fprofile-arcs -ftest-coverage
+endif
+
+
+bin_PROGRAMS = \
+ gnunet-daemon-topology
+
+gnunet_daemon_topology_SOURCES = \
+ gnunet-daemon-topology.c
+gnunet_daemon_topology_LDADD = \
+ $(top_builddir)/src/core/libgnunetcore.la \
+ $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(GN_LIBINTL)
+
+
Added: gnunet/src/topology/gnunet-daemon-topology.c
===================================================================
--- gnunet/src/topology/gnunet-daemon-topology.c
(rev 0)
+++ gnunet/src/topology/gnunet-daemon-topology.c 2009-06-12 00:34:47 UTC
(rev 8552)
@@ -0,0 +1,87 @@
+/*
+ This file is part of GNUnet.
+ (C) 2007, 2008, 2009 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 topology/gnunet-daemon-topology.c
+ * @brief code for bootstrapping via topology servers
+ * @author Christian Grothoff
+ */
+
+#include <stdlib.h>
+#include "platform.h"
+#include "gnunet_getopt_lib.h"
+#include "gnunet_protocols.h"
+#include "gnunet_program_lib.h"
+#include "gnunet_statistics_service.h"
+#include "gnunet_strings_lib.h"
+#include "gnunet_time_lib.h"
+
+
+/**
+ * gnunet-daemon-topology command line options.
+ */
+static struct GNUNET_GETOPT_CommandLineOption options[] = {
+ GNUNET_GETOPT_OPTION_END
+};
+
+
+
+/**
+ * Main function that will be run.
+ *
+ * @param cls closure
+ * @param sched the scheduler to use
+ * @param args remaining command-line arguments
+ * @param cfgfile name of the configuration file used (for saving, can be
NULL!)
+ * @param cfg configuration
+ */
+static void
+run (void *cls,
+ struct GNUNET_SCHEDULER_Handle * sched,
+ char *const *args,
+ const char *cfgfile,
+ struct GNUNET_CONFIGURATION_Handle * cfg)
+{
+}
+
+
+/**
+ * The main function for the topology daemon.
+ *
+ * @param argc number of arguments from the command line
+ * @param argv command line arguments
+ * @return 0 ok, 1 on error
+ */
+int
+main (int argc, char *const *argv)
+{
+ int ret;
+
+ ret = (GNUNET_OK ==
+ GNUNET_PROGRAM_run (argc,
+ argv,
+ "topology",
+ _("GNUnet topology control (maintaining P2P mesh
and F2F constraints)"),
+ options,
+ &run, NULL)) ? 0 : 1;
+ return ret;
+}
+
+/* end of gnunet-daemon-topology.c */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r8552 - in gnunet: . src src/arm src/core src/hostlist src/topology,
gnunet <=