2 * @(#) FreeSWAN tunable paramaters
4 * Copyright (C) 2001 Richard Guy Briggs <rgb@freeswan.org>
5 * and Michael Richardson <mcr@freeswan.org>
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 * RCSID $Id: ipsec_param.h,v 1.6 2002/01/29 02:11:42 mcr Exp $
22 * This file provides a set of #define's which may be tuned by various
23 * people/configurations. It keeps all compile-time tunables in one place.
25 * This file should be included before all other IPsec kernel-only files.
29 #ifndef _IPSEC_PARAM_H_
31 #include "ipsec_kversion.h"
33 #ifdef CONFIG_IPSEC_BIGGATE
34 #define SADB_HASHMOD 8069
36 #define SADB_HASHMOD 257
40 #define IPSEC_PROC_LAST_ARG , int dummy
42 #define IPSEC_PROC_LAST_ARG
43 #endif /* !PROC_NO_DUMMY */
47 #define device net_device
48 #define ipsec_dev_get __dev_get_by_name
52 #define ipsec_dev_get dev_get
54 #endif /* NETDEV_23 */
57 #define IPSEC_PROCFS_DEBUG_NO_STATIC DEBUG_NO_STATIC
59 #define IPSEC_PROCFS_DEBUG_NO_STATIC
60 #endif /* PROC_FS_2325 */
62 #if !defined(LINUX_KERNEL_HAS_SNPRINTF)
63 /* GNU CPP specific! */
64 #define snprintf(buf, len, fmt...) sprintf(buf, ##fmt)
69 #include <linux/spinlock.h> /* *lock* */
70 #else /* SPINLOCK_23 */
71 #include <asm/spinlock.h> /* *lock* */
72 #endif /* SPINLOCK_23 */
75 #ifndef KLIPS_FIXES_DES_PARITY
76 #define KLIPS_FIXES_DES_PARITY 1
79 #ifndef KLIPS_DIVULGE_CYPHER_KEY
80 #define KLIPS_DIVULGE_CYPHER_KEY 0
83 /* extra toggles for regression testing */
84 #ifdef CONFIG_IPSEC_REGRESS
87 * should pfkey_acquire() become 100% lossy?
90 extern int sysctl_ipsec_regress_pfkey_lossage;
91 #ifndef KLIPS_PFKEY_ACQUIRE_LOSSAGE
92 #ifdef CONFIG_IPSEC_PFKEY_ACQUIRE_LOSSAGE
93 #define KLIPS_PFKEY_ACQUIRE_LOSSAGE 100
96 #define KLIPS_PFKEY_ACQUIRE_LOSSAGE 0
102 /* IP_FRAGMENT_LINEARIZE is set in freeswan.h if Kernel > 2.4.4 */
103 #ifndef IP_FRAGMENT_LINEARIZE
104 #define IP_FRAGMENT_LINEARIZE 0
107 #define _IPSEC_PARAM_H_
111 * $Log: ipsec_param.h,v $
112 * Revision 1.6 2002/01/29 02:11:42 mcr
113 * removal of kversions.h - sources that needed it now use ipsec_param.h.
114 * updating of IPv6 structures to match latest in6.h version.
115 * removed dead code from freeswan.h that also duplicated kversions.h
118 * Revision 1.5 2002/01/28 19:22:01 mcr
119 * by default, turn off LINEARIZE option
120 * (let kversions.h turn it on)
122 * Revision 1.4 2002/01/20 20:19:36 mcr
123 * renamed option to IP_FRAGMENT_LINEARIZE.
125 * Revision 1.3 2002/01/12 02:57:25 mcr
126 * first regression test causes acquire messages to be lost
127 * 100% of the time. This is to help testing of pluto.
129 * Revision 1.2 2001/11/26 09:16:14 rgb
130 * Merge MCR's ipsec_sa, eroute, proc and struct lifetime changes.
132 * Revision 1.1.2.3 2001/10/23 04:40:16 mcr
133 * added #define for DIVULGING session keys in debug output.
135 * Revision 1.1.2.2 2001/10/22 20:53:25 mcr
136 * added a define to control forcing of DES parity.
138 * Revision 1.1.2.1 2001/09/25 02:20:19 mcr
139 * many common kernel configuration questions centralized.
140 * more things remain that should be moved from freeswan.h.
144 * c-file-style: "linux"