summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2005-06-05 03:32:53 +0000
committerthompsa <thompsa@FreeBSD.org>2005-06-05 03:32:53 +0000
commite8bfe6c2484cd442ddb34018bd3819dd264ce091 (patch)
treee8a945a182303d69c5dda0c9dee1231a515c6530
parent6c5bdda300f45e4abacd6f3dbf4663bbfdfefa35 (diff)
downloadFreeBSD-src-e8bfe6c2484cd442ddb34018bd3819dd264ce091.zip
FreeBSD-src-e8bfe6c2484cd442ddb34018bd3819dd264ce091.tar.gz
Connect if_bridge to the build.
Approved by: mlaier (mentor)
-rw-r--r--sbin/ifconfig/Makefile2
-rw-r--r--sbin/ifconfig/ifconfig.8111
-rw-r--r--share/man/man4/Makefile1
-rw-r--r--sys/conf/NOTES1
-rw-r--r--sys/conf/files2
-rw-r--r--sys/modules/Makefile1
-rw-r--r--sys/modules/if_bridge/Makefile17
7 files changed, 135 insertions, 0 deletions
diff --git a/sbin/ifconfig/Makefile b/sbin/ifconfig/Makefile
index c90f0f6..7d00149 100644
--- a/sbin/ifconfig/Makefile
+++ b/sbin/ifconfig/Makefile
@@ -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}
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index 8c1f2ce..6c5edd2 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -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
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 3dc8782..5780036 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -100,6 +100,7 @@ MAN= aac.4 \
idt.4 \
ieee80211.4 \
ifmib.4 \
+ if_bridge.4 \
iic.4 \
iicbb.4 \
iicbus.4 \
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index 480ccab..a8dd7c7 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -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
diff --git a/sys/conf/files b/sys/conf/files
index 8ad7c01..cedc74e 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -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
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index e27a13d..4d1cc2a 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -98,6 +98,7 @@ SUBDIR= ${_3dfx} \
${_ida} \
${_idt} \
${_ie} \
+ if_bridge \
if_disc \
if_ef \
if_faith \
diff --git a/sys/modules/if_bridge/Makefile b/sys/modules/if_bridge/Makefile
new file mode 100644
index 0000000..8af88f8
--- /dev/null
+++ b/sys/modules/if_bridge/Makefile
@@ -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>
OpenPOWER on IntegriCloud