aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-05-27 08:53:34 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-05-27 08:53:34 +0000
commitc1ee8b5616043a436d7d39be7f5dd3bd8054dd76 (patch)
tree6c5aa15553278e67c284d8c3ad08c3e00be49922
parentd22cb6fd4b977f5d77dbc621852b41d4fdb47482 (diff)
downloadgnunet-c1ee8b5616043a436d7d39be7f5dd3bd8054dd76.tar.gz
gnunet-c1ee8b5616043a436d7d39be7f5dd3bd8054dd76.zip
new components
-rw-r--r--src/experimentation/Makefile.am4
-rw-r--r--src/experimentation/gnunet-daemon-experimentation.c5
-rw-r--r--src/experimentation/gnunet-daemon-experimentation.h15
-rw-r--r--src/experimentation/gnunet-daemon-experimentation_scheduler.c54
-rw-r--r--src/experimentation/gnunet-daemon-experimentation_storage.c54
5 files changed, 131 insertions, 1 deletions
diff --git a/src/experimentation/Makefile.am b/src/experimentation/Makefile.am
index 2f0da9ee7..aaa205460 100644
--- a/src/experimentation/Makefile.am
+++ b/src/experimentation/Makefile.am
@@ -36,7 +36,9 @@ gnunet_daemon_experimentation_SOURCES = \
36 gnunet-daemon-experimentation.c \ 36 gnunet-daemon-experimentation.c \
37 gnunet-daemon-experimentation_capabilities.c \ 37 gnunet-daemon-experimentation_capabilities.c \
38 gnunet-daemon-experimentation_nodes.c \ 38 gnunet-daemon-experimentation_nodes.c \
39 gnunet-daemon-experimentation_experiments.c 39 gnunet-daemon-experimentation_scheduler.c \
40 gnunet-daemon-experimentation_experiments.c \
41 gnunet-daemon-experimentation_storage.c
40gnunet_daemon_experimentation_LDADD = \ 42gnunet_daemon_experimentation_LDADD = \
41 $(top_builddir)/src/core/libgnunetcore.la \ 43 $(top_builddir)/src/core/libgnunetcore.la \
42 $(top_builddir)/src/statistics/libgnunetstatistics.la \ 44 $(top_builddir)/src/statistics/libgnunetstatistics.la \
diff --git a/src/experimentation/gnunet-daemon-experimentation.c b/src/experimentation/gnunet-daemon-experimentation.c
index ee632ec86..085dd14b1 100644
--- a/src/experimentation/gnunet-daemon-experimentation.c
+++ b/src/experimentation/gnunet-daemon-experimentation.c
@@ -54,8 +54,11 @@ static void
54shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 54shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
55{ 55{
56 GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Experimentation daemon shutting down ...\n")); 56 GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Experimentation daemon shutting down ...\n"));
57
58 GNUNET_EXPERIMENTATION_scheduler_stop ();
57 GNUNET_EXPERIMENTATION_nodes_stop (); 59 GNUNET_EXPERIMENTATION_nodes_stop ();
58 GNUNET_EXPERIMENTATION_experiments_stop (); 60 GNUNET_EXPERIMENTATION_experiments_stop ();
61 GNUNET_EXPERIMENTATION_storage_stop ();
59 GNUNET_EXPERIMENTATION_capabilities_stop (); 62 GNUNET_EXPERIMENTATION_capabilities_stop ();
60} 63}
61 64
@@ -83,12 +86,14 @@ run (void *cls, char *const *args, const char *cfgfile,
83 } 86 }
84 87
85 GNUNET_EXPERIMENTATION_capabilities_start (); 88 GNUNET_EXPERIMENTATION_capabilities_start ();
89 GNUNET_EXPERIMENTATION_storage_start ();
86 if (GNUNET_SYSERR == GNUNET_EXPERIMENTATION_experiments_start ()) 90 if (GNUNET_SYSERR == GNUNET_EXPERIMENTATION_experiments_start ())
87 { 91 {
88 GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); 92 GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
89 return; 93 return;
90 } 94 }
91 GNUNET_EXPERIMENTATION_nodes_start (); 95 GNUNET_EXPERIMENTATION_nodes_start ();
96 GNUNET_EXPERIMENTATION_scheduler_start ();
92 97
93 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, 98 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
94 NULL); 99 NULL);
diff --git a/src/experimentation/gnunet-daemon-experimentation.h b/src/experimentation/gnunet-daemon-experimentation.h
index d2fc6bd37..a8bfc3523 100644
--- a/src/experimentation/gnunet-daemon-experimentation.h
+++ b/src/experimentation/gnunet-daemon-experimentation.h
@@ -194,4 +194,19 @@ void
194GNUNET_EXPERIMENTATION_experiments_stop (); 194GNUNET_EXPERIMENTATION_experiments_stop ();
195 195
196 196
197/**
198 * Start the storage component
199 */
200void
201GNUNET_EXPERIMENTATION_storage_start ();
202
203
204
205/**
206 * Stop the storage component
207 */
208void
209GNUNET_EXPERIMENTATION_storage_stop ();
210
211
197/* end of gnunet-daemon-experimentation.h */ 212/* end of gnunet-daemon-experimentation.h */
diff --git a/src/experimentation/gnunet-daemon-experimentation_scheduler.c b/src/experimentation/gnunet-daemon-experimentation_scheduler.c
new file mode 100644
index 000000000..478813cf7
--- /dev/null
+++ b/src/experimentation/gnunet-daemon-experimentation_scheduler.c
@@ -0,0 +1,54 @@
1/*
2 This file is part of GNUnet.
3 (C) 2009 Christian Grothoff (and other contributing authors)
4
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19*/
20
21/**
22 * @file experimentation/gnunet-daemon-experimentation_scheduler.c
23 * @brief experimentation daemon: execute experiments
24 * @author Christian Grothoff
25 * @author Matthias Wachs
26 */
27#include "platform.h"
28#include "gnunet_getopt_lib.h"
29#include "gnunet_util_lib.h"
30#include "gnunet_core_service.h"
31#include "gnunet_statistics_service.h"
32#include "gnunet-daemon-experimentation.h"
33
34
35/**
36 * Start the scheduler component
37 */
38void
39GNUNET_EXPERIMENTATION_scheduler_start ()
40{
41
42}
43
44
45/**
46 * Stop the scheduler component
47 */
48void
49GNUNET_EXPERIMENTATION_scheduler_stop ()
50{
51
52}
53
54/* end of gnunet-daemon-experimentation_scheduler.c */
diff --git a/src/experimentation/gnunet-daemon-experimentation_storage.c b/src/experimentation/gnunet-daemon-experimentation_storage.c
new file mode 100644
index 000000000..8382eaa6f
--- /dev/null
+++ b/src/experimentation/gnunet-daemon-experimentation_storage.c
@@ -0,0 +1,54 @@
1/*
2 This file is part of GNUnet.
3 (C) 2009 Christian Grothoff (and other contributing authors)
4
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19*/
20
21/**
22 * @file experimentation/gnunet-daemon-experimentation_storage.c
23 * @brief experimentation daemon: store results
24 * @author Christian Grothoff
25 * @author Matthias Wachs
26 */
27#include "platform.h"
28#include "gnunet_getopt_lib.h"
29#include "gnunet_util_lib.h"
30#include "gnunet_core_service.h"
31#include "gnunet_statistics_service.h"
32#include "gnunet-daemon-experimentation.h"
33
34
35/**
36 * Start the storage component
37 */
38void
39GNUNET_EXPERIMENTATION_storage_start ()
40{
41
42}
43
44
45/**
46 * Stop the storage component
47 */
48void
49GNUNET_EXPERIMENTATION_storage_stop ()
50{
51
52}
53
54/* end of gnunet-daemon-experimentation_storage.c */