Nettle.OpenFlow.Packet
- data PacketOut = PacketOut {}
- bufferedPacketOut :: BufferID -> Maybe PortID -> ActionSequence -> PacketOut
- unbufferedPacketOut :: ByteString -> Maybe PortID -> ActionSequence -> PacketOut
- receivedPacketOut :: PacketInfo -> ActionSequence -> PacketOut
- type BufferID = Word32
- data PacketInfo = PacketInfo {}
- data PacketInReason
- type NumBytes = Integer
- bufferedAtSwitch :: PacketInfo -> Bool
Sending packets
A switch can be remotely commanded to send a packet. The packet can either be a packet buffered at the switch, in which case the bufferID is provided, or it can be specified explicitly by giving the packet data.
Constructors
PacketOut | |
Fields
|
bufferedPacketOut :: BufferID -> Maybe PortID -> ActionSequence -> PacketOutSource
Constructs a PacketOut
value for a packet buffered at a switch.
unbufferedPacketOut :: ByteString -> Maybe PortID -> ActionSequence -> PacketOutSource
Constructs a PacketOut
value for an unbuffered packet, including the packet data.
receivedPacketOut :: PacketInfo -> ActionSequence -> PacketOutSource
Constructs a PacketOut
value that processes the packet referred to by the PacketInfo
value
according to the specified actions.
A switch may buffer a packet that it receives. When it does so, the packet is assigned a bufferID which can be used to refer to that packet.
Packets not handled by a switch
data PacketInfo Source
A switch receives packets on its ports. If the packet matches some flow rules, the highest priority rule is executed. If no flow rule matches, the packet is sent to the controller. When packet is sent to the controller, the switch sends a message containing the following information.
Constructors
PacketInfo | |
Fields
|
Instances
data PacketInReason Source
A PacketInfo message includes the reason that the message was sent, namely either there was no match, or there was a match, and that match's actions included a Sent-To-Controller action.
Constructors
NotMatched | |
ExplicitSend |