module Nettle.OpenFlow.Switch (
SwitchFeatures (..)
, SwitchID
, SwitchCapability (..)
, maxNumberPorts
, QueueConfigRequest (..)
, QueueConfigReply (..)
, QueueConfig (..)
, QueueLength
, QueueProperty (..)
, QueueRate (..)
) where
import Data.Word
import Nettle.OpenFlow.Port
import Nettle.OpenFlow.Action
data SwitchFeatures
= SwitchFeatures {
switchID :: SwitchID,
packetBufferSize :: Integer,
numberFlowTables :: Integer,
capabilities :: [SwitchCapability],
supportedActions :: [ActionType],
ports :: [Port]
} deriving (Show,Read,Eq)
type SwitchID = Word64
maxNumberPorts :: PortID
maxNumberPorts = 0xff00
data SwitchCapability = HasFlowStats
| HasTableStats
| HasPortStats
| SpanningTree
| MayTransmitOverMultiplePhysicalInterfaces
| HasQueueStatistics
| CanMatchIPAddressesInARPPackets
| CanReassembleIPFragments
deriving (Show,Read,Eq,Ord,Enum)
data QueueConfigRequest = QueueConfigRequest PortID
deriving (Show,Read,Eq)
data QueueConfigReply = PortQueueConfig PortID [QueueConfig]
deriving (Show,Read,Eq)
data QueueConfig = QueueConfig QueueID [QueueProperty]
deriving (Show,Read,Eq)
type QueueLength = Word16
data QueueProperty = MinRateQueue QueueRate
deriving (Show,Read,Eq)
data QueueRate = Disabled | Enabled Word16
deriving (Show, Read, Eq)