1 |
27 |
unneback |
//==========================================================================
|
2 |
|
|
//
|
3 |
|
|
// include/netinet/ip_ecn.h
|
4 |
|
|
//
|
5 |
|
|
//
|
6 |
|
|
//
|
7 |
|
|
//==========================================================================
|
8 |
|
|
//####BSDCOPYRIGHTBEGIN####
|
9 |
|
|
//
|
10 |
|
|
// -------------------------------------------
|
11 |
|
|
//
|
12 |
|
|
// Portions of this software may have been derived from OpenBSD or other sources,
|
13 |
|
|
// and are covered by the appropriate copyright disclaimers included herein.
|
14 |
|
|
//
|
15 |
|
|
// -------------------------------------------
|
16 |
|
|
//
|
17 |
|
|
//####BSDCOPYRIGHTEND####
|
18 |
|
|
//==========================================================================
|
19 |
|
|
//#####DESCRIPTIONBEGIN####
|
20 |
|
|
//
|
21 |
|
|
// Author(s): gthomas
|
22 |
|
|
// Contributors: gthomas
|
23 |
|
|
// Date: 2000-01-10
|
24 |
|
|
// Purpose:
|
25 |
|
|
// Description:
|
26 |
|
|
//
|
27 |
|
|
//
|
28 |
|
|
//####DESCRIPTIONEND####
|
29 |
|
|
//
|
30 |
|
|
//==========================================================================
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
/* $OpenBSD: ip_ecn.h,v 1.1 1999/12/08 06:50:19 itojun Exp $ */
|
34 |
|
|
|
35 |
|
|
/*
|
36 |
|
|
* Copyright (C) 1999 WIDE Project.
|
37 |
|
|
* All rights reserved.
|
38 |
|
|
*
|
39 |
|
|
* Redistribution and use in source and binary forms, with or without
|
40 |
|
|
* modification, are permitted provided that the following conditions
|
41 |
|
|
* are met:
|
42 |
|
|
* 1. Redistributions of source code must retain the above copyright
|
43 |
|
|
* notice, this list of conditions and the following disclaimer.
|
44 |
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
45 |
|
|
* notice, this list of conditions and the following disclaimer in the
|
46 |
|
|
* documentation and/or other materials provided with the distribution.
|
47 |
|
|
* 3. Neither the name of the project nor the names of its contributors
|
48 |
|
|
* may be used to endorse or promote products derived from this software
|
49 |
|
|
* without specific prior written permission.
|
50 |
|
|
*
|
51 |
|
|
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
52 |
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
53 |
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
54 |
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
|
55 |
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
56 |
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
57 |
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
58 |
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
59 |
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
60 |
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
61 |
|
|
* SUCH DAMAGE.
|
62 |
|
|
*
|
63 |
|
|
* KAME Id: ip_ecn.h,v 1.2 1999/08/19 12:57:44 itojun Exp
|
64 |
|
|
*/
|
65 |
|
|
|
66 |
|
|
#ifndef _NETINET_IP_ECN_H_
|
67 |
|
|
#define _NETINET_IP_ECN_H_
|
68 |
|
|
|
69 |
|
|
/*
|
70 |
|
|
* ECN consideration on tunnel ingress/egress operation.
|
71 |
|
|
* http://www.aciri.org/floyd/papers/draft-ipsec-ecn-00.txt
|
72 |
|
|
*/
|
73 |
|
|
|
74 |
|
|
#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(__NetBSD__)
|
75 |
|
|
#if defined(_KERNEL) && !defined(_LKM)
|
76 |
|
|
#include "opt_inet.h"
|
77 |
|
|
#endif
|
78 |
|
|
#endif
|
79 |
|
|
|
80 |
|
|
#define ECN_ALLOWED 1 /* ECN allowed */
|
81 |
|
|
#define ECN_FORBIDDEN 0 /* ECN forbidden */
|
82 |
|
|
#define ECN_NOCARE (-1) /* no consideration to ECN */
|
83 |
|
|
|
84 |
|
|
#if defined(KERNEL) || defined(_KERNEL)
|
85 |
|
|
extern void ip_ecn_ingress __P((int, u_int8_t *, u_int8_t *));
|
86 |
|
|
extern void ip_ecn_egress __P((int, u_int8_t *, u_int8_t *));
|
87 |
|
|
#ifdef INET6
|
88 |
|
|
extern void ip6_ecn_ingress __P((int, u_int32_t *, u_int32_t *));
|
89 |
|
|
extern void ip6_ecn_egress __P((int, u_int32_t *, u_int32_t *));
|
90 |
|
|
#endif
|
91 |
|
|
#endif
|
92 |
|
|
|
93 |
|
|
#endif // _NETINET_IP_ECN_H_
|