aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-06-30 08:16:30 +0000
committerChristian Grothoff <christian@grothoff.org>2010-06-30 08:16:30 +0000
commit90594e4bb7410653c96c7d7562f9ae65fce3fc4d (patch)
tree807ecdc60351d9ff04851acb17c33f8ef65626cc
parent81f29ab47db4b57fa5a09eb4a6c776f7e586265c (diff)
downloadgnunet-90594e4bb7410653c96c7d7562f9ae65fce3fc4d.tar.gz
gnunet-90594e4bb7410653c96c7d7562f9ae65fce3fc4d.zip
missing
-rw-r--r--src/vpn/Makefile.am55
-rw-r--r--src/vpn/gnunet-daemon-vpn.c77
2 files changed, 132 insertions, 0 deletions
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 @@
1INCLUDES = -I$(top_srcdir)/src/include
2
3if MINGW
4 WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
5endif
6
7if USE_COVERAGE
8 AM_CFLAGS = --coverage -O0
9endif
10
11if LINUX
12VPNBIN = gnunet-vpn-helper
13install-exec-hook:
14 chown root $(bindir)/gnunet-vpn-helper || true
15 chmod u+s $(bindir)/gnunet-vpn-helper || true
16else
17install-exec-hook:
18endif
19
20
21bin_PROGRAMS = \
22 gnunet-daemon-vpn $(VPNBIN)
23
24
25gnunet_vpn_helper_SOURCES = \
26 debug.c debug.h \
27 packet.h packet.c \
28 pretty-print.c pretty-print.h \
29 tcp.c tcp.h \
30 test.c \
31 tun.c tun.h
32
33gnunet_daemon_vpn_SOURCES = \
34 gnunet-daemon-vpn.c
35gnunet_daemon_vpn_LDADD = \
36 $(top_builddir)/src/core/libgnunetcore.la \
37 $(top_builddir)/src/statistics/libgnunetstatistics.la \
38 $(top_builddir)/src/util/libgnunetutil.la \
39 $(GN_LIBINTL)
40
41
42#check_PROGRAMS = \
43# test_XXX
44
45#TESTS = \
46# test_transport_api_tcp
47
48
49#test_transport_api_tcp_SOURCES = \
50# test_transport_api.c
51#test_transport_api_tcp_LDADD = \
52# $(top_builddir)/src/transport/libgnunettransport.la \
53# $(top_builddir)/src/util/libgnunetutil.la
54
55#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 @@
1/*
2 This file is part of GNUnet.
3 (C) 2010 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 2, 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 vpn/gnunet-daemon-vpn.c
23 * @brief
24 * @author Christian Grothoff
25 */
26#include "platform.h"
27#include "gnunet_getopt_lib.h"
28#include "gnunet_program_lib.h"
29/* #include "gnunet_template_service.h" */
30
31/**
32 * Final status code.
33 */
34static int ret;
35
36/**
37 * Main function that will be run by the scheduler.
38 *
39 * @param cls closure
40 * @param sched the scheduler to use
41 * @param args remaining command-line arguments
42 * @param cfgfile name of the configuration file used (for saving, can be NULL!)
43 * @param cfg configuration
44 */
45static void
46run (void *cls,
47 struct GNUNET_SCHEDULER_Handle *sched,
48 char *const *args,
49 const char *cfgfile,
50 const struct GNUNET_CONFIGURATION_Handle *cfg)
51{
52 /* main code here */
53}
54
55
56/**
57 * The main function to obtain template from gnunetd.
58 *
59 * @param argc number of arguments from the command line
60 * @param argv command line arguments
61 * @return 0 ok, 1 on error
62 */
63int
64main (int argc, char *const *argv)
65{
66 static const struct GNUNET_GETOPT_CommandLineOption options[] = {
67 GNUNET_GETOPT_OPTION_END
68 };
69 return (GNUNET_OK ==
70 GNUNET_PROGRAM_run (argc,
71 argv,
72 "gnunet-daemon-vpn",
73 gettext_noop ("help text"),
74 options, &run, NULL)) ? ret : 1;
75}
76
77/* end of gnunet-daemon-vpn.c */