Nettle.OpenFlow.Action
Contents
- data Action
- = SendOutPort PseudoPort
- | SetVlanVID VLANID
- | SetVlanPriority VLANPriority
- | StripVlanHeader
- | SetEthSrcAddr EthernetAddress
- | SetEthDstAddr EthernetAddress
- | SetIPSrcAddr IPAddress
- | SetIPDstAddr IPAddress
- | SetIPToS IPTypeOfService
- | SetTransportSrcPort TransportPort
- | SetTransportDstPort TransportPort
- | Enqueue {
- enqueuePort :: PortID
- queueID :: QueueID
- | VendorAction VendorID [Word8]
- data ActionType
- data PseudoPort
- type MaxLenToSendController = Word16
- type VendorID = Word32
- type QueueID = Word32
- type ActionSequence = [Action]
- sendOnPort :: PortID -> ActionSequence
- sendOnInPort, processNormally, allPhysicalPorts, drop, flood :: ActionSequence
- sendToController :: MaxLenToSendController -> ActionSequence
- processWithTable :: ActionSequence
- setVlanVID :: VLANID -> ActionSequence
- setVlanPriority :: VLANPriority -> ActionSequence
- stripVlanHeader :: ActionSequence
- setEthSrcAddr :: EthernetAddress -> ActionSequence
- setEthDstAddr :: EthernetAddress -> ActionSequence
- setIPSrcAddr :: IPAddress -> ActionSequence
- setIPDstAddr :: IPAddress -> ActionSequence
- setIPToS :: IPTypeOfService -> ActionSequence
- setTransportSrcPort :: TransportPort -> ActionSequence
- setTransportDstPort :: TransportPort -> ActionSequence
- enqueue :: PortID -> QueueID -> ActionSequence
- vendorAction :: VendorID -> [Word8] -> ActionSequence
Actions
Each flow table entry contains a list of actions that will
be executed when a packet matches the entry.
Specification: ofp_action_header and all ofp_action_* structures.
Constructors
| SendOutPort PseudoPort | send out given port |
| SetVlanVID VLANID | set the 802.1q VLAN ID |
| SetVlanPriority VLANPriority | set the 802.1q priority |
| StripVlanHeader | strip the 802.1q header |
| SetEthSrcAddr EthernetAddress | set ethernet source address |
| SetEthDstAddr EthernetAddress | set ethernet destination address |
| SetIPSrcAddr IPAddress | set IP source address |
| SetIPDstAddr IPAddress | set IP destination address |
| SetIPToS IPTypeOfService | IP ToS (DSCP field) |
| SetTransportSrcPort TransportPort | set TCP/UDP source port |
| SetTransportDstPort TransportPort | set TCP/UDP destination port |
| Enqueue | output to queue |
Fields
| |
| VendorAction VendorID [Word8] | |
data ActionType Source
The supported switch actions are denoted with these symbols.
Constructors
Instances
data PseudoPort Source
A PseudoPort denotes the target of a forwarding
action.
Constructors
| PhysicalPort PortID | send out physical port with given id |
| InPort | send packet out the input port |
| Flood | send out all physical ports except input port and those disabled by STP |
| AllPhysicalPorts | send out all physical ports except input port |
| ToController MaxLenToSendController | send to controller |
| NormalSwitching | process with normal L2/L3 switching |
| WithTable | process packet with flow table |
Instances
type MaxLenToSendController = Word16Source
A send to controller action includes the maximum number of bytes that a switch will send to the controller.
Action sequences
type ActionSequence = [Action]Source
Sequence of actions, represented as finite lists. The Monoid instance of
lists provides methods for denoting the do-nothing action (mempty) and for concatenating action sequences mconcat.
enqueue :: PortID -> QueueID -> ActionSequenceSource
vendorAction :: VendorID -> [Word8] -> ActionSequenceSource