Class DefaultOutboundPacket

  • All Implemented Interfaces:
    OutboundPacket

    public final class DefaultOutboundPacket
    extends Object
    implements OutboundPacket
    Default implementation of an immutable outbound packet.
    • Constructor Detail

      • DefaultOutboundPacket

        public DefaultOutboundPacket​(DeviceId sendThrough,
                                     TrafficTreatment treatment,
                                     ByteBuffer data)
        Creates an immutable outbound packet.
        Parameters:
        sendThrough - identifier through which to send the packet
        treatment - list of packet treatments
        data - raw packet data
      • DefaultOutboundPacket

        public DefaultOutboundPacket​(DeviceId sendThrough,
                                     TrafficTreatment treatment,
                                     ByteBuffer data,
                                     PortNumber inPort)
        Creates an immutable outbound packet.
        Parameters:
        sendThrough - identifier through which to send the packet
        treatment - list of packet treatments
        data - raw packet data
        inPort - input port to be used for the packet
    • Method Detail

      • sendThrough

        public DeviceId sendThrough()
        Description copied from interface: OutboundPacket
        Returns the identity of a device through which this packet should be sent.
        Specified by:
        sendThrough in interface OutboundPacket
        Returns:
        device identity
      • inPort

        public PortNumber inPort()
        Description copied from interface: OutboundPacket
        Returns the input port of this packet. Defaults to controller port. This is useful for actions that involve the input port such as ALL or FLOOD.
        Specified by:
        inPort in interface OutboundPacket
        Returns:
        the input port to be used for this packet.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object