1 /* IPSec VPN client compatible with Cisco equipment.
2 Copyright (C) 2004-2005 Maurice Massar
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 #include "vpnc-debug.h"
34 CONFIG_ENABLE_NO_ENCRYPTION
,
36 CONFIG_NON_INTERACTIVE
,
46 CONFIG_IPSEC_TARGET_NETWORK
,
49 CONFIG_IPSEC_SECRET_OBF
,
50 CONFIG_XAUTH_USERNAME
,
51 CONFIG_XAUTH_PASSWORD
,
52 CONFIG_XAUTH_PASSWORD_OBF
,
53 CONFIG_XAUTH_INTERACTIVE
,
56 CONFIG_UDP_ENCAP_PORT
,
95 extern const char *config
[LAST_CONFIG
];
97 extern enum vendor_enum opt_vendor
;
100 extern int opt_1des
, opt_no_encryption
, opt_auth_mode
;
101 extern enum natt_mode_enum opt_natt_mode
;
102 extern enum if_mode_enum opt_if_mode
;
103 extern uint16_t opt_udpencapport
;
105 #define TIMESTAMP() ({ \
110 tm = localtime(&t); \
111 strftime(st, sizeof(st), "%F %T", tm); \
115 #define DEBUGTOP(LVL, COMMAND) do { \
116 if (opt_debug >= (LVL)) { \
119 printf(" [%s]\n", TIMESTAMP()); \
123 #define DEBUG(LVL, COMMAND) do { \
124 if (opt_debug >= (LVL)) { \
131 extern void hex_dump(const char *str
, const void *data
, ssize_t len
, const struct debug_strings
*decode
);
132 extern void do_config(int argc
, char **argv
);
134 extern void (*logmsg
)(int priority
, const char *format
, ...)
135 __attribute__ ((__format__ (__printf__
, 2, 3)));