Go to the documentation of this file.
1 /**
2  * @file rstp_procedures.h
3  * @brief RSTP state machine procedures
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2019-2024 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneSTP Open.
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26  *
27  * @author Oryx Embedded SARL (
28  * @version 2.4.0
29  **/
34 //Dependencies
35 #include "rstp/rstp.h"
37 //C++ guard
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
42 //RSTP related functions
56 void rstpSetSyncTree(RstpBridgeContext *context);
69 //C++ guard
70 #ifdef __cplusplus
71 }
72 #endif
74 #endif
int bool_t
Definition: compiler_port.h:53
uint16_t port
Definition: dns_common.h:267
RSTP (Rapid Spanning Tree Protocol)
Origin/state of the port's Spanning Tree information.
Definition: rstp.h:242
#define RstpBridgeContext
Definition: rstp.h:36
#define RstpBridgePort
Definition: rstp.h:40
State of the received Spanning Tree information.
Definition: rstp.h:228
void rstpSetSyncTree(RstpBridgeContext *context)
Set sync for all ports of the bridge (17.21.14)
void rstpUpdtRcvdInfoWhile(RstpBridgePort *port)
Update the Received Info timer (17.21.23)
bool_t rstpBetterOrSameInfo(RstpBridgePort *port, RstpInfoIs newInfoIs)
Compare Spanning Tree information (17.21.1)
void rstpNewTcWhile(RstpBridgePort *port)
Update the value of tcWhile (17.21.7)
void rstpEnableLearning(RstpBridgePort *port)
Start learning from frames received on the port (17.21.6)
void rstpRecordDispute(RstpBridgePort *port)
Record dispute (17.21.10)
void rstpRecordTimes(RstpBridgePort *port)
Set portTimes variable (17.21.13)
void rstpUpdtBpduVersion(RstpBridgePort *port)
Update rcvdSTP and rcvdRSTP variables depending on BPDU version (17.21.22)
void rstpDisableForwarding(RstpBridgePort *port)
Stop forwarding frames through the port (17.21.3)
void rstpRecordProposal(RstpBridgePort *port)
Record proposal (17.21.11)
void rstpUpdtRolesTree(RstpBridgeContext *context)
Update spanning tree information and port roles (17.21.25)
void rstpDisableLearning(RstpBridgePort *port)
Stop learning from frames received on the port (17.21.4)
void rstpSetReRootTree(RstpBridgeContext *context)
Set reRoot for all ports of the bridge (17.21.15)
void rstpUpdtRoleDisabledTree(RstpBridgeContext *context)
Set the selectedRole to DisabledPort for all ports of the bridge (17.21.24)
void rstpSetSelectedTree(RstpBridgeContext *context)
Set the selected variable for all ports of the bridge (17.21.16)
void rstpRecordAgreement(RstpBridgePort *port)
Record agreement (17.21.9)
void rstpSetTcFlags(RstpBridgePort *port)
Update rcvdTc, rcvdTcAck and rcvdTcn flags (17.21.17)
void rstpTxTcn(RstpBridgePort *port)
Transmit a Topology Change Notification BPDU (17.21.21)
RstpRcvdInfo rstpRcvInfo(RstpBridgePort *port)
Decode message priority and timer values from the received BPDU (17.21.8)
void rstpTxConfig(RstpBridgePort *port)
Transmit a Configuration BPDU (17.21.19)
void rstpRecordPriority(RstpBridgePort *port)
Record priority (17.21.12)
void rstpEnableForwarding(RstpBridgePort *port)
Start forwarding frames through the port (17.21.5)
void rstpTxRstp(RstpBridgePort *port)
Transmit a Rapid Spanning Tree BPDU (17.21.20)
void rstpSetTcPropTree(RstpBridgePort *port)
Set tcProp for all ports except the port that called the procedure (17.21.18)
void rstpClearReselectTree(RstpBridgeContext *context)
Clear reselect for all ports of the bridge (17.21.2)