stp.c
error_t stpMgmtGetAdminPortState(StpBridgeContext *context, uint_t portIndex, bool_t *value)
Get the administrative port state.
Definition: stp_mgmt.c:999
error_t ethAcceptMacAddr(NetInterface *interface, const MacAddr *macAddr)
Add a unicast/multicast address to the MAC filter table.
Definition: ethernet.c:594
void stpUnconfigurePermanentDatabase(StpBridgeContext *context)
Unconfigure the permanent database.
Definition: stp_misc.c:606
error_t stpMgmtGetRootPathCost(StpBridgeContext *context, uint32_t *value)
Get the current cost of the path to the root.
Definition: stp_mgmt.c:545
void stpUpdateAgeingTime(StpBridgeContext *context, uint32_t ageingTime)
Set ageing time for dynamic filtering entries.
Definition: stp_misc.c:427
error_t stpGetMacOperState(StpBridgeContext *context, uint_t portIndex, bool_t *value)
Get the current MAC operational state.
Definition: stp.c:1343
error_t stpMgmtGetForwardDelay(StpBridgeContext *context, uint_t *value)
Get the current Forward Delay value.
Definition: stp_mgmt.c:633
error_t stpGetDesignatedRoot(StpBridgeContext *context, StpBridgeId *value)
Get the bridge identifier of the root of the spanning tree.
Definition: stp.c:721
error_t stpGetNumPorts(StpBridgeContext *context, uint_t *value)
Get the number of ports.
Definition: stp.c:465
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 stpMgmtGetPortPriority(StpBridgeContext *context, uint_t portIndex, uint8_t *value)
Get the priority assigned to the port.
Definition: stp_mgmt.c:967
error_t stpGetRootPathCost(StpBridgeContext *context, uint32_t *value)
Get the current cost of the path to the root.
Definition: stp.c:753
error_t stpGetPortRole(StpBridgeContext *context, uint_t portIndex, StpPortRole *value)
Get the assigned role of the port.
Definition: stp.c:1445
error_t stpGetBridgeForwardDelay(StpBridgeContext *context, uint_t *value)
Get the assigned value of the Bridge Forward Delay parameter.
Definition: stp.c:625
void stpLock(StpBridgeContext *context)
Acquire exclusive access to the STP bridge context.
Definition: stp_misc.c:59
error_t stpInit(StpBridgeContext *context, StpBridgeSettings *settings)
Initialize STP bridge context.
Definition: stp.c:70
error_t stpMgmtGetPortRole(StpBridgeContext *context, uint_t portIndex, StpPortRole *value)
Get the assigned role of the port.
Definition: stp_mgmt.c:1171
error_t stpSetPortAddr(StpBridgeContext *context, uint_t portIndex, const MacAddr *value)
Set port address.
Definition: stp.c:1040
void stpUpdatePortState(StpBridgePort *port, StpPortState state)
Set port state.
Definition: stp_misc.c:358
error_t netAttachTimerCallback(systime_t period, NetTimerCallback callback, void *param)
Register timer callback.
Definition: net_misc.c:347
error_t stpMgmtGetHoldTime(StpBridgeContext *context, uint_t *value)
Get the assigned value of the Hold Time parameter.
Definition: stp_mgmt.c:481
error_t stpSetPortPathCost(StpBridgeContext *context, uint_t portIndex, uint32_t value)
Set administrative port path cost.
Definition: stp.c:1159
error_t stpMgmtGetTopologyChanges(StpBridgeContext *context, uint_t *value)
Get the number of topology changes.
Definition: stp_mgmt.c:655
error_t stpMgmtGetMacOperState(StpBridgeContext *context, uint_t portIndex, bool_t *value)
Get the current MAC operational state.
Definition: stp_mgmt.c:1031
error_t stpMgmtGetRootPort(StpBridgeContext *context, uint16_t *value)
Get the current root port.
Definition: stp_mgmt.c:566
error_t stpMgmtSetPortPriority(StpBridgeContext *context, uint_t portIndex, uint8_t value, bool_t commit)
Set port priority.
Definition: stp_mgmt.c:702
error_t stpMgmtGetBridgePriority(StpBridgeContext *context, uint16_t *value)
Get the assigned bridge priority.
Definition: stp_mgmt.c:397
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
error_t stpMgmtGetTimeSinceTopologyChange(StpBridgeContext *context, uint_t *value)
Get the time since a topology change was last detected.
Definition: stp_mgmt.c:676
void stpGeneratePortAddr(StpBridgePort *port)
Port's MAC address generation.
Definition: stp_misc.c:633
error_t ethDropMacAddr(NetInterface *interface, const MacAddr *macAddr)
Remove a unicast/multicast address from the MAC filter table.
Definition: ethernet.c:666
STP (Spanning Tree Protocol)
error_t netDetachTimerCallback(NetTimerCallback callback, void *param)
Unregister timer callback.
Definition: net_misc.c:385
error_t stpSetAdminPortState(StpBridgeContext *context, uint_t portIndex, bool_t value)
Set administrative bridge port state.
Definition: stp.c:1125
error_t stpGetMaxAge(StpBridgeContext *context, uint_t *value)
Get the current Max Age value.
Definition: stp.c:817
error_t stpMgmtSetBridgeForwardDelay(StpBridgeContext *context, uint_t value, bool_t commit)
Set Bridge Forward Delay parameter.
Definition: stp_mgmt.c:253
error_t stpMgmtGetPortDesignatedBridge(StpBridgeContext *context, uint_t portIndex, StpBridgeId *value)
Get the bridge identifier of the designated bridge.
Definition: stp_mgmt.c:1290
error_t stpMgmtGetAgeingTime(StpBridgeContext *context, uint_t *value)
Get the assigned value of the Ageing Time parameter.
Definition: stp_mgmt.c:502
void stpProcessLlcFrame(NetInterface *interface, EthHeader *ethHeader, const uint8_t *data, size_t length, NetRxAncillary *ancillary, void *param)
Process incoming LLC frame.
Definition: stp_bpdu.c:72
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 stpGetPortDesignatedPort(StpBridgeContext *context, uint_t portIndex, uint16_t *value)
Get the port identifier of the designated bridge.
Definition: stp.c:1581
error_t stpMgmtGetNumPorts(StpBridgeContext *context, uint_t *value)
Get the number of ports.
Definition: stp_mgmt.c:356
error_t stpMgmtGetForwardTransitions(StpBridgeContext *context, uint_t portIndex, uint_t *value)
Get the number of times the port has transitioned to Forwarding state.
Definition: stp_mgmt.c:1356
error_t stpMgmtSetPortPathCost(StpBridgeContext *context, uint_t portIndex, uint32_t value, bool_t commit)
Set administrative port path cost.
Definition: stp_mgmt.c:886
error_t stpMgmtSetBridgeHelloTime(StpBridgeContext *context, uint_t value, bool_t commit)
Set Bridge Hello Time parameter.
Definition: stp_mgmt.c:198
error_t stpMgmtGetBridgeHelloTime(StpBridgeContext *context, uint_t *value)
Get the assigned value of the Bridge Hello Time parameter.
Definition: stp_mgmt.c:439
error_t stpSetBridgeForwardDelay(StpBridgeContext *context, uint_t value)
Set Bridge Forward Delay parameter.
Definition: stp.c:401
error_t stpMgmtGetPortPathCost(StpBridgeContext *context, uint_t portIndex, uint32_t *value)
Get the current value of the port path cost.
Definition: stp_mgmt.c:1063
error_t stpMgmtGetPortDesignatedRoot(StpBridgeContext *context, uint_t portIndex, StpBridgeId *value)
Get the bridge identifier of the designated root bridge.
Definition: stp_mgmt.c:1223
error_t stpMgmtGetBridgeForwardDelay(StpBridgeContext *context, uint_t *value)
Get the assigned value of the Bridge Forward Delay parameter.
Definition: stp_mgmt.c:460
error_t stpSetBridgeHelloTime(StpBridgeContext *context, uint_t value)
Set Bridge Hello Time parameter.
Definition: stp.c:369
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 stpGetBridgeAddr(StpBridgeContext *context, MacAddr *value)
Get the MAC address assigned to the bridge.
Definition: stp.c:497
error_t stpMgmtGetHelloTime(StpBridgeContext *context, uint_t *value)
Get the current Hello Time value.
Definition: stp_mgmt.c:610
error_t stpGetAdminPortState(StpBridgeContext *context, uint_t portIndex, bool_t *value)
Get the administrative port state.
Definition: stp.c:1309
Elements of procedures.
error_t stpGetPortDesignatedBridge(StpBridgeContext *context, uint_t portIndex, StpBridgeId *value)
Get the bridge identifier of the designated bridge.
Definition: stp.c:1547
error_t stpGetHoldTime(StpBridgeContext *context, uint_t *value)
Get the assigned value of the Hold Time parameter.
Definition: stp.c:657
error_t stpMgmtSetBridgeMaxAge(StpBridgeContext *context, uint_t value, bool_t commit)
Set Bridge Max Age parameter.
Definition: stp_mgmt.c:137
error_t stpGetForwardDelay(StpBridgeContext *context, uint_t *value)
Get the current Forward Delay value.
Definition: stp.c:881
error_t stpMgmtGetDesignatedRoot(StpBridgeContext *context, StpBridgeId *value)
Get the bridge identifier of the root of the spanning tree.
Definition: stp_mgmt.c:523
STP algorithm conditions.
error_t stpGetTopologyChanges(StpBridgeContext *context, uint_t *value)
Get the number of topology changes.
Definition: stp.c:913
error_t stpMgmtGetBridgeAddr(StpBridgeContext *context, MacAddr *value)
Get the MAC address assigned to the bridge.
Definition: stp_mgmt.c:376
error_t stpMgmtGetPortDesignatedCost(StpBridgeContext *context, uint_t portIndex, uint32_t *value)
Get the designated cost of the port.
Definition: stp_mgmt.c:1257
error_t stpGetBridgeMaxAge(StpBridgeContext *context, uint_t *value)
Get the assigned value of the Bridge Max Age parameter.
Definition: stp.c:561
error_t stpGetTimeSinceTopologyChange(StpBridgeContext *context, uint_t *value)
Get the time since a topology change was last detected.
Definition: stp.c:945
error_t stpMgmtGetMaxAge(StpBridgeContext *context, uint_t *value)
Get the current Max Age value.
Definition: stp_mgmt.c:588
error_t stpGetPortDesignatedRoot(StpBridgeContext *context, uint_t portIndex, StpBridgeId *value)
Get the bridge identifier of the designated root bridge.
Definition: stp.c:1479
void stpGetDefaultSettings(StpBridgeSettings *settings)
Initialize settings with default values.
Definition: stp.c:51
error_t ethAttachLlcRxCalback(NetInterface *interface, LlcRxCallback callback, void *param)
Register LLC frame received callback.
Definition: ethernet.c:721
STP helper functions.
error_t stpMgmtGetBridgeMaxAge(StpBridgeContext *context, uint_t *value)
Get the assigned value of the Bridge Max Age parameter.
Definition: stp_mgmt.c:418
error_t stpGetPortAddr(StpBridgeContext *context, uint_t portIndex, MacAddr *value)
Get the MAC address assigned to the port.
Definition: stp.c:1241
error_t stpGetPortState(StpBridgeContext *context, uint_t portIndex, StpPortState *value)
Get the current state of the port.
Definition: stp.c:1411
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 ethDetachLlcRxCalback(NetInterface *interface)
Unregister LLC frame received callback.
Definition: ethernet.c:749
error_t stpMgmtSetAdminPortState(StpBridgeContext *context, uint_t portIndex, bool_t value, bool_t commit)
Set administrative bridge port state.
Definition: stp_mgmt.c:774
error_t stpSetPortNum(StpBridgeContext *context, uint_t portIndex, uint16_t value)
Set port number.
Definition: stp.c:979
error_t stpMgmtGetPortState(StpBridgeContext *context, uint_t portIndex, StpPortState *value)
Get the current state of the port.
Definition: stp_mgmt.c:1096
error_t stpMgmtSetAgeingTime(StpBridgeContext *context, uint_t value, bool_t commit)
Set Ageing Time parameter.
Definition: stp_mgmt.c:314
error_t stpGetPortPriority(StpBridgeContext *context, uint_t portIndex, uint8_t *value)
Get the priority assigned to the port.
Definition: stp.c:1275
error_t stpGetPortPathCost(StpBridgeContext *context, uint_t portIndex, uint32_t *value)
Get the current value of the port path cost.
Definition: stp.c:1377
void stpUnlock(StpBridgeContext *context)
Release exclusive access to the STP bridge context.
Definition: stp_misc.c:71
error_t stpConfigurePermanentDatabase(StpBridgeContext *context)
Configure the permanent database.
Definition: stp_misc.c:561
error_t stpMgmtGetPortDesignatedPort(StpBridgeContext *context, uint_t portIndex, uint16_t *value)
Get the port identifier of the designated bridge.
Definition: stp_mgmt.c:1323
error_t stpGetBridgePriority(StpBridgeContext *context, uint16_t *value)
Get the assigned bridge priority.
Definition: stp.c:529
error_t stpSetPortPriority(StpBridgeContext *context, uint_t portIndex, uint8_t value)
Set port priority.
Definition: stp.c:1091
error_t stpMgmtSetBridgePriority(StpBridgeContext *context, uint16_t value, bool_t commit)
Set bridge priority.
Definition: stp_mgmt.c:55
error_t stpSetBridgePriority(StpBridgeContext *context, uint16_t value)
Set bridge priority.
Definition: stp.c:305
Debugging facilities.
error_t stpMgmtGetPortAddr(StpBridgeContext *context, uint_t portIndex, MacAddr *value)
Get the MAC address assigned to the port.
Definition: stp_mgmt.c:935
error_t stpSetBridgeMaxAge(StpBridgeContext *context, uint_t value)
Set Bridge Max Age parameter.
Definition: stp.c:337
Management of the STP bridge.