1 | /* |
1 | /* |
2 | vpectrl.C -- the main file for vpectrl |
2 | vpectrl.C -- the main file for vpectrl |
3 | Copyright (C) 1998-2002 Ivo Timmermans <ivo@o2w.nl> |
3 | Copyright (C) 1998-2002 Ivo Timmermans <ivo@o2w.nl> |
4 | 2000-2002 Guus Sliepen <guus@sliepen.eu.org> |
4 | 2000-2002 Guus Sliepen <guus@sliepen.eu.org> |
5 | 2003 Marc Lehmannn <pcg@goof.com> |
5 | 2003 Marc Lehmann <pcg@goof.com> |
6 | |
6 | |
7 | This program is free software; you can redistribute it and/or modify |
7 | This program is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by |
8 | it under the terms of the GNU General Public License as published by |
9 | the Free Software Foundation; either version 2 of the License, or |
9 | the Free Software Foundation; either version 2 of the License, or |
10 | (at your option) any later version. |
10 | (at your option) any later version. |
… | |
… | |
26 | |
26 | |
27 | #include <errno.h> |
27 | #include <errno.h> |
28 | #include <fcntl.h> |
28 | #include <fcntl.h> |
29 | #include <getopt.h> |
29 | #include <getopt.h> |
30 | #include <signal.h> |
30 | #include <signal.h> |
|
|
31 | #include <sys/stat.h> |
31 | #include <sys/types.h> |
32 | #include <sys/types.h> |
32 | #include <unistd.h> |
33 | #include <unistd.h> |
33 | #include <signal.h> |
34 | #include <signal.h> |
34 | |
35 | |
35 | #include <openssl/rand.h> |
36 | #include <openssl/rand.h> |
… | |
… | |
42 | #include "gettext.h" |
43 | #include "gettext.h" |
43 | |
44 | |
44 | #include "conf.h" |
45 | #include "conf.h" |
45 | #include "slog.h" |
46 | #include "slog.h" |
46 | #include "util.h" |
47 | #include "util.h" |
47 | #include "protocol.h" |
48 | #include "vpn.h" |
48 | |
49 | |
49 | /* If nonzero, display usage information and exit. */ |
50 | /* If nonzero, display usage information and exit. */ |
50 | static int show_help; |
51 | static int show_help; |
51 | |
52 | |
52 | /* If nonzero, print the version on standard output and exit. */ |
53 | /* If nonzero, print the version on standard output and exit. */ |
… | |
… | |
294 | |
295 | |
295 | parse_options (argc, argv, envp); |
296 | parse_options (argc, argv, envp); |
296 | |
297 | |
297 | if (show_version) |
298 | if (show_version) |
298 | { |
299 | { |
299 | printf (_("%s version %s (built %s %s, protocol %d:%d)\n"), get_identity (), |
300 | printf (_("%s version %s (built %s %s, protocol %d.%d)\n"), get_identity (), |
300 | VERSION, __DATE__, __TIME__, PROTOCOL_MAJOR, PROTOCOL_MINOR); |
301 | VERSION, __DATE__, __TIME__, PROTOCOL_MAJOR, PROTOCOL_MINOR); |
301 | printf (_ |
302 | printf (_ |
302 | ("Copyright (C) 2003 Marc Lehmann <vpe@plan9.de> and others.\n" |
303 | ("Copyright (C) 2003 Marc Lehmann <vpe@plan9.de> and others.\n" |
303 | "See the AUTHORS file for a complete list.\n\n" |
304 | "See the AUTHORS file for a complete list.\n\n" |
304 | "vpe comes with ABSOLUTELY NO WARRANTY. This is free software,\n" |
305 | "vpe comes with ABSOLUTELY NO WARRANTY. This is free software,\n" |