Class DefaultInboundPacket

  • All Implemented Interfaces:
    InboundPacket

    public final class DefaultInboundPacket
    extends Object
    implements InboundPacket
    Default implementation of an immutable inbound packet.
    • Constructor Detail

      • DefaultInboundPacket

        public DefaultInboundPacket​(ConnectPoint receivedFrom,
                                    org.onlab.packet.Ethernet parsed,
                                    ByteBuffer unparsed)
        Creates an immutable inbound packet.
        Parameters:
        receivedFrom - connection point where received
        parsed - parsed ethernet frame
        unparsed - unparsed raw bytes
      • DefaultInboundPacket

        public DefaultInboundPacket​(ConnectPoint receivedFrom,
                                    org.onlab.packet.Ethernet parsed,
                                    ByteBuffer unparsed,
                                    Optional<Long> cookie)
        Creates an immutable inbound packet with cookie.
        Parameters:
        receivedFrom - connection point where received
        parsed - parsed ethernet frame
        unparsed - unparsed raw bytes
        cookie - cookie
    • Method Detail

      • receivedFrom

        public ConnectPoint receivedFrom()
        Description copied from interface: InboundPacket
        Returns the device and port from where the packet was received.
        Specified by:
        receivedFrom in interface InboundPacket
        Returns:
        connection point where received
      • parsed

        public org.onlab.packet.Ethernet parsed()
        Description copied from interface: InboundPacket
        Returns the parsed form of the packet.
        Specified by:
        parsed in interface InboundPacket
        Returns:
        parsed Ethernet frame; null if the packet is not an Ethernet frame or one for which there is no parser
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object