module Nettle.OpenFlow.Switch (
SwitchFeatures (..)
, SwitchID
, SwitchCapability (..)
, maxNumberPorts
) 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
#if OPENFLOW_VERSION==151 || OPENFLOW_VERSION==152
| MayTransmitOverMultiplePhysicalInterfaces
#endif
#if OPENFLOW_VERSION==1
| HasQueueStatistics
| CanMatchIPAddressesInARPPackets
#endif
| CanReassembleIPFragments
deriving (Show,Read,Eq,Ord,Enum)