161452Sdfr/*
261452Sdfr * ng_fec.h
361452Sdfr */
461452Sdfr
561452Sdfr/*-
661452Sdfr * Copyright (c) 2000 Berkeley Software Design, Inc.
761452Sdfr * Copyright (c) 1997, 1998, 1999, 2000
861452Sdfr *	Bill Paul <wpaul@osd.bsdi.com>.  All rights reserved.
961452Sdfr *
1061452Sdfr * Redistribution and use in source and binary forms, with or without
1161452Sdfr * modification, are permitted provided that the following conditions
1261452Sdfr * are met:
1361452Sdfr * 1. Redistributions of source code must retain the above copyright
1461452Sdfr *    notice, this list of conditions and the following disclaimer.
1561452Sdfr * 2. Redistributions in binary form must reproduce the above copyright
1661452Sdfr *    notice, this list of conditions and the following disclaimer in the
1761452Sdfr *    documentation and/or other materials provided with the distribution.
1861452Sdfr * 3. All advertising materials mentioning features or use of this software
1961452Sdfr *    must display the following acknowledgement:
2061452Sdfr *	This product includes software developed by Bill Paul.
2161452Sdfr * 4. Neither the name of the author nor the names of any co-contributors
2261452Sdfr *    may be used to endorse or promote products derived from this software
2361452Sdfr *    without specific prior written permission.
2461452Sdfr *
2561452Sdfr * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
2661452Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27116192Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28116192Sobrien * ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
29116192Sobrien * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
3061452Sdfr * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
3161452Sdfr * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
3261452Sdfr * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3361452Sdfr * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34129878Sphk * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
3561452Sdfr * THE POSSIBILITY OF SUCH DAMAGE.
3661452Sdfr *
3776827Salfred * $FreeBSD$
3879339Sjhb */
3961452Sdfr/*-
40173573Sjhb * Copyright (c) 1996-1999 Whistle Communications, Inc.
41173573Sjhb * All rights reserved.
42119288Simp *
43119288Simp * Subject to the following obligations and disclaimer of warranty, use and
4461452Sdfr * redistribution of this software, in source or object code forms, with or
4561452Sdfr * without modifications are expressly permitted by Whistle Communications;
4661452Sdfr * provided, however, that:
4761452Sdfr * 1. Any and all reproductions of the source or object code must include the
4861452Sdfr *    copyright notice above and the following disclaimer of warranties; and
4961452Sdfr * 2. No rights are granted, in any manner or form, to use Whistle
5061452Sdfr *    Communications, Inc. trademarks, including the mark "WHISTLE
5161452Sdfr *    COMMUNICATIONS" on advertising, endorsements, or otherwise except as
5261452Sdfr *    such appears in the above copyright notice or in the software.
5361452Sdfr *
5461452Sdfr * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
5561452Sdfr * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
5661452Sdfr * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
5761452Sdfr * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
5861452Sdfr * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
5961452Sdfr * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
6061452Sdfr * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
6161452Sdfr * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
6261452Sdfr * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
6361452Sdfr * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
6461452Sdfr * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
6561452Sdfr * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
66142646Scognet * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
67142646Scognet * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
6861452Sdfr * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
6961452Sdfr * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
70139431Sanholt * OF SUCH DAMAGE.
71139431Sanholt *
72244926Santoine * Author: Archie Cobbs <archie@freebsd.org>
7361452Sdfr *
7461452Sdfr * $Whistle: ng_fec.h,v 1.5 1999/01/20 00:22:13 archie Exp $
7561452Sdfr */
7661452Sdfr
7761452Sdfr#ifndef _NETGRAPH_NG_FEC_H_
7861452Sdfr#define _NETGRAPH_NG_FEC_H_
7961452Sdfr
8061452Sdfr#define NETISR_FEC			26
8161452Sdfr
82241885Seadler/* Node type name and magic cookie */
83241885Seadler#define NG_FEC_NODE_TYPE		"fec"
8461452Sdfr#define NGM_FEC_COOKIE			983566799
8561452Sdfr
8661452Sdfr/* Interface base name */
87142398Simp#define NG_FEC_FEC_NAME			"fec"
8861452Sdfr#define NG_FEC_FEC_NAME_MAX		15
8961452Sdfr
9061452Sdfr/* MTU bounds */
9161452Sdfr#define NG_FEC_MTU_MIN			72
9261452Sdfr#define NG_FEC_MTU_MAX			65535
9361452Sdfr#define NG_FEC_MTU_DEFAULT		1500
9461452Sdfr
9561452Sdfr/* Special flags for mbufs. */
9661452Sdfr#define M_FEC_MAC			0x2000
9761452Sdfr#define M_FEC_INET			0x4000
9861452Sdfr#define M_FEC_INET6			0x8000
99134098Sanholt
10061452Sdfr/* Netgraph commands */
10161452Sdfrenum {
10261452Sdfr	NGM_FEC_ADD_IFACE,
10361452Sdfr	NGM_FEC_DEL_IFACE,
10461452Sdfr	NGM_FEC_SET_MODE_MAC,
10561452Sdfr	NGM_FEC_SET_MODE_INET,
106122513Sanholt	NGM_FEC_SET_MODE_INET6
107122513Sanholt};
108122513Sanholt
109122513Sanholtstruct ng_fec_ifname {
11061452Sdfr	char    ngif_name[NG_FEC_FEC_NAME_MAX + 1];
11161452Sdfr};
11261452Sdfr
11361452Sdfr#endif /* _NETGRAPH_NG_FEC_H_ */
11461452Sdfr