* Introduction

BridgeSim is a simulation environment for studying the behavior of
ethernet bridging protocols.  Currently, RSTP (802.1w) is the only
bridging protocol supported.

BridgeSim is heavily based on rstplib version 1.1.02
(http://rstplib.sourceforge.net/) by Alex Rozin and Michael Rozhavsky.
Really, BridgeSim is just a thin veneer over rstplib.  Both rstplib and
BridgeSim are released under the GPL.

BridgeSim was developed by Andy Myers (acm at cs.cmu.edu) and
Dr. T. S. Eugene Ng of Rice University with code contributed by Anwis
Das, Sumit Mittal, Tsuen-Wan Ngan, and Ping Yuan.  Andy is the
maintainer.

You can find the latest version of BridgeSim at
http://www.cs.cmu.edu/~acm/bridgesim

* Compiling BridgeSim

BridgeSim has been tried on both Redhat 9 and Fedora Core 1.  If you
have good/bad experience with BridgeSim on other platforms, please
drop me (acm at cs.cmu.edu) a line.

./configure 
make

That should produce a binary, called bs (which is, obviously, an
acronym for Bridge Simulator).

* Files of interest

README - this file
TODO - a brief list of work 
ChangeLog - Record of what's changed lately
ScenarioCommands.txt - documentation of the simulator's input file
format
scenarios - a subdirectory with some input files for the simulator.

* Running BridgeSim

./bs -f scenarios/4nodeMesh -l output.log

This runs the simulator, setting up the topology in the file
scenarios/4nodeMesh and placing rstplib logging in output.log.

There's a subdirectory (called scenarios) that contains a few input
files for the simulator.  They all set up fully-connected meshes of
bridges and then kill off the root bridge.

See the file ScenarioCommands.txt for some documentation about the
scenario file format.

* Information about the code's structure

BridgeSim was created because I wanted a more full-featured simulation
environment than the one that is provided with rstplib.  While doing
this, I decided to translate the code into C++, since an object system
and access to C++'s STL seemed to simplify things.

BridgeSim instantiates all bridges in the same process.  This is a
large change from rstplib, but makes a lot of things easier.  For
instance, time has been fully virtualized, so (a) simulation outcome
doesn't depend on how fast the processor running the simulation is,
and (b) simulations can run faster than real time (we only need to
simulate the moments when stuff is happening).

Class hierarchy

Simulator
  Switch
    RapidSpanningTree (public spanning tree interface from rstplib)
      STPM (one VLAN's worth of spanning tree)
        RoleSelection state machine
        Port
           PortInfo
           RoleTransitions
           PortStateTransitions
           TopologyChange
           ProtocolMigration
           Transmit
           P2P
           Edge
           PathCost
