OpenVPN: Update to version 2.3.2. Solves TLS security bug.
[tomato.git] / release / src / router / openvpn / src / openvpn / common.h
blob2f85bec2b70ca675a29f63084df695c1103c8aec
1 /*
2 * OpenVPN -- An application to securely tunnel IP networks
3 * over a single UDP port, with support for SSL/TLS-based
4 * session authentication and key exchange,
5 * packet encryption, packet authentication, and
6 * packet compression.
8 * Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2
12 * as published by the Free Software Foundation.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program (see the file COPYING included with this
21 * distribution); if not, write to the Free Software Foundation, Inc.,
22 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #ifndef COMMON_H
26 #define COMMON_H
29 * Statistics counters and associated printf formats.
31 #ifdef USE_64_BIT_COUNTERS
32 typedef unsigned long long int counter_type;
33 # ifdef WIN32
34 # define counter_format "%I64u"
35 # else
36 # define counter_format "%llu"
37 # endif
38 #else
39 typedef unsigned int counter_type;
40 # define counter_format "%u"
41 #endif
44 * Time intervals
46 typedef int interval_t;
49 * Used as an upper bound for timeouts.
51 #define BIG_TIMEOUT (60*60*24*7) /* one week (in seconds) */
54 * Printf formats for special types
56 #ifdef _WIN64
57 #define ptr_format "0x%I64x"
58 #else
59 #define ptr_format "0x%08lx"
60 #endif
61 #define time_format "%lu"
62 #define fragment_header_format "0x%08x"
64 /* these are used to cast the arguments
65 * and MUST match the formats above */
66 typedef unsigned long time_type;
67 #ifdef _WIN64
68 typedef unsigned long long ptr_type;
69 #else
70 typedef unsigned long ptr_type;
71 #endif
73 /* the --client-config-dir default file */
74 #define CCD_DEFAULT "DEFAULT"
77 * This parameter controls the TLS channel buffer size and the
78 * maximum size of a single TLS message (cleartext).
79 * This parameter must be >= PUSH_BUNDLE_SIZE
81 #define TLS_CHANNEL_BUF_SIZE 2048
84 * This parameter controls the maximum size of a bundle
85 * of pushed options.
87 #define PUSH_BUNDLE_SIZE 1024
90 * In how many seconds does client re-send PUSH_REQUEST if we haven't yet received a reply
92 #define PUSH_REQUEST_INTERVAL 5
95 * A sort of pseudo-filename for data provided inline within
96 * the configuration file.
98 #define INLINE_FILE_TAG "[[INLINE]]"
101 * Script security warning
103 #define SCRIPT_SECURITY_WARNING "WARNING: External program may not be called unless '--script-security 2' or higher is enabled. See --help text or man page for detailed info."
105 #endif