STP algorithm conditions. More...
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL STP_TRACE_LEVEL |
Functions | |
bool_t | stpRootBridge (StpBridgeContext *context) |
Test whether the bridge is the Root bridge. More... | |
bool_t | stpDesignatedBridge (StpBridgeContext *context) |
Test whether the bridge is the Designated bridge for at least one LAN. More... | |
bool_t | stpRootPort (StpBridgePort *port) |
Test whether a given port is the Root port for the bridge. More... | |
bool_t | stpDesignatedPort (StpBridgePort *port) |
Test whether a given port is a Designated port. More... | |
bool_t | stpSupersedesPortInfo (StpBridgePort *port, const StpBpdu *bpdu) |
Check whether the protocol information supersedes that already held for a port. More... | |
Detailed Description
STP algorithm conditions.
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.
- Version
- 2.4.4
Definition in file stp_conditions.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL STP_TRACE_LEVEL |
Definition at line 32 of file stp_conditions.c.
Function Documentation
◆ stpDesignatedBridge()
bool_t stpDesignatedBridge | ( | StpBridgeContext * | context | ) |
Test whether the bridge is the Designated bridge for at least one LAN.
- Parameters
-
[in] context Pointer to the STP bridge context
- Returns
- TRUE if the bridge is the Designated bridge for at least one of the LANs, else FALSE
Definition at line 77 of file stp_conditions.c.
◆ stpDesignatedPort()
bool_t stpDesignatedPort | ( | StpBridgePort * | port | ) |
Test whether a given port is a Designated port.
- Parameters
-
[in] port Pointer to the bridge port context
- Returns
- TRUE if the port is the Designated port for the LAN to which it is attached, else FALSE
Definition at line 138 of file stp_conditions.c.
◆ stpRootBridge()
bool_t stpRootBridge | ( | StpBridgeContext * | context | ) |
Test whether the bridge is the Root bridge.
- Parameters
-
[in] context Pointer to the STP bridge context
- Returns
- TRUE if the bridge has been selected as the Root, else FALSE
Definition at line 50 of file stp_conditions.c.
◆ stpRootPort()
bool_t stpRootPort | ( | StpBridgePort * | port | ) |
Test whether a given port is the Root port for the bridge.
- Parameters
-
[in] port Pointer to the bridge port context
- Returns
- TRUE if the port is the Root port for the bridge, else FALSE
Definition at line 112 of file stp_conditions.c.
◆ stpSupersedesPortInfo()
bool_t stpSupersedesPortInfo | ( | StpBridgePort * | port, |
const StpBpdu * | bpdu | ||
) |
Check whether the protocol information supersedes that already held for a port.
- Parameters
-
[in] port Pointer to the bridge port context [in] bpdu Pointer to the received Configuration BPDU
- Returns
- TRUE if the Configuration BPDU conveys protocol information that supersedes that already held, else FALSE
Definition at line 174 of file stp_conditions.c.