Documentation ¶
Overview ¶
802.1D-2004 17.25 Bridge Detection State Machine The Bridge Detection state machine shall implement the function specified by the state diagram in Figure 17-16, the definitions in 17.16, 17.13, 17.20, and 17.21, and the variable declarations in 17.17, 17.18, and 17.19.
bridge.go
Copyright [2016] [SnapRoute Inc]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
_______ __ __________ ___ _______.____ __ ____ __ .___________. ______ __ __ | ____|| | | ____\ \ / / / |\ \ / \ / / | | | | / || | | | | |__ | | | |__ \ V / | (----` \ \/ \/ / | | `---| |----`| ,----'| |__| | | __| | | | __| > < \ \ \ / | | | | | | | __ | | | | `----.| |____ / . \ .----) | \ /\ / | | | | | `----.| | | | |__| |_______||_______/__/ \__\ |_______/ \__/ \__/ |__| |__| \______||__| |__|
config.go
def.go
enum
global.go
init.go
logger.go
802.1D-2004 17.27 Port Information State Machine The Port Information state machine shall implement the function specified by the state diagram in Figure 17- 18, the definitions in 17.13, 17.16, 17.20, and 17.21, and the variable declarations in 17.17, 17.18, and 17.19. This state machine is responsible for updating and recording the source (infoIs, 17.19.10) of the Spanning Tree information (portPriority 17.19.21, portTimes 17.19.22) used to test the information conveyed (msgPriority, 17.19.14; msgTimes, 17.19.15) by received Configuration Messages. If new, superior, information arrives on the port, or the existing information is aged out, it sets the reselect variable to request the Port Role Selection state machine to update the spanning tree priority vectors held by the Bridge and the Bridge’s Port Roles.
port.go
802.1D-2004 17.24 Port Protocol Migration state machine The Port Protocol Migration state machine shall implement the function specified by the state diagram in Figure 17-15, the definitions in 17.16, 17.20, and 17.21, and the variable declarations in 17.17, 17.18, and 17.19. It updates sendRSTP (17.19.38) to tell the Port Transmit state machine (17.26) which BPDU types (9.3) to transmit, to support interoperability (17.4) with the Spanning Tree Algorithm and Protocol specified in previous revisions of this standard.
802.1D-2004 17.28 Port Role Selection State Machine The Port Role Selection state machine shall implement the function specified by the state diagram in Figure 17-19, the definitions in 17.13, 17.16, 17.20, and 17.21, and the variable declarations in 17.17, 17.18, and 17.19. It selects roles for all Bridge Ports. On initialization all Bridge Ports are assigned the Disabled Port Role. Whenever any Bridge Port’s reselect variable (17.19.34) is set by the Port Information state machine (17.27), spanning tree information including the designatedPriority (17.19.4) and designatedTimes (17.19.5) for each Port is recomputed and its Port Role (selectedRole, 17.19.37) updated by the updtRolesTree() procedure (17.21.25). The reselect variables are cleared before computation starts so that recomputation will take place if new information becomes available while the computation is in progress.
802.1D-2004 17.29 Port Role Selection State Machine The Port Role Selection state machine shall implement the function specified by the state diagram in Figure 17-19, the definitions in 17.13, 17.16, 17.20, and 17.21, and the variable declarations in 17.17, 17.18, and 17.19. It selects roles for all Bridge Ports. On initialization all Bridge Ports are assigned the Disabled Port Role. Whenever any Bridge Port’s reselect variable (17.19.34) is set by the Port Information state machine (17.27), spanning tree information including the designatedPriority (17.19.4) and designatedTimes (17.19.5) for each Port is recomputed and its Port Role (selectedRole, 17.19.37) updated by the updtRolesTree() procedure (17.21.25). The reselect variables are cleared before computation starts so that recomputation will take place if new information becomes available while the computation is in progress.
17.23 Port Receive state machine
802.1D-2004 17.29 Port State Transition State Machine The Port State Transition state machine shall implement the function specified by the state diagram in Figure 17-24, the definitions in 17.13, 17.16, 17.20, and 17.21, and variable declarations in 17.17, 17.18, and 17.19. This state machine models changes in the Port State (7.4). The Port Role Transitions state machine requests changes by setting the learn and forward variables; the Port State Transitions machine updates the learning and forwarding variables as the actual Port State changes. The disableLearning(), disableForwarding(), enableLearning(), and enableForwarding() procedures model the system-dependent actions and delays that take place; these procedures do not complete until the desired behavior has been achieved.
17.22 Port Timers state machine
802.1D-2004 17.24 Port Protocol Migration state machine The Port Protocol Migration state machine shall implement the function specified by the state diagram in Figure 17-15, the definitions in 17.16, 17.20, and 17.21, and the variable declarations in 17.17, 17.18, and 17.19. It updates sendRSTP (17.19.38) to tell the Port Transmit state machine (17.26) which BPDU types (9.3) to transmit, to support interoperability (17.4) with the Spanning Tree Algorithm and Protocol specified in previous revisions of this standard.
rx will take care of parsing a received frame from a linux socket if checks pass then packet will be either passed rx machine or marker responder
802.1D-2004 17.30 Topology Change State Machine The Topology Change state machine shall implement the function specified by the state diagram in Figure 17-25, the definitions in 17.13, 17.16, 17.20, and 17.21, and variable declarations in 17.17, 17.18, and 17.19 This state machine is responsible for topology change detection, notification, and propagation, and for instructing the Filtering Database to remove Dynamic Filtering Entries for certain ports (17.11).
timers
tx.go
Index ¶
- Constants
- Variables
- func BdmMachineStrStateMapInit()
- func BpduRxMain(pId int32, bId int32, rxPktChan chan gopacket.Packet)
- func CompareBridgeAddr(b1 [6]uint8, b2 [6]uint8) int
- func CompareBridgeId(b1 BridgeId, b2 BridgeId) int
- func ConstructPortConfigMap()
- func ConvertBoolToUint8(v bool) (rv uint8)
- func ConvertRoleToPktRole(r PortRole) (rv uint8)
- func CreateBridgeIdStr(bId BridgeId) string
- func DelStpBridge(b *Bridge, force bool)
- func DelStpPort(p *StpPort)
- func GetAsicDPluginList() []asicdClient.AsicdClientIntf
- func GetBridgeAddrFromBridgeId(b BridgeId) [6]uint8
- func GetBridgePriorityFromBridgeId(b BridgeId) uint16
- func GetBridgeVlanFromBridgeId(b BridgeId) (vlan uint16)
- func GetIfIndexFromIntfRef(intfref string) int32
- func GetPortNameFromIfIndex(ifindex int32) string
- func GetStpLogger() *logging.Writer
- func IsDesignatedPriorytVectorNotHigherThanPortPriorityVector(d *PriorityVector, p *PriorityVector) bool
- func IsMsgPriorityVectorSuperiorOrSameThanPortPriorityVector(msg *PriorityVector, port *PriorityVector) bool
- func IsMsgPriorityVectorSuperiorThanPortPriorityVector(msg *PriorityVector, port *PriorityVector) bool
- func IsMsgPriorityVectorTheSameOrWorseThanPortPriorityVector(msg *PriorityVector, port *PriorityVector) bool
- func IsMsgPriorityVectorWorseThanPortPriorityVector(msg *PriorityVector, port *PriorityVector) bool
- func IsValidStpPort(pId int32) bool
- func PimMachineStrStateMapInit()
- func PpmmMachineStrStateMapInit()
- func ProcessBpduFrame(p *StpPort, ptype BPDURxType, packet gopacket.Packet)
- func PrsMachineStrStateMapInit()
- func PrtMachineStrStateMapInit()
- func PrxmMachineStrStateMapInit()
- func PstMachineStrStateMapInit()
- func PtmMachineStrStateMapInit()
- func PtxmMachineStrStateMapInit()
- func SaveSwitchMac(switchMac string)
- func SendResponse(msg string, responseChan chan string)
- func SetAsicDPlugin(clientif asicdClient.AsicdClientIntf)
- func StpBrgConfigDelete(bId int32) error
- func StpBrgConfigParamCheck(c *StpBridgeConfig, create bool) error
- func StpBrgConfigSave(c *StpBridgeConfig) error
- func StpBrgForceVersion(bId int32, version int32) error
- func StpBrgForwardDelaySet(bId int32, fwddelay uint16) error
- func StpBrgHelloTimeSet(bId int32, hellotime uint16) error
- func StpBrgMaxAgeSet(bId int32, maxage uint16) error
- func StpBrgPrioritySet(bId int32, priority uint16) error
- func StpBrgTxHoldCountSet(bId int32, txholdcount uint16) error
- func StpBridgeCreate(c *StpBridgeConfig) error
- func StpBridgeDelete(c *StpBridgeConfig) error
- func StpFindBridgeById(key BridgeKey, b **Bridge) bool
- func StpFindBridgeByIfIndex(brgIfIndex int32, brg **Bridge) bool
- func StpFindPortByIfIndex(pId int32, brgId int32, p **StpPort) bool
- func StpGetBpduAgreement(flags uint8) bool
- func StpGetBpduForwarding(flags uint8) bool
- func StpGetBpduLearning(flags uint8) bool
- func StpGetBpduProposal(flags uint8) bool
- func StpGetBpduTopoChange(flags uint8) bool
- func StpGetBpduTopoChangeAck(flags uint8) bool
- func StpGlobalStateGet() int
- func StpGlobalStateSet(state int)
- func StpLogger(t string, msg string)
- func StpMachineLogger(t string, m string, p int32, b int32, msg string)
- func StpPortAddToBridge(pId int32, brgifindex int32)
- func StpPortAdminEdgeSet(pId int32, bId int32, adminedge bool) error
- func StpPortBpduGuardSet(pId int32, bId int32, bpduguard bool) error
- func StpPortBridgeAssuranceSet(pId int32, bId int32, bridgeassurance bool) error
- func StpPortConfigDelete(Id int32)
- func StpPortConfigParamCheck(c *StpPortConfig, update bool, create bool) error
- func StpPortConfigSave(c *StpPortConfig, update bool) error
- func StpPortCreate(c *StpPortConfig) error
- func StpPortDelFromBridge(pId int32, brgifindex int32)
- func StpPortDelete(c *StpPortConfig) error
- func StpPortEnable(pId int32, bId int32, enable bool) error
- func StpPortLinkDown(pId int32)
- func StpPortLinkUp(pId int32)
- func StpPortPortPathCostSet(pId int32, bId int32, pathcost uint32) error
- func StpPortPrioritySet(pId int32, bId int32, priority uint16) error
- func StpPortProtocolMigrationSet(pId int32, bId int32, protocolmigration bool) error
- func StpSetBpduFlags(topochangeack uint8, agreement uint8, forwarding uint8, learning uint8, ...)
- func TcMachineStrStateMapInit()
- func TimerTypeStrStateMapInit()
- type BPDURxType
- type BdmMachine
- func (bdm *BdmMachine) Apply(r *fsm.Ruleset) *fsm.Machine
- func (bdm *BdmMachine) BdmLogger(s string)
- func (bdm *BdmMachine) BdmMachineEdge(m fsm.Machine, data interface{}) fsm.State
- func (bdm *BdmMachine) BdmMachineNotEdge(m fsm.Machine, data interface{}) fsm.State
- func (m *BdmMachine) GetCurrStateStr() string
- func (m *BdmMachine) GetPrevStateStr() string
- func (bdm *BdmMachine) ProcessPostStateEdge()
- func (bdm *BdmMachine) ProcessPostStateNotEdge()
- func (bdm *BdmMachine) ProcessPostStateProcessing()
- func (bdm *BdmMachine) Stop()
- type Bridge
- type BridgeId
- type BridgeKey
- type MachineEvent
- type PimMachine
- func (pim *PimMachine) Apply(r *fsm.Ruleset) *fsm.Machine
- func (m *PimMachine) GetCurrStateStr() string
- func (m *PimMachine) GetPrevStateStr() string
- func (pim *PimMachine) NotifyAgreeChanged(oldagree bool, newagree bool)
- func (pim *PimMachine) NotifyAgreedChanged(oldagreed bool, newagreed bool)
- func (pim *PimMachine) NotifyDisputedChanged(olddisputed bool, newdisputed bool)
- func (pim *PimMachine) NotifyNewInfoChange(oldnewinfo bool, newnewinfo bool)
- func (pim *PimMachine) NotifyProposedChanged(oldproposed bool, newproposed bool)
- func (pim *PimMachine) NotifyReselectChanged(oldreselect bool, newreselect bool)
- func (pim *PimMachine) PimLogger(s string)
- func (pim *PimMachine) PimMachineAged(m fsm.Machine, data interface{}) fsm.State
- func (pim *PimMachine) PimMachineCurrent(m fsm.Machine, data interface{}) fsm.State
- func (pim *PimMachine) PimMachineDisabled(m fsm.Machine, data interface{}) fsm.State
- func (pim *PimMachine) PimMachineInferiorDesignated(m fsm.Machine, data interface{}) fsm.State
- func (pim *PimMachine) PimMachineNotDesignated(m fsm.Machine, data interface{}) fsm.State
- func (pim *PimMachine) PimMachineOther(m fsm.Machine, data interface{}) fsm.State
- func (pim *PimMachine) PimMachineReceive(m fsm.Machine, data interface{}) fsm.State
- func (pim *PimMachine) PimMachineRepeatedDesignated(m fsm.Machine, data interface{}) fsm.State
- func (pim *PimMachine) PimMachineSuperiorDesignated(m fsm.Machine, data interface{}) fsm.State
- func (pim *PimMachine) PimMachineUpdate(m fsm.Machine, data interface{}) fsm.State
- func (pim *PimMachine) ProcessPostStateProcessing(data interface{})
- func (pim *PimMachine) ProcessingPostStateAged(data interface{})
- func (pim *PimMachine) ProcessingPostStateCurrent(data interface{})
- func (pim *PimMachine) ProcessingPostStateDisabled(data interface{})
- func (pim *PimMachine) ProcessingPostStateInferiorDesignated(data interface{})
- func (pim *PimMachine) ProcessingPostStateNotDesignated(data interface{})
- func (pim *PimMachine) ProcessingPostStateOther(data interface{})
- func (pim *PimMachine) ProcessingPostStateReceive(data interface{})
- func (pim *PimMachine) ProcessingPostStateRepeatedDesignated(data interface{})
- func (pim *PimMachine) ProcessingPostStateSuperiorDesignated(data interface{})
- func (pim *PimMachine) ProcessingPostStateUpdate(data interface{})
- func (pim *PimMachine) Stop()
- type PointToPointMac
- type PortDesignatedRcvInfo
- type PortInfoState
- type PortMapKey
- type PortRole
- type PortTimer
- type PpmmMachine
- func (ppmm *PpmmMachine) Apply(r *fsm.Ruleset) *fsm.Machine
- func (m *PpmmMachine) GetCurrStateStr() string
- func (m *PpmmMachine) GetPrevStateStr() string
- func (ppmm *PpmmMachine) InformPtxMachineSendRSTPChanged()
- func (ppm *PpmmMachine) PpmLogger(s string)
- func (ppmm *PpmmMachine) PpmmMachineCheckingRSTP(m fsm.Machine, data interface{}) fsm.State
- func (ppmm *PpmmMachine) PpmmMachineSelectingSTP(m fsm.Machine, data interface{}) fsm.State
- func (ppmm *PpmmMachine) PpmmMachineSensing(m fsm.Machine, data interface{}) fsm.State
- func (ppmm *PpmmMachine) ProcessPostStateCheckingRSTP()
- func (ppmm *PpmmMachine) ProcessPostStateProcessing()
- func (ppmm *PpmmMachine) ProcessPostStateSelectingSTP()
- func (ppmm *PpmmMachine) ProcessPostStateSensing()
- func (ppmm *PpmmMachine) Stop()
- type PriorityVector
- type PrsMachine
- func (prsm *PrsMachine) Apply(r *fsm.Ruleset) *fsm.Machine
- func (m *PrsMachine) GetCurrStateStr() string
- func (m *PrsMachine) GetPrevStateStr() string
- func (prsm *PrsMachine) PrsLogger(s string)
- func (prsm *PrsMachine) PrsMachineInitBridge(m fsm.Machine, data interface{}) fsm.State
- func (prsm *PrsMachine) PrsMachineRoleSelection(m fsm.Machine, data interface{}) fsm.State
- func (prsm *PrsMachine) Stop()
- type PrtMachine
- func (prtm *PrtMachine) Apply(r *fsm.Ruleset) *fsm.Machine
- func (m *PrtMachine) GetCurrStateStr() string
- func (m *PrtMachine) GetPrevStateStr() string
- func (prtm *PrtMachine) NotifyForwardChanged(oldforward bool, newforward bool)
- func (prtm *PrtMachine) NotifyLearnChanged(oldlearn bool, newlearn bool)
- func (prtm *PrtMachine) NotifyNewInfoChanged(oldnewinfo bool, newnewinfo bool)
- func (prtm *PrtMachine) NotifyReRootChanged(oldreroot bool, newreroot bool)
- func (prtm *PrtMachine) NotifyRoleChanged(oldrole PortRole, newrole PortRole)
- func (prtm *PrtMachine) NotifySyncChanged(oldsync bool, newsync bool)
- func (prtm *PrtMachine) ProcessPostStateInitPort()
- func (prtm *PrtMachine) ProcessPostStateProcessing()
- func (prtm *PrtMachine) ProcessPostStateRootPort()
- func (prtm *PrtMachine) ProcessingPostStateAlternateAgreed()
- func (prtm *PrtMachine) ProcessingPostStateAlternatePort()
- func (prtm *PrtMachine) ProcessingPostStateAlternateProposed()
- func (prtm *PrtMachine) ProcessingPostStateBackupPort()
- func (prtm *PrtMachine) ProcessingPostStateBlockedPort()
- func (prtm *PrtMachine) ProcessingPostStateDesignatedDiscard()
- func (prtm *PrtMachine) ProcessingPostStateDesignatedForward()
- func (prtm *PrtMachine) ProcessingPostStateDesignatedLearn()
- func (prtm *PrtMachine) ProcessingPostStateDesignatedPort()
- func (prtm *PrtMachine) ProcessingPostStateDesignatedPropose()
- func (prtm *PrtMachine) ProcessingPostStateDesignatedRetired()
- func (prtm *PrtMachine) ProcessingPostStateDesignatedSynced()
- func (prtm *PrtMachine) ProcessingPostStateDisable()
- func (prtm *PrtMachine) ProcessingPostStateDisabled()
- func (prtm *PrtMachine) ProcessingPostStateReRoot()
- func (prtm *PrtMachine) ProcessingPostStateReRooted()
- func (prtm *PrtMachine) ProcessingPostStateRootAgreed()
- func (prtm *PrtMachine) ProcessingPostStateRootForward()
- func (prtm *PrtMachine) ProcessingPostStateRootLearn()
- func (prtm *PrtMachine) ProcessingPostStateRootProposed()
- func (prtm *PrtMachine) PrtLogger(s string)
- func (prtm *PrtMachine) PrtMachineAlternateAgreed(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineAlternatePort(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineAlternateProposed(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineBackupPort(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineBlockPort(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineDesignatedDiscard(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineDesignatedForward(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineDesignatedLearn(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineDesignatedPort(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineDesignatedPropose(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineDesignatedRetired(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineDesignatedSynced(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineDisablePort(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineDisabledPort(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineInitPort(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineReRoot(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineReRooted(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineRootAgreed(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineRootForward(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineRootLearn(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineRootPort(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) PrtMachineRootProposed(m fsm.Machine, data interface{}) fsm.State
- func (prtm *PrtMachine) Stop()
- type PrxmMachine
- func (prxm *PrxmMachine) Apply(r *fsm.Ruleset) *fsm.Machine
- func (m *PrxmMachine) GetCurrStateStr() string
- func (m *PrxmMachine) GetPrevStateStr() string
- func (prxm *PrxmMachine) ProcessPostStateDiscard(data interface{})
- func (prxm *PrxmMachine) ProcessPostStateProcessing(data interface{})
- func (prxm *PrxmMachine) ProcessPostStateReceive(data interface{})
- func (prxm *PrxmMachine) PrxmLogger(s string)
- func (prxm *PrxmMachine) PrxmMachineDiscard(m fsm.Machine, data interface{}) fsm.State
- func (prxm *PrxmMachine) PrxmMachineReceive(m fsm.Machine, data interface{}) fsm.State
- func (prxm *PrxmMachine) Stop()
- func (prxm *PrxmMachine) UpdtBPDUVersion(data interface{}) bool
- type PstMachine
- func (pstm *PstMachine) Apply(r *fsm.Ruleset) *fsm.Machine
- func (m *PstMachine) GetCurrStateStr() string
- func (m *PstMachine) GetPrevStateStr() string
- func (pstm *PstMachine) NotifyForwardingChanged(oldforwarding bool, newforwarding bool)
- func (pstm *PstMachine) NotifyLearningChanged(oldlearning bool, newlearning bool)
- func (pstm *PstMachine) ProcessPostStateDiscarding()
- func (pstm *PstMachine) ProcessPostStateForwarding()
- func (pstm *PstMachine) ProcessPostStateLearning()
- func (pstm *PstMachine) ProcessPostStateProcessing()
- func (pstm *PstMachine) PstMachineDiscarding(m fsm.Machine, data interface{}) fsm.State
- func (pstm *PstMachine) PstMachineForwarding(m fsm.Machine, data interface{}) fsm.State
- func (pstm *PstMachine) PstMachineLearning(m fsm.Machine, data interface{}) fsm.State
- func (pstm *PstMachine) PstmLogger(s string)
- func (pstm *PstMachine) Stop()
- type PtmMachine
- func (ptm *PtmMachine) Apply(r *fsm.Ruleset) *fsm.Machine
- func (m *PtmMachine) GetCurrStateStr() string
- func (m *PtmMachine) GetPrevStateStr() string
- func (ptm *PtmMachine) PrevState() fsm.State
- func (ptm *PtmMachine) PrevStateSet(s fsm.State)
- func (ptm *PtmMachine) PtmLogger(s string)
- func (ptm *PtmMachine) PtmMachineOneSecond(m fsm.Machine, data interface{}) fsm.State
- func (ptm *PtmMachine) PtmMachineTick(m fsm.Machine, data interface{}) fsm.State
- func (ptm *PtmMachine) Stop()
- func (m *PtmMachine) TickTimerDestroy()
- func (m *PtmMachine) TickTimerStart()
- func (m *PtmMachine) TickTimerStop()
- type PtxmMachine
- func (ptxm *PtxmMachine) Apply(r *fsm.Ruleset) *fsm.Machine
- func (m *PtxmMachine) GetCurrStateStr() string
- func (m *PtxmMachine) GetPrevStateStr() string
- func (ptxm *PtxmMachine) ProcessPostStateIdle()
- func (ptxm *PtxmMachine) ProcessPostStateProcessing()
- func (ptxm *PtxmMachine) ProcessPostStateTransmitConfig()
- func (ptxm *PtxmMachine) ProcessPostStateTransmitInit()
- func (ptxm *PtxmMachine) ProcessPostStateTransmitPeriodic()
- func (ptxm *PtxmMachine) ProcessPostStateTransmitRstp()
- func (ptxm *PtxmMachine) ProcessPostStateTransmitTcn()
- func (ptxm *PtxmMachine) PtxmLogger(s string)
- func (ptxm *PtxmMachine) PtxmMachineTransmitConfig(m fsm.Machine, data interface{}) fsm.State
- func (ptxm *PtxmMachine) PtxmMachineTransmitIdle(m fsm.Machine, data interface{}) fsm.State
- func (ptxm *PtxmMachine) PtxmMachineTransmitInit(m fsm.Machine, data interface{}) fsm.State
- func (ptxm *PtxmMachine) PtxmMachineTransmitPeriodic(m fsm.Machine, data interface{}) fsm.State
- func (ptxm *PtxmMachine) PtxmMachineTransmitRSTP(m fsm.Machine, data interface{}) fsm.State
- func (ptxm *PtxmMachine) PtxmMachineTransmitTCN(m fsm.Machine, data interface{}) fsm.State
- func (ptxm *PtxmMachine) Stop()
- type RxBpduPdu
- type StpBridgeConfig
- type StpPort
- func (p *StpPort) BEGIN(restart bool)
- func (p *StpPort) BdmMachineMain()
- func (p *StpPort) BridgeProtocolVersionGet() uint8
- func (p *StpPort) BuildRSTPEthernetLlcHeaders() (eth layers.Ethernet, llc layers.LLC)
- func (p *StpPort) CreateRxTx()
- func (p *StpPort) DecrementTimerCounters()
- func (p *StpPort) DeleteRxTx()
- func (p *StpPort) DistributeMachineEvents(mec []chan MachineEvent, e []MachineEvent, waitForResponse bool)
- func (p *StpPort) EdgeDelay() uint16
- func (p *StpPort) ForceVersionSet(src string, val int)
- func (p *StpPort) GetPortListToApplyConfigTo() (newlist []*StpPort)
- func (p *StpPort) IsAdminEdgePort() bool
- func (p *StpPort) NotifyEdgeDelayWhileTimerExpired()
- func (p *StpPort) NotifyFdWhileTimerExpired()
- func (p *StpPort) NotifyHelloWhenTimerExpired()
- func (p *StpPort) NotifyMdelayWhileTimerExpired()
- func (p *StpPort) NotifyOperEdgeChanged(src string, oldoperedge bool, newoperedge bool)
- func (p *StpPort) NotifyPortEnabled(src string, oldportenabled bool, newportenabled bool)
- func (p *StpPort) NotifyProposingChanged(src string, oldproposing bool, newproposing bool)
- func (p *StpPort) NotifyRbWhileTimerExpired()
- func (p *StpPort) NotifyRcvdInfoWhileTimerExpired()
- func (p *StpPort) NotifyRcvdMsgChanged(src string, oldrcvdmsg bool, newrcvdmsg bool, data interface{})
- func (p *StpPort) NotifyRcvdTcRcvdTcnRcvdTcAck(oldrcvdtc bool, oldrcvdtcn bool, oldrcvdtcack bool, newrcvdtc bool, ...)
- func (p *StpPort) NotifyRrWhileTimerExpired()
- func (p *StpPort) NotifySelectedChanged(src string, oldselected bool, newselected bool)
- func (p *StpPort) NotifySelectedRoleChanged(src string, oldselectedrole PortRole, newselectedrole PortRole)
- func (p *StpPort) NotifySyncedChanged(src string, oldsynced bool, newsynced bool)
- func (p *StpPort) NotifyTcWhileTimerExpired()
- func (p *StpPort) NotifyUpdtInfoChanged(src string, oldupdtinfo bool, newupdtinfo bool)
- func (p *StpPort) PimMachineMain()
- func (p *StpPort) PpmmMachineMain()
- func (p *StpPort) PrtMachineMain()
- func (p *StpPort) PrxmMachineMain()
- func (p *StpPort) PstMachineMain()
- func (p *StpPort) PtmMachineMain()
- func (p *StpPort) PtxmMachineMain()
- func (p *StpPort) ResetTimerCounters(counterType TimerType)
- func (p *StpPort) SaveMsgRcvInfo(data interface{})
- func (p *StpPort) SetRxPortCounters(ptype BPDURxType)
- func (p *StpPort) SetTxPortCounters(ptype BPDURxType)
- func (p *StpPort) Stop()
- func (p *StpPort) TcMachineMain()
- func (p *StpPort) TxConfig()
- func (p *StpPort) TxPVST()
- func (p *StpPort) TxRSTP()
- func (p *StpPort) TxTCN()
- type StpPortConfig
- type StpStateEvent
- func (se *StpStateEvent) CurrentEvent() fsm.Event
- func (se *StpStateEvent) CurrentState() fsm.State
- func (se *StpStateEvent) EnableLogging(ena bool)
- func (se *StpStateEvent) IsLoggerEna() bool
- func (se *StpStateEvent) LoggerSet(log func(string))
- func (se *StpStateEvent) PreviousEvent() fsm.Event
- func (se *StpStateEvent) PreviousState() fsm.State
- func (se *StpStateEvent) SetEvent(es string, e fsm.Event)
- func (se *StpStateEvent) SetState(s fsm.State)
- func (se *StpStateEvent) StateStrMapSet(strMap map[fsm.State]string)
- type TcMachine
- func (tcm *TcMachine) Apply(r *fsm.Ruleset) *fsm.Machine
- func (tcm *TcMachine) FlushFdb()
- func (m *TcMachine) GetCurrStateStr() string
- func (m *TcMachine) GetPrevStateStr() string
- func (tcm *TcMachine) NotifyFdbFlush()
- func (tcm *TcMachine) NotifyNewInfoChanged(oldnewinfo bool, newnewinfo bool)
- func (tcm *TcMachine) NotifyTcAckChanged(val bool)
- func (tcm *TcMachine) NotifyTcPropChanged(oldtcprop bool, newtcprop bool)
- func (tcm *TcMachine) NotifyTcWhileChanged(val int32)
- func (tcm *TcMachine) ProcessPostStateAcknowledged()
- func (tcm *TcMachine) ProcessPostStateActive()
- func (tcm *TcMachine) ProcessPostStateDetected()
- func (tcm *TcMachine) ProcessPostStateInactive()
- func (tcm *TcMachine) ProcessPostStateLearning()
- func (tcm *TcMachine) ProcessPostStateNotifiedTc()
- func (tcm *TcMachine) ProcessPostStateNotifiedTcn()
- func (tcm *TcMachine) ProcessPostStateProcessing()
- func (tcm *TcMachine) ProcessPostStatePropagating()
- func (tcm *TcMachine) Stop()
- func (tcm *TcMachine) TcMachineAcknowledged(m fsm.Machine, data interface{}) fsm.State
- func (tcm *TcMachine) TcMachineActive(m fsm.Machine, data interface{}) fsm.State
- func (tcm *TcMachine) TcMachineDetected(m fsm.Machine, data interface{}) fsm.State
- func (tcm *TcMachine) TcMachineInactive(m fsm.Machine, data interface{}) fsm.State
- func (tcm *TcMachine) TcMachineLearning(m fsm.Machine, data interface{}) fsm.State
- func (tcm *TcMachine) TcMachineNotifiedTc(m fsm.Machine, data interface{}) fsm.State
- func (tcm *TcMachine) TcMachineNotifiedTcn(m fsm.Machine, data interface{}) fsm.State
- func (tcm *TcMachine) TcMachinePropagating(m fsm.Machine, data interface{}) fsm.State
- func (tcm *TcMachine) TcmLogger(s string)
- type TimerType
- type Times
Constants ¶
const ( BdmStateNone = iota + 1 BdmStateEdge BdmStateNotEdge )
const ( BdmEventBeginAdminEdge = iota + 1 BdmEventBeginNotAdminEdge BdmEventNotPortEnabledAndAdminEdge BdmEventEdgeDelayWhileEqualZeroAndAutoEdgeAndSendRSTPAndProposing BdmEventNotPortEnabledAndNotAdminEdge BdmEventNotOperEdge )
const ( MigrateTimeDefault = 3 BridgeHelloTimeMin = 1 BridgeHelloTimeDefault = 2 BridgeMaxAgeMin = 6 BridgeMaxAgeMax = 40 BridgeMaxAgeDefault = 20 BridgeForwardDelayMin = 4 BridgeForwardDelayMax = 30 BridgeForwardDelayDefault = 15 TransmitHoldCountMin = 1 TransmitHoldCountMax = 10 TransmitHoldCountDefault = 6 )
const ( // usage 20,000,000-200,000,000 PortPathCostSpeedLess100Kbs = 200000000 // usage 2,000,000-200,000,000 PortPathCostSpeed1Mb = 20000000 // usage 200,000-20,000,000 PortPathCostSpeed10Mb = 2000000 // usage 20,000-2,000,000 PortPathCostSpeed100Mb = 200000 // usage 2,000-200,000 PortPathCost1Gb = 20000 // usage 200-20,000 PortPathCost10Gb = 2000 // usage 20-2000 PortPathCost100Gb = 200 // usage 20-200 PortPathCost1Tb = 20 // usage 1-20 PortPathCost10Tb = 2 )
Table 17-3 Recommended Port Path Cost Values provisionable range 1-200,000,000
const ( StpPointToPointForceTrue PointToPointMac = 0 StpPointToPointForceFalse = 1 StpPointToPointAuto = 2 )
const ( // init STP_GLOBAL_INIT = iota + 1 // allow all config STP_GLOBAL_ENABLE // disallow all config STP_GLOBAL_DISABLE // transition state to to allow deleting on // when global state changes to disable STP_GLOBAL_DISABLE_PENDING )
const ( PimStateNone = iota + 1 PimStateDisabled PimStateAged PimStateUpdate PimStateSuperiorDesignated PimStateRepeatedDesignated PimStateInferiorDesignated PimStateNotDesignated PimStateOther PimStateCurrent PimStateReceive )
const ( PimEventBegin = iota + 1 PimEventNotPortEnabledInfoIsNotEqualDisabled PimEventRcvdMsg PimEventRcvdMsgAndNotUpdtInfo PimEventPortEnabled PimEventSelectedAndUpdtInfo PimEventUnconditionalFallThrough PimEventInflsEqualReceivedAndRcvdInfoWhileEqualZeroAndNotUpdtInfoAndNotRcvdMsg PimEventRcvdInfoEqualSuperiorDesignatedInfo PimEventRcvdInfoEqualRepeatedDesignatedInfo PimEventRcvdInfoEqualInferiorDesignatedInfo PimEventRcvdInfoEqualInferiorRootAlternateInfo PimEventRcvdInfoEqualOtherInfo )
const ( PpmmStateNone = iota + 1 PpmmStateCheckingRSTP PpmmStateSelectingSTP PpmmStateSensing )
const ( PpmmEventBegin = iota + 1 PpmmEventMdelayNotEqualMigrateTimeAndNotPortEnabled PpmmEventNotPortEnabled PpmmEventMcheck PpmmEventRstpVersionAndNotSendRSTPAndRcvdRSTP PpmmEventMdelayWhileEqualZero PpmmEventSendRSTPAndRcvdSTP )
const ( PrsStateNone = iota + 1 PrsStateInitBridge PrsStateRoleSelection )
const ( PrsEventBegin = iota + 1 PrsEventUnconditionallFallThrough PrsEventReselect )
const ( PrtStateNone = iota + 1 // Role: Disabled PrtStateInitPort PrtStateDisablePort PrtStateDisabledPort // Role Root PrtStateRootPort PrtStateReRoot PrtStateRootAgreed PrtStateRootProposed PrtStateRootForward PrtStateRootLearn PrtStateReRooted // Role Designated PrtStateDesignatedPort PrtStateDesignatedRetired PrtStateDesignatedSynced PrtStateDesignatedPropose PrtStateDesignatedForward PrtStateDesignatedLearn PrtStateDesignatedDiscard // Role Alternate Backup PrtStateAlternatePort PrtStateAlternateAgreed PrtStateAlternateProposed PrtStateBlockPort PrtStateBackupPort )
const ( PrtEventBegin = iota + 1 PrtEventUnconditionallFallThrough // 2 // events taken from Figure 17.20 Disabled Port role transitions PrtEventSelectedRoleEqualDisabledPortAndRoleNotEqualSelectedRoleAndSelectedAndNotUpdtInfo // 3 PrtEventNotLearningAndNotForwardingAndSelectedAndNotUpdtInfo // 4 PrtEventFdWhileNotEqualMaxAgeAndSelectedAndNotUpdtInfo // 5 PrtEventSyncAndSelectedAndNotUpdtInfo // 6 also applies to Alternate and Backup Port role PrtEventReRootAndSelectedAndNotUpdtInfo // 7 also applies to Alternate and Backup Port role PrtEventNotSyncedAndSelectedAndNotUpdtInfo // 8 also applies to Alternate and Backup Port role // events taken from Figure 17.21 Root Port role transitions PrtEventSelectedRoleEqualRootPortAndRoleNotEqualSelectedRoleAndSelectedAndNotUpdtInfo // 9 PrtEventProposedAndNotAgreeAndSelectedAndNotUpdtInfo // 10 also applies to Alternate and Backup Port role PrtEventAllSyncedAndNotAgreeAndSelectedAndNotUpdtInfo // 11 also applies to Alternate and Backup Port role PrtEventProposedAndAgreeAndSelectedAndNotUpdtInfo // 12 also applies to Alternate and Backup Port role PrtEventNotForwardAndNotReRootAndSelectedAndNotUpdtInfo // 13 PrtEventRrWhileNotEqualFwdDelayAndSelectedAndNotUpdtInfo // 14 PrtEventReRootAndForwardAndSelectedAndNotUpdtInfo // 15 PrtEventFdWhileEqualZeroAndRstpVersionAndNotLearnAndSelectedAndNotUpdtInfo // 16 PrtEventReRootedAndRbWhileEqualZeroAndRstpVersionAndNotLearnAndSelectedAndNotUpdtInfo // 17 PrtEventFdWhileEqualZeroAndRstpVersionAndLearnAndNotForwardAndSelectedAndNotUpdtInfo // 18 PrtEventReRootedAndRbWhileEqualZeroAndRstpVersionAndLearnAndNotForwardAndSelectedAndNotUpdtInfo // 19 // events take from Figure 17-22 Designated port role transitions PrtEventSelectedRoleEqualDesignatedPortAndRoleNotEqualSelectedRoleAndSelectedAndNotUpdtInfo // 20 PrtEventNotForwardAndNotAgreedAndNotProposingAndNotOperEdgeAndSelectedAndNotUpdtInfo // 21 PrtEventNotLearningAndNotForwardingAndNotSyncedAndSelectedAndNotUpdtInfo // 22 PrtEventAgreedAndNotSyncedAndSelectedAndNotUpdtInfo // 23 PrtEventOperEdgeAndNotSyncedAndSelectedAndNotUpdtInfo // 24 PrtEventSyncAndSyncedAndSelectedAndNotUpdtInfo // 25 PrtEventRrWhileEqualZeroAndReRootAndSelectedAndNotUpdtInfo // 26 PrtEventSyncAndNotSyncedAndNotOperEdgeAndLearnAndSelectedAndNotUpdtInfo // 27 PrtEventSyncAndNotSyncedAndNotOperEdgeAndForwardAndSelectedAndNotUpdtInfo // 28 PrtEventReRootAndRrWhileNotEqualZeroAndNotOperEdgeAndLearnAndSelectedAndNotUpdtInfo // 29 PrtEventReRootAndRrWhileNotEqualZeroAndNotOperEdgeAndForwardAndSelectedAndNotUpdtInfo // 30 PrtEventDisputedAndNotOperEdgeAndLearnAndSelectedAndNotUpdtInfo // 31 PrtEventDisputedAndNotOperEdgeAndForwardAndSelectedAndNotUpdtInfo // 32 PrtEventFdWhileEqualZeroAndRrWhileEqualZeroAndNotSyncAndNotLearnAndSelectedAndNotUpdtInfo // 33 PrtEventFdWhileEqualZeroAndNotReRootAndNotSyncAndNotLearnSelectedAndNotUpdtInfo // 34 PrtEventAgreedAndRrWhileEqualZeroAndNotSyncAndNotLearnAndSelectedAndNotUpdtInfo // 35 PrtEventAgreedAndNotReRootAndNotSyncAndNotLearnAndSelectedAndNotUpdtInfo // 36 PrtEventOperEdgeAndRrWhileEqualZeroAndNotSyncAndNotLearnAndSelectedAndNotUpdtInfo // 37 PrtEventOperEdgeAndNotReRootAndNotSyncAndNotLearnAndSelectedAndNotUpdtInfo // 38 PrtEventNotReRootAndNotSyncAndNotLearnAndSelectedAndNotUpdtInfo // 39 PrtEventFdWhileEqualZeroAndRrWhileEqualZeroAndNotSyncAndLearnAndNotForwardSelectedAndNotUpdtInfo // 40 PrtEventFdWhileEqualZeroAndNotReRootAndNotSyncAndLearnAndNotForwardSelectedAndNotUpdtInfo // 41 PrtEventAgreedAndRrWhileEqualZeroAndNotSyncAndLearnAndNotForwardAndSelectedAndNotUpdtInfo // 42 PrtEventAgreedAndNotReRootAndNotSyncAndLearnAndNotForwardAndSelectedAndNotUpdtInfo // 43 PrtEventOperEdgeAndRrWhileEqualZeroAndNotSyncAndLearnAndNotForwardAndSelectedAndNotUpdtInfo // 44 PrtEventOperEdgeAndNotReRootAndNotSyncAndLearnAndNotForwardAndSelectedAndNotUpdtInfo // 45 PrtEventNotReRootAndNotSyncAndLearnAndNotForwardAndSelectedAndNotUpdtInfo // 46 // events taken from Figure 17-23 Alternate and Backup Port role transitions PrtEventSelectedRoleEqualAlternateAndRoleNotEqualSelectedRoleAndSelectedAndNotUpdtInfo // 47 PrtEventSelectedRoleEqualBackupPortAndRoleNotEqualSelectedRoleAndSelectedAndNotUpdtInfo // 48 PrtEventRbWhileNotEqualTwoTimesHelloTimeAndRoleEqualsBackupPortAndSelectedAndNotUpdtInfo // 49 PrtEventFdWhileNotEqualForwardDelayAndSelectedAndNotUpdtInfo // 50 )
const ( PrxmStateNone = iota + 1 PrxmStateDiscard PrxmStateReceive )
const ( PrxmEventBegin = iota + 1 PrxmEventRcvdBpduAndNotPortEnabled PrxmEventEdgeDelayWhileNotEqualMigrateTimeAndNotPortEnabled PrxmEventRcvdBpduAndPortEnabled PrxmEventRcvdBpduAndPortEnabledAndNotRcvdMsg )
const ( PstStateNone = iota + 1 PstStateDiscarding PstStateLearning PstStateForwarding )
const ( PstEventBegin = iota + 1 PstEventLearn PstEventNotLearn PstEventForward PstEventNotForward )
const ( PtmStateNone = iota + 1 PtmStateOneSecond PtmStateTick )
const ( PtmEventBegin = iota + 1 PtmEventTickEqualsTrue PtmEventUnconditionalFallthrough )
const ( PtxmStateNone = iota + 1 PtxmStateTransmitInit PtxmStateTransmitConfig PtxmStateTransmitTCN PtxmStateTransmitPeriodic PtxmStateTransmitRSTP PtxmStateIdle )
const ( PtxmEventBegin = iota + 1 PtxmEventUnconditionalFallThrough PtxmEventSendRSTPAndNewInfoAndTxCountLessThanTxHoldCoundAndHelloWhenNotEqualZeroAndSelectedAndNotUpdtInfo PtxmEventNotSendRSTPAndNewInfoAndRootPortAndTxCountLessThanTxHoldCountAndHellWhenNotEqualZeroAndSelectedAndNotUpdtInfo PtxmEventNotSendRSTPAndNewInfoAndDesignatedPortAndTxCountLessThanTxHoldCountAndHellWhenNotEqualZeroAndSelectedAndNotUpdtInfo PtxmEventHelloWhenEqualsZeroAndSelectedAndNotUpdtInfo )
const ( TcStateNone = iota + 1 TcStateInactive TcStateLearning TcStateDetected TcStateActive TcStateNotifiedTcn TcStateNotifiedTc TcStatePropagating TcStateAcknowledged )
const ( TcEventBegin = iota + 1 TcEventUnconditionalFallThrough TcEventRoleNotEqualRootPortAndRoleNotEqualDesignatedPortAndNotLearnAndNotLearningAndNotRcvdTcAndNotRcvdTcnAndNotRcvdTcAckAndNotTcProp TcEventLearnAndNotFdbFlush TcEventRcvdTc TcEventRcvdTcn TcEventRcvdTcAck TcEventTcProp TcEventRoleEqualRootPortAndForwardAndNotOperEdge TcEventRoleEqualDesignatedPortAndForwardAndNotOperEdge TcEventTcPropAndNotOperEdge TcEventRoleNotEqualRootPortAndRoleNotEqualDesignatedPort TcEventOperEdge )
const BdmMachineModuleStr = "BDM"
const BridgeConfigModuleStr = "BRG CFG"
const DEFAULT_STP_BRIDGE_VLAN = 0
const PVST_VLAN_PRIORITY = 7
const PimMachineModuleStr = "PIM"
const PortConfigModuleStr = "PORT CFG"
const PpmmMachineModuleStr = "PPMM"
const PrsMachineModuleStr = "PRSM"
const PrtMachineModuleStr = "PRTM"
const PrxmMachineModuleStr = "PRXM"
const PstMachineModuleStr = "PSTM"
const PtmMachineModuleStr = "PTIM"
const PtxmMachineModuleStr = "PTXM"
const RxModuleStr = "Rx Module STP"
const TcMachineModuleStr = "TCM"
Variables ¶
var BdmStateStrMap map[fsm.State]string
var BridgeListTable []*Bridge
var BridgeMapTable map[BridgeKey]*Bridge
var ClientIntfs []asicdClient.AsicdClientIntf
var PimStateStrMap map[fsm.State]string
var PortConfigMap map[int32]portConfig
var PortListTable []*StpPort
var PortMapTable map[PortMapKey]*StpPort
var PpmmStateStrMap map[fsm.State]string
var PrsStateStrMap map[fsm.State]string
var PrtStateStrMap map[fsm.State]string
var PrxmStateStrMap map[fsm.State]string
var PstStateStrMap map[fsm.State]string
var PtmStateStrMap map[fsm.State]string
var PtxmStateStrMap map[fsm.State]string
var StpBridgeConfigMap map[int32]StpBridgeConfig
store the bridge config for each bridge
var StpBridgeMac [6]uint8
var StpGlobalState int = STP_GLOBAL_INIT
var StpPortConfigMap map[int32]StpPortConfig
store the port config for each port
var TcStateStrMap map[fsm.State]string
var TimerTypeStrMap map[TimerType]string
Functions ¶
func BdmMachineStrStateMapInit ¶
func BdmMachineStrStateMapInit()
func BpduRxMain ¶
BpduRxMain will process incomming packets from
func CompareBridgeAddr ¶
func CompareBridgeId ¶
Compare BridgeId 0 == equal > 1 == greater than < 1 == less than
func ConstructPortConfigMap ¶
func ConstructPortConfigMap()
func ConvertBoolToUint8 ¶
func ConvertRoleToPktRole ¶
func CreateBridgeIdStr ¶
func DelStpBridge ¶
func DelStpPort ¶
func DelStpPort(p *StpPort)
NOT NEEDED
func (p *StpPort) PollLinuxLinkStatus() {
p.PollingTimer = time.NewTimer(time.Second * 1) p.PollingRoutine = true go func(p *StpPort) { StpMachineLogger("DEBUG", "LINUX POLLING", p.IfIndex, p.BrgIfIndex, "Start") for { if !p.PollingRoutine { fmt.Println("Stopping Link Polling Routine") return } select { case <-p.PollingTimer.C: netif, _ := netlink.LinkByName(PortConfigMap[p.IfIndex].Name) netifattr := netif.Attrs() //StpLogger("DEBUG", fmt.Sprintf("Polling link flags%#v, running=0x%x up=0x%x check1 %t check2 %t", netifattr.Flags, syscall.IFF_RUNNING, syscall.IFF_UP, ((netifattr.Flags>>6)&0x1) == 1, (netifattr.Flags&1) == 1)) //if (((netifattr.Flags >> 6) & 0x1) == 1) && (netifattr.Flags&1) == 1 { if (netifattr.Flags & 1) == 1 { //StpLogger("DEBUG", "LINUX LINK UP") prevPortEnabled := p.PortEnabled p.PortEnabled = true p.NotifyPortEnabled("LINUX LINK STATUS", prevPortEnabled, true) } else { //StpLogger("DEBUG", "LINUX LINK DOWN") prevPortEnabled := p.PortEnabled p.PortEnabled = false p.NotifyPortEnabled("LINUX LINK STATUS", prevPortEnabled, false) } p.PollingTimer.Reset(time.Second * 1) } } }(p) }
func GetAsicDPluginList ¶
func GetAsicDPluginList() []asicdClient.AsicdClientIntf
func GetIfIndexFromIntfRef ¶
IntfRef can be string number or fpPort
func GetPortNameFromIfIndex ¶
func GetStpLogger ¶
func IsDesignatedPriorytVectorNotHigherThanPortPriorityVector ¶
func IsDesignatedPriorytVectorNotHigherThanPortPriorityVector(d *PriorityVector, p *PriorityVector) bool
func IsMsgPriorityVectorSuperiorOrSameThanPortPriorityVector ¶
func IsMsgPriorityVectorSuperiorOrSameThanPortPriorityVector(msg *PriorityVector, port *PriorityVector) bool
func IsMsgPriorityVectorSuperiorThanPortPriorityVector ¶
func IsMsgPriorityVectorSuperiorThanPortPriorityVector(msg *PriorityVector, port *PriorityVector) bool
17.6 Priority vector calculations
func IsMsgPriorityVectorTheSameOrWorseThanPortPriorityVector ¶
func IsMsgPriorityVectorTheSameOrWorseThanPortPriorityVector(msg *PriorityVector, port *PriorityVector) bool
func IsMsgPriorityVectorWorseThanPortPriorityVector ¶
func IsMsgPriorityVectorWorseThanPortPriorityVector(msg *PriorityVector, port *PriorityVector) bool
func IsValidStpPort ¶
func PimMachineStrStateMapInit ¶
func PimMachineStrStateMapInit()
func PpmmMachineStrStateMapInit ¶
func PpmmMachineStrStateMapInit()
func ProcessBpduFrame ¶
func ProcessBpduFrame(p *StpPort, ptype BPDURxType, packet gopacket.Packet)
ProcessBpduFrame will lookup the cooresponding port from which the packet arrived and forward the packet to the Port Rx Machine for processing
func PrsMachineStrStateMapInit ¶
func PrsMachineStrStateMapInit()
func PrtMachineStrStateMapInit ¶
func PrtMachineStrStateMapInit()
func PrxmMachineStrStateMapInit ¶
func PrxmMachineStrStateMapInit()
func PstMachineStrStateMapInit ¶
func PstMachineStrStateMapInit()
func PtmMachineStrStateMapInit ¶
func PtmMachineStrStateMapInit()
func PtxmMachineStrStateMapInit ¶
func PtxmMachineStrStateMapInit()
func SaveSwitchMac ¶
func SaveSwitchMac(switchMac string)
func SendResponse ¶
func SetAsicDPlugin ¶
func SetAsicDPlugin(clientif asicdClient.AsicdClientIntf)
func StpBrgConfigDelete ¶
func StpBrgConfigParamCheck ¶
func StpBrgConfigParamCheck(c *StpBridgeConfig, create bool) error
StpBrgConfigParamCheck will validate the bridge config paramaters
func StpBrgConfigSave ¶
func StpBrgConfigSave(c *StpBridgeConfig) error
StpPortConfigSave Save the last config given by user this is a validation check as well so that all port contain the same config
func StpBrgForceVersion ¶
func StpBrgForwardDelaySet ¶
func StpBrgHelloTimeSet ¶
func StpBrgMaxAgeSet ¶
func StpBrgPrioritySet ¶
func StpBrgTxHoldCountSet ¶
func StpBridgeCreate ¶
func StpBridgeCreate(c *StpBridgeConfig) error
func StpBridgeDelete ¶
func StpBridgeDelete(c *StpBridgeConfig) error
func StpFindBridgeById ¶
func StpFindBridgeByIfIndex ¶
func StpGetBpduAgreement ¶
func StpGetBpduForwarding ¶
func StpGetBpduLearning ¶
func StpGetBpduProposal ¶
func StpGetBpduTopoChange ¶
func StpGetBpduTopoChangeAck ¶
func StpGlobalStateGet ¶
func StpGlobalStateGet() int
func StpGlobalStateSet ¶
func StpGlobalStateSet(state int)
func StpPortAddToBridge ¶
func StpPortAdminEdgeSet ¶
StpPortAdminEdgeSet will set all bridge port as admin edge ports
func StpPortConfigParamCheck ¶
func StpPortConfigParamCheck(c *StpPortConfig, update bool, create bool) error
StpPortConfigParamCheck will validate the config paramater for a bridge port
func StpPortConfigSave ¶
func StpPortConfigSave(c *StpPortConfig, update bool) error
StpPortConfigSave Save the last config given by user this is a validation check as well so that all port contain the same config
func StpPortCreate ¶
func StpPortCreate(c *StpPortConfig) error
func StpPortDelFromBridge ¶
func StpPortDelete ¶
func StpPortDelete(c *StpPortConfig) error
func StpPortLinkDown ¶
func StpPortLinkDown(pId int32)
func StpPortLinkUp ¶
func StpPortLinkUp(pId int32)
func StpPortPortPathCostSet ¶
StpPortPortPathCostSet N/A
func StpPortPrioritySet ¶
StpPortPrioritySet will set the priority on all bridge ports
func StpSetBpduFlags ¶
func TcMachineStrStateMapInit ¶
func TcMachineStrStateMapInit()
func TimerTypeStrStateMapInit ¶
func TimerTypeStrStateMapInit()
Types ¶
type BPDURxType ¶
type BPDURxType int8
const ( BPDURxTypeUnknown BPDURxType = iota BPDURxTypeUnknownBPDU BPDURxTypeSTP BPDURxTypeRSTP BPDURxTypeTopo BPDURxTypeTopoAck BPDURxTypePVST )
this is not to be confused with bpdu type as defined in message
func ValidateBPDUFrame ¶
func ValidateBPDUFrame(p *StpPort, packet gopacket.Packet) (bpduType BPDURxType)
ValidateBPDUFrame: 802.1D Section 9.3.4 Function shall validate the received BPDU
type BdmMachine ¶
type BdmMachine struct { Machine *fsm.Machine // machine specific events BdmEvents chan MachineEvent // enable logging BdmLogEnableEvent chan bool // contains filtered or unexported fields }
BdmMachine holds FSM and current State and event channels for State transitions
func BdmMachineFSMBuild ¶
func BdmMachineFSMBuild(p *StpPort) *BdmMachine
func NewStpBdmMachine ¶
func NewStpBdmMachine(p *StpPort) *BdmMachine
NewStpPimMachine will create a new instance of the LacpRxMachine
func (*BdmMachine) Apply ¶
func (bdm *BdmMachine) Apply(r *fsm.Ruleset) *fsm.Machine
A helpful function that lets us apply arbitrary rulesets to this instances State machine without reallocating the machine.
func (*BdmMachine) BdmLogger ¶
func (bdm *BdmMachine) BdmLogger(s string)
func (*BdmMachine) BdmMachineEdge ¶
func (bdm *BdmMachine) BdmMachineEdge(m fsm.Machine, data interface{}) fsm.State
BdmMachineEdge
func (*BdmMachine) BdmMachineNotEdge ¶
func (bdm *BdmMachine) BdmMachineNotEdge(m fsm.Machine, data interface{}) fsm.State
BdmMachineNotEdge
func (*BdmMachine) GetCurrStateStr ¶
func (m *BdmMachine) GetCurrStateStr() string
func (*BdmMachine) GetPrevStateStr ¶
func (m *BdmMachine) GetPrevStateStr() string
func (*BdmMachine) ProcessPostStateEdge ¶
func (bdm *BdmMachine) ProcessPostStateEdge()
func (*BdmMachine) ProcessPostStateNotEdge ¶
func (bdm *BdmMachine) ProcessPostStateNotEdge()
func (*BdmMachine) ProcessPostStateProcessing ¶
func (bdm *BdmMachine) ProcessPostStateProcessing()
type Bridge ¶
type Bridge struct { // 17.18.1 Begin bool // 17.18.2 BridgeIdentifier BridgeId // 17.18.3 // Root/Designated equal to Bridge Identifier BridgePriority PriorityVector // 17.18.4 BridgeTimes Times // 17.18.6 RootPortId int32 // 17.18.7 RootTimes Times // Stp IfIndex StpPorts []int32 ForceVersion int32 TxHoldCount uint64 // Vlan Vlan uint16 PrsMachineFsm *PrsMachine // store the previous bridge id OldRootBridgeIdentifier BridgeId // IntfRef IntfRef string // bridge ifIndex BrgIfIndex int32 // hw stgId StgId int32 DebugLevel int // contains filtered or unexported fields }
func NewStpBridge ¶
func NewStpBridge(c *StpBridgeConfig) *Bridge
type MachineEvent ¶
type MachineEvent struct {
// contains filtered or unexported fields
}
type PimMachine ¶
type PimMachine struct { Machine *fsm.Machine // machine specific events PimEvents chan MachineEvent // enable logging PimLogEnableEvent chan bool // contains filtered or unexported fields }
PimMachine holds FSM and current State and event channels for State transitions
func NewStpPimMachine ¶
func NewStpPimMachine(p *StpPort) *PimMachine
NewStpPimMachine will create a new instance of the LacpRxMachine
func PimMachineFSMBuild ¶
func PimMachineFSMBuild(p *StpPort) *PimMachine
func (*PimMachine) Apply ¶
func (pim *PimMachine) Apply(r *fsm.Ruleset) *fsm.Machine
A helpful function that lets us apply arbitrary rulesets to this instances State machine without reallocating the machine.
func (*PimMachine) GetCurrStateStr ¶
func (m *PimMachine) GetCurrStateStr() string
func (*PimMachine) GetPrevStateStr ¶
func (m *PimMachine) GetPrevStateStr() string
func (*PimMachine) NotifyAgreeChanged ¶
func (pim *PimMachine) NotifyAgreeChanged(oldagree bool, newagree bool)
notify the prt machine
func (*PimMachine) NotifyAgreedChanged ¶
func (pim *PimMachine) NotifyAgreedChanged(oldagreed bool, newagreed bool)
func (*PimMachine) NotifyDisputedChanged ¶
func (pim *PimMachine) NotifyDisputedChanged(olddisputed bool, newdisputed bool)
func (*PimMachine) NotifyNewInfoChange ¶
func (pim *PimMachine) NotifyNewInfoChange(oldnewinfo bool, newnewinfo bool)
func (*PimMachine) NotifyProposedChanged ¶
func (pim *PimMachine) NotifyProposedChanged(oldproposed bool, newproposed bool)
func (*PimMachine) NotifyReselectChanged ¶
func (pim *PimMachine) NotifyReselectChanged(oldreselect bool, newreselect bool)
func (*PimMachine) PimLogger ¶
func (pim *PimMachine) PimLogger(s string)
func (*PimMachine) PimMachineAged ¶
func (pim *PimMachine) PimMachineAged(m fsm.Machine, data interface{}) fsm.State
PimMachineAged
func (*PimMachine) PimMachineCurrent ¶
func (pim *PimMachine) PimMachineCurrent(m fsm.Machine, data interface{}) fsm.State
PimMachineCurrent
func (*PimMachine) PimMachineDisabled ¶
func (pim *PimMachine) PimMachineDisabled(m fsm.Machine, data interface{}) fsm.State
PimMachineDisabled
func (*PimMachine) PimMachineInferiorDesignated ¶
func (pim *PimMachine) PimMachineInferiorDesignated(m fsm.Machine, data interface{}) fsm.State
PimMachineInferiorDesignated
func (*PimMachine) PimMachineNotDesignated ¶
func (pim *PimMachine) PimMachineNotDesignated(m fsm.Machine, data interface{}) fsm.State
PimMachineNotDesignated
func (*PimMachine) PimMachineOther ¶
func (pim *PimMachine) PimMachineOther(m fsm.Machine, data interface{}) fsm.State
PimMachineOther
func (*PimMachine) PimMachineReceive ¶
func (pim *PimMachine) PimMachineReceive(m fsm.Machine, data interface{}) fsm.State
PimMachineReceive
func (*PimMachine) PimMachineRepeatedDesignated ¶
func (pim *PimMachine) PimMachineRepeatedDesignated(m fsm.Machine, data interface{}) fsm.State
PimMachineRepeatedDesignated
func (*PimMachine) PimMachineSuperiorDesignated ¶
func (pim *PimMachine) PimMachineSuperiorDesignated(m fsm.Machine, data interface{}) fsm.State
PimMachineSuperiorDesignated
func (*PimMachine) PimMachineUpdate ¶
func (pim *PimMachine) PimMachineUpdate(m fsm.Machine, data interface{}) fsm.State
PimMachineUpdate
func (*PimMachine) ProcessPostStateProcessing ¶
func (pim *PimMachine) ProcessPostStateProcessing(data interface{})
func (*PimMachine) ProcessingPostStateAged ¶
func (pim *PimMachine) ProcessingPostStateAged(data interface{})
func (*PimMachine) ProcessingPostStateCurrent ¶
func (pim *PimMachine) ProcessingPostStateCurrent(data interface{})
func (*PimMachine) ProcessingPostStateDisabled ¶
func (pim *PimMachine) ProcessingPostStateDisabled(data interface{})
func (*PimMachine) ProcessingPostStateInferiorDesignated ¶
func (pim *PimMachine) ProcessingPostStateInferiorDesignated(data interface{})
func (*PimMachine) ProcessingPostStateNotDesignated ¶
func (pim *PimMachine) ProcessingPostStateNotDesignated(data interface{})
func (*PimMachine) ProcessingPostStateOther ¶
func (pim *PimMachine) ProcessingPostStateOther(data interface{})
func (*PimMachine) ProcessingPostStateReceive ¶
func (pim *PimMachine) ProcessingPostStateReceive(data interface{})
func (*PimMachine) ProcessingPostStateRepeatedDesignated ¶
func (pim *PimMachine) ProcessingPostStateRepeatedDesignated(data interface{})
func (*PimMachine) ProcessingPostStateSuperiorDesignated ¶
func (pim *PimMachine) ProcessingPostStateSuperiorDesignated(data interface{})
func (*PimMachine) ProcessingPostStateUpdate ¶
func (pim *PimMachine) ProcessingPostStateUpdate(data interface{})
type PointToPointMac ¶
type PointToPointMac int
type PortDesignatedRcvInfo ¶
type PortDesignatedRcvInfo int
const ( SuperiorDesignatedInfo PortDesignatedRcvInfo = iota RepeatedDesignatedInfo InferiorDesignatedInfo InferiorRootAlternateInfo OtherInfo )
type PortInfoState ¶
type PortInfoState int
const ( PortInfoStateMine PortInfoState = iota PortInfoStateAged PortInfoStateReceived PortInfoStateDisabled )
type PortMapKey ¶
type PpmmMachine ¶
type PpmmMachine struct { Machine *fsm.Machine // machine specific events PpmmEvents chan MachineEvent // enable logging PpmmLogEnableEvent chan bool // contains filtered or unexported fields }
LacpRxMachine holds FSM and current State and event channels for State transitions
func NewStpPpmmMachine ¶
func NewStpPpmmMachine(p *StpPort) *PpmmMachine
NewLacpRxMachine will create a new instance of the LacpRxMachine
func PpmmMachineFSMBuild ¶
func PpmmMachineFSMBuild(p *StpPort) *PpmmMachine
func (*PpmmMachine) Apply ¶
func (ppmm *PpmmMachine) Apply(r *fsm.Ruleset) *fsm.Machine
A helpful function that lets us apply arbitrary rulesets to this instances State machine without reallocating the machine.
func (*PpmmMachine) GetCurrStateStr ¶
func (m *PpmmMachine) GetCurrStateStr() string
func (*PpmmMachine) GetPrevStateStr ¶
func (m *PpmmMachine) GetPrevStateStr() string
func (*PpmmMachine) InformPtxMachineSendRSTPChanged ¶
func (ppmm *PpmmMachine) InformPtxMachineSendRSTPChanged()
func (*PpmmMachine) PpmLogger ¶
func (ppm *PpmmMachine) PpmLogger(s string)
func (*PpmmMachine) PpmmMachineCheckingRSTP ¶
func (ppmm *PpmmMachine) PpmmMachineCheckingRSTP(m fsm.Machine, data interface{}) fsm.State
PpmMachineCheckingRSTP
func (*PpmmMachine) PpmmMachineSelectingSTP ¶
func (ppmm *PpmmMachine) PpmmMachineSelectingSTP(m fsm.Machine, data interface{}) fsm.State
PpmmMachineSelectingSTP
func (*PpmmMachine) PpmmMachineSensing ¶
func (ppmm *PpmmMachine) PpmmMachineSensing(m fsm.Machine, data interface{}) fsm.State
PpmmMachineSensing
func (*PpmmMachine) ProcessPostStateCheckingRSTP ¶
func (ppmm *PpmmMachine) ProcessPostStateCheckingRSTP()
func (*PpmmMachine) ProcessPostStateProcessing ¶
func (ppmm *PpmmMachine) ProcessPostStateProcessing()
func (*PpmmMachine) ProcessPostStateSelectingSTP ¶
func (ppmm *PpmmMachine) ProcessPostStateSelectingSTP()
func (*PpmmMachine) ProcessPostStateSensing ¶
func (ppmm *PpmmMachine) ProcessPostStateSensing()
type PriorityVector ¶
type PrsMachine ¶
type PrsMachine struct { Machine *fsm.Machine // machine specific events PrsEvents chan MachineEvent // enable logging PrsLogEnableEvent chan bool // contains filtered or unexported fields }
PrsMachine holds FSM and current State and event channels for State transitions
func NewStpPrsMachine ¶
func NewStpPrsMachine(b *Bridge) *PrsMachine
NewStpPimMachine will create a new instance of the LacpRxMachine
func PrsMachineFSMBuild ¶
func PrsMachineFSMBuild(b *Bridge) *PrsMachine
func (*PrsMachine) Apply ¶
func (prsm *PrsMachine) Apply(r *fsm.Ruleset) *fsm.Machine
A helpful function that lets us apply arbitrary rulesets to this instances State machine without reallocating the machine.
func (*PrsMachine) GetCurrStateStr ¶
func (m *PrsMachine) GetCurrStateStr() string
func (*PrsMachine) GetPrevStateStr ¶
func (m *PrsMachine) GetPrevStateStr() string
func (*PrsMachine) PrsLogger ¶
func (prsm *PrsMachine) PrsLogger(s string)
func (*PrsMachine) PrsMachineInitBridge ¶
func (prsm *PrsMachine) PrsMachineInitBridge(m fsm.Machine, data interface{}) fsm.State
PrsMachineInitBridge
func (*PrsMachine) PrsMachineRoleSelection ¶
func (prsm *PrsMachine) PrsMachineRoleSelection(m fsm.Machine, data interface{}) fsm.State
PrsMachineRoleSelection
type PrtMachine ¶
type PrtMachine struct { Machine *fsm.Machine // machine specific events PrtEvents chan MachineEvent // enable logging PrtLogEnableEvent chan bool // contains filtered or unexported fields }
PrtMachine holds FSM and current State and event channels for State transitions
func NewStpPrtMachine ¶
func NewStpPrtMachine(p *StpPort) *PrtMachine
NewStpPrtMachine will create a new instance of the LacpRxMachine
func PrtMachineFSMBuild ¶
func PrtMachineFSMBuild(p *StpPort) *PrtMachine
func (*PrtMachine) Apply ¶
func (prtm *PrtMachine) Apply(r *fsm.Ruleset) *fsm.Machine
A helpful function that lets us apply arbitrary rulesets to this instances State machine without reallocating the machine.
func (*PrtMachine) GetCurrStateStr ¶
func (m *PrtMachine) GetCurrStateStr() string
func (*PrtMachine) GetPrevStateStr ¶
func (m *PrtMachine) GetPrevStateStr() string
func (*PrtMachine) NotifyForwardChanged ¶
func (prtm *PrtMachine) NotifyForwardChanged(oldforward bool, newforward bool)
func (*PrtMachine) NotifyLearnChanged ¶
func (prtm *PrtMachine) NotifyLearnChanged(oldlearn bool, newlearn bool)
func (*PrtMachine) NotifyNewInfoChanged ¶
func (prtm *PrtMachine) NotifyNewInfoChanged(oldnewinfo bool, newnewinfo bool)
func (*PrtMachine) NotifyReRootChanged ¶
func (prtm *PrtMachine) NotifyReRootChanged(oldreroot bool, newreroot bool)
func (*PrtMachine) NotifyRoleChanged ¶
func (prtm *PrtMachine) NotifyRoleChanged(oldrole PortRole, newrole PortRole)
func (*PrtMachine) NotifySyncChanged ¶
func (prtm *PrtMachine) NotifySyncChanged(oldsync bool, newsync bool)
func (*PrtMachine) ProcessPostStateInitPort ¶
func (prtm *PrtMachine) ProcessPostStateInitPort()
func (*PrtMachine) ProcessPostStateProcessing ¶
func (prtm *PrtMachine) ProcessPostStateProcessing()
func (*PrtMachine) ProcessPostStateRootPort ¶
func (prtm *PrtMachine) ProcessPostStateRootPort()
func (*PrtMachine) ProcessingPostStateAlternateAgreed ¶
func (prtm *PrtMachine) ProcessingPostStateAlternateAgreed()
func (*PrtMachine) ProcessingPostStateAlternatePort ¶
func (prtm *PrtMachine) ProcessingPostStateAlternatePort()
func (*PrtMachine) ProcessingPostStateAlternateProposed ¶
func (prtm *PrtMachine) ProcessingPostStateAlternateProposed()
func (*PrtMachine) ProcessingPostStateBackupPort ¶
func (prtm *PrtMachine) ProcessingPostStateBackupPort()
func (*PrtMachine) ProcessingPostStateBlockedPort ¶
func (prtm *PrtMachine) ProcessingPostStateBlockedPort()
func (*PrtMachine) ProcessingPostStateDesignatedDiscard ¶
func (prtm *PrtMachine) ProcessingPostStateDesignatedDiscard()
func (*PrtMachine) ProcessingPostStateDesignatedForward ¶
func (prtm *PrtMachine) ProcessingPostStateDesignatedForward()
func (*PrtMachine) ProcessingPostStateDesignatedLearn ¶
func (prtm *PrtMachine) ProcessingPostStateDesignatedLearn()
func (*PrtMachine) ProcessingPostStateDesignatedPort ¶
func (prtm *PrtMachine) ProcessingPostStateDesignatedPort()
func (*PrtMachine) ProcessingPostStateDesignatedPropose ¶
func (prtm *PrtMachine) ProcessingPostStateDesignatedPropose()
func (*PrtMachine) ProcessingPostStateDesignatedRetired ¶
func (prtm *PrtMachine) ProcessingPostStateDesignatedRetired()
func (*PrtMachine) ProcessingPostStateDesignatedSynced ¶
func (prtm *PrtMachine) ProcessingPostStateDesignatedSynced()
func (*PrtMachine) ProcessingPostStateDisable ¶
func (prtm *PrtMachine) ProcessingPostStateDisable()
func (*PrtMachine) ProcessingPostStateDisabled ¶
func (prtm *PrtMachine) ProcessingPostStateDisabled()
func (*PrtMachine) ProcessingPostStateReRoot ¶
func (prtm *PrtMachine) ProcessingPostStateReRoot()
func (*PrtMachine) ProcessingPostStateReRooted ¶
func (prtm *PrtMachine) ProcessingPostStateReRooted()
func (*PrtMachine) ProcessingPostStateRootAgreed ¶
func (prtm *PrtMachine) ProcessingPostStateRootAgreed()
func (*PrtMachine) ProcessingPostStateRootForward ¶
func (prtm *PrtMachine) ProcessingPostStateRootForward()
func (*PrtMachine) ProcessingPostStateRootLearn ¶
func (prtm *PrtMachine) ProcessingPostStateRootLearn()
func (*PrtMachine) ProcessingPostStateRootProposed ¶
func (prtm *PrtMachine) ProcessingPostStateRootProposed()
func (*PrtMachine) PrtLogger ¶
func (prtm *PrtMachine) PrtLogger(s string)
func (*PrtMachine) PrtMachineAlternateAgreed ¶
func (prtm *PrtMachine) PrtMachineAlternateAgreed(m fsm.Machine, data interface{}) fsm.State
PrtMachineAlternateAgreed
func (*PrtMachine) PrtMachineAlternatePort ¶
func (prtm *PrtMachine) PrtMachineAlternatePort(m fsm.Machine, data interface{}) fsm.State
PrtMachineAlternatePort
func (*PrtMachine) PrtMachineAlternateProposed ¶
func (prtm *PrtMachine) PrtMachineAlternateProposed(m fsm.Machine, data interface{}) fsm.State
PrtMachineAlternateProposed
func (*PrtMachine) PrtMachineBackupPort ¶
func (prtm *PrtMachine) PrtMachineBackupPort(m fsm.Machine, data interface{}) fsm.State
PrtMachineBackupPort
func (*PrtMachine) PrtMachineBlockPort ¶
func (prtm *PrtMachine) PrtMachineBlockPort(m fsm.Machine, data interface{}) fsm.State
PrtMachineBlockPort
func (*PrtMachine) PrtMachineDesignatedDiscard ¶
func (prtm *PrtMachine) PrtMachineDesignatedDiscard(m fsm.Machine, data interface{}) fsm.State
PrtMachineDesignatedDiscard
func (*PrtMachine) PrtMachineDesignatedForward ¶
func (prtm *PrtMachine) PrtMachineDesignatedForward(m fsm.Machine, data interface{}) fsm.State
PrtMachineDesignatedForward
func (*PrtMachine) PrtMachineDesignatedLearn ¶
func (prtm *PrtMachine) PrtMachineDesignatedLearn(m fsm.Machine, data interface{}) fsm.State
PrtMachineDesignatedLearn
func (*PrtMachine) PrtMachineDesignatedPort ¶
func (prtm *PrtMachine) PrtMachineDesignatedPort(m fsm.Machine, data interface{}) fsm.State
PrtMachineDesignatedPort
func (*PrtMachine) PrtMachineDesignatedPropose ¶
func (prtm *PrtMachine) PrtMachineDesignatedPropose(m fsm.Machine, data interface{}) fsm.State
PrtMachineDesignatedPropose
func (*PrtMachine) PrtMachineDesignatedRetired ¶
func (prtm *PrtMachine) PrtMachineDesignatedRetired(m fsm.Machine, data interface{}) fsm.State
PrtMachineDesignatedRetired
func (*PrtMachine) PrtMachineDesignatedSynced ¶
func (prtm *PrtMachine) PrtMachineDesignatedSynced(m fsm.Machine, data interface{}) fsm.State
PrtMachineDesignatedSynced
func (*PrtMachine) PrtMachineDisablePort ¶
func (prtm *PrtMachine) PrtMachineDisablePort(m fsm.Machine, data interface{}) fsm.State
PrtMachineDisablePort
func (*PrtMachine) PrtMachineDisabledPort ¶
func (prtm *PrtMachine) PrtMachineDisabledPort(m fsm.Machine, data interface{}) fsm.State
PrtMachineDisablePort
func (*PrtMachine) PrtMachineInitPort ¶
func (prtm *PrtMachine) PrtMachineInitPort(m fsm.Machine, data interface{}) fsm.State
PrtMachineInitPort
func (*PrtMachine) PrtMachineReRoot ¶
func (prtm *PrtMachine) PrtMachineReRoot(m fsm.Machine, data interface{}) fsm.State
PrtMachineReroot
func (*PrtMachine) PrtMachineReRooted ¶
func (prtm *PrtMachine) PrtMachineReRooted(m fsm.Machine, data interface{}) fsm.State
PrtMachineReRooted
func (*PrtMachine) PrtMachineRootAgreed ¶
func (prtm *PrtMachine) PrtMachineRootAgreed(m fsm.Machine, data interface{}) fsm.State
PrtMachineRootAgreed
func (*PrtMachine) PrtMachineRootForward ¶
func (prtm *PrtMachine) PrtMachineRootForward(m fsm.Machine, data interface{}) fsm.State
PrtMachineRootForward
func (*PrtMachine) PrtMachineRootLearn ¶
func (prtm *PrtMachine) PrtMachineRootLearn(m fsm.Machine, data interface{}) fsm.State
PrtMachineRootLearn
func (*PrtMachine) PrtMachineRootPort ¶
func (prtm *PrtMachine) PrtMachineRootPort(m fsm.Machine, data interface{}) fsm.State
PrtMachineRootPort
func (*PrtMachine) PrtMachineRootProposed ¶
func (prtm *PrtMachine) PrtMachineRootProposed(m fsm.Machine, data interface{}) fsm.State
PrtMachineRootProposed
type PrxmMachine ¶
type PrxmMachine struct { Machine *fsm.Machine // machine specific events PrxmEvents chan MachineEvent // rx pkt PrxmRxBpduPkt chan RxBpduPdu // enable logging PrxmLogEnableEvent chan bool // contains filtered or unexported fields }
LacpRxMachine holds FSM and current State and event channels for State transitions
func NewStpPrxmMachine ¶
func NewStpPrxmMachine(p *StpPort) *PrxmMachine
NewLacpRxMachine will create a new instance of the LacpRxMachine
func PrxmMachineFSMBuild ¶
func PrxmMachineFSMBuild(p *StpPort) *PrxmMachine
func (*PrxmMachine) Apply ¶
func (prxm *PrxmMachine) Apply(r *fsm.Ruleset) *fsm.Machine
A helpful function that lets us apply arbitrary rulesets to this instances State machine without reallocating the machine.
func (*PrxmMachine) GetCurrStateStr ¶
func (m *PrxmMachine) GetCurrStateStr() string
func (*PrxmMachine) GetPrevStateStr ¶
func (m *PrxmMachine) GetPrevStateStr() string
func (*PrxmMachine) ProcessPostStateDiscard ¶
func (prxm *PrxmMachine) ProcessPostStateDiscard(data interface{})
func (*PrxmMachine) ProcessPostStateProcessing ¶
func (prxm *PrxmMachine) ProcessPostStateProcessing(data interface{})
func (*PrxmMachine) ProcessPostStateReceive ¶
func (prxm *PrxmMachine) ProcessPostStateReceive(data interface{})
func (*PrxmMachine) PrxmLogger ¶
func (prxm *PrxmMachine) PrxmLogger(s string)
func (*PrxmMachine) PrxmMachineDiscard ¶
func (prxm *PrxmMachine) PrxmMachineDiscard(m fsm.Machine, data interface{}) fsm.State
PrmMachineDiscard
func (*PrxmMachine) PrxmMachineReceive ¶
func (prxm *PrxmMachine) PrxmMachineReceive(m fsm.Machine, data interface{}) fsm.State
LacpPtxMachineFastPeriodic sets the periodic transmission time to fast and starts the timer
func (*PrxmMachine) UpdtBPDUVersion ¶
func (prxm *PrxmMachine) UpdtBPDUVersion(data interface{}) bool
UpdtBPDUVersion: 17.21.22 This function will also inform Port Migration of BPDU type rcvdRSTP or rcvdSTP Figure 17-12
type PstMachine ¶
type PstMachine struct { Machine *fsm.Machine // machine specific events PstEvents chan MachineEvent // enable logging PstLogEnableEvent chan bool // contains filtered or unexported fields }
PstMachine holds FSM and current State and event channels for State transitions
func NewStpPstMachine ¶
func NewStpPstMachine(p *StpPort) *PstMachine
NewStpPrtMachine will create a new instance of the LacpRxMachine
func PstMachineFSMBuild ¶
func PstMachineFSMBuild(p *StpPort) *PstMachine
func (*PstMachine) Apply ¶
func (pstm *PstMachine) Apply(r *fsm.Ruleset) *fsm.Machine
A helpful function that lets us apply arbitrary rulesets to this instances State machine without reallocating the machine.
func (*PstMachine) GetCurrStateStr ¶
func (m *PstMachine) GetCurrStateStr() string
func (*PstMachine) GetPrevStateStr ¶
func (m *PstMachine) GetPrevStateStr() string
func (*PstMachine) NotifyForwardingChanged ¶
func (pstm *PstMachine) NotifyForwardingChanged(oldforwarding bool, newforwarding bool)
func (*PstMachine) NotifyLearningChanged ¶
func (pstm *PstMachine) NotifyLearningChanged(oldlearning bool, newlearning bool)
func (*PstMachine) ProcessPostStateDiscarding ¶
func (pstm *PstMachine) ProcessPostStateDiscarding()
func (*PstMachine) ProcessPostStateForwarding ¶
func (pstm *PstMachine) ProcessPostStateForwarding()
func (*PstMachine) ProcessPostStateLearning ¶
func (pstm *PstMachine) ProcessPostStateLearning()
func (*PstMachine) ProcessPostStateProcessing ¶
func (pstm *PstMachine) ProcessPostStateProcessing()
func (*PstMachine) PstMachineDiscarding ¶
func (pstm *PstMachine) PstMachineDiscarding(m fsm.Machine, data interface{}) fsm.State
PstMachineDiscarding
func (*PstMachine) PstMachineForwarding ¶
func (pstm *PstMachine) PstMachineForwarding(m fsm.Machine, data interface{}) fsm.State
PstMachineForwarding
func (*PstMachine) PstMachineLearning ¶
func (pstm *PstMachine) PstMachineLearning(m fsm.Machine, data interface{}) fsm.State
PstMachineLearning
func (*PstMachine) PstmLogger ¶
func (pstm *PstMachine) PstmLogger(s string)
type PtmMachine ¶
type PtmMachine struct { // for debugging PreviousState fsm.State Machine *fsm.Machine // timer type TickTimer *time.Timer Tick bool // machine specific events PtmEvents chan MachineEvent // enable logging PtmLogEnableEvent chan bool // contains filtered or unexported fields }
LacpRxMachine holds FSM and current State and event channels for State transitions
func NewStpPtmMachine ¶
func NewStpPtmMachine(p *StpPort) *PtmMachine
NewLacpRxMachine will create a new instance of the LacpRxMachine
func PtmMachineFSMBuild ¶
func PtmMachineFSMBuild(p *StpPort) *PtmMachine
func (*PtmMachine) Apply ¶
func (ptm *PtmMachine) Apply(r *fsm.Ruleset) *fsm.Machine
A helpful function that lets us apply arbitrary rulesets to this instances State machine without reallocating the machine.
func (*PtmMachine) GetCurrStateStr ¶
func (m *PtmMachine) GetCurrStateStr() string
func (*PtmMachine) GetPrevStateStr ¶
func (m *PtmMachine) GetPrevStateStr() string
func (*PtmMachine) PrevState ¶
func (ptm *PtmMachine) PrevState() fsm.State
func (*PtmMachine) PrevStateSet ¶
func (ptm *PtmMachine) PrevStateSet(s fsm.State)
PrevStateSet will set the previous State
func (*PtmMachine) PtmLogger ¶
func (ptm *PtmMachine) PtmLogger(s string)
func (*PtmMachine) PtmMachineOneSecond ¶
func (ptm *PtmMachine) PtmMachineOneSecond(m fsm.Machine, data interface{}) fsm.State
LacpPtxMachineNoPeriodic stops the periodic transmission of packets
func (*PtmMachine) PtmMachineTick ¶
func (ptm *PtmMachine) PtmMachineTick(m fsm.Machine, data interface{}) fsm.State
LacpPtxMachineFastPeriodic sets the periodic transmission time to fast and starts the timer
func (*PtmMachine) TickTimerDestroy ¶
func (m *PtmMachine) TickTimerDestroy()
func (*PtmMachine) TickTimerStart ¶
func (m *PtmMachine) TickTimerStart()
TickTimerStart: Port Timers Tick timer
func (*PtmMachine) TickTimerStop ¶
func (m *PtmMachine) TickTimerStop()
TickTimerStop Stop the running timer
type PtxmMachine ¶
type PtxmMachine struct { Machine *fsm.Machine // machine specific events PtxmEvents chan MachineEvent // enable logging PtxmLogEnableEvent chan bool // contains filtered or unexported fields }
LacpRxMachine holds FSM and current State and event channels for State transitions
func NewStpPtxmMachine ¶
func NewStpPtxmMachine(p *StpPort) *PtxmMachine
NewLacpRxMachine will create a new instance of the LacpRxMachine
func PtxmMachineFSMBuild ¶
func PtxmMachineFSMBuild(p *StpPort) *PtxmMachine
func (*PtxmMachine) Apply ¶
func (ptxm *PtxmMachine) Apply(r *fsm.Ruleset) *fsm.Machine
A helpful function that lets us apply arbitrary rulesets to this instances State machine without reallocating the machine.
func (*PtxmMachine) GetCurrStateStr ¶
func (m *PtxmMachine) GetCurrStateStr() string
func (*PtxmMachine) GetPrevStateStr ¶
func (m *PtxmMachine) GetPrevStateStr() string
func (*PtxmMachine) ProcessPostStateIdle ¶
func (ptxm *PtxmMachine) ProcessPostStateIdle()
func (*PtxmMachine) ProcessPostStateProcessing ¶
func (ptxm *PtxmMachine) ProcessPostStateProcessing()
func (*PtxmMachine) ProcessPostStateTransmitConfig ¶
func (ptxm *PtxmMachine) ProcessPostStateTransmitConfig()
func (*PtxmMachine) ProcessPostStateTransmitInit ¶
func (ptxm *PtxmMachine) ProcessPostStateTransmitInit()
func (*PtxmMachine) ProcessPostStateTransmitPeriodic ¶
func (ptxm *PtxmMachine) ProcessPostStateTransmitPeriodic()
func (*PtxmMachine) ProcessPostStateTransmitRstp ¶
func (ptxm *PtxmMachine) ProcessPostStateTransmitRstp()
func (*PtxmMachine) ProcessPostStateTransmitTcn ¶
func (ptxm *PtxmMachine) ProcessPostStateTransmitTcn()
func (*PtxmMachine) PtxmLogger ¶
func (ptxm *PtxmMachine) PtxmLogger(s string)
func (*PtxmMachine) PtxmMachineTransmitConfig ¶
func (ptxm *PtxmMachine) PtxmMachineTransmitConfig(m fsm.Machine, data interface{}) fsm.State
func (*PtxmMachine) PtxmMachineTransmitIdle ¶
func (ptxm *PtxmMachine) PtxmMachineTransmitIdle(m fsm.Machine, data interface{}) fsm.State
PtxmMachineTransmitIdle
func (*PtxmMachine) PtxmMachineTransmitInit ¶
func (ptxm *PtxmMachine) PtxmMachineTransmitInit(m fsm.Machine, data interface{}) fsm.State
PtxmMachineTransmitInit
func (*PtxmMachine) PtxmMachineTransmitPeriodic ¶
func (ptxm *PtxmMachine) PtxmMachineTransmitPeriodic(m fsm.Machine, data interface{}) fsm.State
PtxmMachineTransmitPeriodic
func (*PtxmMachine) PtxmMachineTransmitRSTP ¶
func (ptxm *PtxmMachine) PtxmMachineTransmitRSTP(m fsm.Machine, data interface{}) fsm.State
func (*PtxmMachine) PtxmMachineTransmitTCN ¶
func (ptxm *PtxmMachine) PtxmMachineTransmitTCN(m fsm.Machine, data interface{}) fsm.State
type StpBridgeConfig ¶
type StpBridgeConfig struct { IfIndex int32 Address string Priority uint16 MaxAge uint16 HelloTime uint16 ForwardDelay uint16 ForceVersion int32 TxHoldCount int32 Vlan uint16 DebugLevel int }
StpBridgeConfig config data
func StpBrgConfigGet ¶
func StpBrgConfigGet(bId int32) *StpBridgeConfig
StpBrgConfigGet gets the current bridge config
type StpPort ¶
type StpPort struct { IfIndex int32 ProtocolPortId uint16 // 17.19 AgeingTime int32 // TODO STP functionality Agree bool Agreed bool AdminEdge bool AutoEdgePort bool // optional AdminPathCost int32 BpduGuard bool BpduGuardInterval int32 BridgeAssurance bool BridgeAssuranceInconsistant bool Disputed bool FdbFlush bool Forward bool Forwarding bool InfoIs PortInfoState Learn bool Learning bool Mcheck bool MsgPriority PriorityVector MsgTimes Times NewInfo bool OperEdge bool PortEnabled bool PortId uint16 PortPathCost uint32 PortPriority PriorityVector PortTimes Times Priority uint16 Proposed bool Proposing bool RcvdBPDU bool RcvdInfo PortDesignatedRcvInfo RcvdMsg bool RcvdRSTP bool RcvdSTP bool RcvdTc bool RcvdTcAck bool RcvdTcn bool RstpVersion bool ReRoot bool Reselect bool Role PortRole Selected bool SelectedRole PortRole SendRSTP bool Sync bool Synced bool TcAck bool TcProp bool Tick bool TxCount uint64 UpdtInfo bool // 6.4.3 OperPointToPointMAC bool AdminPointToPointMAC PointToPointMac // link operational state AdminPortEnabled bool // Associated Bridge Id BridgeId BridgeId BrgIfIndex int32 // statistics BpduRx uint64 BpduTx uint64 StpRx uint64 StpTx uint64 TcRx uint64 TcTx uint64 TcAckRx uint64 TcAckTx uint64 RstpRx uint64 RstpTx uint64 PvstRx uint64 PvstTx uint64 ForwardingTransitions uint64 // 17.17 EdgeDelayWhileTimer PortTimer FdWhileTimer PortTimer HelloWhenTimer PortTimer MdelayWhiletimer PortTimer RbWhileTimer PortTimer RcvdInfoWhiletimer PortTimer RrWhileTimer PortTimer TcWhileTimer PortTimer BAWhileTimer PortTimer BPDUGuardTimer PortTimer PrxmMachineFsm *PrxmMachine PtmMachineFsm *PtmMachine PpmmMachineFsm *PpmmMachine PtxmMachineFsm *PtxmMachine PimMachineFsm *PimMachine BdmMachineFsm *BdmMachine PrtMachineFsm *PrtMachine TcMachineFsm *TcMachine PstMachineFsm *PstMachine // used to poll linux interface status. Useful for SIM/TEST PollingRoutine bool PollingTimer *time.Timer // contains filtered or unexported fields }
func GetBrgPort ¶
find proper bridge for the given port
func NewStpPort ¶
func NewStpPort(c *StpPortConfig) *StpPort
func (*StpPort) BridgeProtocolVersionGet ¶
func (*StpPort) BuildRSTPEthernetLlcHeaders ¶
func (*StpPort) CreateRxTx ¶
func (p *StpPort) CreateRxTx()
func (*StpPort) DecrementTimerCounters ¶
func (p *StpPort) DecrementTimerCounters()
func (*StpPort) DeleteRxTx ¶
func (p *StpPort) DeleteRxTx()
func (*StpPort) DistributeMachineEvents ¶
func (p *StpPort) DistributeMachineEvents(mec []chan MachineEvent, e []MachineEvent, waitForResponse bool)
DistributeMachineEvents will distribute the events in parrallel to each machine
func (*StpPort) ForceVersionSet ¶
func (*StpPort) GetPortListToApplyConfigTo ¶
This function can be used to know whether or not to apply configuration parameters to one port or all ports, as of 3/21/16 applying to all ports
func (*StpPort) IsAdminEdgePort ¶
check if any other bridge port is adminEdge
func (*StpPort) NotifyEdgeDelayWhileTimerExpired ¶
func (p *StpPort) NotifyEdgeDelayWhileTimerExpired()
func (*StpPort) NotifyFdWhileTimerExpired ¶
func (p *StpPort) NotifyFdWhileTimerExpired()
func (*StpPort) NotifyHelloWhenTimerExpired ¶
func (p *StpPort) NotifyHelloWhenTimerExpired()
func (*StpPort) NotifyMdelayWhileTimerExpired ¶
func (p *StpPort) NotifyMdelayWhileTimerExpired()
func (*StpPort) NotifyOperEdgeChanged ¶
func (*StpPort) NotifyPortEnabled ¶
func (*StpPort) NotifyProposingChanged ¶
func (*StpPort) NotifyRbWhileTimerExpired ¶
func (p *StpPort) NotifyRbWhileTimerExpired()
func (*StpPort) NotifyRcvdInfoWhileTimerExpired ¶
func (p *StpPort) NotifyRcvdInfoWhileTimerExpired()
func (*StpPort) NotifyRcvdMsgChanged ¶
func (*StpPort) NotifyRcvdTcRcvdTcnRcvdTcAck ¶
func (*StpPort) NotifyRrWhileTimerExpired ¶
func (p *StpPort) NotifyRrWhileTimerExpired()
func (*StpPort) NotifySelectedChanged ¶
No need to when these parameters change as selected/updtInfo will be used as the trigger for update
func (p *StpPort) DesignatedPrioritySet(src string, val *PriorityVector) { // The following machines need to know about // changes in DesignatedPriority State // 1) Port Information // 2) Port Transmit p.DesignatedPriority = *val }
func (p *StpPort) DesignatedTimesSet(src string, val *Times) { // The following machines need to know about // changes in DesignatedTimes State // 1) Port Information // 2) Port Transmit p.DesignatedTimes = *val }
func (*StpPort) NotifySelectedRoleChanged ¶
func (*StpPort) NotifySyncedChanged ¶
func (*StpPort) NotifyTcWhileTimerExpired ¶
func (p *StpPort) NotifyTcWhileTimerExpired()
func (*StpPort) NotifyUpdtInfoChanged ¶
func (*StpPort) PtmMachineMain ¶
func (p *StpPort) PtmMachineMain()
LacpRxMachineMain: 802.1ax-2014 Table 6-18 Creation of Rx State Machine State transitions and callbacks and create go routine to pend on events
func (*StpPort) ResetTimerCounters ¶
func (*StpPort) SaveMsgRcvInfo ¶
func (p *StpPort) SaveMsgRcvInfo(data interface{})
func (*StpPort) SetRxPortCounters ¶
func (p *StpPort) SetRxPortCounters(ptype BPDURxType)
func (*StpPort) SetTxPortCounters ¶
func (p *StpPort) SetTxPortCounters(ptype BPDURxType)
type StpPortConfig ¶
type StpPortConfig struct { IfIndex int32 Priority uint16 Enable bool PathCost int32 ProtocolMigration int32 AdminPointToPoint int32 AdminEdgePort bool AdminPathCost int32 BrgIfIndex int32 BridgeAssurance bool BpduGuard bool BpduGuardInterval int32 }
StpPortConfig config data
func StpPortConfigGet ¶
func StpPortConfigGet(pId int32) *StpPortConfig
StpPortConfigGet gets the current port config
type StpStateEvent ¶
type StpStateEvent struct {
// contains filtered or unexported fields
}
func (*StpStateEvent) CurrentEvent ¶
func (se *StpStateEvent) CurrentEvent() fsm.Event
func (*StpStateEvent) CurrentState ¶
func (se *StpStateEvent) CurrentState() fsm.State
func (*StpStateEvent) EnableLogging ¶
func (se *StpStateEvent) EnableLogging(ena bool)
func (*StpStateEvent) IsLoggerEna ¶
func (se *StpStateEvent) IsLoggerEna() bool
func (*StpStateEvent) LoggerSet ¶
func (se *StpStateEvent) LoggerSet(log func(string))
func (*StpStateEvent) PreviousEvent ¶
func (se *StpStateEvent) PreviousEvent() fsm.Event
func (*StpStateEvent) PreviousState ¶
func (se *StpStateEvent) PreviousState() fsm.State
func (*StpStateEvent) SetState ¶
func (se *StpStateEvent) SetState(s fsm.State)
func (*StpStateEvent) StateStrMapSet ¶
func (se *StpStateEvent) StateStrMapSet(strMap map[fsm.State]string)
type TcMachine ¶
type TcMachine struct { Machine *fsm.Machine // machine specific events TcEvents chan MachineEvent // enable logging TcLogEnableEvent chan bool // contains filtered or unexported fields }
TcMachine holds FSM and current State and event channels for State transitions
func NewStpTcMachine ¶
NewStpTcMachine will create a new instance of the LacpRxMachine
func TcMachineFSMBuild ¶
func (*TcMachine) Apply ¶
A helpful function that lets us apply arbitrary rulesets to this instances State machine without reallocating the machine.
func (*TcMachine) FlushFdb ¶
func (tcm *TcMachine) FlushFdb()
17.19.7 A boolean. Set by the topology change state machine to instruct the filtering database to remove all entries for this Port, immediately if rstpVersion (17.20.11) is TRUE, or by rapid ageing (17.19.1) if stpVersion (17.20.12) is TRUE. Reset by the filtering database once the entries are removed if rstpVersion is TRUE, and immediately if stpVersion is TRUE.
func (*TcMachine) GetCurrStateStr ¶
func (*TcMachine) GetPrevStateStr ¶
func (*TcMachine) NotifyFdbFlush ¶
func (tcm *TcMachine) NotifyFdbFlush()
func (*TcMachine) NotifyNewInfoChanged ¶
func (*TcMachine) NotifyTcAckChanged ¶
func (*TcMachine) NotifyTcPropChanged ¶
func (*TcMachine) NotifyTcWhileChanged ¶
func (*TcMachine) ProcessPostStateAcknowledged ¶
func (tcm *TcMachine) ProcessPostStateAcknowledged()
func (*TcMachine) ProcessPostStateActive ¶
func (tcm *TcMachine) ProcessPostStateActive()
func (*TcMachine) ProcessPostStateDetected ¶
func (tcm *TcMachine) ProcessPostStateDetected()
func (*TcMachine) ProcessPostStateInactive ¶
func (tcm *TcMachine) ProcessPostStateInactive()
func (*TcMachine) ProcessPostStateLearning ¶
func (tcm *TcMachine) ProcessPostStateLearning()
func (*TcMachine) ProcessPostStateNotifiedTc ¶
func (tcm *TcMachine) ProcessPostStateNotifiedTc()
func (*TcMachine) ProcessPostStateNotifiedTcn ¶
func (tcm *TcMachine) ProcessPostStateNotifiedTcn()
func (*TcMachine) ProcessPostStateProcessing ¶
func (tcm *TcMachine) ProcessPostStateProcessing()
ProcessPostStateProcessing: advance states after a given event for faster state transitions
func (*TcMachine) ProcessPostStatePropagating ¶
func (tcm *TcMachine) ProcessPostStatePropagating()
func (*TcMachine) TcMachineAcknowledged ¶
TcMachineAcknowledged
func (*TcMachine) TcMachineActive ¶
TcMachineActive
func (*TcMachine) TcMachineDetected ¶
TcMachineDetected
func (*TcMachine) TcMachineInactive ¶
TcmMachineInactive
func (*TcMachine) TcMachineLearning ¶
TcMachineLearning
func (*TcMachine) TcMachineNotifiedTc ¶
TcMachineNotifyTc
func (*TcMachine) TcMachineNotifiedTcn ¶
TcMachineNotifyTcn
func (*TcMachine) TcMachinePropagating ¶
TcMachinePropagating