]> git.ipfire.org Git - people/ms/strongswan.git/blob - linux/include/freeswan/ipsec_rcv.h
3ae239bf9cbfda9f3405b03bc857b8c7420a3b02
[people/ms/strongswan.git] / linux / include / freeswan / ipsec_rcv.h
1 /*
2 *
3 * Copyright (C) 1996, 1997 John Ioannidis.
4 * Copyright (C) 1998, 1999, 2000, 2001 Richard Guy Briggs.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 *
16 * RCSID $Id: ipsec_rcv.h,v 1.1 2004/03/15 20:35:25 as Exp $
17 */
18
19 #define DB_RX_PKTRX 0x0001
20 #define DB_RX_PKTRX2 0x0002
21 #define DB_RX_DMP 0x0004
22 #define DB_RX_IPSA 0x0010
23 #define DB_RX_XF 0x0020
24 #define DB_RX_IPAD 0x0040
25 #define DB_RX_INAU 0x0080
26 #define DB_RX_OINFO 0x0100
27 #define DB_RX_OINFO2 0x0200
28 #define DB_RX_OH 0x0400
29 #define DB_RX_REPLAY 0x0800
30
31 #ifdef __KERNEL__
32 /* struct options; */
33
34 #define __NO_VERSION__
35 #include <linux/module.h>
36 #include <linux/config.h> /* for CONFIG_IP_FORWARD */
37 #include <linux/version.h>
38 #include <freeswan.h>
39
40 #define IPSEC_BIRTH_TEMPLATE_MAXLEN 256
41
42 struct ipsec_birth_reply {
43 int packet_template_len;
44 unsigned char packet_template[IPSEC_BIRTH_TEMPLATE_MAXLEN];
45 };
46
47 extern struct ipsec_birth_reply ipsec_ipv4_birth_packet;
48 extern struct ipsec_birth_reply ipsec_ipv6_birth_packet;
49
50 extern int
51 #ifdef PROTO_HANDLER_SINGLE_PARM
52 ipsec_rcv(struct sk_buff *skb);
53 #else /* PROTO_HANDLER_SINGLE_PARM */
54 ipsec_rcv(struct sk_buff *skb,
55 #ifdef NET_21
56 unsigned short xlen);
57 #else /* NET_21 */
58 struct device *dev,
59 struct options *opt,
60 __u32 daddr,
61 unsigned short len,
62 __u32 saddr,
63 int redo,
64 struct inet_protocol *protocol);
65 #endif /* NET_21 */
66 #endif /* PROTO_HANDLER_SINGLE_PARM */
67
68 #ifdef CONFIG_IPSEC_DEBUG
69 extern int debug_rcv;
70 #endif /* CONFIG_IPSEC_DEBUG */
71 extern int sysctl_ipsec_inbound_policy_check;
72 #endif /* __KERNEL__ */
73
74 /*
75 * $Log: ipsec_rcv.h,v $
76 * Revision 1.1 2004/03/15 20:35:25 as
77 * added files from freeswan-2.04-x509-1.5.3
78 *
79 * Revision 1.17 2002/09/03 16:32:32 mcr
80 * definitions of ipsec_birth_reply.
81 *
82 * Revision 1.16 2002/05/14 02:36:00 rgb
83 * Change references to _TDB to _IPSA.
84 *
85 * Revision 1.15 2002/04/24 07:36:47 mcr
86 * Moved from ./klips/net/ipsec/ipsec_rcv.h,v
87 *
88 * Revision 1.14 2001/09/07 22:15:48 rgb
89 * Fix for removal of transport layer protocol handler arg in 2.4.4.
90 *
91 * Revision 1.13 2001/06/14 19:35:09 rgb
92 * Update copyright date.
93 *
94 * Revision 1.12 2001/03/16 07:36:44 rgb
95 * Fixed #endif comment to sate compiler.
96 *
97 * Revision 1.11 2000/09/21 04:34:21 rgb
98 * Moved declaration of sysctl_ipsec_inbound_policy_check outside
99 * CONFIG_IPSEC_DEBUG. (MB)
100 *
101 * Revision 1.10 2000/09/18 02:36:10 rgb
102 * Exported sysctl_ipsec_inbound_policy_check for skb_decompress().
103 *
104 * Revision 1.9 2000/09/08 19:12:56 rgb
105 * Change references from DEBUG_IPSEC to CONFIG_IPSEC_DEBUG.
106 *
107 * Revision 1.8 1999/11/18 04:09:19 rgb
108 * Replaced all kernel version macros to shorter, readable form.
109 *
110 * Revision 1.7 1999/05/25 01:45:37 rgb
111 * Fix version macros for 2.0.x as a module.
112 *
113 * Revision 1.6 1999/05/08 21:24:27 rgb
114 * Add includes for 2.2.x include into net/ipv4/protocol.c
115 *
116 * Revision 1.5 1999/05/05 22:02:32 rgb
117 * Add a quick and dirty port to 2.2 kernels by Marc Boucher <marc@mbsi.ca>.
118 *
119 * Revision 1.4 1999/04/11 00:28:59 henry
120 * GPL boilerplate
121 *
122 * Revision 1.3 1999/04/06 04:54:27 rgb
123 * Fix/Add RCSID Id: and Log: bits to make PHMDs happy. This includes
124 * patch shell fixes.
125 *
126 * Revision 1.2 1999/01/22 20:06:59 rgb
127 * Fixed cut-and-paste error from ipsec_esp.h.
128 *
129 * Revision 1.1 1999/01/21 20:29:12 rgb
130 * Converted from transform switching to algorithm switching.
131 *
132 * Log: ipsec_esp.h,v
133 * Revision 1.4 1998/08/12 00:07:32 rgb
134 * Added data structures for new xforms: null, {,3}dessha1.
135 *
136 * Revision 1.3 1998/07/14 15:57:01 rgb
137 * Add #ifdef __KERNEL__ to protect kernel-only structures.
138 *
139 * Revision 1.2 1998/06/25 19:33:46 rgb
140 * Add prototype for protocol receive function.
141 * Rearrange for more logical layout.
142 *
143 * Revision 1.1 1998/06/18 21:27:45 henry
144 * move sources from klips/src to klips/net/ipsec, to keep stupid
145 * kernel-build scripts happier in the presence of symlinks
146 *
147 * Revision 1.6 1998/06/05 02:28:08 rgb
148 * Minor comment fix.
149 *
150 * Revision 1.5 1998/05/27 22:34:00 rgb
151 * Changed structures to accomodate key separation.
152 *
153 * Revision 1.4 1998/05/18 22:28:43 rgb
154 * Disable key printing facilities from /proc/net/ipsec_*.
155 *
156 * Revision 1.3 1998/04/21 21:29:07 rgb
157 * Rearrange debug switches to change on the fly debug output from user
158 * space. Only kernel changes checked in at this time. radij.c was also
159 * changed to temporarily remove buggy debugging code in rj_delete causing
160 * an OOPS and hence, netlink device open errors.
161 *
162 * Revision 1.2 1998/04/12 22:03:20 rgb
163 * Updated ESP-3DES-HMAC-MD5-96,
164 * ESP-DES-HMAC-MD5-96,
165 * AH-HMAC-MD5-96,
166 * AH-HMAC-SHA1-96 since Henry started freeswan cvs repository
167 * from old standards (RFC182[5-9] to new (as of March 1998) drafts.
168 *
169 * Fixed eroute references in /proc/net/ipsec*.
170 *
171 * Started to patch module unloading memory leaks in ipsec_netlink and
172 * radij tree unloading.
173 *
174 * Revision 1.1 1998/04/09 03:06:00 henry
175 * sources moved up from linux/net/ipsec
176 *
177 * Revision 1.1.1.1 1998/04/08 05:35:02 henry
178 * RGB's ipsec-0.8pre2.tar.gz ipsec-0.8
179 *
180 * Revision 0.5 1997/06/03 04:24:48 ji
181 * Added ESP-3DES-MD5-96 transform.
182 *
183 * Revision 0.4 1997/01/15 01:28:15 ji
184 * Added definitions for new ESP transforms.
185 *
186 * Revision 0.3 1996/11/20 14:35:48 ji
187 * Minor Cleanup.
188 * Rationalized debugging code.
189 *
190 * Revision 0.2 1996/11/02 00:18:33 ji
191 * First limited release.
192 *
193 *
194 */
195
196