1106159Sjulian/*
2106159Sjulian * ng_fec.h
3139823Simp */
4139823Simp
5139823Simp/*-
6106159Sjulian * Copyright (c) 2000 Berkeley Software Design, Inc.
7106159Sjulian * Copyright (c) 1997, 1998, 1999, 2000
8106159Sjulian *	Bill Paul <wpaul@osd.bsdi.com>.  All rights reserved.
9106159Sjulian *
10106159Sjulian * Redistribution and use in source and binary forms, with or without
11106159Sjulian * modification, are permitted provided that the following conditions
12106159Sjulian * are met:
13106159Sjulian * 1. Redistributions of source code must retain the above copyright
14106159Sjulian *    notice, this list of conditions and the following disclaimer.
15106159Sjulian * 2. Redistributions in binary form must reproduce the above copyright
16106159Sjulian *    notice, this list of conditions and the following disclaimer in the
17106159Sjulian *    documentation and/or other materials provided with the distribution.
18106159Sjulian * 3. All advertising materials mentioning features or use of this software
19106159Sjulian *    must display the following acknowledgement:
20106159Sjulian *	This product includes software developed by Bill Paul.
21106159Sjulian * 4. Neither the name of the author nor the names of any co-contributors
22106159Sjulian *    may be used to endorse or promote products derived from this software
23106159Sjulian *    without specific prior written permission.
24106159Sjulian *
25106159Sjulian * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
26106159Sjulian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27106159Sjulian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28106159Sjulian * ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
29106159Sjulian * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30106159Sjulian * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31106159Sjulian * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32106159Sjulian * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33106159Sjulian * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34106159Sjulian * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
35106159Sjulian * THE POSSIBILITY OF SUCH DAMAGE.
36106159Sjulian *
37106159Sjulian * $FreeBSD$
38106159Sjulian */
39139823Simp/*-
40106159Sjulian * Copyright (c) 1996-1999 Whistle Communications, Inc.
41106159Sjulian * All rights reserved.
42106159Sjulian *
43106159Sjulian * Subject to the following obligations and disclaimer of warranty, use and
44106159Sjulian * redistribution of this software, in source or object code forms, with or
45106159Sjulian * without modifications are expressly permitted by Whistle Communications;
46106159Sjulian * provided, however, that:
47106159Sjulian * 1. Any and all reproductions of the source or object code must include the
48106159Sjulian *    copyright notice above and the following disclaimer of warranties; and
49106159Sjulian * 2. No rights are granted, in any manner or form, to use Whistle
50106159Sjulian *    Communications, Inc. trademarks, including the mark "WHISTLE
51106159Sjulian *    COMMUNICATIONS" on advertising, endorsements, or otherwise except as
52106159Sjulian *    such appears in the above copyright notice or in the software.
53106159Sjulian *
54106159Sjulian * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
55106159Sjulian * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
56106159Sjulian * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
57106159Sjulian * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
58106159Sjulian * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
59106159Sjulian * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
60106159Sjulian * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
61106159Sjulian * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
62106159Sjulian * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
63106159Sjulian * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
64106159Sjulian * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
65106159Sjulian * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
66106159Sjulian * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
67106159Sjulian * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
68106159Sjulian * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
69106159Sjulian * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
70106159Sjulian * OF SUCH DAMAGE.
71106159Sjulian *
72106159Sjulian * Author: Archie Cobbs <archie@freebsd.org>
73106159Sjulian *
74106159Sjulian * $Whistle: ng_fec.h,v 1.5 1999/01/20 00:22:13 archie Exp $
75106159Sjulian */
76106159Sjulian
77122481Sru#ifndef _NETGRAPH_NG_FEC_H_
78122481Sru#define _NETGRAPH_NG_FEC_H_
79106159Sjulian
80106159Sjulian#define NETISR_FEC			26
81106159Sjulian
82106159Sjulian/* Node type name and magic cookie */
83106159Sjulian#define NG_FEC_NODE_TYPE		"fec"
84106159Sjulian#define NGM_FEC_COOKIE			983566799
85106159Sjulian
86106159Sjulian/* Interface base name */
87106159Sjulian#define NG_FEC_FEC_NAME			"fec"
88106159Sjulian#define NG_FEC_FEC_NAME_MAX		15
89106159Sjulian
90106159Sjulian/* MTU bounds */
91106159Sjulian#define NG_FEC_MTU_MIN			72
92106159Sjulian#define NG_FEC_MTU_MAX			65535
93106159Sjulian#define NG_FEC_MTU_DEFAULT		1500
94106159Sjulian
95106159Sjulian/* Special flags for mbufs. */
96106159Sjulian#define M_FEC_MAC			0x2000
97106159Sjulian#define M_FEC_INET			0x4000
98106159Sjulian#define M_FEC_INET6			0x8000
99106159Sjulian
100106159Sjulian/* Netgraph commands */
101106159Sjulianenum {
102106159Sjulian	NGM_FEC_ADD_IFACE,
103106159Sjulian	NGM_FEC_DEL_IFACE,
104106159Sjulian	NGM_FEC_SET_MODE_MAC,
105106159Sjulian	NGM_FEC_SET_MODE_INET,
106106159Sjulian	NGM_FEC_SET_MODE_INET6
107106159Sjulian};
108106159Sjulian
109106159Sjulianstruct ng_fec_ifname {
110106159Sjulian	char    ngif_name[NG_FEC_FEC_NAME_MAX + 1];
111106159Sjulian};
112106159Sjulian
113122481Sru#endif /* _NETGRAPH_NG_FEC_H_ */
114