- data Match = Match {
- inPort :: !(Maybe PortID)
- srcEthAddress :: !(Maybe EthernetAddress)
- dstEthAddress :: !(Maybe EthernetAddress)
- vLANID :: !(Maybe VLANID)
- vLANPriority :: !(Maybe VLANPriority)
- ethFrameType :: !(Maybe EthernetTypeCode)
- ipTypeOfService :: !(Maybe IPTypeOfService)
- matchIPProtocol :: !(Maybe IPProtocol)
- srcIPAddress :: !IPAddressPrefix
- dstIPAddress :: !IPAddressPrefix
- srcTransportPort :: !(Maybe TransportPort)
- dstTransportPort :: !(Maybe TransportPort)
- matchAny :: Match
- isExactMatch :: Match -> Bool
- getExactMatch :: PortID -> Get Match
- frameToExactMatch :: PortID -> EthernetFrame -> Match
- frameToExactMatchNoPort :: 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.
Match | |
|
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 -> Get MatchSource
Utility function to get an exact match corresponding to a packet (as given by a byte sequence).
frameToExactMatch :: PortID -> EthernetFrame -> MatchSource