--- /dev/null
+/*
+ This file is part of GNUnet.
+ (C) 2012 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 testbed/gnunet-service-testbed.c
+ * @brief implementation of the TESTBED service
+ * @author Sree Harsha Totakura
+ */
+
+#include "platform.h"
+#include "gnunet_service_lib.h"
+#include "gnunet_server_lib.h"
+
+#include "testbed.h"
+
+
+#define LOG(kind,...) \
+ GNUNET_log (kind, __VA_ARGS__)
+
+
+/**
+ * Message handler for GNUNET_MESSAGE_TYPE_TESTBED_INIT messages
+ *
+ * @param cls NULL
+ * @param client identification of the client
+ * @param message the actual message
+ */
+static void
+handle_init (void *cls,
+ struct GNUNET_SERVER_Client *client,
+ const struct GNUNET_MessageHeader *message)
+{
+ GNUNET_break (0);
+}
+
+
+/**
+ * Callback for client disconnect
+ *
+ * @param cls NULL
+ * @param client the client which has disconnected
+ */
+static void
+client_disconnect_cb (void *cls, struct GNUNET_SERVER_Client *client)
+{
+ GNUNET_break (0);
+}
+
+
+/**
+ * Task to clean up and shutdown nicely
+ *
+ * @param cls NULL
+ * @param tc the TaskContext from scheduler
+ */
+static void
+shutdown_task (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+ GNUNET_break (0);
+}
+
+
+/**
+ * Testbed setup
+ *
+ * @param cls closure
+ * @param server the initialized server
+ * @param cfg configuration to use
+ */
+static void
+testbed_run (void *cls,
+ struct GNUNET_SERVER_Handle * server,
+ const struct GNUNET_CONFIGURATION_Handle *cfg)
+{
+ static const struct GNUNET_SERVER_MessageHandler message_handlers[] =
+ {
+ {&handle_init, NULL, GNUNET_MESSAGE_TYPE_TESTBED_INIT, 0},
+ {NULL}
+ };
+ GNUNET_SERVER_add_handlers (server,
+ message_handlers);
+ GNUNET_SERVER_disconnect_notify (server,
+ &client_disconnect_cb,
+ NULL);
+ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
+ &shutdown_task,
+ NULL);
+}
+
+
+/**
+ * The starting point of execution
+ */
+int main (int argc, char *const *argv)
+{
+ return
+ (GNUNET_OK ==
+ GNUNET_SERVICE_run (argc,
+ argv,
+ "testbed",
+ GNUNET_SERVICE_OPTION_NONE,
+ &testbed_run,
+ NULL)) ? 0 : 1;
+}