BpduCfg

Namespace: inet

class BpduCfg

(no description)

Usage diagram

Inheritance diagram

Extends

Name

Type

Description

BpduBase

class

Represents a BPDU (Bridge PDU) used by the STP and RSTP protocols, as defined in the 802.1D-1998 specification.

Fields

Name

Type

Description

id

int

mutable

bool

complete

bool

correct

bool

properlyRepresented

bool

chunkLength

b

rawBin

string[]

rawHex

string[]

regionTags

SharingRegionTagSet::TagBaseRegionTag[]

protocolIdentifier

BpduProtocolIdentifier

2 bytes, 0 for STP, 1 for RSTP (TODO use them)

protocolVersionIdentifier

BpduProtocolVersionIdentifier

1 byte, version ID, currently 0, // 3:MultipleSpanningTree

bpduType

BpduType

1 byte, 0 for Configuration BPDU, 1 for Topology Change Notification BPDU

chunkLength

protocolIdentifier

protocolVersionIdentifier

bpduType

flags: 1 byte

tcaFlag

bool

bit 7: Topology Change Acknowledgment flag

agreementFlag

bool

bit 6: Agreement flag (RSTP)

proposalFlag

bool

bit 1: Proposal flag (RSTP)

tcFlag

bool

bit 0: Topology Change flag

rootPriority

uint16_t

2 bytes, priority of the tree root (part of Root Identifier)

rootAddress

MacAddress

6 bytes, address of the tree root (part of Root Identifier)

rootPathCost

uint32_t

4 bytes, cost to the root

bridgePriority

uint16_t

2 bytes, priority of sender bridge (part of Bridge Identifier)

bridgeAddress

MacAddress

6 bytes, address of sender bridge (part of Bridge Identifier)

portPriority

unsigned int

1 byte, priority of sender port (part of Port Identifier)

portNum

unsigned int

1 byte, port number (ethg[] gate index) of sender port (part of Port Identifier) (or 4 bit priority (shifted with 4 bit) and 12 bit portnum (in 802.1D-2004))

messageAge

simtime_t

2 bytes, Message Age (in 256ths of a second)

maxAge

simtime_t

2 bytes, maximum lifetime of the BPDU (in 256ths of a second)

helloTime

simtime_t

2 bytes, Hello Time (Hello Interval) of the sender bridge (in 256ths of a second)

forwardDelay

simtime_t

2 bytes, Forward Delay timer of the sender bridge (in 256ths of a second)

Properties

Name

Value

Description

beforeChange

handleChange()

descriptor

readonly

existingClass

packetData

Source code

class BpduCfg extends BpduBase
{
    chunkLength = B(35);
    protocolIdentifier = SPANNING_TREE_PROTOCOL;
    protocolVersionIdentifier = SPANNING_TREE;
    bpduType = BPDU_CFG;
                                              // flags: 1 byte
    bool tcaFlag;                             //   bit 7: Topology Change Acknowledgment flag
    bool agreementFlag;                       //   bit 6: Agreement flag (RSTP)
    bool proposalFlag;                        //   bit 1: Proposal flag (RSTP)
    bool tcFlag;                              //   bit 0: Topology Change flag

    uint16_t rootPriority;                    // 2 bytes, priority of the tree root (part of Root Identifier)
    MacAddress rootAddress;                   // 6 bytes, address of the tree root (part of Root Identifier)
    uint32_t rootPathCost;                    // 4 bytes, cost to the root

    uint16_t bridgePriority;                  // 2 bytes, priority of sender bridge (part of Bridge Identifier)
    MacAddress bridgeAddress;                 // 6 bytes, address of sender bridge (part of Bridge Identifier)

    unsigned int portPriority;                // 1 byte, priority of sender port (part of Port Identifier)
    unsigned int portNum;                     // 1 byte, port number (ethg[] gate index) of sender port (part of Port Identifier)
                                              // (or 4 bit priority (shifted with 4 bit) and 12 bit portnum (in 802.1D-2004))

    simtime_t messageAge;                     // 2 bytes, Message Age (in 256ths of a second)
    simtime_t maxAge;                         // 2 bytes, maximum lifetime of the BPDU (in 256ths of a second)
    simtime_t helloTime;                      // 2 bytes, Hello Time (Hello Interval) of the sender bridge (in 256ths of a second)
    simtime_t forwardDelay;                   // 2 bytes, Forward Delay timer of the sender bridge (in 256ths of a second)
}

File: src/inet/linklayer/ieee8021d/common/Ieee8021dBpdu.msg