- data Match = Match {
- inPort :: Maybe PortID
- srcEthAddress :: Maybe EthernetAddress
- dstEthAddress :: Maybe EthernetAddress
- vLANID :: Maybe VLANID
- vLANPriority :: Maybe VLANPriority
- ethFrameType :: Maybe EthernetTypeCode
- ipTypeOfService :: Maybe IPTypeOfService
- ipProtocol :: Maybe IPProtocol
- srcIPAddress :: IPAddressPrefix
- dstIPAddress :: IPAddressPrefix
- srcTransportPort :: Maybe TransportPort
- dstTransportPort :: Maybe TransportPort
- matchAny :: Match
- isExactMatch :: Match -> Bool
- getExactMatch :: PortID -> GetE Match
- frameToExactMatch :: PortID -> EthernetFrame -> Match
- ofpVlanNone :: Integer
- matches :: (PortID, EthernetFrame) -> Match -> Bool
Documentation
Each flow entry includes a match, which essentially defines packet-matching condition. Fields that are left Nothing are wildcards.
isExactMatch :: Match -> BoolSource
Return True if given Match
represents an exact match, i.e. no
wildcards and the IP addresses' prefixes cover all bits.
getExactMatch :: PortID -> GetE MatchSource
Utility function to get an exact match corresponding to a packet (as given by a byte sequence).
frameToExactMatch :: PortID -> EthernetFrame -> MatchSource