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