Axe ng_fec(4). It has never been a real netgraph(4) module, since
it had no hooks. It has abused ifnet's if_afdata slot and actually abused every subsystem it touched. lagg(4) is a proper trunking solution at ifnet(9) layer. ng_one2many(4) is a proper trunking solution in netgraph(4).
This commit is contained in:
parent
2e14fd4313
commit
506658cc1e
@ -295,7 +295,6 @@ MAN= aac.4 \
|
||||
ng_etf.4 \
|
||||
ng_ether.4 \
|
||||
ng_ether_echo.4 \
|
||||
ng_fec.4 \
|
||||
ng_frame_relay.4 \
|
||||
ng_gif.4 \
|
||||
ng_gif_demux.4 \
|
||||
|
@ -1,109 +0,0 @@
|
||||
.\" Copyright (c) 2004 Gleb Smirnoff
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd July 22, 2004
|
||||
.Dt NG_FEC 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm ng_fec
|
||||
.Nd netgraph Fast EtherChannel node
|
||||
.Sh SYNOPSIS
|
||||
.In netgraph/ng_fec.h
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm fec
|
||||
node implements Ethernet port trunking using the
|
||||
.Dq Cisco Fast EtherChannel
|
||||
protocol.
|
||||
Upon creation, a
|
||||
.Nm fec
|
||||
node creates a network interface associated with it.
|
||||
Interfaces are named
|
||||
.Dq Li fec0 ,
|
||||
.Dq Li fec1 ,
|
||||
etc.
|
||||
New nodes take the first available unit.
|
||||
.Sh HOOKS
|
||||
The
|
||||
.Nm fec
|
||||
node accepts any hooks.
|
||||
However it does not use them.
|
||||
Under normal operation, a
|
||||
.Nm fec
|
||||
node should not have any hooks.
|
||||
.Sh CONTROL MESSAGES
|
||||
Interface membership in the FEC group is configured with the following
|
||||
control messages:
|
||||
.Bl -tag -width foo
|
||||
.It Dv NGM_FEC_ADD_IFACE Pq Ic add_iface
|
||||
Attach interface to the FEC group.
|
||||
The target interface name is passed as a string argument.
|
||||
.It Dv NGM_FEC_DEL_IFACE Pq Ic del_iface
|
||||
Remove interface from the trunk.
|
||||
The target interface name is passed as a string argument.
|
||||
.El
|
||||
.Pp
|
||||
The following control messages define the forwarding method for a node:
|
||||
.Bl -tag -width foo
|
||||
.It Dv NGM_FEC_SET_MODE_MAC Pq Ic set_mode_mac
|
||||
Forwarding decisions will be based on the link-layer MAC address of the destination.
|
||||
.It Dv NGM_FEC_SET_MODE_INET Pq Ic set_mode_inet
|
||||
Forwarding decisions will be based on the IP address of the destination.
|
||||
.El
|
||||
.Sh SHUTDOWN
|
||||
This node shuts down upon receipt of a
|
||||
.Dv NGM_SHUTDOWN
|
||||
control message.
|
||||
.Sh EXAMPLES
|
||||
The following example script creates an
|
||||
.Nm fec
|
||||
node, attaches four Ethernet interfaces to it and
|
||||
sets the forwarding method to be IP-address based:
|
||||
.Bd -literal -offset indent
|
||||
/usr/sbin/ngctl -f- << SEQ
|
||||
mkpeer fec dummy fec
|
||||
msg fec0: add_iface "dc0"
|
||||
msg fec0: add_iface "dc1"
|
||||
msg fec0: add_iface "dc2"
|
||||
msg fec0: add_iface "dc3"
|
||||
msg fec0: set_mode_inet
|
||||
SEQ
|
||||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.Xr netgraph 4
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm fec
|
||||
node type was implemented in
|
||||
.Fx 5.0 .
|
||||
.Sh AUTHORS
|
||||
.An -nosplit
|
||||
The
|
||||
.Nm fec
|
||||
node was written by
|
||||
.An "Bill Paul" Aq wpaul@FreeBSD.org .
|
||||
This manual page was written by
|
||||
.An "Gleb Smirnoff" Aq glebius@FreeBSD.org .
|
@ -18,7 +18,6 @@ SUBDIR= async \
|
||||
etf \
|
||||
ether \
|
||||
ether_echo \
|
||||
fec \
|
||||
frame_relay \
|
||||
gif \
|
||||
gif_demux \
|
||||
|
@ -1,8 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
KMOD= ng_fec
|
||||
SRCS= ng_fec.c opt_inet.h opt_inet6.h
|
||||
|
||||
CFLAGS += -DINET -DINET6
|
||||
|
||||
.include <bsd.kmod.mk>
|
File diff suppressed because it is too large
Load Diff
@ -1,113 +0,0 @@
|
||||
/*
|
||||
* ng_fec.h
|
||||
*/
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 Berkeley Software Design, Inc.
|
||||
* Copyright (c) 1997, 1998, 1999, 2000
|
||||
* Bill Paul <wpaul@osd.bsdi.com>. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Bill Paul.
|
||||
* 4. Neither the name of the author nor the names of any co-contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
/*-
|
||||
* Copyright (c) 1996-1999 Whistle Communications, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Subject to the following obligations and disclaimer of warranty, use and
|
||||
* redistribution of this software, in source or object code forms, with or
|
||||
* without modifications are expressly permitted by Whistle Communications;
|
||||
* provided, however, that:
|
||||
* 1. Any and all reproductions of the source or object code must include the
|
||||
* copyright notice above and the following disclaimer of warranties; and
|
||||
* 2. No rights are granted, in any manner or form, to use Whistle
|
||||
* Communications, Inc. trademarks, including the mark "WHISTLE
|
||||
* COMMUNICATIONS" on advertising, endorsements, or otherwise except as
|
||||
* such appears in the above copyright notice or in the software.
|
||||
*
|
||||
* THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
|
||||
* REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
|
||||
* WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
|
||||
* REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
|
||||
* SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
|
||||
* IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
|
||||
* RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
|
||||
* WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
||||
* PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*
|
||||
* Author: Archie Cobbs <archie@freebsd.org>
|
||||
*
|
||||
* $Whistle: ng_fec.h,v 1.5 1999/01/20 00:22:13 archie Exp $
|
||||
*/
|
||||
|
||||
#ifndef _NETGRAPH_NG_FEC_H_
|
||||
#define _NETGRAPH_NG_FEC_H_
|
||||
|
||||
#define NETISR_FEC 26
|
||||
|
||||
/* Node type name and magic cookie */
|
||||
#define NG_FEC_NODE_TYPE "fec"
|
||||
#define NGM_FEC_COOKIE 983566799
|
||||
|
||||
/* Interface base name */
|
||||
#define NG_FEC_FEC_NAME "fec"
|
||||
#define NG_FEC_FEC_NAME_MAX 15
|
||||
|
||||
/* MTU bounds */
|
||||
#define NG_FEC_MTU_MIN 72
|
||||
#define NG_FEC_MTU_MAX 65535
|
||||
#define NG_FEC_MTU_DEFAULT 1500
|
||||
|
||||
/* Special flags for mbufs. */
|
||||
#define M_FEC_MAC 0x2000
|
||||
#define M_FEC_INET 0x4000
|
||||
#define M_FEC_INET6 0x8000
|
||||
|
||||
/* Netgraph commands */
|
||||
enum {
|
||||
NGM_FEC_ADD_IFACE,
|
||||
NGM_FEC_DEL_IFACE,
|
||||
NGM_FEC_SET_MODE_MAC,
|
||||
NGM_FEC_SET_MODE_INET,
|
||||
NGM_FEC_SET_MODE_INET6
|
||||
};
|
||||
|
||||
struct ng_fec_ifname {
|
||||
char ngif_name[NG_FEC_FEC_NAME_MAX + 1];
|
||||
};
|
||||
|
||||
#endif /* _NETGRAPH_NG_FEC_H_ */
|
Loading…
Reference in New Issue
Block a user