]> git.ipfire.org Git - people/ms/strongswan.git/blob - src/libfreeswan.tmp/ipcomp.h
(no commit message)
[people/ms/strongswan.git] / src / libfreeswan.tmp / ipcomp.h
1 /*
2 * IPCOMP zlib interface code.
3 * Copyright (C) 2000 Svenning Soerensen <svenning@post5.tele.dk>
4 * Copyright (C) 2000, 2001 Richard Guy Briggs <rgb@conscoop.ottawa.on.ca>
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: ipcomp.h,v 1.1 2004/03/15 20:35:25 as Exp $
17
18 */
19
20 /* SSS */
21
22 #ifndef _IPCOMP_H
23 #define _IPCOMP_H
24
25 /* Prefix all global deflate symbols with "ipcomp_" to avoid collisions with ppp_deflate & ext2comp */
26 #ifndef IPCOMP_PREFIX
27 #define IPCOMP_PREFIX
28 #endif /* IPCOMP_PREFIX */
29
30 #ifndef IPPROTO_COMP
31 #define IPPROTO_COMP 108
32 #endif /* IPPROTO_COMP */
33
34 #ifdef CONFIG_IPSEC_DEBUG
35 extern int sysctl_ipsec_debug_ipcomp;
36 #endif /* CONFIG_IPSEC_DEBUG */
37
38 struct ipcomphdr { /* IPCOMP header */
39 __u8 ipcomp_nh; /* Next header (protocol) */
40 __u8 ipcomp_flags; /* Reserved, must be 0 */
41 __u16 ipcomp_cpi; /* Compression Parameter Index */
42 };
43
44 extern struct inet_protocol comp_protocol;
45 extern int sysctl_ipsec_debug_ipcomp;
46
47 #define IPCOMP_UNCOMPRESSABLE 0x000000001
48 #define IPCOMP_COMPRESSIONERROR 0x000000002
49 #define IPCOMP_PARMERROR 0x000000004
50 #define IPCOMP_DECOMPRESSIONERROR 0x000000008
51
52 #define IPCOMP_ADAPT_INITIAL_TRIES 8
53 #define IPCOMP_ADAPT_INITIAL_SKIP 4
54 #define IPCOMP_ADAPT_SUBSEQ_TRIES 2
55 #define IPCOMP_ADAPT_SUBSEQ_SKIP 8
56
57 /* Function prototypes */
58 struct sk_buff *skb_compress(struct sk_buff *skb, struct ipsec_sa *ips, unsigned int *flags);
59 struct sk_buff *skb_decompress(struct sk_buff *skb, struct ipsec_sa *ips, unsigned int *flags);
60
61 #endif /* _IPCOMP_H */