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>
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>.
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
16 RCSID $Id: ipcomp.h,v 1.1 2004/03/15 20:35:25 as Exp $
25 /* Prefix all global deflate symbols with "ipcomp_" to avoid collisions with ppp_deflate & ext2comp */
28 #endif /* IPCOMP_PREFIX */
31 #define IPPROTO_COMP 108
32 #endif /* IPPROTO_COMP */
34 #ifdef CONFIG_IPSEC_DEBUG
35 extern int sysctl_ipsec_debug_ipcomp
;
36 #endif /* CONFIG_IPSEC_DEBUG */
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 */
44 extern struct inet_protocol comp_protocol
;
45 extern int sysctl_ipsec_debug_ipcomp
;
47 #define IPCOMP_UNCOMPRESSABLE 0x000000001
48 #define IPCOMP_COMPRESSIONERROR 0x000000002
49 #define IPCOMP_PARMERROR 0x000000004
50 #define IPCOMP_DECOMPRESSIONERROR 0x000000008
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
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
);
61 #endif /* _IPCOMP_H */