Connect if_bridge to the build.

Approved by:	mlaier (mentor)
This commit is contained in:
Andrew Thompson 2005-06-05 03:32:53 +00:00
parent 8f86751705
commit 7afc53b8df
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146987
7 changed files with 135 additions and 0 deletions

View File

@ -26,6 +26,8 @@ SRCS+= ifieee80211.c # SIOC[GS]IEEE80211 support
SRCS+= ifcarp.c # SIOC[GS]VH support
SRCS+= ifpfsync.c # pfsync(4) support
SRCS+= ifbridge.c # bridge support
.if !defined(RELEASE_CRUNCH)
SRCS+= af_ipx.c # IPX support
DPADD= ${LIBIPX}

View File

@ -870,6 +870,117 @@ Included for
compatibility.
.El
.Pp
The following parameters are specific to bridge interfaces:
.Bl -tag -width indent
.It Cm addm Ar interface
Add the interface named by
.Ar interface
as a member of the bridge.
The interface is put into promiscuous mode
so that it can receive every packet sent on the network.
.It Cm deletem Ar interface
Remove the interface named by
.Ar interface
from the bridge.
Promiscuous mode is disabled on the interface when
it is removed from the bridge.
.It Cm maxaddr Ar size
Set the size of the bridge address cache to
.Ar size .
The default is 100 entries.
.It Cm timeout Ar seconds
Set the timeout of address cache entries to
.Ar seconds
seconds.
If
.Ar seconds
is zero, then address cache entries will not be expired.
The default is 240 seconds.
.It Cm deladdr Ar address
Delete
.Ar address
from the address cache.
.It Cm flush
Delete all dynamically-learned addresses from the address cache.
.It Cm flushall
Delete all addresses, including static addresses, from the address cache.
.It Cm discover Ar interface
Mark an interface as a
.Dq discovering
interface.
When the bridge has no address cache entry
(either dynamic or static)
for the destination address of a packet,
the bridge will forward the packet to all
member interfaces marked as
.Dq discovering .
This is the default for all interfaces added to a bridge.
.It Cm -discover Ar interface
Clear the
.Dq discovering
attribute on a member interface.
For packets without the
.Dq discovering
attribute, the only packets forwarded on the interface are broadcast
or multicast packets and packets for which the destination address
is known to be on the interface's segment.
.It Cm learn Ar interface
Mark an interface as a
.Dq learning
interface.
When a packet arrives on such an interface, the source
address of the packet is entered into the address cache as being a
destination address on the interface's segment.
This is the default for all interfaces added to a bridge.
.It Cm -learn Ar interface
Clear the
.Dq learning
attribute on a member interface.
.It Cm stp Ar interface
Enable Spanning Tree protocol on
.Ar interface .
The
.Xr if_bridge 4
driver has support for the IEEE 802.1D Spanning Tree protocol (STP).
Spanning Tree is used to detect and remove loops in a network topology.
.It Cm -stp Ar interface
Disable Spanning Tree protocol on
.Ar interface .
This is the default for all interfaces added to a bridge.
.It Cm maxage Ar seconds
Set the time that a Spanning Tree protocol configuration is valid.
The default is 20 seconds.
The minimum is 1 second and the maximum is 255 seconds.
.It Cm fwddelay Ar seconds
Set the time that must pass before an interface begins forwarding
packets when Spanning Tree is enabled.
The default is 15 seconds.
The minimum is 1 second and the maximum is 255 seconds.
.It Cm hellotime Ar seconds
Set the time between broadcasting of Spanning Tree protocol
configuration messages.
The default is 2 seconds.
The minimum is 1 second and the maximum is 255 seconds.
.It Cm priority Ar value
Set the bridge priority for Spanning Tree.
The default is 32768.
The minimum is 0 and the maximum is 65536.
.It Cm ifpriority Ar interface Ar value
Set the Spanning Tree priority of
.Ar interface
to
.Ar value .
The default is 128.
The minimum is 0 and the maximum is 255.
.It Cm ifpathcost Ar interface Ar value
Set the Spanning Tree path cost of
.Ar interface
to
.Ar value .
The default is 55.
The minimum is 0 and the maximum is 65535.
.El
.Pp
The
.Nm
utility displays the current configuration for a network interface

View File

@ -100,6 +100,7 @@ MAN= aac.4 \
idt.4 \
ieee80211.4 \
ifmib.4 \
if_bridge.4 \
iic.4 \
iicbb.4 \
iicbus.4 \

View File

@ -641,6 +641,7 @@ device tap #Virtual Ethernet driver
device tun #Tunnel driver (ppp(8), nos-tun(8))
device sl #Serial Line IP
device gre #IP over IP tunneling
device if_bridge #Bridge interface
device pf #PF OpenBSD packet-filter firewall
device pflog #logging support interface for PF
device pfsync #synchronization interface for PF

View File

@ -1327,10 +1327,12 @@ net/bpf.c standard
net/bpf_filter.c optional bpf
net/bpf_filter.c optional netgraph_bpf
net/bridge.c optional bridge
net/bridgestp.c optional if_bridge
net/bsd_comp.c optional ppp_bsdcomp
net/if.c standard
net/if_arcsubr.c optional arcnet
net/if_atmsubr.c optional atm
net/if_bridge.c optional if_bridge
net/if_clone.c standard
net/if_disc.c optional disc
net/if_ef.c optional ef

View File

@ -98,6 +98,7 @@ SUBDIR= ${_3dfx} \
${_ida} \
${_idt} \
${_ie} \
if_bridge \
if_disc \
if_ef \
if_faith \

View File

@ -0,0 +1,17 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../net
KMOD= if_bridge
SRCS= if_bridge.c bridgestp.c opt_inet.h opt_inet6.h
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
opt_inet6.h:
.if defined(NOINET6)
echo > ${.TARGET}
.else
echo "#define INET6 1" > ${.TARGET}
.endif
.include <bsd.kmod.mk>