summaryrefslogtreecommitdiffstats
path: root/sys/net/bridgestp.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix spelling.thompsa2007-12-091-1/+1
| | | | Obtained from: OpenBSD
* - Ensure the path cost does not exceed 65535 in legacy STP mode.thompsa2007-08-041-0/+1
| | | | | | | | | - If the path cost is calculated when the link is down, set a pending flag so it is calculated again when it comes back up. - To not use 00:00:00:00:00:00 as the bridge id, all interfaces are scanned and the lowest number wins. All zeros is too low. Approved by: re (rwatson)
* Change the passing of callbacks to a struct in case this needs to be ↵thompsa2007-03-091-1/+5
| | | | extended in the future.
* These days P2P means peer-2-peer (also well known from serveral filesharingthompsa2006-12-111-4/+4
| | | | | | | protocols) while PointToPoint has been PtP links. Change the variables accordingly while the code is still fresh and undocumented. Requested by: bz
* Add two new flags to if_bridge(4) indicating whether the edge flagsyrinx2006-12-041-0/+1
| | | | | | | | | | | | | | of the bridge port and path cost have been administratively set or calculated automatically by RSTP. Make sure to transition from non-edge to edge when the port goes down and the edge flag was manually set before. This is needed to comply with the condition ((!portEnabled && AdminEdge) || ....) in the Bridge Detection State Machine (IEE802.1D-2004, p. 171). Reviewed by: thompsa Approved by: bz (mentor)
* fix typo in last commitimp2006-12-011-1/+1
|
* Use FreeBDS standard __packed as opposed to the gcc centricimp2006-12-011-2/+2
| | | | __attribute__(__packed__).
* Sync with the OpenBSD port of RSTPthompsa2006-11-271-0/+3
| | | | | | | | | - use flags rather than sperate ioctls for edge, p2p - implement p2p and autop2p flags - define large pathcost constant as ULL - show bridgeid and rootid in ifconfig Obtained from: Reyk Floeter <reyk@openbsd.org>
* use two stage creation of stp ports, this means that the stp variables can bethompsa2006-11-261-3/+4
| | | | set before the port is marked STP and they will no longer be overwrittten
* MFp4thompsa2006-11-091-0/+1
| | | | | | | | | | | | - Each stp port is added sequentially so it was possible for our bridgeid to change every time because the new port has a lower MAC address. Instead just find the lowest MAC address from all Ethernet adapters in the machine as the value only needs to be unique, this stops a lot of churn on the protocol. - Update the states after enabling or disabling a port. - Keep tabs if we have been stopped or started by our parent bridge. - The callout only needs to be drained before destroying the mutex, move it to bstp_detach.
* Bring in support for the Rapid Spanning Tree Protocol (802.1w).thompsa2006-11-011-51/+170
| | | | | | | | | | RSTP provides faster spanning tree convergence, the protocol will exchange information with neighboring switches to quickly transition to forwarding without creating loops. The code will default to RSTP mode but will downgrade any port connected to a legacy STP network so is fully backward compatible. Reviewed by: syrinx Tested by: syrinx
* Add a callback so we can notify the parent bridge that a port state change hasthompsa2006-08-021-1/+9
| | | | | occured, we need to do this from a taskqueue to avoid a LOR with the if_bridge mutex.
* Add some statistics that are needed to support RFC4188 as part of the SoC2006thompsa2006-07-311-0/+2
| | | | | | work on a bridge monitoring module for BSNMP. Submitted by: shteryana (SoC 2006)
* /tmp/cvsuusTrcthompsa2006-07-261-0/+256
OpenPOWER on IntegriCloud