|
INET Framework for OMNeT++/OMNEST
|
Implements the Spanning Tree Protocol.
More...
#include <Stp.h>
|
| | Stp () |
| |
| virtual | ~Stp () |
| |
| void | handleBPDU (Packet *packet, const Ptr< const BpduCfg > &bpdu) |
| |
| virtual void | initInterfacedata (unsigned int interfaceId) |
| |
| void | handleTCN (Packet *packet, const Ptr< const BpduTcn > &tcn) |
| | Topology change handling. More...
|
| |
| virtual void | handleMessageWhenUp (cMessage *msg) override |
| |
| virtual void | initialize (int stage) override |
| |
| virtual int | numInitStages () const override |
| |
| void | generateBPDU (int interfaceId, const MacAddress &address=MacAddress::STP_MULTICAST_ADDRESS, bool tcFlag=false, bool tcaFlag=false) |
| |
| void | generateHelloBPDUs () |
| |
| void | generateTCN () |
| |
| int | comparePorts (const Ieee8021dInterfaceData *portA, const Ieee8021dInterfaceData *portB) |
| |
| int | compareBridgeIDs (unsigned int aPriority, MacAddress aAddress, unsigned int bPriority, MacAddress bAddress) |
| |
| int | comparePortIDs (unsigned int aPriority, unsigned int aNum, unsigned int bPriority, unsigned int bNum) |
| |
| bool | isSuperiorBPDU (int interfaceId, const Ptr< const BpduCfg > &bpdu) |
| |
| void | setSuperiorBPDU (int interfaceId, const Ptr< const BpduCfg > &bpdu) |
| |
| void | handleTick () |
| |
| void | checkTimers () |
| |
| void | checkParametersChange () |
| |
| void | initPortTable () |
| |
| void | selectRootPort () |
| |
| void | selectDesignatedPorts () |
| |
| void | setAllDesignated () |
| |
| void | lostRoot () |
| |
| void | lostAlternate () |
| |
| void | reset () |
| |
| bool | checkRootEligibility () |
| |
| void | tryRoot () |
| |
| | StpBase () |
| |
| virtual bool | isInitializeStage (int stage) const override |
| |
| virtual bool | isModuleStartStage (int stage) const override |
| |
| virtual bool | isModuleStopStage (int stage) const override |
| |
| virtual void | handleStartOperation (LifecycleOperation *operation) override |
| |
| virtual void | handleStopOperation (LifecycleOperation *operation) override |
| |
| virtual void | handleCrashOperation (LifecycleOperation *operation) override |
| |
| virtual void | receiveSignal (cComponent *source, simsignal_t signalID, cObject *obj, cObject *details) override |
| |
| virtual | ~OperationalMixin () |
| | }@ More...
|
| |
| virtual | ~ILifecycle () |
| |
Implements the Spanning Tree Protocol.
See the NED file for details.
◆ PortInfo
◆ Stp()
◆ ~Stp()
51 cancelAndDelete(
tick);
◆ checkParametersChange()
| void inet::Stp::checkParametersChange |
( |
| ) |
|
◆ checkRootEligibility()
| bool inet::Stp::checkRootEligibility |
( |
| ) |
|
414 for (
unsigned int i = 0; i <
numPorts; i++) {
415 int interfaceId =
ifTable->getInterface(i)->getInterfaceId();
Referenced by tryRoot().
◆ checkTimers()
| void inet::Stp::checkTimers |
( |
| ) |
|
335 Ieee8021dInterfaceData *port;
347 for (
unsigned int i = 0; i <
numPorts; i++) {
348 int interfaceId =
ifTable->getInterface(i)->getInterfaceId();
352 EV_DETAIL <<
"Port=" << i <<
" reached its maximum age. Setting it to the default port info." << endl;
365 for (
unsigned int i = 0; i <
numPorts; i++) {
366 int interfaceId =
ifTable->getInterface(i)->getInterfaceId();
372 switch (port->getState()) {
374 EV_DETAIL <<
"Port=" << interfaceId <<
" goes into learning state." << endl;
380 EV_DETAIL <<
"Port=" << interfaceId <<
" goes into forwarding state." << endl;
392 EV_DETAIL <<
"Port=" << interfaceId <<
" goes into discarding state." << endl;
Referenced by handleTick().
◆ compareBridgeIDs()
| int inet::Stp::compareBridgeIDs |
( |
unsigned int |
aPriority, |
|
|
MacAddress |
aAddress, |
|
|
unsigned int |
bPriority, |
|
|
MacAddress |
bAddress |
|
) |
| |
447 if (aPriority < bPriority)
449 else if (aPriority > bPriority)
453 if (aAddress.compareTo(bAddress) == -1)
455 else if (aAddress.compareTo(bAddress) == 1)
Referenced by checkRootEligibility(), and comparePorts().
◆ comparePortIDs()
| int inet::Stp::comparePortIDs |
( |
unsigned int |
aPriority, |
|
|
unsigned int |
aNum, |
|
|
unsigned int |
bPriority, |
|
|
unsigned int |
bNum |
|
) |
| |
466 if (aPriority < bPriority)
469 else if (aPriority > bPriority)
476 else if (aNum > bNum)
Referenced by comparePorts().
◆ comparePorts()
487 result =
compareBridgeIDs(portA->getRootPriority(), portA->getRootAddress(), portB->getRootPriority(),
488 portB->getRootAddress());
494 if (portA->getRootPathCost() < portB->getRootPathCost())
497 if (portA->getRootPathCost() > portB->getRootPathCost())
501 result =
compareBridgeIDs(portA->getBridgePriority(), portA->getBridgeAddress(), portB->getBridgePriority(),
502 portB->getBridgeAddress());
509 result =
comparePortIDs(portA->getPortPriority(), portA->getPortNum(), portB->getPortPriority(), portB->getPortNum());
Referenced by isSuperiorBPDU(), selectDesignatedPorts(), and selectRootPort().
◆ generateBPDU()
166 Packet *packet =
new Packet(
"BPDU");
167 const auto& bpdu = makeShared<BpduCfg>();
168 auto macAddressReq = packet->addTag<MacAddressReq>();
170 macAddressReq->setDestAddress(address);
171 packet->addTag<
InterfaceReq>()->setInterfaceId(interfaceId);
183 bpdu->setPortNum(interfaceId);
185 bpdu->setMessageAge(0);
192 bpdu->setTcFlag(
true);
193 bpdu->setTcaFlag(
false);
196 bpdu->setTcFlag(
false);
197 bpdu->setTcaFlag(
true);
201 packet->insertAtBack(bpdu);
202 send(packet,
"relayOut");
Referenced by generateHelloBPDUs(), handleBPDU(), and handleTCN().
◆ generateHelloBPDUs()
| void inet::Stp::generateHelloBPDUs |
( |
| ) |
|
293 EV_INFO <<
"It is hello time. Root switch sending hello BPDUs on all its ports." << endl;
296 for (
unsigned int i = 0; i <
numPorts; i++) {
297 int interfaceId =
ifTable->getInterface(i)->getInterfaceId();
Referenced by checkTimers().
◆ generateTCN()
| void inet::Stp::generateTCN |
( |
| ) |
|
212 Packet *packet =
new Packet(
"BPDU-TCN");
213 const auto& tcn = makeShared<BpduTcn>();
217 auto macAddressReq = packet->addTag<MacAddressReq>();
224 packet->insertAtBack(tcn);
225 EV_INFO <<
"The topology has changed. Sending Topology Change Notification BPDU " << tcn <<
" to the Root Switch." << endl;
226 send(packet,
"relayOut");
Referenced by handleTick().
◆ handleBPDU()
| void inet::Stp::handleBPDU |
( |
Packet * |
packet, |
|
|
const Ptr< const BpduCfg > & |
bpdu |
|
) |
| |
94 int arrivalGate = packet->getTag<InterfaceInd>()->getInterfaceId();
97 if (bpdu->getTcaFlag()) {
105 EV_DETAIL <<
"Inferior Configuration BPDU " << bpdu <<
" arrived on port=" << arrivalGate <<
" responding to it with a superior BPDU." << endl;
111 EV_INFO <<
"Configuration BPDU " << bpdu <<
" arrived from Root Switch." << endl;
113 if (bpdu->getTcFlag()) {
114 EV_DEBUG <<
"MacForwardingTable aging time set to " <<
currentFwdDelay <<
"." << endl;
124 EV_INFO <<
"Sending BPDUs on all designated ports." << endl;
Referenced by handleMessageWhenUp().
◆ handleMessageWhenUp()
| void inet::Stp::handleMessageWhenUp |
( |
cMessage * |
msg | ) |
|
|
overridevirtual |
Implements inet::OperationalMixin< cSimpleModule >.
67 if (!msg->isSelfMessage()) {
68 Packet *packet = check_and_cast<Packet *>(msg);
69 const auto& bpdu = packet->peekAtFront<BpduBase>();
71 switch (bpdu->getBpduType()) {
76 handleTCN(packet,
CHK(dynamicPtrCast<const BpduTcn>(bpdu)));
79 throw cRuntimeError(
"unknown BPDU TYPE: %d", bpdu->getBpduType());
85 scheduleAfter(1,
tick);
88 throw cRuntimeError(
"Unknown self-message received");
◆ handleTCN()
| void inet::Stp::handleTCN |
( |
Packet * |
packet, |
|
|
const Ptr< const BpduTcn > & |
tcn |
|
) |
| |
Topology change handling.
138 EV_INFO <<
"Topology Change Notification BPDU " << tcn <<
" arrived." << endl;
141 int arrivalGate = packet->getTag<InterfaceInd>()->getInterfaceId();
142 const auto& addressInd = packet->getTag<MacAddressInd>();
143 MacAddress srcAddress = addressInd->getSrcAddress();
144 MacAddress destAddress = addressInd->getDestAddress();
147 EV_INFO <<
"Sending Topology Change Notification ACK." << endl;
151 Packet *outPacket =
new Packet(packet->getName());
152 outPacket->insertAtBack(tcn);
154 auto macAddressReq = outPacket->addTag<MacAddressReq>();
156 macAddressReq->setDestAddress(destAddress);
159 send(outPacket,
"relayOut");
Referenced by handleMessageWhenUp().
◆ handleTick()
| void inet::Stp::handleTick |
( |
| ) |
|
310 for (
unsigned int i = 0; i <
numPorts; i++) {
311 int interfaceId =
ifTable->getInterface(i)->getInterfaceId();
320 EV_DEBUG <<
"Message Age timer incremented on port=" << interfaceId << endl;
324 EV_DEBUG <<
"Forward While timer incremented on port=" << interfaceId << endl;
Referenced by handleMessageWhenUp().
◆ initialize()
| void inet::Stp::initialize |
( |
int |
stage | ) |
|
|
overridevirtual |
Reimplemented from inet::StpBase.
34 tick =
new cMessage(
"STP_TICK", 0);
40 for (
int i = 0; i <
ifTable->getNumInterfaces(); i++) {
42 if (!
ie->isLoopback() &&
ie->isWired() &&
ie->isMulticast() ) {
◆ initInterfacedata()
| void inet::Stp::initInterfacedata |
( |
unsigned int |
interfaceId | ) |
|
|
virtual |
◆ initPortTable()
| void inet::Stp::initPortTable |
( |
| ) |
|
56 EV_DEBUG <<
"IEE8021D Interface Data initialization. Setting port infos to the protocol defaults." << endl;
57 for (
unsigned int i = 0; i <
numPorts; i++) {
59 if (!
ie->isLoopback() &&
ie->isWired() &&
ie->isMulticast() ) {
Referenced by start().
◆ isSuperiorBPDU()
| bool inet::Stp::isSuperiorBPDU |
( |
int |
interfaceId, |
|
|
const Ptr< const BpduCfg > & |
bpdu |
|
) |
| |
234 Ieee8021dInterfaceData *xBpdu =
new Ieee8021dInterfaceData();
238 xBpdu->setRootPriority(bpdu->getRootPriority());
239 xBpdu->setRootAddress(bpdu->getRootAddress());
240 xBpdu->setRootPathCost(bpdu->getRootPathCost() + port->getLinkCost());
241 xBpdu->setBridgePriority(bpdu->getBridgePriority());
242 xBpdu->setBridgeAddress(bpdu->getBridgeAddress());
243 xBpdu->setPortPriority(bpdu->getPortPriority());
244 xBpdu->setPortNum(bpdu->getPortNum());
Referenced by handleBPDU().
◆ lostAlternate()
| void inet::Stp::lostAlternate |
( |
| ) |
|
◆ lostRoot()
| void inet::Stp::lostRoot |
( |
| ) |
|
◆ numInitStages()
| virtual int inet::Stp::numInitStages |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ reset()
| void inet::Stp::reset |
( |
| ) |
|
◆ selectDesignatedPorts()
| void inet::Stp::selectDesignatedPorts |
( |
| ) |
|
565 Ieee8021dInterfaceData *bridgeGlobal =
new Ieee8021dInterfaceData();
573 for (
unsigned int i = 0; i <
numPorts; i++) {
574 NetworkInterface *
ie =
ifTable->getInterface(i);
575 auto portData =
ie->getProtocolDataForUpdate<Ieee8021dInterfaceData>();
576 ASSERT(portData !=
nullptr);
581 bridgeGlobal->setPortPriority(portData->getPriority());
582 int interfaceId =
ie->getInterfaceId();
583 bridgeGlobal->setPortNum(interfaceId);
585 bridgeGlobal->setRootPathCost(
rootPathCost + portData->getLinkCost());
590 EV_DETAIL <<
"Port=" <<
ie->getFullName() <<
" is elected as designated portData." << endl;
596 EV_DETAIL <<
"Port=" <<
ie->getFullName() <<
" goes into alternate role." << endl;
Referenced by lostAlternate(), and tryRoot().
◆ selectRootPort()
| void inet::Stp::selectRootPort |
( |
| ) |
|
521 unsigned int xRootIdx = 0;
523 auto best =
ifTable->getInterface(0)->getProtocolData<Ieee8021dInterfaceData>();
524 Ieee8021dInterfaceData *currentPort =
nullptr;
526 for (
unsigned int i = 0; i <
numPorts; i++) {
527 currentPort =
ifTable->getInterface(i)->getProtocolDataForUpdate<Ieee8021dInterfaceData>();
538 if (currentPort->getPriority() < best->getPriority()) {
545 unsigned int xRootInterfaceId =
ifTable->getInterface(xRootIdx)->getInterfaceId();
547 EV_DETAIL <<
"Port=" << xRootInterfaceId <<
" selected as root port." << endl;
Referenced by tryRoot().
◆ setAllDesignated()
| void inet::Stp::setAllDesignated |
( |
| ) |
|
607 EV_DETAIL <<
"All ports become designated." << endl;
610 for (
unsigned int i = 0; i <
numPorts; i++) {
611 NetworkInterface *
ie =
ifTable->getInterface(i);
612 auto portData =
ie->getProtocolDataForUpdate<Ieee8021dInterfaceData>();
613 ASSERT(portData !=
nullptr);
617 int interfaceId =
ie->getInterfaceId();
Referenced by reset(), start(), and tryRoot().
◆ setSuperiorBPDU()
| void inet::Stp::setSuperiorBPDU |
( |
int |
interfaceId, |
|
|
const Ptr< const BpduCfg > & |
bpdu |
|
) |
| |
271 if (bpdu->getMessageAge() >= bpdu->getMaxAge())
276 portData->setRootPriority(bpdu->getRootPriority());
277 portData->setRootAddress(bpdu->getRootAddress());
278 portData->setRootPathCost(bpdu->getRootPathCost() + portData->getLinkCost());
279 portData->setBridgePriority(bpdu->getBridgePriority());
280 portData->setBridgeAddress(bpdu->getBridgeAddress());
281 portData->setPortPriority(bpdu->getPortPriority());
282 portData->setPortNum(bpdu->getPortNum());
283 portData->setMaxAge(bpdu->getMaxAge());
284 portData->setFwdDelay(bpdu->getForwardDelay());
285 portData->setHelloTime(bpdu->getHelloTime());
Referenced by isSuperiorBPDU().
◆ start()
| void inet::Stp::start |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ stop()
◆ tryRoot()
| void inet::Stp::tryRoot |
( |
| ) |
|
◆ operator<< [1/4]
◆ operator<< [2/4]
◆ operator<< [3/4]
209 if (p->isForwarding())
215 os <<
" " << p->getRole() <<
" " << p->getState() <<
" ";
216 os << p->getLinkCost() <<
" ";
217 os << p->getPriority() <<
" ";
◆ operator<< [4/4]
| std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
Stp |
i |
|
) |
| |
|
friend |
224 os <<
"RootID Priority: " << i.rootPriority <<
" \n";
225 os <<
" Address: " << i.rootAddress <<
" \n";
227 os <<
" This bridge is the Root. \n";
229 os <<
" Cost: " << i.rootPathCost <<
" \n";
230 os <<
" Port: " << i.rootInterfaceId <<
" \n";
232 os <<
" Hello Time: " << i.currentHelloTime <<
" \n";
233 os <<
" Max Age: " << i.currentMaxAge <<
" \n";
234 os <<
" Forward Delay: " << i.currentFwdDelay <<
" \n";
235 os <<
"BridgeID Priority: " << i.bridgePriority <<
"\n";
236 os <<
" Address: " << i.bridgeAddress <<
" \n";
237 os <<
" Hello Time: " << i.helloTime <<
" \n";
238 os <<
" Max Age: " << i.maxAge <<
" \n";
239 os <<
" Forward Delay: " << i.forwardDelay <<
" \n";
240 os <<
"Port Flag Role State Cost Priority \n";
241 os <<
"-----------------------------------------\n";
243 for (
unsigned int x = 0; x < i.numPorts; x++)
244 os << x <<
" " << i.getPortInterfaceData(x) <<
" \n";
◆ currentBridgePriority
| unsigned int inet::Stp::currentBridgePriority = 0 |
|
protected |
◆ currentFwdDelay
| simtime_t inet::Stp::currentFwdDelay |
|
protected |
◆ currentHelloTime
| simtime_t inet::Stp::currentHelloTime |
|
protected |
◆ currentMaxAge
| simtime_t inet::Stp::currentMaxAge |
|
protected |
◆ defaultPort
◆ desPorts
| std::vector<unsigned int> inet::Stp::desPorts |
|
protected |
◆ helloTime
| simtime_t inet::Stp::helloTime |
|
protected |
◆ isRoot
| bool inet::Stp::isRoot = false |
|
protected |
◆ rootAddress
◆ rootInterfaceId
| unsigned int inet::Stp::rootInterfaceId = 0 |
|
protected |
◆ rootPathCost
| unsigned int inet::Stp::rootPathCost = 0 |
|
protected |
◆ rootPriority
| unsigned int inet::Stp::rootPriority = 0 |
|
protected |
◆ tick
| cMessage* inet::Stp::tick = nullptr |
|
protected |
◆ tickInterval
| const double inet::Stp::tickInterval = 1 |
|
staticprotected |
◆ topologyChangeNotification
| bool inet::Stp::topologyChangeNotification = false |
|
protected |
◆ topologyChangeRecvd
| bool inet::Stp::topologyChangeRecvd = false |
|
protected |
The documentation for this class was generated from the following files:
#define CHK(x)
Definition: INETDefs.h:87
simtime_t currentHelloTime
Definition: Stp.h:46
int comparePorts(const Ieee8021dInterfaceData *portA, const Ieee8021dInterfaceData *portB)
Definition: Stp.cc:483
static const Protocol stp
Definition: Protocol.h:111
void initPortTable()
Definition: Stp.cc:54
opp_component_ptr< NetworkInterface > ie
Definition: StpBase.h:39
void handleTCN(Packet *packet, const Ptr< const BpduTcn > &tcn)
Topology change handling.
Definition: Stp.cc:136
unsigned int bridgePriority
Definition: StpBase.h:29
Ieee8021dInterfaceData * getPortInterfaceDataForUpdate(unsigned int interfaceId)
Definition: StpBase.cc:140
simtime_t helloTime
Definition: Stp.h:47
@ DESIGNATED
Definition: Ieee8021dInterfaceData.h:24
@ ROOT
Definition: Ieee8021dInterfaceData.h:24
void generateTCN()
Definition: Stp.cc:205
unsigned int rootInterfaceId
Definition: Stp.h:36
std::vector< unsigned int > desPorts
Definition: Stp.h:37
removed InterfaceReq
Definition: IUdp-gates.txt:11
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down DispatchProtocolReq
Definition: IUdp-gates.txt:25
bool isRoot
Definition: Stp.h:35
void selectRootPort()
Definition: Stp.cc:518
void reset()
Definition: Stp.cc:635
virtual void initInterfacedata(unsigned int interfaceId)
Definition: Stp.cc:678
void lostRoot()
Definition: Stp.cc:623
void generateBPDU(int interfaceId, const MacAddress &address=MacAddress::STP_MULTICAST_ADDRESS, bool tcFlag=false, bool tcaFlag=false)
Definition: Stp.cc:164
unsigned int rootPathCost
Definition: Stp.h:40
static const MacAddress STP_MULTICAST_ADDRESS
The spanning tree protocol bridge's multicast address, 01:80:C2:00:00:00.
Definition: MacAddress.h:40
int compareBridgeIDs(unsigned int aPriority, MacAddress aAddress, unsigned int bPriority, MacAddress bAddress)
Definition: Stp.cc:445
simtime_t forwardDelay
Definition: StpBase.h:34
@ DISCARDING
Definition: Ieee8021dInterfaceData.h:26
static const Protocol ieee8022llc
Definition: Protocol.h:88
void handleTick()
Definition: Stp.cc:302
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down PacketProtocolTag
Definition: IUdp-gates.txt:25
void setRole(PortRole role)
Definition: Ieee8021dInterfaceData.h:126
void tryRoot()
Definition: Stp.cc:425
value< double, units::s > s
Definition: Units.h:1235
static const double tickInterval
Definition: Stp.h:34
void handleBPDU(Packet *packet, const Ptr< const BpduCfg > &bpdu)
Definition: Stp.cc:92
MacAddress bridgeAddress
Definition: StpBase.h:30
ModuleRefByPar< IInterfaceTable > ifTable
Definition: StpBase.h:38
@ SPANNING_TREE
Definition: Ieee8021dBpdu_m.h:76
cMessage * tick
Definition: Stp.h:56
@ FORWARDING
Definition: Ieee8021dInterfaceData.h:26
bool topologyChangeNotification
Definition: Stp.h:52
void setSuperiorBPDU(int interfaceId, const Ptr< const BpduCfg > &bpdu)
Definition: Stp.cc:268
bool topologyChangeRecvd
Definition: Stp.h:53
@ BPDU_CFG
Definition: Ieee8021dBpdu_m.h:96
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
@ DISABLED
Definition: Ieee8021dInterfaceData.h:24
const Ieee8021dInterfaceData * getPortInterfaceData(unsigned int interfaceId) const
Gets Ieee8021dInterfaceData for interface ID.
Definition: StpBase.cc:135
void checkParametersChange()
Definition: Stp.cc:399
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
unsigned int currentBridgePriority
Definition: Stp.h:50
void checkTimers()
Definition: Stp.cc:333
simtime_t currentMaxAge
Definition: Stp.h:44
void setAllDesignated()
Definition: Stp.cc:604
virtual void start()
Definition: StpBase.cc:48
void lostAlternate()
Definition: Stp.cc:629
@ NOTASSIGNED
Definition: Ieee8021dInterfaceData.h:24
virtual void initialize(int stage) override
Definition: StpBase.cc:25
bool isSuperiorBPDU(int interfaceId, const Ptr< const BpduCfg > &bpdu)
Definition: Stp.cc:231
MacAddress rootAddress
Definition: Stp.h:42
simtime_t currentFwdDelay
Definition: Stp.h:45
@ ALTERNATE
Definition: Ieee8021dInterfaceData.h:24
simtime_t maxAge
Definition: StpBase.h:32
@ SPANNING_TREE_PROTOCOL
Definition: Ieee8021dBpdu_m.h:58
int comparePortIDs(unsigned int aPriority, unsigned int aNum, unsigned int bPriority, unsigned int bNum)
Definition: Stp.cc:464
unsigned int rootPriority
Definition: Stp.h:41
ModuleRefByPar< IMacForwardingTable > macTable
Definition: StpBase.h:37
void selectDesignatedPorts()
Definition: Stp.cc:561
unsigned int numPorts
Definition: StpBase.h:27
void registerProtocol(const Protocol &protocol, cGate *gate, ServicePrimitive servicePrimitive)
Registers a protocol primitive (PDU processing) at the given gate.
Definition: IProtocolRegistrationListener.cc:83
@ BPDU_TCN
Definition: Ieee8021dBpdu_m.h:97
bool checkRootEligibility()
Definition: Stp.cc:412
INET_API InitStage INITSTAGE_LINK_LAYER
Initialization of link-layer protocols.
@ LEARNING
Definition: Ieee8021dInterfaceData.h:26
void generateHelloBPDUs()
Definition: Stp.cc:291
virtual void stop()
Definition: StpBase.cc:58