Data Structures | Macros | Functions | Variables
stp.h File Reference

Spanning Tree Protocol (STP) More...

#include <stdint.h>
#include <ipxe/if_ether.h>

Go to the source code of this file.

Data Structures

struct  stp_switch
 A switch identifier. More...
struct  stp_bpdu
 A Spanning Tree bridge protocol data unit. More...


#define ETH_P_STP   0x4242
 "Protocol" value for STP More...
#define STP_PROTOCOL   0x0000
 Spanning Tree protocol ID. More...
#define STP_VERSION_RSTP   0x02
 Rapid Spanning Tree protocol version. More...
#define STP_TYPE_RSTP   0x02
 Rapid Spanning Tree bridge PDU type. More...
#define STP_FL_FORWARDING   0x20
 Port is forwarding. More...


struct stp_switch __attribute__ ((packed))


uint16_t priority
 Priotity. More...
uint8_t mac [ETH_ALEN]
 MAC address. More...
uint8_t dsap
 LLC DSAP. More...
uint8_t ssap
 LLC SSAP. More...
uint8_t control
 LLC control field. More...
uint16_t protocol
 Protocol ID. More...
uint8_t version
 Protocol version. More...
uint8_t type
 Message type. More...
uint8_t flags
 Flags. More...
struct stp_switch root
 Root switch. More...
uint32_t cost
 Root path cost. More...
struct stp_switch sender
 Sender switch. More...
uint16_t port
 Port. More...
uint16_t age
 Message age. More...
uint16_t max
 Maximum age. More...
uint16_t hello
 Hello time. More...
uint16_t delay
 Forward delay. More...

Detailed Description

Spanning Tree Protocol (STP)

Definition in file stp.h.

Macro Definition Documentation


#define ETH_P_STP   0x4242

"Protocol" value for STP

This is the concatenated {DSAP,SSAP} value used internally by iPXE as the network-layer protocol for LLC frames.

Definition at line 20 of file stp.h.


#define STP_PROTOCOL   0x0000

Spanning Tree protocol ID.

Definition at line 65 of file stp.h.


#define STP_VERSION_RSTP   0x02

Rapid Spanning Tree protocol version.

Definition at line 68 of file stp.h.


#define STP_TYPE_RSTP   0x02

Rapid Spanning Tree bridge PDU type.

Definition at line 71 of file stp.h.


#define STP_FL_FORWARDING   0x20

Port is forwarding.

Definition at line 74 of file stp.h.

Function Documentation



◆ __attribute__()

struct stp_switch __attribute__ ( (packed)  )

Variable Documentation

◆ priority

uint16_t priority


Definition at line 12 of file stp.h.

Referenced by dhcp_discovery_rx(), fcoe_fip_rx_advertisement(), reprioritise_settings(), and vlan_create().

◆ mac

MAC address.

Definition at line 14 of file stp.h.

◆ dsap

uint8_t dsap


Definition at line 12 of file stp.h.

◆ ssap

uint8_t ssap


Definition at line 14 of file stp.h.

◆ control

uint8_t control

LLC control field.

Definition at line 16 of file stp.h.

◆ protocol

uint16_t protocol

◆ version

uint8_t version

Protocol version.

Definition at line 20 of file stp.h.

◆ type

uint8_t type

Message type.

Definition at line 22 of file stp.h.

◆ flags

uint8_t flags


Definition at line 24 of file stp.h.

◆ root

struct stp_switch root

◆ cost

uint32_t cost

Root path cost.

Definition at line 28 of file stp.h.

Referenced by cipher_cost(), and digest_cost().

◆ sender

struct stp_switch sender

Sender switch.

Definition at line 30 of file stp.h.

Referenced by loopback_test(), and lotest_exec().

◆ port

uint16_t port


Definition at line 32 of file stp.h.

◆ age

uint16_t age

Message age.

Definition at line 34 of file stp.h.

◆ max

uint16_t max

Maximum age.

Definition at line 36 of file stp.h.

◆ hello

uint16_t hello

Hello time.

Definition at line 38 of file stp.h.

Referenced by stp_rx(), and tls_send_client_hello().

◆ delay

uint16_t delay

Forward delay.

Definition at line 40 of file stp.h.

Referenced by ath5k_hw_reset(), hunt_mcdi_request_poll(), and reg_delay().