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