Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / sys / netgraph / fec / ng_fec.h
1 /*
2  * ng_fec.h
3  *
4  * Copyright (c) 2000 Berkeley Software Design, Inc.
5  * Copyright (c) 1997, 1998, 1999, 2000
6  *      Bill Paul <wpaul@osd.bsdi.com>.  All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  * 3. All advertising materials mentioning features or use of this software
17  *    must display the following acknowledgement:
18  *      This product includes software developed by Bill Paul.
19  * 4. Neither the name of the author nor the names of any co-contributors
20  *    may be used to endorse or promote products derived from this software
21  *    without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26  * ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
27  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
33  * THE POSSIBILITY OF SUCH DAMAGE.
34  *
35  * $FreeBSD: src/sys/netgraph/ng_fec.h,v 1.1.2.1 2002/11/01 21:39:31 julian Exp $
36  * $DragonFly: src/sys/netgraph/fec/ng_fec.h,v 1.2 2003/06/17 04:28:50 dillon Exp $
37  */
38 /*
39  * Copyright (c) 1996-1999 Whistle Communications, Inc.
40  * All rights reserved.
41  * 
42  * Subject to the following obligations and disclaimer of warranty, use and
43  * redistribution of this software, in source or object code forms, with or
44  * without modifications are expressly permitted by Whistle Communications;
45  * provided, however, that:
46  * 1. Any and all reproductions of the source or object code must include the
47  *    copyright notice above and the following disclaimer of warranties; and
48  * 2. No rights are granted, in any manner or form, to use Whistle
49  *    Communications, Inc. trademarks, including the mark "WHISTLE
50  *    COMMUNICATIONS" on advertising, endorsements, or otherwise except as
51  *    such appears in the above copyright notice or in the software.
52  * 
53  * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
54  * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
55  * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
56  * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
57  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
58  * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
59  * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
60  * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
61  * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
62  * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
63  * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
64  * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
65  * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
66  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
67  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
68  * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
69  * OF SUCH DAMAGE.
70  *
71  * Author: Archie Cobbs <archie@freebsd.org>
72  *
73  * $Whistle: ng_fec.h,v 1.5 1999/01/20 00:22:13 archie Exp $
74  */
75
76 #ifndef _NETGRAPH_FEC_H_
77 #define _NETGRAPH_FEC_H_
78
79 #define NETISR_FEC                      26
80
81 /* Node type name and magic cookie */
82 #define NG_FEC_NODE_TYPE                "fec"
83 #define NGM_FEC_COOKIE                  983566799
84
85 /* Interface base name */
86 #define NG_FEC_FEC_NAME                 "fec"
87 #define NG_FEC_FEC_NAME_MAX             15
88
89 /* MTU bounds */
90 #define NG_FEC_MTU_MIN                  72
91 #define NG_FEC_MTU_MAX                  65535
92 #define NG_FEC_MTU_DEFAULT              1500
93
94 /* Special flags for mbufs. */
95 #define M_FEC_MAC                       0x2000
96 #define M_FEC_INET                      0x4000
97 #define M_FEC_INET6                     0x8000
98
99 /* Netgraph commands */
100 enum {
101         NGM_FEC_ADD_IFACE,
102         NGM_FEC_DEL_IFACE,
103         NGM_FEC_SET_MODE_MAC,
104         NGM_FEC_SET_MODE_INET,
105         NGM_FEC_SET_MODE_INET6
106 };
107
108 struct ng_fec_ifname {
109         char    ngif_name[NG_FEC_FEC_NAME_MAX + 1];
110 };
111
112 #endif /* _NETGRAPH_FEC_H_ */