Search in sources :

Example 1 with PacketContextAdapter

use of org.onosproject.net.packet.PacketContextAdapter in project onos by opennetworkinglab.

the class NeighbourResolutionManagerTest method context.

/**
 * Creates a packet context for the given packet coming in the given port.
 *
 * @param packet packet to wrap in a packet context
 * @param inPort input port of the packet
 * @return packet context
 */
private static PacketContext context(Ethernet packet, ConnectPoint inPort) {
    InboundPacket inboundPacket = new DefaultInboundPacket(inPort, packet, null);
    OutboundPacket outboundPacket = new DefaultOutboundPacket(null, null, null);
    return new PacketContextAdapter(0, inboundPacket, outboundPacket, false);
}
Also used : DefaultInboundPacket(org.onosproject.net.packet.DefaultInboundPacket) DefaultInboundPacket(org.onosproject.net.packet.DefaultInboundPacket) InboundPacket(org.onosproject.net.packet.InboundPacket) PacketContextAdapter(org.onosproject.net.packet.PacketContextAdapter) DefaultOutboundPacket(org.onosproject.net.packet.DefaultOutboundPacket) OutboundPacket(org.onosproject.net.packet.OutboundPacket) DefaultOutboundPacket(org.onosproject.net.packet.DefaultOutboundPacket)

Aggregations

DefaultInboundPacket (org.onosproject.net.packet.DefaultInboundPacket)1 DefaultOutboundPacket (org.onosproject.net.packet.DefaultOutboundPacket)1 InboundPacket (org.onosproject.net.packet.InboundPacket)1 OutboundPacket (org.onosproject.net.packet.OutboundPacket)1 PacketContextAdapter (org.onosproject.net.packet.PacketContextAdapter)1