186d7f5d3SJohn Marino /* 286d7f5d3SJohn Marino * ng_fec.h 386d7f5d3SJohn Marino * 486d7f5d3SJohn Marino * Copyright (c) 2000 Berkeley Software Design, Inc. 586d7f5d3SJohn Marino * Copyright (c) 1997, 1998, 1999, 2000 686d7f5d3SJohn Marino * Bill Paul <wpaul@osd.bsdi.com>. All rights reserved. 786d7f5d3SJohn Marino * 886d7f5d3SJohn Marino * Redistribution and use in source and binary forms, with or without 986d7f5d3SJohn Marino * modification, are permitted provided that the following conditions 1086d7f5d3SJohn Marino * are met: 1186d7f5d3SJohn Marino * 1. Redistributions of source code must retain the above copyright 1286d7f5d3SJohn Marino * notice, this list of conditions and the following disclaimer. 1386d7f5d3SJohn Marino * 2. Redistributions in binary form must reproduce the above copyright 1486d7f5d3SJohn Marino * notice, this list of conditions and the following disclaimer in the 1586d7f5d3SJohn Marino * documentation and/or other materials provided with the distribution. 1686d7f5d3SJohn Marino * 3. All advertising materials mentioning features or use of this software 1786d7f5d3SJohn Marino * must display the following acknowledgement: 1886d7f5d3SJohn Marino * This product includes software developed by Bill Paul. 1986d7f5d3SJohn Marino * 4. Neither the name of the author nor the names of any co-contributors 2086d7f5d3SJohn Marino * may be used to endorse or promote products derived from this software 2186d7f5d3SJohn Marino * without specific prior written permission. 2286d7f5d3SJohn Marino * 2386d7f5d3SJohn Marino * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND 2486d7f5d3SJohn Marino * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2586d7f5d3SJohn Marino * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2686d7f5d3SJohn Marino * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD 2786d7f5d3SJohn Marino * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2886d7f5d3SJohn Marino * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2986d7f5d3SJohn Marino * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 3086d7f5d3SJohn Marino * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 3186d7f5d3SJohn Marino * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 3286d7f5d3SJohn Marino * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 3386d7f5d3SJohn Marino * THE POSSIBILITY OF SUCH DAMAGE. 3486d7f5d3SJohn Marino * 3586d7f5d3SJohn Marino * $FreeBSD: src/sys/netgraph/ng_fec.h,v 1.1.2.1 2002/11/01 21:39:31 julian Exp $ 3686d7f5d3SJohn Marino * $DragonFly: src/sys/netgraph/fec/ng_fec.h,v 1.2 2003/06/17 04:28:50 dillon Exp $ 3786d7f5d3SJohn Marino */ 3886d7f5d3SJohn Marino /* 3986d7f5d3SJohn Marino * Copyright (c) 1996-1999 Whistle Communications, Inc. 4086d7f5d3SJohn Marino * All rights reserved. 4186d7f5d3SJohn Marino * 4286d7f5d3SJohn Marino * Subject to the following obligations and disclaimer of warranty, use and 4386d7f5d3SJohn Marino * redistribution of this software, in source or object code forms, with or 4486d7f5d3SJohn Marino * without modifications are expressly permitted by Whistle Communications; 4586d7f5d3SJohn Marino * provided, however, that: 4686d7f5d3SJohn Marino * 1. Any and all reproductions of the source or object code must include the 4786d7f5d3SJohn Marino * copyright notice above and the following disclaimer of warranties; and 4886d7f5d3SJohn Marino * 2. No rights are granted, in any manner or form, to use Whistle 4986d7f5d3SJohn Marino * Communications, Inc. trademarks, including the mark "WHISTLE 5086d7f5d3SJohn Marino * COMMUNICATIONS" on advertising, endorsements, or otherwise except as 5186d7f5d3SJohn Marino * such appears in the above copyright notice or in the software. 5286d7f5d3SJohn Marino * 5386d7f5d3SJohn Marino * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND 5486d7f5d3SJohn Marino * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO 5586d7f5d3SJohn Marino * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, 5686d7f5d3SJohn Marino * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF 5786d7f5d3SJohn Marino * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. 5886d7f5d3SJohn Marino * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY 5986d7f5d3SJohn Marino * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS 6086d7f5d3SJohn Marino * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE. 6186d7f5d3SJohn Marino * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES 6286d7f5d3SJohn Marino * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING 6386d7f5d3SJohn Marino * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 6486d7f5d3SJohn Marino * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR 6586d7f5d3SJohn Marino * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 6686d7f5d3SJohn Marino * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 6786d7f5d3SJohn Marino * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 6886d7f5d3SJohn Marino * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 6986d7f5d3SJohn Marino * OF SUCH DAMAGE. 7086d7f5d3SJohn Marino * 7186d7f5d3SJohn Marino * Author: Archie Cobbs <archie@freebsd.org> 7286d7f5d3SJohn Marino * 7386d7f5d3SJohn Marino * $Whistle: ng_fec.h,v 1.5 1999/01/20 00:22:13 archie Exp $ 7486d7f5d3SJohn Marino */ 7586d7f5d3SJohn Marino 7686d7f5d3SJohn Marino #ifndef _NETGRAPH_FEC_H_ 7786d7f5d3SJohn Marino #define _NETGRAPH_FEC_H_ 7886d7f5d3SJohn Marino 7986d7f5d3SJohn Marino #define NETISR_FEC 26 8086d7f5d3SJohn Marino 8186d7f5d3SJohn Marino /* Node type name and magic cookie */ 8286d7f5d3SJohn Marino #define NG_FEC_NODE_TYPE "fec" 8386d7f5d3SJohn Marino #define NGM_FEC_COOKIE 983566799 8486d7f5d3SJohn Marino 8586d7f5d3SJohn Marino /* Interface base name */ 8686d7f5d3SJohn Marino #define NG_FEC_FEC_NAME "fec" 8786d7f5d3SJohn Marino #define NG_FEC_FEC_NAME_MAX 15 8886d7f5d3SJohn Marino 8986d7f5d3SJohn Marino /* MTU bounds */ 9086d7f5d3SJohn Marino #define NG_FEC_MTU_MIN 72 9186d7f5d3SJohn Marino #define NG_FEC_MTU_MAX 65535 9286d7f5d3SJohn Marino #define NG_FEC_MTU_DEFAULT 1500 9386d7f5d3SJohn Marino 9486d7f5d3SJohn Marino /* Special flags for mbufs. */ 9586d7f5d3SJohn Marino #define M_FEC_MAC 0x2000 9686d7f5d3SJohn Marino #define M_FEC_INET 0x4000 9786d7f5d3SJohn Marino #define M_FEC_INET6 0x8000 9886d7f5d3SJohn Marino 9986d7f5d3SJohn Marino /* Netgraph commands */ 10086d7f5d3SJohn Marino enum { 10186d7f5d3SJohn Marino NGM_FEC_ADD_IFACE, 10286d7f5d3SJohn Marino NGM_FEC_DEL_IFACE, 10386d7f5d3SJohn Marino NGM_FEC_SET_MODE_MAC, 10486d7f5d3SJohn Marino NGM_FEC_SET_MODE_INET, 10586d7f5d3SJohn Marino NGM_FEC_SET_MODE_INET6 10686d7f5d3SJohn Marino }; 10786d7f5d3SJohn Marino 10886d7f5d3SJohn Marino struct ng_fec_ifname { 10986d7f5d3SJohn Marino char ngif_name[NG_FEC_FEC_NAME_MAX + 1]; 11086d7f5d3SJohn Marino }; 11186d7f5d3SJohn Marino 11286d7f5d3SJohn Marino #endif /* _NETGRAPH_FEC_H_ */ 113