rstp.h File Reference

RSTP (Rapid Spanning Tree Protocol) More...

#include "stp/stp_common.h"
#include "rstp/rstp_pti.h"
#include "rstp/rstp_prx.h"
#include "rstp/rstp_ppm.h"
#include "rstp/rstp_bdm.h"
#include "rstp/rstp_ptx.h"
#include "rstp/rstp_pim.h"
#include "rstp/rstp_prs.h"
#include "rstp/rstp_prt.h"
#include "rstp/rstp_pst.h"
#include "rstp/rstp_tcm.h"
#include "rstp/rstp_bpdu.h"

Go to the source code of this file.

Data Structures

struct  RstpTimes
 RSTP timer parameter values. More...
 
struct  RstpPriority
 Spanning Tree priority vector. More...
 
struct  RstpBridgeParams
 RSTP bridge parameters. More...
 
struct  RstpPortParams
 Bridge port parameters. More...
 
struct  _RstpBridgePort
 Bridge port. More...
 
struct  RstpBridgeSettings
 RSTP bridge settings. More...
 
struct  _RstpBridgeContext
 RSTP bridge context. More...
 

Macros

#define RstpBridgeContext   struct _RstpBridgeContext
 
#define RstpBridgePort   struct _RstpBridgePort
 
#define RSTP_SUPPORT   DISABLED
 
#define RSTP_TICK_INTERVAL   1000
 
#define RSTP_DEFAULT_BRIDGE_PRIORITY   32768
 
#define RSTP_DEFAULT_PORT_PRIORITY   128
 
#define RSTP_DEFAULT_MIGRATE_TIME   3
 
#define RSTP_MIN_BRIDGE_MAX_AGE   6
 
#define RSTP_DEFAULT_BRIDGE_MAX_AGE   20
 
#define RSTP_MAX_BRIDGE_MAX_AGE   40
 
#define RSTP_MIN_BRIDGE_HELLO_TIME   1
 
#define RSTP_DEFAULT_BRIDGE_HELLO_TIME   2
 
#define RSTP_MAX_BRIDGE_HELLO_TIME   10
 
#define RSTP_MIN_BRIDGE_FORWARD_DELAY   4
 
#define RSTP_DEFAULT_BRIDGE_FORWARD_DELAY   15
 
#define RSTP_MAX_BRIDGE_FORWARD_DELAY   30
 
#define RSTP_MIN_TRANSMIT_HOLD_COUNT   1
 
#define RSTP_DEFAULT_TRANSMIT_HOLD_COUNT   6
 
#define RSTP_MAX_TRANSMIT_HOLD_COUNT   10
 
#define RSTP_MIN_AGEING_TIME   10
 
#define RSTP_DEFAULT_AGEING_TIME   300
 
#define RSTP_MAX_AGEING_TIME   1000000
 
#define RSTP_MIN_PORT_PATH_COST   1
 
#define RSTP_DEFAULT_PORT_PATH_COST   200000
 
#define RSTP_MAX_PORT_PATH_COST   200000000
 

Enumerations

enum  RstpRcvdInfo {
  RSTP_RCVD_INFO_SUPERIOR_DESIGNATED = 0, RSTP_RCVD_INFO_REPEATED_DESIGNATED = 1, RSTP_RCVD_INFO_INFERIOR_DESIGNATED = 2, RSTP_RCVD_INFO_INFERIOR_ROOT_ALTERNATE = 3,
  RSTP_RCVD_INFO_OTHER = 4
}
 State of the received Spanning Tree information. More...
 
enum  RstpInfoIs { RSTP_INFO_IS_DISABLED = 0, RSTP_INFO_IS_RECEIVED = 1, RSTP_INFO_IS_MINE = 2, RSTP_INFO_IS_AGED = 3 }
 Origin/state of the port's Spanning Tree information. More...
 
enum  RstpAdminPointToPointMac { RSTP_ADMIN_P2P_MAC_FORCE_FALSE = 0, RSTP_ADMIN_P2P_MAC_FORCE_TRUE = 1, RSTP_ADMIN_P2P_MAC_AUTO = 2 }
 Administrative state of the point-to-point status. More...
 

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.h.

Macro Definition Documentation

◆ RSTP_DEFAULT_AGEING_TIME

#define RSTP_DEFAULT_AGEING_TIME   300

Definition at line 184 of file rstp.h.

◆ RSTP_DEFAULT_BRIDGE_FORWARD_DELAY

#define RSTP_DEFAULT_BRIDGE_FORWARD_DELAY   15

Definition at line 142 of file rstp.h.

◆ RSTP_DEFAULT_BRIDGE_HELLO_TIME

#define RSTP_DEFAULT_BRIDGE_HELLO_TIME   2

Definition at line 121 of file rstp.h.

◆ RSTP_DEFAULT_BRIDGE_MAX_AGE

#define RSTP_DEFAULT_BRIDGE_MAX_AGE   20

Definition at line 100 of file rstp.h.

◆ RSTP_DEFAULT_BRIDGE_PRIORITY

#define RSTP_DEFAULT_BRIDGE_PRIORITY   32768

Definition at line 72 of file rstp.h.

◆ RSTP_DEFAULT_MIGRATE_TIME

#define RSTP_DEFAULT_MIGRATE_TIME   3

Definition at line 86 of file rstp.h.

◆ RSTP_DEFAULT_PORT_PATH_COST

#define RSTP_DEFAULT_PORT_PATH_COST   200000

Definition at line 205 of file rstp.h.

◆ RSTP_DEFAULT_PORT_PRIORITY

#define RSTP_DEFAULT_PORT_PRIORITY   128

Definition at line 79 of file rstp.h.

◆ RSTP_DEFAULT_TRANSMIT_HOLD_COUNT

#define RSTP_DEFAULT_TRANSMIT_HOLD_COUNT   6

Definition at line 163 of file rstp.h.

◆ RSTP_MAX_AGEING_TIME

#define RSTP_MAX_AGEING_TIME   1000000

Definition at line 191 of file rstp.h.

◆ RSTP_MAX_BRIDGE_FORWARD_DELAY

#define RSTP_MAX_BRIDGE_FORWARD_DELAY   30

Definition at line 149 of file rstp.h.

◆ RSTP_MAX_BRIDGE_HELLO_TIME

#define RSTP_MAX_BRIDGE_HELLO_TIME   10

Definition at line 128 of file rstp.h.

◆ RSTP_MAX_BRIDGE_MAX_AGE

#define RSTP_MAX_BRIDGE_MAX_AGE   40

Definition at line 107 of file rstp.h.

◆ RSTP_MAX_PORT_PATH_COST

#define RSTP_MAX_PORT_PATH_COST   200000000

Definition at line 212 of file rstp.h.

◆ RSTP_MAX_TRANSMIT_HOLD_COUNT

#define RSTP_MAX_TRANSMIT_HOLD_COUNT   10

Definition at line 170 of file rstp.h.

◆ RSTP_MIN_AGEING_TIME

#define RSTP_MIN_AGEING_TIME   10

Definition at line 177 of file rstp.h.

◆ RSTP_MIN_BRIDGE_FORWARD_DELAY

#define RSTP_MIN_BRIDGE_FORWARD_DELAY   4

Definition at line 135 of file rstp.h.

◆ RSTP_MIN_BRIDGE_HELLO_TIME

#define RSTP_MIN_BRIDGE_HELLO_TIME   1

Definition at line 114 of file rstp.h.

◆ RSTP_MIN_BRIDGE_MAX_AGE

#define RSTP_MIN_BRIDGE_MAX_AGE   6

Definition at line 93 of file rstp.h.

◆ RSTP_MIN_PORT_PATH_COST

#define RSTP_MIN_PORT_PATH_COST   1

Definition at line 198 of file rstp.h.

◆ RSTP_MIN_TRANSMIT_HOLD_COUNT

#define RSTP_MIN_TRANSMIT_HOLD_COUNT   1

Definition at line 156 of file rstp.h.

◆ RSTP_SUPPORT

#define RSTP_SUPPORT   DISABLED

Definition at line 58 of file rstp.h.

◆ RSTP_TICK_INTERVAL

#define RSTP_TICK_INTERVAL   1000

Definition at line 65 of file rstp.h.

◆ RstpBridgeContext

#define RstpBridgeContext   struct _RstpBridgeContext

Definition at line 36 of file rstp.h.

◆ RstpBridgePort

#define RstpBridgePort   struct _RstpBridgePort

Definition at line 40 of file rstp.h.

Enumeration Type Documentation

◆ RstpAdminPointToPointMac

Administrative state of the point-to-point status.

Enumerator
RSTP_ADMIN_P2P_MAC_FORCE_FALSE 
RSTP_ADMIN_P2P_MAC_FORCE_TRUE 
RSTP_ADMIN_P2P_MAC_AUTO 

Definition at line 254 of file rstp.h.

◆ RstpInfoIs

enum RstpInfoIs

Origin/state of the port's Spanning Tree information.

Enumerator
RSTP_INFO_IS_DISABLED 
RSTP_INFO_IS_RECEIVED 
RSTP_INFO_IS_MINE 
RSTP_INFO_IS_AGED 

Definition at line 241 of file rstp.h.

◆ RstpRcvdInfo

State of the received Spanning Tree information.

Enumerator
RSTP_RCVD_INFO_SUPERIOR_DESIGNATED 
RSTP_RCVD_INFO_REPEATED_DESIGNATED 
RSTP_RCVD_INFO_INFERIOR_DESIGNATED 
RSTP_RCVD_INFO_INFERIOR_ROOT_ALTERNATE 
RSTP_RCVD_INFO_OTHER 

Definition at line 227 of file rstp.h.

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.