Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ethernet_bridge_stp.h File Reference

Rapid Spanning Tree Protocol for Ethernet bridges. More...

#include <stdbool.h>
#include <stdint.h>
#include <zephyr/net/net_if.h>

Go to the source code of this file.

Data Structures

struct  eth_bridge_stp_status
 Spanning tree state of a bridge. More...
struct  eth_bridge_stp_port_status
 Spanning tree state of a bridge port. More...
struct  eth_bridge_stp_port_event
 Information of the NET_EVENT_ETHERNET_BRIDGE_PORT_STATE event. More...
struct  eth_bridge_stp_root_event
 Information of the NET_EVENT_ETHERNET_BRIDGE_NEW_ROOT event. More...
struct  eth_bridge_stp_topology_event
 Information of the NET_EVENT_ETHERNET_BRIDGE_TOPOLOGY_CHANGE event. More...

Enumerations

enum  eth_bridge_stp_role {
  ETH_BRIDGE_STP_ROLE_DISABLED , ETH_BRIDGE_STP_ROLE_ROOT , ETH_BRIDGE_STP_ROLE_DESIGNATED , ETH_BRIDGE_STP_ROLE_ALTERNATE ,
  ETH_BRIDGE_STP_ROLE_BACKUP
}
 Port Role (IEEE Std 802.1Q-2014 13.27.66). More...
enum  eth_bridge_stp_version { ETH_BRIDGE_STP_VERSION_STP = 0 , ETH_BRIDGE_STP_VERSION_RSTP = 2 }
 Force Protocol Version (IEEE Std 802.1Q-2014 13.7.2). More...
enum  eth_bridge_stp_p2p { ETH_BRIDGE_STP_P2P_AUTO , ETH_BRIDGE_STP_P2P_ON , ETH_BRIDGE_STP_P2P_OFF }
 Point-to-point setting of a port (IEEE Std 802.1Q-2014 13.28.16). More...

Functions

int eth_bridge_stp_enable (struct net_if *br, bool enable)
 Start or stop the spanning tree protocol on a bridge.
int eth_bridge_stp_get_status (struct net_if *br, struct eth_bridge_stp_status *status)
 Get the spanning tree state of a bridge.
int eth_bridge_stp_port_get_status (struct net_if *br, struct net_if *iface, struct eth_bridge_stp_port_status *status)
 Get the spanning tree state of a bridge port.
int eth_bridge_stp_set_bridge_priority (struct net_if *br, uint16_t priority)
 Set the Bridge Priority.
int eth_bridge_stp_set_times (struct net_if *br, uint8_t max_age, uint8_t forward_delay)
 Set the Bridge Max Age and Bridge Forward Delay.
int eth_bridge_stp_set_tx_hold_count (struct net_if *br, uint8_t count)
 Set the Transmit Hold Count.
int eth_bridge_stp_set_version (struct net_if *br, enum eth_bridge_stp_version version)
 Set the Force Protocol Version.
int eth_bridge_stp_port_set_priority (struct net_if *br, struct net_if *iface, uint8_t priority)
 Set the priority of a bridge port.
int eth_bridge_stp_port_set_path_cost (struct net_if *br, struct net_if *iface, uint32_t cost)
 Set the Port Path Cost of a bridge port.
int eth_bridge_stp_port_set_edge (struct net_if *br, struct net_if *iface, bool admin_edge, bool auto_edge)
 Set how a bridge port detects that it is an Edge Port.
int eth_bridge_stp_port_set_p2p (struct net_if *br, struct net_if *iface, enum eth_bridge_stp_p2p p2p)
 Set whether a bridge port is attached to a point-to-point link.
int eth_bridge_stp_port_mcheck (struct net_if *br, struct net_if *iface)
 Make a bridge port check whether STP bridges are still attached.

Detailed Description

Rapid Spanning Tree Protocol for Ethernet bridges.