diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-06-30 08:16:30 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-06-30 08:16:30 +0000 |
commit | 90594e4bb7410653c96c7d7562f9ae65fce3fc4d (patch) | |
tree | 807ecdc60351d9ff04851acb17c33f8ef65626cc /src | |
parent | 81f29ab47db4b57fa5a09eb4a6c776f7e586265c (diff) | |
download | gnunet-90594e4bb7410653c96c7d7562f9ae65fce3fc4d.tar.gz gnunet-90594e4bb7410653c96c7d7562f9ae65fce3fc4d.zip |
missing
Diffstat (limited to 'src')
-rw-r--r-- | src/vpn/Makefile.am | 55 | ||||
-rw-r--r-- | src/vpn/gnunet-daemon-vpn.c | 77 |
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 @@ | |||
1 | INCLUDES = -I$(top_srcdir)/src/include | ||
2 | |||
3 | if MINGW | ||
4 | WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols | ||
5 | endif | ||
6 | |||
7 | if USE_COVERAGE | ||
8 | AM_CFLAGS = --coverage -O0 | ||
9 | endif | ||
10 | |||
11 | if LINUX | ||
12 | VPNBIN = gnunet-vpn-helper | ||
13 | install-exec-hook: | ||
14 | chown root $(bindir)/gnunet-vpn-helper || true | ||
15 | chmod u+s $(bindir)/gnunet-vpn-helper || true | ||
16 | else | ||
17 | install-exec-hook: | ||
18 | endif | ||
19 | |||
20 | |||
21 | bin_PROGRAMS = \ | ||
22 | gnunet-daemon-vpn $(VPNBIN) | ||
23 | |||
24 | |||
25 | gnunet_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 | |||
33 | gnunet_daemon_vpn_SOURCES = \ | ||
34 | gnunet-daemon-vpn.c | ||
35 | gnunet_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 | */ | ||
34 | static 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 | */ | ||
45 | static void | ||
46 | run (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 | */ | ||
63 | int | ||
64 | main (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 */ | ||