- data Port = Port {
- portID :: PortID
- portName :: String
- portAddress :: EthernetAddress
- portConfig :: [PortConfigAttribute]
- portLinkDown :: Bool
- portSTPState :: SpanningTreePortState
- portCurrentFeatures :: Maybe PortFeatures
- portAdvertisedFeatures :: Maybe PortFeatures
- portSupportedFeatures :: Maybe PortFeatures
- portPeerFeatures :: Maybe PortFeatures
- type PortID = Word16
- data SpanningTreePortState
- data PortConfigAttribute
- = PortDown
- | STPDisabled
- | OnlySTPackets
- | NoSTPackets
- | NoFlooding
- | DropForwarded
- | NoPacketInMsg
- data PortFeature
- = Rate10MbHD
- | Rate10MbFD
- | Rate100MbHD
- | Rate100MbFD
- | Rate1GbHD
- | Rate1GbFD
- | Rate10GbFD
- | Copper
- | Fiber
- | AutoNegotiation
- | Pause
- | AsymmetricPause
- type PortFeatures = [PortFeature]
- data PortMod = PortMod {}
- type PortStatus = (PortStatusUpdateReason, Port)
- data PortStatusUpdateReason
- = PortAdded
- | PortDeleted
- | PortModified
- portAttributeOn :: PortID -> EthernetAddress -> PortConfigAttribute -> PortMod
- portAttributeOff :: PortID -> EthernetAddress -> PortConfigAttribute -> PortMod
Documentation
A switch receives and sends packets on a port; The Port data type models attributes of a physical port.
Port | |
|
data PortConfigAttribute Source
Possible behaviors of a physical port. Specification:
ofp_port_config
.
PortDown | port is administratively down |
STPDisabled | disable 802.1D spanning tree on this port |
OnlySTPackets | drop all packets except 802.1D spanning tree packets |
NoSTPackets | drop received 802.1D STP packets |
NoFlooding | do not include this port when flooding |
DropForwarded | drop packets forwarded to port |
NoPacketInMsg | do not send packet-in messages for this port |
data PortFeature Source
Possible port features. Specification ofp_port_features
.
Rate10MbHD | 10 Mb half-duplex rate support |
Rate10MbFD | 10 Mb full-duplex rate support |
Rate100MbHD | 100 Mb half-duplex rate support |
Rate100MbFD | 100 Mb full-duplex rate support |
Rate1GbHD | 1 Gb half-duplex rate support |
Rate1GbFD | 1 Gb full-duplex rate support |
Rate10GbFD | 10 Gb full-duplex rate support |
Copper | |
Fiber | |
AutoNegotiation | |
Pause | |
AsymmetricPause |
type PortFeatures = [PortFeature]Source
Set of PortFeature
s. Specification: bitmap of members in enum
ofp_port_features
.
A port can be configured with a PortMod
message.
PortMod | |
|
type PortStatus = (PortStatusUpdateReason, Port)Source
The PortStatus
represents information regarding
a change to a port state on a switch.
data PortStatusUpdateReason Source
The reason that a port status update message was sent.