Class DefaultOpenFlowPacketContext

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean block()
      Blocks further responses (ie.
      void build​(org.onlab.packet.Ethernet ethFrame, org.projectfloodlight.openflow.types.OFPort outPort)
      Build the packet out in response to this packet in event.
      void build​(org.projectfloodlight.openflow.types.OFPort outPort)
      Build the packet out in response to this packet in event.
      java.util.Optional<java.lang.Long> cookie()
      Provide the cookie in the packet in message.
      Dpid dpid()
      Provide the dpid of the switch where the packet in arrived.
      java.lang.Integer inPort()
      Provide the port on which the packet arrived.
      boolean isBuffered()
      Indicates that this packet is buffered at the switch.
      boolean isHandled()
      Checks whether the packet has been handled.
      static OpenFlowPacketContext packetContextFromPacketIn​(OpenFlowSwitch s, org.projectfloodlight.openflow.protocol.OFPacketIn pkt)
      Creates an OpenFlow packet context based on a packet-in.
      org.onlab.packet.Ethernet parsed()
      Provided a handle onto the parsed payload.
      void send()
      Provided build has been called send the packet out the switch it came in on.
      byte[] unparsed()
      Provide an unparsed copy of the data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • build

        public void build​(org.projectfloodlight.openflow.types.OFPort outPort)
        Description copied from interface: OpenFlowPacketContext
        Build the packet out in response to this packet in event.
        Specified by:
        build in interface OpenFlowPacketContext
        Parameters:
        outPort - the out port to send to packet out of.
      • build

        public void build​(org.onlab.packet.Ethernet ethFrame,
                          org.projectfloodlight.openflow.types.OFPort outPort)
        Description copied from interface: OpenFlowPacketContext
        Build the packet out in response to this packet in event.
        Specified by:
        build in interface OpenFlowPacketContext
        Parameters:
        ethFrame - the actual packet to send out.
        outPort - the out port to send to packet out of.
      • parsed

        public org.onlab.packet.Ethernet parsed()
        Description copied from interface: OpenFlowPacketContext
        Provided a handle onto the parsed payload.
        Specified by:
        parsed in interface OpenFlowPacketContext
        Returns:
        the parsed form of the payload.
      • packetContextFromPacketIn

        public static OpenFlowPacketContext packetContextFromPacketIn​(OpenFlowSwitch s,
                                                                      org.projectfloodlight.openflow.protocol.OFPacketIn pkt)
        Creates an OpenFlow packet context based on a packet-in.
        Parameters:
        s - OpenFlow switch
        pkt - OpenFlow packet-in
        Returns:
        the OpenFlow packet context
      • block

        public boolean block()
        Description copied from interface: OpenFlowPacketContext
        Blocks further responses (ie. send() calls) on this packet in event.
        Specified by:
        block in interface OpenFlowPacketContext
        Returns:
        true if blocks
      • cookie

        public java.util.Optional<java.lang.Long> cookie()
        Description copied from interface: OpenFlowPacketContext
        Provide the cookie in the packet in message.
        Specified by:
        cookie in interface OpenFlowPacketContext
        Returns:
        optional flow cookie