|
INET Framework for OMNeT++/OMNEST
|
Utility class for testing the STP protocol. More...
#include <STPTester.h>
Public Types | |
| enum | Color { WHITE, GRAY, BLACK } |
Public Member Functions | |
| STPTester () | |
| ~STPTester () | |
| virtual void | initialize () override |
| virtual void | handleMessage (cMessage *msg) override |
Protected Member Functions | |
| void | dfsVisit (Topology::Node *node) |
| bool | isForwarding (Topology::Node *node, unsigned int portNum) |
| void | depthFirstSearch () |
| bool | isLoopFreeGraph () |
| bool | isConnectedGraph () |
| bool | isTreeGraph () |
| int | getNumOfNodes () |
| int | getNumOfVisitedNodes () |
Protected Attributes | |
| bool | loop = false |
| int | numOfVisitedNodes = 0 |
| int | numOfNodes = 0 |
| std::map< Topology::Node *, int > | color |
| std::map< Topology::Node *, Topology::Node * > | parent |
| Topology | graph |
| simtime_t | checkTime |
| cMessage * | checkTimer = nullptr |
Utility class for testing the STP protocol.
First, it extracts the network topology (network nodes marked with the NED property), regarding the enabled (state=FORWARDING) links only. Then it analyzes the resulting graph for connectedness and loop free-ness, using a modified depth-first search with cycle detection. The results can be obtained with getter methods.
| inet::STPTester::~STPTester | ( | ) |
|
protected |
Referenced by handleMessage().
|
protected |
Referenced by depthFirstSearch().
|
protected |
|
protected |
|
overridevirtual |
|
overridevirtual |
|
protected |
Referenced by handleMessage().
|
protected |
Referenced by dfsVisit().
|
protected |
Referenced by handleMessage().
|
protected |
Referenced by handleMessage().
|
protected |
Referenced by handleMessage(), and initialize().
|
protected |
Referenced by initialize(), and ~STPTester().
|
protected |
Referenced by depthFirstSearch(), and dfsVisit().
|
protected |
Referenced by depthFirstSearch().
|
protected |
Referenced by depthFirstSearch(), dfsVisit(), isLoopFreeGraph(), and isTreeGraph().
|
protected |
Referenced by depthFirstSearch(), getNumOfNodes(), isConnectedGraph(), and isTreeGraph().
|
protected |
Referenced by depthFirstSearch(), dfsVisit(), getNumOfVisitedNodes(), isConnectedGraph(), and isTreeGraph().
|
protected |
Referenced by depthFirstSearch(), and dfsVisit().