aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-05-21 13:38:34 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-05-21 13:38:34 +0000
commitac8e1d62caf10cdc6f481f54f9eb92a161c02616 (patch)
tree5dc2a1f8321be1831689b86cfe57382f6e465576 /src
parent1418efcaf31eb8723cc4f436bab9cc6ed09e20f2 (diff)
downloadgnunet-ac8e1d62caf10cdc6f481f54f9eb92a161c02616.tar.gz
gnunet-ac8e1d62caf10cdc6f481f54f9eb92a161c02616.zip
testcase to connect daemons in a clique
Diffstat (limited to 'src')
-rw-r--r--src/experimentation/Makefile712
-rw-r--r--src/experimentation/Makefile.am19
-rw-r--r--src/experimentation/gnunet-daemon-experimentation.c81
-rw-r--r--src/experimentation/test_experimentation_clique.c176
-rw-r--r--src/experimentation/test_experimentation_clique.conf84
5 files changed, 344 insertions, 728 deletions
diff --git a/src/experimentation/Makefile b/src/experimentation/Makefile
deleted file mode 100644
index 8c0aed92a..000000000
--- a/src/experimentation/Makefile
+++ /dev/null
@@ -1,712 +0,0 @@
1# Makefile.in generated by automake 1.11.3 from Makefile.am.
2# src/experimentation/Makefile. Generated from Makefile.in by configure.
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
6# Foundation, Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16
17
18
19
20pkgdatadir = $(datadir)/gnunet
21pkgincludedir = $(includedir)/gnunet
22pkglibdir = $(libdir)/gnunet
23pkglibexecdir = $(libexecdir)/gnunet
24am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
25install_sh_DATA = $(install_sh) -c -m 644
26install_sh_PROGRAM = $(install_sh) -c
27install_sh_SCRIPT = $(install_sh) -c
28INSTALL_HEADER = $(INSTALL_DATA)
29transform = $(program_transform_name)
30NORMAL_INSTALL = :
31PRE_INSTALL = :
32POST_INSTALL = :
33NORMAL_UNINSTALL = :
34PRE_UNINSTALL = :
35POST_UNINSTALL = :
36build_triplet = x86_64-unknown-linux-gnu
37host_triplet = x86_64-unknown-linux-gnu
38target_triplet = x86_64-unknown-linux-gnu
39libexec_PROGRAMS = gnunet-daemon-experimentation$(EXEEXT)
40subdir = src/experimentation
41DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
42 $(srcdir)/experimentation.conf.in
43ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
44am__aclocal_m4_deps = $(top_srcdir)/m4/absolute-header.m4 \
45 $(top_srcdir)/m4/align.m4 $(top_srcdir)/m4/argz.m4 \
46 $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glib-2.0.m4 \
47 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
48 $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
49 $(top_srcdir)/m4/libcurl.m4 $(top_srcdir)/m4/libgcrypt.m4 \
50 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libunistring.m4 \
51 $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
52 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
53 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
54 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
55 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
56am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
57 $(ACLOCAL_M4)
58mkinstalldirs = $(install_sh) -d
59CONFIG_HEADER = $(top_builddir)/gnunet_config.h
60CONFIG_CLEAN_FILES = experimentation.conf
61CONFIG_CLEAN_VPATH_FILES =
62am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(pkgcfgdir)"
63PROGRAMS = $(libexec_PROGRAMS)
64am_gnunet_daemon_experimentation_OBJECTS = \
65 gnunet-daemon-experimentation.$(OBJEXT)
66gnunet_daemon_experimentation_OBJECTS = \
67 $(am_gnunet_daemon_experimentation_OBJECTS)
68gnunet_daemon_experimentation_DEPENDENCIES = \
69 $(top_builddir)/src/hello/libgnunethello.la \
70 $(top_builddir)/src/statistics/libgnunetstatistics.la \
71 $(top_builddir)/src/util/libgnunetutil.la
72AM_V_lt = $(am__v_lt_$(V))
73am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
74am__v_lt_0 = --silent
75DEFAULT_INCLUDES = -I. -I$(top_builddir)
76depcomp = $(SHELL) $(top_srcdir)/depcomp
77am__depfiles_maybe = depfiles
78am__mv = mv -f
79COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
80 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
81LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
82 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
83 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
84 $(AM_CFLAGS) $(CFLAGS)
85AM_V_CC = $(am__v_CC_$(V))
86am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
87am__v_CC_0 = @echo " CC " $@;
88AM_V_at = $(am__v_at_$(V))
89am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
90am__v_at_0 = @
91CCLD = $(CC)
92LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
93 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
94 $(AM_LDFLAGS) $(LDFLAGS) -o $@
95AM_V_CCLD = $(am__v_CCLD_$(V))
96am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
97am__v_CCLD_0 = @echo " CCLD " $@;
98AM_V_GEN = $(am__v_GEN_$(V))
99am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
100am__v_GEN_0 = @echo " GEN " $@;
101SOURCES = $(gnunet_daemon_experimentation_SOURCES)
102DIST_SOURCES = $(gnunet_daemon_experimentation_SOURCES)
103am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
104am__vpath_adj = case $$p in \
105 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
106 *) f=$$p;; \
107 esac;
108am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
109am__install_max = 40
110am__nobase_strip_setup = \
111 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
112am__nobase_strip = \
113 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
114am__nobase_list = $(am__nobase_strip_setup); \
115 for p in $$list; do echo "$$p $$p"; done | \
116 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
117 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
118 if (++n[$$2] == $(am__install_max)) \
119 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
120 END { for (dir in files) print dir, files[dir] }'
121am__base_list = \
122 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
123 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
124am__uninstall_files_from_dir = { \
125 test -z "$$files" \
126 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
127 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
128 $(am__cd) "$$dir" && rm -f $$files; }; \
129 }
130DATA = $(pkgcfg_DATA)
131ETAGS = etags
132CTAGS = ctags
133DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
134ACLOCAL = ${SHELL} /home/mwachs/gnunet/gnunet-debug/missing --run aclocal-1.11
135AMTAR = $${TAR-tar}
136AM_DEFAULT_VERBOSITY = 0
137AR = ar
138ARGZ_H =
139AS = as
140AUTOCONF = ${SHELL} /home/mwachs/gnunet/gnunet-debug/missing --run autoconf
141AUTOHEADER = ${SHELL} /home/mwachs/gnunet/gnunet-debug/missing --run autoheader
142AUTOMAKE = ${SHELL} /home/mwachs/gnunet/gnunet-debug/missing --run automake-1.11
143AWK = gawk
144CC = gcc
145CCDEPMODE = depmode=gcc3
146CFLAGS = -fno-strict-aliasing -Wall -Wall -g -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
147CPP = gcc -E
148CPPFLAGS =
149CXX = g++
150CXXCPP = g++ -E
151CXXDEPMODE = depmode=gcc3
152CXXFLAGS = -g -O2
153CYGPATH_W = echo
154DEFAULT_INTERFACE = "eth0"
155DEFS = -DHAVE_CONFIG_H
156DEPDIR = .deps
157DLLDIR = lib
158DLLTOOL = false
159DSYMUTIL =
160DUMPBIN =
161ECHO_C =
162ECHO_N = -n
163ECHO_T =
164EGREP = /bin/grep -E
165EXEEXT =
166EXT_LIBS =
167EXT_LIB_PATH =
168FGREP = /bin/grep -F
169GLIB_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
170GLIB_GENMARSHAL = glib-genmarshal
171GLIB_LIBS = -lglib-2.0
172GLIB_MKENUMS = glib-mkenums
173GMSGFMT = /usr/bin/msgfmt
174GMSGFMT_015 = /usr/bin/msgfmt
175GNUNETDNS_GROUP = gnunetdns
176GN_DAEMON_CONFIG_DIR = /etc
177GN_DAEMON_HOME_DIR = /var/lib/gnunet
178GN_INTLINCL =
179GN_LIBINTL =
180GN_LIB_LDFLAGS = -export-dynamic -no-undefined
181GN_PLUGIN_LDFLAGS = -export-dynamic -avoid-version -module -no-undefined
182GN_USER_HOME_DIR = ~/.gnunet
183GOBJECT_QUERY = gobject-query
184GREP = /bin/grep
185HAVE_LIBUNISTRING = yes
186INCLTDL =
187INSTALL = /usr/bin/install -c
188INSTALL_DATA = ${INSTALL} -m 644
189INSTALL_PROGRAM = ${INSTALL}
190INSTALL_SCRIPT = ${INSTALL}
191INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
192INTLLIBS =
193INTL_MACOSX_LIBS =
194JAVAPORT = #
195LD = /usr/bin/ld -m elf_x86_64
196LDFLAGS =
197LIBADD_DL = -ldl
198LIBADD_DLD_LINK =
199LIBADD_DLOPEN = -ldl
200LIBADD_SHL_LOAD =
201LIBCURL = -L/usr/lib/x86_64-linux-gnu -lcurl -Wl,-Bsymbolic-functions -Wl,-z,relro
202LIBCURL_CPPFLAGS =
203LIBGCRYPT_CFLAGS = -I/usr/local/include
204LIBGCRYPT_CONFIG = /usr/local/bin/libgcrypt-config
205LIBGCRYPT_LIBS = -L/usr/local/lib -lgcrypt -lgpg-error
206LIBICONV =
207LIBINTL =
208LIBLTDL = -lltdl
209LIBOBJS =
210LIBPREFIX =
211LIBS = -lm -ldl
212LIBTOOL = $(SHELL) $(top_builddir)/libtool
213LIBUNISTRING = -lunistring
214LIPO =
215LN_S = ln -s
216LTDLDEPS =
217LTDLINCL =
218LTDLOPEN = libltdl
219LTLIBICONV =
220LTLIBINTL =
221LTLIBOBJS =
222LTLIBUNISTRING = -lunistring
223LT_CONFIG_H = gnunet_config.h
224LT_DLLOADERS = libltdl/dlopen.la
225LT_DLPREOPEN = -dlpreopen libltdl/dlopen.la
226MAKEINFO = ${SHELL} /home/mwachs/gnunet/gnunet-debug/missing --run makeinfo
227MANIFEST_TOOL = :
228MKDIR_P = /bin/mkdir -p
229MONKEYPREFIX =
230MSGFMT = /usr/bin/msgfmt
231MSGFMT_015 = /usr/bin/msgfmt
232MSGMERGE = /usr/bin/msgmerge
233MYSQL_CPPFLAGS =
234MYSQL_LDFLAGS =
235NM = /usr/bin/nm -B
236NMEDIT =
237NSS_DIR =
238OBJC = gcc
239OBJCDEPMODE = depmode=gcc3
240OBJCFLAGS =
241OBJDUMP = objdump
242OBJEXT = o
243OTOOL =
244OTOOL64 =
245PACKAGE = gnunet
246PACKAGE_BUGREPORT = bug-gnunet@gnu.org
247PACKAGE_NAME = gnunet
248PACKAGE_STRING = gnunet 0.9.5a
249PACKAGE_TARNAME = gnunet
250PACKAGE_URL =
251PACKAGE_VERSION = 0.9.5a
252PATH_SEPARATOR = :
253PKG_CONFIG = /usr/bin/pkg-config
254POSTGRES_CPPFLAGS =
255POSTGRES_LDFLAGS =
256POSUB = po
257PYTHON = /usr/bin/python
258PYTHON_EXEC_PREFIX = ${exec_prefix}
259PYTHON_PLATFORM = linux2
260PYTHON_PREFIX = ${prefix}
261PYTHON_VERSION = 2.7
262RANLIB = ranlib
263SED = /bin/sed
264SET_MAKE =
265SHELL = /bin/bash
266SQLITE_CPPFLAGS =
267SQLITE_LDFLAGS =
268STRIP = strip
269SUDO_BINARY =
270UNIXONLY = #
271USE_NLS = yes
272VERSION = 0.9.5a
273XGETTEXT = /usr/bin/xgettext
274XGETTEXT_015 = /usr/bin/xgettext
275XMKMF =
276X_CFLAGS =
277X_EXTRA_LIBS =
278X_LIBS =
279X_PRE_LIBS = -lSM -lICE
280_libcurl_config =
281abs_builddir = /home/mwachs/gnunet/gnunet-debug/src/experimentation
282abs_srcdir = /home/mwachs/gnunet/gnunet-debug/src/experimentation
283abs_top_builddir = /home/mwachs/gnunet/gnunet-debug
284abs_top_srcdir = /home/mwachs/gnunet/gnunet-debug
285ac_ct_AR = ar
286ac_ct_CC = gcc
287ac_ct_CXX = g++
288ac_ct_DUMPBIN =
289ac_ct_OBJC = gcc
290am__include = include
291am__leading_dot = .
292am__quote =
293am__tar = $${TAR-tar} chof - "$$tardir"
294am__untar = $${TAR-tar} xf -
295bindir = ${exec_prefix}/bin
296build = x86_64-unknown-linux-gnu
297build_alias =
298build_cpu = x86_64
299build_os = linux-gnu
300build_target = linux
301build_vendor = unknown
302builddir = .
303datadir = ${datarootdir}
304datarootdir = ${prefix}/share
305docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
306dvidir = ${docdir}
307exec_prefix = ${prefix}
308gitcommand = /usr/bin/git
309host = x86_64-unknown-linux-gnu
310host_alias =
311host_cpu = x86_64
312host_os = linux-gnu
313host_vendor = unknown
314htmldir = ${docdir}
315includedir = ${prefix}/include
316infodir = ${datarootdir}/info
317install_sh = ${SHELL} /home/mwachs/gnunet/gnunet-debug/install-sh
318libdir = ${exec_prefix}/lib
319libexecdir = $(pkglibdir)/libexec/
320localedir = ${datarootdir}/locale
321localstatedir = ${prefix}/var
322ltdl_LIBOBJS = lt__strl.o
323ltdl_LTLIBOBJS = lt__strl.lo
324mandir = ${datarootdir}/man
325mkdir_p = /bin/mkdir -p
326oldincludedir = /usr/include
327pdfdir = ${docdir}
328pkgpyexecdir = ${pyexecdir}/gnunet
329pkgpythondir = ${pythondir}/gnunet
330prefix = /home/mwachs/gnunet/gnb-debug
331program_transform_name = s,x,x,
332psdir = ${docdir}
333pyexecdir = ${exec_prefix}/lib/python2.7/site-packages
334pythondir = ${prefix}/lib/python2.7/site-packages
335sbindir = ${exec_prefix}/sbin
336sharedstatedir = ${prefix}/com
337srcdir = .
338subdirs = libltdl
339svnversioncommand = /usr/bin/svnversion
340sys_symbol_underscore = no
341sysconfdir = ${prefix}/etc
342target = x86_64-unknown-linux-gnu
343target_alias =
344target_cpu = x86_64
345target_os = linux-gnu
346target_vendor = unknown
347top_build_prefix = ../../
348top_builddir = ../..
349top_srcdir = ../..
350INCLUDES = -I$(top_srcdir)/src/include
351pkgcfgdir = $(pkgdatadir)/config.d/
352pkgcfg_DATA = \
353 experimentation.conf
354
355#WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols -lole32 -lshell32 -liconv -lstdc++ -lcomdlg32 -lgdi32
356#AM_CFLAGS = --coverage -O0
357#XLIB = -lgcov
358gnunet_daemon_experimentation_SOURCES = \
359 gnunet-daemon-experimentation.c
360
361gnunet_daemon_experimentation_LDADD = \
362 $(top_builddir)/src/hello/libgnunethello.la \
363 $(top_builddir)/src/statistics/libgnunetstatistics.la \
364 $(top_builddir)/src/util/libgnunetutil.la
365
366all: all-am
367
368.SUFFIXES:
369.SUFFIXES: .c .lo .o .obj
370$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
371 @for dep in $?; do \
372 case '$(am__configure_deps)' in \
373 *$$dep*) \
374 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
375 && { if test -f $@; then exit 0; else break; fi; }; \
376 exit 1;; \
377 esac; \
378 done; \
379 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/experimentation/Makefile'; \
380 $(am__cd) $(top_srcdir) && \
381 $(AUTOMAKE) --gnu src/experimentation/Makefile
382.PRECIOUS: Makefile
383Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
384 @case '$?' in \
385 *config.status*) \
386 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
387 *) \
388 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
389 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
390 esac;
391
392$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
393 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
394
395$(top_srcdir)/configure: $(am__configure_deps)
396 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
397$(ACLOCAL_M4): $(am__aclocal_m4_deps)
398 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
399$(am__aclocal_m4_deps):
400experimentation.conf: $(top_builddir)/config.status $(srcdir)/experimentation.conf.in
401 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
402install-libexecPROGRAMS: $(libexec_PROGRAMS)
403 @$(NORMAL_INSTALL)
404 test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
405 @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
406 for p in $$list; do echo "$$p $$p"; done | \
407 sed 's/$(EXEEXT)$$//' | \
408 while read p p1; do if test -f $$p || test -f $$p1; \
409 then echo "$$p"; echo "$$p"; else :; fi; \
410 done | \
411 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
412 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
413 sed 'N;N;N;s,\n, ,g' | \
414 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
415 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
416 if ($$2 == $$4) files[d] = files[d] " " $$1; \
417 else { print "f", $$3 "/" $$4, $$1; } } \
418 END { for (d in files) print "f", d, files[d] }' | \
419 while read type dir files; do \
420 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
421 test -z "$$files" || { \
422 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
423 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
424 } \
425 ; done
426
427uninstall-libexecPROGRAMS:
428 @$(NORMAL_UNINSTALL)
429 @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
430 files=`for p in $$list; do echo "$$p"; done | \
431 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
432 -e 's/$$/$(EXEEXT)/' `; \
433 test -n "$$list" || exit 0; \
434 echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
435 cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
436
437clean-libexecPROGRAMS:
438 @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
439 echo " rm -f" $$list; \
440 rm -f $$list || exit $$?; \
441 test -n "$(EXEEXT)" || exit 0; \
442 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
443 echo " rm -f" $$list; \
444 rm -f $$list
445gnunet-daemon-experimentation$(EXEEXT): $(gnunet_daemon_experimentation_OBJECTS) $(gnunet_daemon_experimentation_DEPENDENCIES) $(EXTRA_gnunet_daemon_experimentation_DEPENDENCIES)
446 @rm -f gnunet-daemon-experimentation$(EXEEXT)
447 $(AM_V_CCLD)$(LINK) $(gnunet_daemon_experimentation_OBJECTS) $(gnunet_daemon_experimentation_LDADD) $(LIBS)
448
449mostlyclean-compile:
450 -rm -f *.$(OBJEXT)
451
452distclean-compile:
453 -rm -f *.tab.c
454
455include ./$(DEPDIR)/gnunet-daemon-experimentation.Po
456
457.c.o:
458 $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
459 $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
460# $(AM_V_CC)source='$<' object='$@' libtool=no \
461# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
462# $(AM_V_CC_no)$(COMPILE) -c $<
463
464.c.obj:
465 $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
466 $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
467# $(AM_V_CC)source='$<' object='$@' libtool=no \
468# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
469# $(AM_V_CC_no)$(COMPILE) -c `$(CYGPATH_W) '$<'`
470
471.c.lo:
472 $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
473 $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
474# $(AM_V_CC)source='$<' object='$@' libtool=yes \
475# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
476# $(AM_V_CC_no)$(LTCOMPILE) -c -o $@ $<
477
478mostlyclean-libtool:
479 -rm -f *.lo
480
481clean-libtool:
482 -rm -rf .libs _libs
483install-pkgcfgDATA: $(pkgcfg_DATA)
484 @$(NORMAL_INSTALL)
485 test -z "$(pkgcfgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgcfgdir)"
486 @list='$(pkgcfg_DATA)'; test -n "$(pkgcfgdir)" || list=; \
487 for p in $$list; do \
488 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
489 echo "$$d$$p"; \
490 done | $(am__base_list) | \
491 while read files; do \
492 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgcfgdir)'"; \
493 $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgcfgdir)" || exit $$?; \
494 done
495
496uninstall-pkgcfgDATA:
497 @$(NORMAL_UNINSTALL)
498 @list='$(pkgcfg_DATA)'; test -n "$(pkgcfgdir)" || list=; \
499 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
500 dir='$(DESTDIR)$(pkgcfgdir)'; $(am__uninstall_files_from_dir)
501
502ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
503 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
504 unique=`for i in $$list; do \
505 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
506 done | \
507 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
508 END { if (nonempty) { for (i in files) print i; }; }'`; \
509 mkid -fID $$unique
510tags: TAGS
511
512TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
513 $(TAGS_FILES) $(LISP)
514 set x; \
515 here=`pwd`; \
516 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
517 unique=`for i in $$list; do \
518 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
519 done | \
520 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
521 END { if (nonempty) { for (i in files) print i; }; }'`; \
522 shift; \
523 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
524 test -n "$$unique" || unique=$$empty_fix; \
525 if test $$# -gt 0; then \
526 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
527 "$$@" $$unique; \
528 else \
529 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
530 $$unique; \
531 fi; \
532 fi
533ctags: CTAGS
534CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
535 $(TAGS_FILES) $(LISP)
536 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
537 unique=`for i in $$list; do \
538 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
539 done | \
540 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
541 END { if (nonempty) { for (i in files) print i; }; }'`; \
542 test -z "$(CTAGS_ARGS)$$unique" \
543 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
544 $$unique
545
546GTAGS:
547 here=`$(am__cd) $(top_builddir) && pwd` \
548 && $(am__cd) $(top_srcdir) \
549 && gtags -i $(GTAGS_ARGS) "$$here"
550
551distclean-tags:
552 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
553
554distdir: $(DISTFILES)
555 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
556 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
557 list='$(DISTFILES)'; \
558 dist_files=`for file in $$list; do echo $$file; done | \
559 sed -e "s|^$$srcdirstrip/||;t" \
560 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
561 case $$dist_files in \
562 */*) $(MKDIR_P) `echo "$$dist_files" | \
563 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
564 sort -u` ;; \
565 esac; \
566 for file in $$dist_files; do \
567 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
568 if test -d $$d/$$file; then \
569 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
570 if test -d "$(distdir)/$$file"; then \
571 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
572 fi; \
573 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
574 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
575 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
576 fi; \
577 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
578 else \
579 test -f "$(distdir)/$$file" \
580 || cp -p $$d/$$file "$(distdir)/$$file" \
581 || exit 1; \
582 fi; \
583 done
584check-am: all-am
585check: check-am
586all-am: Makefile $(PROGRAMS) $(DATA)
587installdirs:
588 for dir in "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(pkgcfgdir)"; do \
589 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
590 done
591install: install-am
592install-exec: install-exec-am
593install-data: install-data-am
594uninstall: uninstall-am
595
596install-am: all-am
597 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
598
599installcheck: installcheck-am
600install-strip:
601 if test -z '$(STRIP)'; then \
602 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
603 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
604 install; \
605 else \
606 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
607 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
608 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
609 fi
610mostlyclean-generic:
611
612clean-generic:
613
614distclean-generic:
615 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
616 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
617
618maintainer-clean-generic:
619 @echo "This command is intended for maintainers to use"
620 @echo "it deletes files that may require special tools to rebuild."
621clean: clean-am
622
623clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \
624 mostlyclean-am
625
626distclean: distclean-am
627 -rm -rf ./$(DEPDIR)
628 -rm -f Makefile
629distclean-am: clean-am distclean-compile distclean-generic \
630 distclean-tags
631
632dvi: dvi-am
633
634dvi-am:
635
636html: html-am
637
638html-am:
639
640info: info-am
641
642info-am:
643
644install-data-am: install-pkgcfgDATA
645
646install-dvi: install-dvi-am
647
648install-dvi-am:
649
650install-exec-am: install-libexecPROGRAMS
651
652install-html: install-html-am
653
654install-html-am:
655
656install-info: install-info-am
657
658install-info-am:
659
660install-man:
661
662install-pdf: install-pdf-am
663
664install-pdf-am:
665
666install-ps: install-ps-am
667
668install-ps-am:
669
670installcheck-am:
671
672maintainer-clean: maintainer-clean-am
673 -rm -rf ./$(DEPDIR)
674 -rm -f Makefile
675maintainer-clean-am: distclean-am maintainer-clean-generic
676
677mostlyclean: mostlyclean-am
678
679mostlyclean-am: mostlyclean-compile mostlyclean-generic \
680 mostlyclean-libtool
681
682pdf: pdf-am
683
684pdf-am:
685
686ps: ps-am
687
688ps-am:
689
690uninstall-am: uninstall-libexecPROGRAMS uninstall-pkgcfgDATA
691
692.MAKE: install-am install-strip
693
694.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
695 clean-libexecPROGRAMS clean-libtool ctags distclean \
696 distclean-compile distclean-generic distclean-libtool \
697 distclean-tags distdir dvi dvi-am html html-am info info-am \
698 install install-am install-data install-data-am install-dvi \
699 install-dvi-am install-exec install-exec-am install-html \
700 install-html-am install-info install-info-am \
701 install-libexecPROGRAMS install-man install-pdf install-pdf-am \
702 install-pkgcfgDATA install-ps install-ps-am install-strip \
703 installcheck installcheck-am installdirs maintainer-clean \
704 maintainer-clean-generic mostlyclean mostlyclean-compile \
705 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
706 tags uninstall uninstall-am uninstall-libexecPROGRAMS \
707 uninstall-pkgcfgDATA
708
709
710# Tell versions [3.59,3.63) of GNU make to not export all variables.
711# Otherwise a system limit (for SysV at least) may be exceeded.
712.NOEXPORT:
diff --git a/src/experimentation/Makefile.am b/src/experimentation/Makefile.am
index 34d8ec3d1..c25c460d8 100644
--- a/src/experimentation/Makefile.am
+++ b/src/experimentation/Makefile.am
@@ -16,12 +16,29 @@ if USE_COVERAGE
16 XLIB = -lgcov 16 XLIB = -lgcov
17endif 17endif
18 18
19check_PROGRAMS = \
20 test_experimentation_clique
21
22if ENABLE_TEST_RUN
23 TESTS = \
24 test_experimentation_clique
25endif
26
19libexec_PROGRAMS = \ 27libexec_PROGRAMS = \
20 gnunet-daemon-experimentation 28 gnunet-daemon-experimentation
21 29
22gnunet_daemon_experimentation_SOURCES = \ 30gnunet_daemon_experimentation_SOURCES = \
23 gnunet-daemon-experimentation.c 31 gnunet-daemon-experimentation.c
24gnunet_daemon_experimentation_LDADD = \ 32gnunet_daemon_experimentation_LDADD = \
25 $(top_builddir)/src/hello/libgnunethello.la \ 33 $(top_builddir)/src/core/libgnunetcore.la \
26 $(top_builddir)/src/statistics/libgnunetstatistics.la \ 34 $(top_builddir)/src/statistics/libgnunetstatistics.la \
27 $(top_builddir)/src/util/libgnunetutil.la 35 $(top_builddir)/src/util/libgnunetutil.la
36
37test_experimentation_clique_SOURCES = \
38 test_experimentation_clique.c
39test_experimentation_clique_LDADD = \
40 $(top_builddir)/src/util/libgnunetutil.la \
41 $(top_builddir)/src/testbed/libgnunettestbed.la
42
43EXTRA_DIST = \
44 test_experimentation_clique.conf \ No newline at end of file
diff --git a/src/experimentation/gnunet-daemon-experimentation.c b/src/experimentation/gnunet-daemon-experimentation.c
index 1b8cf1418..7b77445a0 100644
--- a/src/experimentation/gnunet-daemon-experimentation.c
+++ b/src/experimentation/gnunet-daemon-experimentation.c
@@ -26,7 +26,10 @@
26 */ 26 */
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_getopt_lib.h" 28#include "gnunet_getopt_lib.h"
29#include "gnunet_service_lib.h" 29#include "gnunet_program_lib.h"
30#include "gnunet_core_service.h"
31
32static struct GNUNET_CORE_Handle *ch;
30 33
31 34
32/** 35/**
@@ -38,34 +41,77 @@
38static void 41static void
39cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 42cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
40{ 43{
41 /* FIXME: do clean up here */ 44 GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Experimentation daemon shutting down ...\n"));
45 if (NULL != ch)
46 {
47 GNUNET_CORE_disconnect (ch);
48 ch = NULL;
49 }
50
51}
52
53/**
54 * Method called whenever a given peer connects.
55 *
56 * @param cls closure
57 * @param peer peer identity this notification is about
58 */
59void core_connect_handler (void *cls,
60 const struct GNUNET_PeerIdentity * peer)
61{
62 GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Connected to peer %s\n"),
63 GNUNET_i2s (peer));
64 /* Send request */
65
66 /* TBD */
42} 67}
43 68
44 69
45/** 70/**
46 * Process template requests. 71 * Method called whenever a given peer disconnects.
47 * 72 *
48 * @param cls closure 73 * @param cls closure
49 * @param server the initialized server 74 * @param peer peer identity this notification is about
50 * @param cfg configuration to use 75 */
76void core_disconnect_handler (void *cls,
77 const struct GNUNET_PeerIdentity * peer)
78{
79 GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Disconnected from peer %s\n"),
80 GNUNET_i2s (peer));
81
82}
83
84/**
85 * The main function for the experimentation daemon.
86 *
87 * @param argc number of arguments from the command line
88 * @param argv command line arguments
51 */ 89 */
52static void 90static void
53run (void *cls, struct GNUNET_SERVER_Handle *server, 91run (void *cls, char *const *args, const char *cfgfile,
54 const struct GNUNET_CONFIGURATION_Handle *cfg) 92 const struct GNUNET_CONFIGURATION_Handle *cfg)
55{ 93{
56 static const struct GNUNET_SERVER_MessageHandler handlers[] = { 94 GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Experimentation daemon starting ...\n"));
57 /* FIXME: add handlers here! */ 95
58 {NULL, NULL, 0, 0} 96 /* Connecting to core service to find partners */
59 }; 97 ch = GNUNET_CORE_connect (cfg, NULL, NULL,
60 /* FIXME: do setup here */ 98 &core_connect_handler,
61 GNUNET_SERVER_add_handlers (server, handlers); 99 &core_disconnect_handler,
100 NULL, GNUNET_NO, NULL, GNUNET_NO, NULL);
101 if (NULL == ch)
102 {
103 GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Failed to connect to CORE service!\n"));
104 return;
105 }
106
62 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup_task, 107 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup_task,
63 NULL); 108 NULL);
109
64} 110}
65 111
66 112
67/** 113/**
68 * The main function for the template service. 114 * The main function for the experimentation daemon.
69 * 115 *
70 * @param argc number of arguments from the command line 116 * @param argc number of arguments from the command line
71 * @param argv command line arguments 117 * @param argv command line arguments
@@ -74,9 +120,14 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
74int 120int
75main (int argc, char *const *argv) 121main (int argc, char *const *argv)
76{ 122{
123 static const struct GNUNET_GETOPT_CommandLineOption options[] = {
124 GNUNET_GETOPT_OPTION_END
125 };
126
77 return (GNUNET_OK == 127 return (GNUNET_OK ==
78 GNUNET_SERVICE_run (argc, argv, "experimentation", 128 GNUNET_PROGRAM_run (argc, argv, "experimentation",
79 GNUNET_SERVICE_OPTION_NONE, &run, NULL)) ? 0 : 1; 129 _("GNUnet hostlist server and client"), options,
130 &run, NULL)) ? 0 : 1;
80} 131}
81 132
82/* end of gnunet-daemon-experimentation.c */ 133/* end of gnunet-daemon-experimentation.c */
diff --git a/src/experimentation/test_experimentation_clique.c b/src/experimentation/test_experimentation_clique.c
new file mode 100644
index 000000000..e6b3fbed9
--- /dev/null
+++ b/src/experimentation/test_experimentation_clique.c
@@ -0,0 +1,176 @@
1/*
2 This file is part of GNUnet
3 (C) 2008--2013 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 src/testbed/test_testbed_api_topology.c
23 * @brief test case to connect experimentation daemons in a clique
24 * @author Sree Harsha Totakura <sreeharsha@totakura.in>
25 * @author Matthias Wachs
26 */
27
28#include "platform.h"
29#include "gnunet_common.h"
30#include "gnunet_testbed_service.h"
31
32
33/**
34 * Number of peers we want to start
35 */
36#define NUM_PEERS 2
37
38/**
39 * Array of peers
40 */
41static struct GNUNET_TESTBED_Peer **peers;
42
43/**
44 * Operation handle
45 */
46static struct GNUNET_TESTBED_Operation *op;
47
48/**
49 * Shutdown task
50 */
51static GNUNET_SCHEDULER_TaskIdentifier shutdown_task;
52
53/**
54 * Testing result
55 */
56static int result;
57
58/**
59 * Counter for counting overlay connections
60 */
61static unsigned int overlay_connects;
62
63
64/**
65 * Shutdown nicely
66 *
67 * @param cls NULL
68 * @param tc the task context
69 */
70static void
71do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
72{
73 shutdown_task = GNUNET_SCHEDULER_NO_TASK;
74 if (NULL != op)
75 {
76 GNUNET_TESTBED_operation_done (op);
77 op = NULL;
78 }
79 GNUNET_SCHEDULER_shutdown ();
80}
81
82/**
83 * Controller event callback
84 *
85 * @param cls NULL
86 * @param event the controller event
87 */
88static void
89controller_event_cb (void *cls,
90 const struct GNUNET_TESTBED_EventInformation *event)
91{
92 switch (event->type)
93 {
94 case GNUNET_TESTBED_ET_CONNECT:
95 overlay_connects++;
96 if ((NUM_PEERS * (NUM_PEERS - 1)) == overlay_connects)
97 {
98 result = GNUNET_OK;
99 GNUNET_SCHEDULER_add_now (&do_shutdown, NULL);
100 }
101 break;
102 case GNUNET_TESTBED_ET_OPERATION_FINISHED:
103 GNUNET_assert (NULL != event->details.operation_finished.emsg);
104 break;
105 default:
106 GNUNET_break (0);
107 result = GNUNET_SYSERR;
108 GNUNET_SCHEDULER_cancel (shutdown_task);
109 shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL);
110 }
111}
112
113
114/**
115 * Signature of a main function for a testcase.
116 *
117 * @param cls closure
118 * @param num_peers number of peers in 'peers'
119 * @param peers_ handle to peers run in the testbed
120 * @param links_succeeded the number of overlay link connection attempts that
121 * succeeded
122 * @param links_failed the number of overlay link connection attempts that
123 * failed
124 */
125static void
126test_master (void *cls, unsigned int num_peers,
127 struct GNUNET_TESTBED_Peer **peers_,
128 unsigned int links_succeeded,
129 unsigned int links_failed)
130{
131 unsigned int peer;
132
133 GNUNET_assert (NULL == cls);
134 GNUNET_assert (NUM_PEERS == num_peers);
135 GNUNET_assert (NULL != peers_);
136 for (peer = 0; peer < num_peers; peer++)
137 GNUNET_assert (NULL != peers_[peer]);
138 peers = peers_;
139 overlay_connects = 0;
140 op = GNUNET_TESTBED_overlay_configure_topology (NULL, NUM_PEERS, peers, NULL,
141 NULL,
142 NULL,
143 GNUNET_TESTBED_TOPOLOGY_CLIQUE,
144 /* GNUNET_TESTBED_TOPOLOGY_ERDOS_RENYI, */
145 /* NUM_PEERS, */
146 GNUNET_TESTBED_TOPOLOGY_OPTION_END);
147 GNUNET_assert (NULL != op);
148 shutdown_task =
149 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
150 (GNUNET_TIME_UNIT_SECONDS, 300),
151 do_shutdown, NULL);
152}
153
154
155/**
156 * Main function
157 */
158int
159main (int argc, char **argv)
160{
161 uint64_t event_mask;
162
163 result = GNUNET_SYSERR;
164 event_mask = 0;
165 event_mask |= (1LL << GNUNET_TESTBED_ET_CONNECT);
166 event_mask |= (1LL << GNUNET_TESTBED_ET_OPERATION_FINISHED);
167 (void) GNUNET_TESTBED_test_run ("test_experimentation_clique",
168 "test_experimentation_clique.conf", NUM_PEERS,
169 event_mask, &controller_event_cb, NULL,
170 &test_master, NULL);
171 if (GNUNET_OK != result)
172 return 1;
173 return 0;
174}
175
176/* end of test_testbed_api_topology.c */
diff --git a/src/experimentation/test_experimentation_clique.conf b/src/experimentation/test_experimentation_clique.conf
new file mode 100644
index 000000000..b8864cea4
--- /dev/null
+++ b/src/experimentation/test_experimentation_clique.conf
@@ -0,0 +1,84 @@
1[testbed]
2AUTOSTART = NO
3PORT = 12113
4ACCEPT_FROM = 127.0.0.1;
5HOSTNAME = localhost
6NEIGHBOUR_LIMIT = 100
7TOPOLOGY = RANDOM
8#PREFIX = xterm -geometry 100x85 -T peer1 -e libtool --mode=execute gdb --args
9
10[fs]
11AUTOSTART = NO
12
13[resolver]
14AUTOSTART = NO
15
16[mesh]
17AUTOSTART = NO
18
19[dht]
20AUTOSTART = NO
21
22[block]
23plugins = dht test
24
25[dhtcache]
26QUOTA = 1 MB
27DATABASE = sqlite
28
29[transport]
30PLUGINS = udp
31ACCEPT_FROM6 = ::1;
32ACCEPT_FROM = 127.0.0.1;
33NEIGHBOUR_LIMIT = 50
34PORT = 12365
35
36[ats]
37WAN_QUOTA_OUT = 3932160
38WAN_QUOTA_IN = 3932160
39
40[core]
41PORT = 12092
42AUTOSTART = YES
43USE_EPHEMERAL_KEYS = NO
44
45[arm]
46DEFAULTSERVICES = core transport experimentation
47PORT = 12366
48
49[transport-udp]
50TIMEOUT = 300 s
51PORT = 12368
52
53[gnunetd]
54HOSTKEY = $SERVICEHOME/.hostkey
55
56[PATHS]
57SERVICEHOME = /tmp/test-testbed/
58
59[dns]
60AUTOSTART = NO
61
62[nse]
63AUTOSTART = NO
64
65[vpn]
66AUTOSTART = NO
67
68[nat]
69RETURN_LOCAL_ADDRESSES = YES
70
71[gns-helper-service-w32]
72AUTOSTART = NO
73
74[consensus]
75AUTOSTART = NO
76
77[gns]
78AUTOSTART = NO
79
80[statistics]
81AUTOSTART = NO
82
83[peerinfo]
84NO_IO = YES