rstp.c File Reference

RSTP (Rapid Spanning Tree Protocol) More...

#include "rstp/rstp.h"
#include "rstp/rstp_mgmt.h"
#include "rstp/rstp_fsm.h"
#include "rstp/rstp_conditions.h"
#include "rstp/rstp_misc.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   RSTP_TRACE_LEVEL
 

Functions

void rstpGetDefaultSettings (RstpBridgeSettings *settings)
 Initialize settings with default values. More...
 
error_t rstpInit (RstpBridgeContext *context, RstpBridgeSettings *settings)
 Initialize RSTP bridge context. More...
 
error_t rstpStart (RstpBridgeContext *context)
 Start RSTP bridge operation. More...
 
error_t rstpStop (RstpBridgeContext *context)
 Stop RSTP bridge operation. More...
 
error_t rstpSetVersion (RstpBridgeContext *context, uint_t value)
 Set protocol version. More...
 
error_t rstpSetBridgePriority (RstpBridgeContext *context, uint16_t value)
 Set bridge priority. More...
 
error_t rstpSetBridgeMaxAge (RstpBridgeContext *context, uint_t value)
 Set Bridge Max Age parameter. More...
 
error_t rstpSetBridgeHelloTime (RstpBridgeContext *context, uint_t value)
 Set Bridge Hello Time parameter. More...
 
error_t rstpSetBridgeForwardDelay (RstpBridgeContext *context, uint_t value)
 Set Bridge Forward Delay parameter. More...
 
error_t rstpSetTxHoldCount (RstpBridgeContext *context, uint_t value)
 Set Transmit Hold Count parameter. More...
 
error_t rstpSetAgeingTime (RstpBridgeContext *context, uint_t value)
 Set Ageing Time parameter. More...
 
error_t rstpGetNumPorts (RstpBridgeContext *context, uint_t *value)
 Get the number of ports. More...
 
error_t rstpGetVersion (RstpBridgeContext *context, uint_t *value)
 Get assigned protocol version. More...
 
error_t rstpGetBridgeAddr (RstpBridgeContext *context, MacAddr *value)
 Get the MAC address assigned to the bridge. More...
 
error_t rstpGetBridgePriority (RstpBridgeContext *context, uint16_t *value)
 Get the assigned bridge priority. More...
 
error_t rstpGetBridgeMaxAge (RstpBridgeContext *context, uint_t *value)
 Get the assigned value of the Bridge Max Age parameter. More...
 
error_t rstpGetBridgeHelloTime (RstpBridgeContext *context, uint_t *value)
 Get the assigned value of the Bridge Hello Time parameter. More...
 
error_t rstpGetBridgeForwardDelay (RstpBridgeContext *context, uint_t *value)
 Get the assigned value of the Bridge Forward Delay parameter. More...
 
error_t rstpGetTxHoldCount (RstpBridgeContext *context, uint_t *value)
 Get the assigned value of the Transmit Hold Count parameter. More...
 
error_t rstpGetAgeingTime (RstpBridgeContext *context, uint_t *value)
 Get the assigned value of the Ageing Time parameter. More...
 
error_t rstpGetDesignatedRoot (RstpBridgeContext *context, StpBridgeId *value)
 Get the bridge identifier of the root of the spanning tree. More...
 
error_t rstpGetRootPathCost (RstpBridgeContext *context, uint32_t *value)
 Get the current cost of the path to the root. More...
 
error_t rstpGetRootPort (RstpBridgeContext *context, uint16_t *value)
 Get the current root port. More...
 
error_t rstpGetMaxAge (RstpBridgeContext *context, uint_t *value)
 Get the current Max Age value. More...
 
error_t rstpGetHelloTime (RstpBridgeContext *context, uint_t *value)
 Get the current Hello Time value. More...
 
error_t rstpGetForwardDelay (RstpBridgeContext *context, uint_t *value)
 Get the current Forward Delay value. More...
 
error_t rstpGetTopologyChanges (RstpBridgeContext *context, uint_t *value)
 Get the number of topology changes. More...
 
error_t rstpGetTimeSinceTopologyChange (RstpBridgeContext *context, uint_t *value)
 Get the time since a topology change was last detected. More...
 
error_t rstpSetPortNum (RstpBridgeContext *context, uint_t portIndex, uint16_t value)
 Set port number. More...
 
error_t rstpSetPortAddr (RstpBridgeContext *context, uint_t portIndex, const MacAddr *value)
 Set port address. More...
 
error_t rstpSetPortPriority (RstpBridgeContext *context, uint_t portIndex, uint8_t value)
 Set port priority. More...
 
error_t rstpSetAdminPortState (RstpBridgeContext *context, uint_t portIndex, bool_t value)
 Set administrative bridge port state. More...
 
error_t rstpSetAdminPortPathCost (RstpBridgeContext *context, uint_t portIndex, uint32_t value)
 Set administrative port path cost. More...
 
error_t rstpSetAdminPointToPointMac (RstpBridgeContext *context, uint_t portIndex, RstpAdminPointToPointMac value)
 Set administrative point-to-point status of the LAN segment. More...
 
error_t rstpSetAdminEdgePort (RstpBridgeContext *context, uint_t portIndex, bool_t value)
 Set administrative value of the Edge Port parameter. More...
 
error_t rstpSetAutoEdgePort (RstpBridgeContext *context, uint_t portIndex, bool_t value)
 Set AutoEdgePort parameter. More...
 
error_t rstpSetProtocolMigration (RstpBridgeContext *context, uint_t portIndex, bool_t value)
 Force protocol migration. More...
 
error_t rstpGetPortNum (RstpBridgeContext *context, uint_t portIndex, uint16_t *value)
 Get the port number assigned to the port. More...
 
error_t rstpGetPortAddr (RstpBridgeContext *context, uint_t portIndex, MacAddr *value)
 Get the MAC address assigned to the port. More...
 
error_t rstpGetPortPriority (RstpBridgeContext *context, uint_t portIndex, uint8_t *value)
 Get the priority assigned to the port. More...
 
error_t rstpGetAdminPortState (RstpBridgeContext *context, uint_t portIndex, bool_t *value)
 Get the administrative port state. More...
 
error_t rstpGetMacOperState (RstpBridgeContext *context, uint_t portIndex, bool_t *value)
 Get the current MAC operational state. More...
 
error_t rstpGetAdminPortPathCost (RstpBridgeContext *context, uint_t portIndex, uint32_t *value)
 Get the administrative port path cost. More...
 
error_t rstpGetPortPathCost (RstpBridgeContext *context, uint_t portIndex, uint32_t *value)
 Get the current value of the port path cost. More...
 
error_t rstpGetAdminPointToPointMac (RstpBridgeContext *context, uint_t portIndex, RstpAdminPointToPointMac *value)
 Get the administrative point-to-point status of the LAN segment. More...
 
error_t rstpGetOperPointToPointMac (RstpBridgeContext *context, uint_t portIndex, bool_t *value)
 Get the operational point-to-point status of the LAN segment. More...
 
error_t rstpGetAdminEdgePort (RstpBridgeContext *context, uint_t portIndex, bool_t *value)
 Get the administrative value of the Edge Port parameter. More...
 
error_t rstpGetAutoEdgePort (RstpBridgeContext *context, uint_t portIndex, bool_t *value)
 Get the value of the AutoEdgePort parameter. More...
 
error_t rstpGetOperEdgePort (RstpBridgeContext *context, uint_t portIndex, bool_t *value)
 Get the operational value of the Edge Port parameter. More...
 
error_t rstpGetPortState (RstpBridgeContext *context, uint_t portIndex, StpPortState *value)
 Get the current state of the port. More...
 
error_t rstpGetPortRole (RstpBridgeContext *context, uint_t portIndex, StpPortRole *value)
 Get the assigned role of the port. More...
 
error_t rstpGetPortDesignatedRoot (RstpBridgeContext *context, uint_t portIndex, StpBridgeId *value)
 Get the bridge identifier of the designated root bridge. More...
 
error_t rstpGetPortDesignatedCost (RstpBridgeContext *context, uint_t portIndex, uint32_t *value)
 Get the designated cost of the port. More...
 
error_t rstpGetPortDesignatedBridge (RstpBridgeContext *context, uint_t portIndex, StpBridgeId *value)
 Get the bridge identifier of the designated bridge. More...
 
error_t rstpGetPortDesignatedPort (RstpBridgeContext *context, uint_t portIndex, uint16_t *value)
 Get the port identifier of the designated bridge. More...
 
error_t rstpGetForwardTransitions (RstpBridgeContext *context, uint_t portIndex, uint_t *value)
 Get the number of times the port has transitioned to Forwarding state. More...
 
void rstpDeinit (RstpBridgeContext *context)
 Release RSTP bridge context. More...
 

Detailed Description

RSTP (Rapid Spanning Tree Protocol)

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2019-2024 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneSTP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file rstp.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   RSTP_TRACE_LEVEL

Definition at line 32 of file rstp.c.

Function Documentation

◆ rstpDeinit()

void rstpDeinit ( RstpBridgeContext context)

Release RSTP bridge context.

Parameters
[in]contextPointer to the RSTP bridge context

Definition at line 2096 of file rstp.c.

◆ rstpGetAdminEdgePort()

error_t rstpGetAdminEdgePort ( RstpBridgeContext context,
uint_t  portIndex,
bool_t value 
)

Get the administrative value of the Edge Port parameter.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valueAdministrative value of the Edge Port parameter
Returns
Error code

Definition at line 1759 of file rstp.c.

◆ rstpGetAdminPointToPointMac()

error_t rstpGetAdminPointToPointMac ( RstpBridgeContext context,
uint_t  portIndex,
RstpAdminPointToPointMac value 
)

Get the administrative point-to-point status of the LAN segment.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valueAdministrative point-to-point status of the LAN segment attached to this port
Returns
Error code

Definition at line 1690 of file rstp.c.

◆ rstpGetAdminPortPathCost()

error_t rstpGetAdminPortPathCost ( RstpBridgeContext context,
uint_t  portIndex,
uint32_t *  value 
)

Get the administrative port path cost.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valueAdministrative port path cost
Returns
Error code

Definition at line 1621 of file rstp.c.

◆ rstpGetAdminPortState()

error_t rstpGetAdminPortState ( RstpBridgeContext context,
uint_t  portIndex,
bool_t value 
)

Get the administrative port state.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valueAdministrative port state
Returns
Error code

Definition at line 1553 of file rstp.c.

◆ rstpGetAgeingTime()

error_t rstpGetAgeingTime ( RstpBridgeContext context,
uint_t value 
)

Get the assigned value of the Ageing Time parameter.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valueValue of the Ageing Time parameter
Returns
Error code

Definition at line 797 of file rstp.c.

◆ rstpGetAutoEdgePort()

error_t rstpGetAutoEdgePort ( RstpBridgeContext context,
uint_t  portIndex,
bool_t value 
)

Get the value of the AutoEdgePort parameter.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valueValue of the AutoEdgePort parameter for the port
Returns
Error code

Definition at line 1793 of file rstp.c.

◆ rstpGetBridgeAddr()

error_t rstpGetBridgeAddr ( RstpBridgeContext context,
MacAddr value 
)

Get the MAC address assigned to the bridge.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valueMAC address of the bridge
Returns
Error code

Definition at line 605 of file rstp.c.

◆ rstpGetBridgeForwardDelay()

error_t rstpGetBridgeForwardDelay ( RstpBridgeContext context,
uint_t value 
)

Get the assigned value of the Bridge Forward Delay parameter.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valueValue of the Bridge Forward Delay parameter, in seconds
Returns
Error code

Definition at line 733 of file rstp.c.

◆ rstpGetBridgeHelloTime()

error_t rstpGetBridgeHelloTime ( RstpBridgeContext context,
uint_t value 
)

Get the assigned value of the Bridge Hello Time parameter.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valueValue of the Bridge Hello Time parameter, in seconds
Returns
Error code

Definition at line 701 of file rstp.c.

◆ rstpGetBridgeMaxAge()

error_t rstpGetBridgeMaxAge ( RstpBridgeContext context,
uint_t value 
)

Get the assigned value of the Bridge Max Age parameter.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valueValue of the Bridge Max Age parameter, in seconds
Returns
Error code

Definition at line 669 of file rstp.c.

◆ rstpGetBridgePriority()

error_t rstpGetBridgePriority ( RstpBridgeContext context,
uint16_t *  value 
)

Get the assigned bridge priority.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valueBridge priority
Returns
Error code

Definition at line 637 of file rstp.c.

◆ rstpGetDefaultSettings()

void rstpGetDefaultSettings ( RstpBridgeSettings settings)

Initialize settings with default values.

Parameters
[out]settingsStructure that contains RSTP bridge settings

Definition at line 51 of file rstp.c.

◆ rstpGetDesignatedRoot()

error_t rstpGetDesignatedRoot ( RstpBridgeContext context,
StpBridgeId value 
)

Get the bridge identifier of the root of the spanning tree.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valueBridge identifier
Returns
Error code

Definition at line 829 of file rstp.c.

◆ rstpGetForwardDelay()

error_t rstpGetForwardDelay ( RstpBridgeContext context,
uint_t value 
)

Get the current Forward Delay value.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valueForward Delay value, in seconds
Returns
Error code

Definition at line 988 of file rstp.c.

◆ rstpGetForwardTransitions()

error_t rstpGetForwardTransitions ( RstpBridgeContext context,
uint_t  portIndex,
uint_t value 
)

Get the number of times the port has transitioned to Forwarding state.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valueNumber of transitions to Forwarding state
Returns
Error code

Definition at line 2065 of file rstp.c.

◆ rstpGetHelloTime()

error_t rstpGetHelloTime ( RstpBridgeContext context,
uint_t value 
)

Get the current Hello Time value.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valueHello Time value, in seconds
Returns
Error code

Definition at line 957 of file rstp.c.

◆ rstpGetMacOperState()

error_t rstpGetMacOperState ( RstpBridgeContext context,
uint_t  portIndex,
bool_t value 
)

Get the current MAC operational state.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valueMAC operational state
Returns
Error code

Definition at line 1587 of file rstp.c.

◆ rstpGetMaxAge()

error_t rstpGetMaxAge ( RstpBridgeContext context,
uint_t value 
)

Get the current Max Age value.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valueMax Age value, in seconds
Returns
Error code

Definition at line 925 of file rstp.c.

◆ rstpGetNumPorts()

error_t rstpGetNumPorts ( RstpBridgeContext context,
uint_t value 
)

Get the number of ports.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valueNumber of ports
Returns
Error code

Definition at line 541 of file rstp.c.

◆ rstpGetOperEdgePort()

error_t rstpGetOperEdgePort ( RstpBridgeContext context,
uint_t  portIndex,
bool_t value 
)

Get the operational value of the Edge Port parameter.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valueOperational value of the Edge Port parameter
Returns
Error code

Definition at line 1827 of file rstp.c.

◆ rstpGetOperPointToPointMac()

error_t rstpGetOperPointToPointMac ( RstpBridgeContext context,
uint_t  portIndex,
bool_t value 
)

Get the operational point-to-point status of the LAN segment.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valueOperational point-to-point status of the LAN segment attached to this port
Returns
Error code

Definition at line 1725 of file rstp.c.

◆ rstpGetPortAddr()

error_t rstpGetPortAddr ( RstpBridgeContext context,
uint_t  portIndex,
MacAddr value 
)

Get the MAC address assigned to the port.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valueMAC address of the individual MAC entity for the port
Returns
Error code

Definition at line 1485 of file rstp.c.

◆ rstpGetPortDesignatedBridge()

error_t rstpGetPortDesignatedBridge ( RstpBridgeContext context,
uint_t  portIndex,
StpBridgeId value 
)

Get the bridge identifier of the designated bridge.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valueBridge identifier
Returns
Error code

Definition at line 1997 of file rstp.c.

◆ rstpGetPortDesignatedCost()

error_t rstpGetPortDesignatedCost ( RstpBridgeContext context,
uint_t  portIndex,
uint32_t *  value 
)

Get the designated cost of the port.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valueDesignated cost of the port
Returns
Error code

Definition at line 1963 of file rstp.c.

◆ rstpGetPortDesignatedPort()

error_t rstpGetPortDesignatedPort ( RstpBridgeContext context,
uint_t  portIndex,
uint16_t *  value 
)

Get the port identifier of the designated bridge.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valuePort identifier
Returns
Error code

Definition at line 2031 of file rstp.c.

◆ rstpGetPortDesignatedRoot()

error_t rstpGetPortDesignatedRoot ( RstpBridgeContext context,
uint_t  portIndex,
StpBridgeId value 
)

Get the bridge identifier of the designated root bridge.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valueBridge identifier
Returns
Error code

Definition at line 1929 of file rstp.c.

◆ rstpGetPortNum()

error_t rstpGetPortNum ( RstpBridgeContext context,
uint_t  portIndex,
uint16_t *  value 
)

Get the port number assigned to the port.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valuePort number
Returns
Error code

Definition at line 1437 of file rstp.c.

◆ rstpGetPortPathCost()

error_t rstpGetPortPathCost ( RstpBridgeContext context,
uint_t  portIndex,
uint32_t *  value 
)

Get the current value of the port path cost.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valuePort path cost
Returns
Error code

Definition at line 1655 of file rstp.c.

◆ rstpGetPortPriority()

error_t rstpGetPortPriority ( RstpBridgeContext context,
uint_t  portIndex,
uint8_t *  value 
)

Get the priority assigned to the port.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valuePort priority
Returns
Error code

Definition at line 1519 of file rstp.c.

◆ rstpGetPortRole()

error_t rstpGetPortRole ( RstpBridgeContext context,
uint_t  portIndex,
StpPortRole value 
)

Get the assigned role of the port.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valuePort role
Returns
Error code

Definition at line 1895 of file rstp.c.

◆ rstpGetPortState()

error_t rstpGetPortState ( RstpBridgeContext context,
uint_t  portIndex,
StpPortState value 
)

Get the current state of the port.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[out]valuePort state
Returns
Error code

Definition at line 1861 of file rstp.c.

◆ rstpGetRootPathCost()

error_t rstpGetRootPathCost ( RstpBridgeContext context,
uint32_t *  value 
)

Get the current cost of the path to the root.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valueRoot path cost
Returns
Error code

Definition at line 861 of file rstp.c.

◆ rstpGetRootPort()

error_t rstpGetRootPort ( RstpBridgeContext context,
uint16_t *  value 
)

Get the current root port.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valuePort number
Returns
Error code

Definition at line 893 of file rstp.c.

◆ rstpGetTimeSinceTopologyChange()

error_t rstpGetTimeSinceTopologyChange ( RstpBridgeContext context,
uint_t value 
)

Get the time since a topology change was last detected.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valueTime since a topology change was last detected
Returns
Error code

Definition at line 1052 of file rstp.c.

◆ rstpGetTopologyChanges()

error_t rstpGetTopologyChanges ( RstpBridgeContext context,
uint_t value 
)

Get the number of topology changes.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valueNumber of topology changes
Returns
Error code

Definition at line 1020 of file rstp.c.

◆ rstpGetTxHoldCount()

error_t rstpGetTxHoldCount ( RstpBridgeContext context,
uint_t value 
)

Get the assigned value of the Transmit Hold Count parameter.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valueValue of the Transmit Hold Count parameter
Returns
Error code

Definition at line 765 of file rstp.c.

◆ rstpGetVersion()

error_t rstpGetVersion ( RstpBridgeContext context,
uint_t value 
)

Get assigned protocol version.

Parameters
[in]contextPointer to the RSTP bridge context
[out]valueProtocol version
Returns
Error code

Definition at line 573 of file rstp.c.

◆ rstpInit()

error_t rstpInit ( RstpBridgeContext context,
RstpBridgeSettings settings 
)

Initialize RSTP bridge context.

Parameters
[in]contextPointer to the RSTP bridge context
[in]settingsRSTP bridge specific settings
Returns
Error code

Definition at line 70 of file rstp.c.

◆ rstpSetAdminEdgePort()

error_t rstpSetAdminEdgePort ( RstpBridgeContext context,
uint_t  portIndex,
bool_t  value 
)

Set administrative value of the Edge Port parameter.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[in]valueAdministrative value of the Edge Port parameter
Returns
Error code

Definition at line 1335 of file rstp.c.

◆ rstpSetAdminPointToPointMac()

error_t rstpSetAdminPointToPointMac ( RstpBridgeContext context,
uint_t  portIndex,
RstpAdminPointToPointMac  value 
)

Set administrative point-to-point status of the LAN segment.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[in]valueAdministrative point-to-point status of the LAN segment attached to this port
Returns
Error code

Definition at line 1301 of file rstp.c.

◆ rstpSetAdminPortPathCost()

error_t rstpSetAdminPortPathCost ( RstpBridgeContext context,
uint_t  portIndex,
uint32_t  value 
)

Set administrative port path cost.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[in]valueAdministrative port path cost
Returns
Error code

Definition at line 1266 of file rstp.c.

◆ rstpSetAdminPortState()

error_t rstpSetAdminPortState ( RstpBridgeContext context,
uint_t  portIndex,
bool_t  value 
)

Set administrative bridge port state.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[in]valueAdministrative bridge port state
Returns
Error code

Definition at line 1232 of file rstp.c.

◆ rstpSetAgeingTime()

error_t rstpSetAgeingTime ( RstpBridgeContext context,
uint_t  value 
)

Set Ageing Time parameter.

Parameters
[in]contextPointer to the RSTP bridge context
[in]valueValue of the Ageing Time parameter
Returns
Error code

Definition at line 509 of file rstp.c.

◆ rstpSetAutoEdgePort()

error_t rstpSetAutoEdgePort ( RstpBridgeContext context,
uint_t  portIndex,
bool_t  value 
)

Set AutoEdgePort parameter.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[in]valueAutoEdgePort parameter for the port
Returns
Error code

Definition at line 1368 of file rstp.c.

◆ rstpSetBridgeForwardDelay()

error_t rstpSetBridgeForwardDelay ( RstpBridgeContext context,
uint_t  value 
)

Set Bridge Forward Delay parameter.

Parameters
[in]contextPointer to the RSTP bridge context
[in]valueValue of the Bridge Forward Delay parameter, in seconds
Returns
Error code

Definition at line 445 of file rstp.c.

◆ rstpSetBridgeHelloTime()

error_t rstpSetBridgeHelloTime ( RstpBridgeContext context,
uint_t  value 
)

Set Bridge Hello Time parameter.

Parameters
[in]contextPointer to the RSTP bridge context
[in]valueValue of the Bridge Hello Time parameter, in seconds
Returns
Error code

Definition at line 413 of file rstp.c.

◆ rstpSetBridgeMaxAge()

error_t rstpSetBridgeMaxAge ( RstpBridgeContext context,
uint_t  value 
)

Set Bridge Max Age parameter.

Parameters
[in]contextPointer to the RSTP bridge context
[in]valueValue of the Bridge Max Age parameter, in seconds
Returns
Error code

Definition at line 381 of file rstp.c.

◆ rstpSetBridgePriority()

error_t rstpSetBridgePriority ( RstpBridgeContext context,
uint16_t  value 
)

Set bridge priority.

Parameters
[in]contextPointer to the RSTP bridge context
[in]valueBridge priority
Returns
Error code

Definition at line 349 of file rstp.c.

◆ rstpSetPortAddr()

error_t rstpSetPortAddr ( RstpBridgeContext context,
uint_t  portIndex,
const MacAddr value 
)

Set port address.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[in]valueMAC address of the individual MAC entity for the port
Returns
Error code

Definition at line 1147 of file rstp.c.

◆ rstpSetPortNum()

error_t rstpSetPortNum ( RstpBridgeContext context,
uint_t  portIndex,
uint16_t  value 
)

Set port number.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[in]valuePort number
Returns
Error code

Definition at line 1086 of file rstp.c.

◆ rstpSetPortPriority()

error_t rstpSetPortPriority ( RstpBridgeContext context,
uint_t  portIndex,
uint8_t  value 
)

Set port priority.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[in]valuePort priority
Returns
Error code

Definition at line 1198 of file rstp.c.

◆ rstpSetProtocolMigration()

error_t rstpSetProtocolMigration ( RstpBridgeContext context,
uint_t  portIndex,
bool_t  value 
)

Force protocol migration.

Parameters
[in]contextPointer to the RSTP bridge context
[in]portIndexPort index
[in]valueValue of the mcheck parameter. Setting mcheck variable to FALSE has no effect
Returns
Error code

Definition at line 1403 of file rstp.c.

◆ rstpSetTxHoldCount()

error_t rstpSetTxHoldCount ( RstpBridgeContext context,
uint_t  value 
)

Set Transmit Hold Count parameter.

Parameters
[in]contextPointer to the RSTP bridge context
[in]valueValue of the Transmit Hold Count parameter
Returns
Error code

Definition at line 477 of file rstp.c.

◆ rstpSetVersion()

error_t rstpSetVersion ( RstpBridgeContext context,
uint_t  value 
)

Set protocol version.

Parameters
[in]contextPointer to the RSTP bridge context
[in]valueProtocol version
Returns
Error code

Definition at line 317 of file rstp.c.

◆ rstpStart()

error_t rstpStart ( RstpBridgeContext context)

Start RSTP bridge operation.

Parameters
[in]contextPointer to the RSTP bridge context
Returns
Error code

Definition at line 168 of file rstp.c.

◆ rstpStop()

error_t rstpStop ( RstpBridgeContext context)

Stop RSTP bridge operation.

Parameters
[in]contextPointer to the RSTP bridge context
Returns
Error code

Definition at line 257 of file rstp.c.