cosmetics
[tomato.git] / release / src / router / openvpn / common.h
blob94da09e5b5f8abbede2822aff3508b73c83e85d7
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-2009 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).
80 #define TLS_CHANNEL_BUF_SIZE 1024
83 * A sort of pseudo-filename for data provided inline within
84 * the configuration file.
86 #if ENABLE_INLINE_FILES
87 #define INLINE_FILE_TAG "[[INLINE]]"
88 #endif
91 * Script security warning
93 #define SCRIPT_SECURITY_WARNING "openvpn_execve: external program may not be called unless '--script-security 2' or higher is enabled. Use '--script-security 3 system' for backward compatibility with 2.1_rc8 and earlier. See --help text or man page for detailed info."
95 #endif