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