From: Christian Grothoff Date: Wed, 30 Jun 2010 08:16:30 +0000 (+0000) Subject: missing X-Git-Tag: initial-import-from-subversion-38251~21116 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=90594e4bb7410653c96c7d7562f9ae65fce3fc4d;p=oweals%2Fgnunet.git missing --- diff --git a/src/vpn/Makefile.am b/src/vpn/Makefile.am new file mode 100644 index 000000000..1fff59309 --- /dev/null +++ b/src/vpn/Makefile.am @@ -0,0 +1,55 @@ +INCLUDES = -I$(top_srcdir)/src/include + +if MINGW + WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols +endif + +if USE_COVERAGE + AM_CFLAGS = --coverage -O0 +endif + +if LINUX +VPNBIN = gnunet-vpn-helper +install-exec-hook: + chown root $(bindir)/gnunet-vpn-helper || true + chmod u+s $(bindir)/gnunet-vpn-helper || true +else +install-exec-hook: +endif + + +bin_PROGRAMS = \ + gnunet-daemon-vpn $(VPNBIN) + + +gnunet_vpn_helper_SOURCES = \ + debug.c debug.h \ + packet.h packet.c \ + pretty-print.c pretty-print.h \ + tcp.c tcp.h \ + test.c \ + tun.c tun.h + +gnunet_daemon_vpn_SOURCES = \ + gnunet-daemon-vpn.c +gnunet_daemon_vpn_LDADD = \ + $(top_builddir)/src/core/libgnunetcore.la \ + $(top_builddir)/src/statistics/libgnunetstatistics.la \ + $(top_builddir)/src/util/libgnunetutil.la \ + $(GN_LIBINTL) + + +#check_PROGRAMS = \ +# test_XXX + +#TESTS = \ +# test_transport_api_tcp + + +#test_transport_api_tcp_SOURCES = \ +# test_transport_api.c +#test_transport_api_tcp_LDADD = \ +# $(top_builddir)/src/transport/libgnunettransport.la \ +# $(top_builddir)/src/util/libgnunetutil.la + +#EXTRA_DIST = test_transport_api_data.conf diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c new file mode 100644 index 000000000..658a3fd7c --- /dev/null +++ b/src/vpn/gnunet-daemon-vpn.c @@ -0,0 +1,77 @@ +/* + This file is part of GNUnet. + (C) 2010 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 vpn/gnunet-daemon-vpn.c + * @brief + * @author Christian Grothoff + */ +#include "platform.h" +#include "gnunet_getopt_lib.h" +#include "gnunet_program_lib.h" +/* #include "gnunet_template_service.h" */ + +/** + * Final status code. + */ +static int ret; + +/** + * Main function that will be run by the scheduler. + * + * @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, + const struct GNUNET_CONFIGURATION_Handle *cfg) +{ + /* main code here */ +} + + +/** + * The main function to obtain template from gnunetd. + * + * @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) +{ + static const struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_OPTION_END + }; + return (GNUNET_OK == + GNUNET_PROGRAM_run (argc, + argv, + "gnunet-daemon-vpn", + gettext_noop ("help text"), + options, &run, NULL)) ? ret : 1; +} + +/* end of gnunet-daemon-vpn.c */