stp.h
Go to the documentation of this file.
232 bool_t configPending; ///<A Configuration BPDU should be transmitted on expiry of the Hold Timer (8.5.5.9)
233 bool_t changeDetectionEnabled; ///<Detection of topology changes is enabled for the associated port(8.5.5.10)
264 StpBridgeId designatedRoot; ///<Unique identifier of the bridge assumed to be the Root (8.5.3.1)
266 uint16_t rootPort; ///<Port identifier of the port that offers the lowest cost path to the Root (8.5.3.3)
267 uint_t maxAge; ///<Maximum age of received protocol information before it is discarded (8.5.3.4)
269 uint_t forwardDelay; ///<Time spent in the Listening/Learning state before moving to the Learning/Forwarding state (8.5.3.6)
272 uint_t bridgeHelloTime; ///<Value of the Hello Time parameter when the bridge is the Root (8.5.3.9)
273 uint_t bridgeForwardDelay; ///<Value of the Forward Delay parameter when the bridge is the Root (8.5.3.10)
274 bool_t topologyChangeDetected; ///<A topology change has been detected by or notified to the bridge (8.5.3.11)
276 uint_t topologyChangeTime; ///<Time period for which Configuration messages indicate topology change (8.5.3.13)
error_t stpGetPortNum(StpBridgeContext *context, uint_t portIndex, uint16_t *value)
Get the port number assigned to the port.
Definition: stp.c:1193
error_t stpGetRootPathCost(StpBridgeContext *context, uint32_t *value)
Get the current cost of the path to the root.
Definition: stp.c:753
error_t stpGetPortDesignatedCost(StpBridgeContext *context, uint_t portIndex, uint32_t *value)
Get the designated cost of the port.
Definition: stp.c:1513
error_t stpGetRootPort(StpBridgeContext *context, uint16_t *value)
Get the current root port.
Definition: stp.c:785
error_t stpGetBridgeForwardDelay(StpBridgeContext *context, uint_t *value)
Get the assigned value of the Bridge Forward Delay parameter.
Definition: stp.c:625
error_t stpSetBridgeMaxAge(StpBridgeContext *context, uint_t value)
Set Bridge Max Age parameter.
Definition: stp.c:337
error_t stpGetBridgePriority(StpBridgeContext *context, uint16_t *value)
Get the assigned bridge priority.
Definition: stp.c:529
bool_t topologyChangeDetected
A topology change has been detected by or notified to the bridge (8.5.3.11)
Definition: stp.h:274
error_t stpGetAgeingTime(StpBridgeContext *context, uint_t *value)
Get the assigned value of the Ageing Time parameter.
Definition: stp.c:689
error_t stpGetBridgeHelloTime(StpBridgeContext *context, uint_t *value)
Get the assigned value of the Bridge Hello Time parameter.
Definition: stp.c:593
StpBridgeId designatedRoot
Unique identifier of the bridge recorded as the Root (8.5.5.4)
Definition: stp.h:227
error_t stpGetPortAddr(StpBridgeContext *context, uint_t portIndex, MacAddr *value)
Get the MAC address assigned to the port.
Definition: stp.c:1241
error_t stpGetTimeSinceTopologyChange(StpBridgeContext *context, uint_t *value)
Get the time since a topology change was last detected.
Definition: stp.c:945
STP common definitions.
error_t stpGetMaxAge(StpBridgeContext *context, uint_t *value)
Get the current Max Age value.
Definition: stp.c:817
error_t stpSetPortPathCost(StpBridgeContext *context, uint_t portIndex, uint32_t value)
Set administrative port path cost.
Definition: stp.c:1159
error_t stpSetBridgeForwardDelay(StpBridgeContext *context, uint_t value)
Set Bridge Forward Delay parameter.
Definition: stp.c:401
uint16_t rootPort
Port identifier of the port that offers the lowest cost path to the Root (8.5.3.3)
Definition: stp.h:266
uint_t maxAge
Maximum age of received protocol information before it is discarded (8.5.3.4)
Definition: stp.h:267
error_t stpGetPortDesignatedPort(StpBridgeContext *context, uint_t portIndex, uint16_t *value)
Get the port identifier of the designated bridge.
Definition: stp.c:1581
error_t stpInit(StpBridgeContext *context, StpBridgeSettings *settings)
Initialize STP bridge context.
Definition: stp.c:70
error_t stpSetAdminPortState(StpBridgeContext *context, uint_t portIndex, bool_t value)
Set administrative bridge port state.
Definition: stp.c:1125
uint_t forwardTransitions
Number of times the port has transitioned to Forwarding state.
Definition: stp.h:222
uint_t bridgeHelloTime
Value of the Hello Time parameter when the bridge is the Root (8.5.3.9)
Definition: stp.h:272
error_t stpGetDesignatedRoot(StpBridgeContext *context, StpBridgeId *value)
Get the bridge identifier of the root of the spanning tree.
Definition: stp.c:721
error_t stpGetAdminPortState(StpBridgeContext *context, uint_t portIndex, bool_t *value)
Get the administrative port state.
Definition: stp.c:1309
error_t stpGetForwardDelay(StpBridgeContext *context, uint_t *value)
Get the current Forward Delay value.
Definition: stp.c:881
error_t stpGetForwardTransitions(StpBridgeContext *context, uint_t portIndex, uint_t *value)
Get the number of times the port has transitioned to Forwarding state.
Definition: stp.c:1615
error_t stpGetHoldTime(StpBridgeContext *context, uint_t *value)
Get the assigned value of the Hold Time parameter.
Definition: stp.c:657
void stpGetDefaultSettings(StpBridgeSettings *settings)
Initialize settings with default values.
Definition: stp.c:51
StpBridgeId designatedRoot
Unique identifier of the bridge assumed to be the Root (8.5.3.1)
Definition: stp.h:264
BPDU processing.
error_t stpSetBridgeHelloTime(StpBridgeContext *context, uint_t value)
Set Bridge Hello Time parameter.
Definition: stp.c:369
error_t stpGetPortPathCost(StpBridgeContext *context, uint_t portIndex, uint32_t *value)
Get the current value of the port path cost.
Definition: stp.c:1377
bool_t changeDetectionEnabled
Detection of topology changes is enabled for the associated port(8.5.5.10)
Definition: stp.h:233
error_t stpSetPortPriority(StpBridgeContext *context, uint_t portIndex, uint8_t value)
Set port priority.
Definition: stp.c:1091
error_t stpGetNumPorts(StpBridgeContext *context, uint_t *value)
Get the number of ports.
Definition: stp.c:465
error_t stpGetBridgeAddr(StpBridgeContext *context, MacAddr *value)
Get the MAC address assigned to the bridge.
Definition: stp.c:497
error_t stpGetPortDesignatedBridge(StpBridgeContext *context, uint_t portIndex, StpBridgeId *value)
Get the bridge identifier of the designated bridge.
Definition: stp.c:1547
error_t stpSetPortAddr(StpBridgeContext *context, uint_t portIndex, const MacAddr *value)
Set port address.
Definition: stp.c:1040
uint_t helloTime
Time interval between the transmission of Configuration BPDUs (8.5.3.5)
Definition: stp.h:268
error_t stpGetPortState(StpBridgeContext *context, uint_t portIndex, StpPortState *value)
Get the current state of the port.
Definition: stp.c:1411
error_t stpGetTopologyChanges(StpBridgeContext *context, uint_t *value)
Get the number of topology changes.
Definition: stp.c:913
uint_t topologyChangeTime
Time period for which Configuration messages indicate topology change (8.5.3.13)
Definition: stp.h:276
uint_t bridgeForwardDelay
Value of the Forward Delay parameter when the bridge is the Root (8.5.3.10)
Definition: stp.h:273
error_t stpGetPortDesignatedRoot(StpBridgeContext *context, uint_t portIndex, StpBridgeId *value)
Get the bridge identifier of the designated root bridge.
Definition: stp.c:1479
error_t stpSetBridgePriority(StpBridgeContext *context, uint16_t value)
Set bridge priority.
Definition: stp.c:305
bool_t configPending
A Configuration BPDU should be transmitted on expiry of the Hold Timer (8.5.5.9)
Definition: stp.h:232
error_t stpGetHelloTime(StpBridgeContext *context, uint_t *value)
Get the current Hello Time value.
Definition: stp.c:849
error_t stpSetAgeingTime(StpBridgeContext *context, uint_t value)
Set Ageing Time parameter.
Definition: stp.c:433
error_t stpGetBridgeMaxAge(StpBridgeContext *context, uint_t *value)
Get the assigned value of the Bridge Max Age parameter.
Definition: stp.c:561
error_t stpGetPortPriority(StpBridgeContext *context, uint_t portIndex, uint8_t *value)
Get the priority assigned to the port.
Definition: stp.c:1275
error_t stpGetMacOperState(StpBridgeContext *context, uint_t portIndex, bool_t *value)
Get the current MAC operational state.
Definition: stp.c:1343
uint_t bridgeMaxAge
Value of the Max Age parameter when the bridge is the Root (8.5.3.8)
Definition: stp.h:271
uint_t forwardDelay
Time spent in the Listening/Learning state before moving to the Learning/Forwarding state (8....
Definition: stp.h:269
uint_t holdTime
Minimum time period between transmission of Configuration BPDUs (8.5.3.14)
Definition: stp.h:277
error_t stpSetPortNum(StpBridgeContext *context, uint_t portIndex, uint16_t value)
Set port number.
Definition: stp.c:979
error_t stpGetPortRole(StpBridgeContext *context, uint_t portIndex, StpPortRole *value)
Get the assigned role of the port.
Definition: stp.c:1445