OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [net/] [bsd_tcpip/] [current/] [include/] [netinet6/] [ipcomp.h] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
//==========================================================================
2
//
3
//      include/netinet6/ipcomp.h
4
//
5
//==========================================================================
6
// ####BSDCOPYRIGHTBEGIN####                                    
7
// -------------------------------------------                  
8
// This file is part of eCos, the Embedded Configurable Operating System.
9
//
10
// Portions of this software may have been derived from FreeBSD 
11
// or other sources, and if so are covered by the appropriate copyright
12
// and license included herein.                                 
13
//
14
// Portions created by the Free Software Foundation are         
15
// Copyright (C) 2002 Free Software Foundation, Inc.            
16
// -------------------------------------------                  
17
// ####BSDCOPYRIGHTEND####                                      
18
 
19
//==========================================================================
20
 
21
/*      $KAME: ipcomp.h,v 1.11 2001/09/04 08:43:19 itojun Exp $ */
22
 
23
/*
24
 * Copyright (C) 1999 WIDE Project.
25
 * All rights reserved.
26
 *
27
 * Redistribution and use in source and binary forms, with or without
28
 * modification, are permitted provided that the following conditions
29
 * are met:
30
 * 1. Redistributions of source code must retain the above copyright
31
 *    notice, this list of conditions and the following disclaimer.
32
 * 2. Redistributions in binary form must reproduce the above copyright
33
 *    notice, this list of conditions and the following disclaimer in the
34
 *    documentation and/or other materials provided with the distribution.
35
 * 3. Neither the name of the project nor the names of its contributors
36
 *    may be used to endorse or promote products derived from this software
37
 *    without specific prior written permission.
38
 *
39
 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
40
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
41
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
42
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
43
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
44
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
45
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
46
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
47
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
48
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
49
 * SUCH DAMAGE.
50
 */
51
 
52
/*
53
 * RFC2393 IP payload compression protocol (IPComp).
54
 */
55
 
56
#ifndef _NETINET6_IPCOMP_H_
57
#define _NETINET6_IPCOMP_H_
58
 
59
struct ipcomp {
60
        u_int8_t comp_nxt;      /* Next Header */
61
        u_int8_t comp_flags;    /* reserved, must be zero */
62
        u_int16_t comp_cpi;     /* Compression parameter index */
63
};
64
 
65
/* well-known algorithm number (in CPI), from RFC2409 */
66
#define IPCOMP_OUI      1       /* vendor specific */
67
#define IPCOMP_DEFLATE  2       /* RFC2394 */
68
#define IPCOMP_LZS      3       /* RFC2395 */
69
#define IPCOMP_MAX      4
70
 
71
#define IPCOMP_CPI_NEGOTIATE_MIN        256
72
 
73
#if defined(KERNEL) || defined(_KERNEL)
74
struct ipcomp_algorithm {
75
        int (*compress) __P((struct mbuf *, struct mbuf *, size_t *));
76
        int (*decompress) __P((struct mbuf *, struct mbuf *, size_t *));
77
        size_t minplen;         /* minimum required length for compression */
78
};
79
 
80
struct ipsecrequest;
81
extern const struct ipcomp_algorithm *ipcomp_algorithm_lookup __P((int));
82
#if (defined(__FreeBSD__) && __FreeBSD__ >= 4)
83
extern void ipcomp4_input __P((struct mbuf *, int));
84
#else
85
extern void ipcomp4_input __P((struct mbuf *, ...));
86
#endif /* (defined(__FreeBSD__) && __FreeBSD__ >= 4) */
87
extern int ipcomp4_output __P((struct mbuf *, struct ipsecrequest *));
88
#ifdef INET6
89
extern int ipcomp6_input __P((struct mbuf **, int *, int));
90
extern int ipcomp6_output __P((struct mbuf *, u_char *, struct mbuf *,
91
        struct ipsecrequest *));
92
#endif
93
#endif /* KERNEL */
94
 
95
#endif /* _NETINET6_IPCOMP_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.