alshabib

renamed OF packet context to OpenFlowPacketContext

package org.onlab.onos.net.packet;
/**
* Abstraction of an inbound packet processor.
*/
......
......@@ -11,7 +11,7 @@ import org.projectfloodlight.openflow.protocol.match.MatchField;
import org.projectfloodlight.openflow.types.OFBufferId;
import org.projectfloodlight.openflow.types.OFPort;
public final class DefaultPacketContext implements PacketContext {
public final class DefaultOpenFlowPacketContext implements OpenFlowPacketContext {
private boolean free = true;
private boolean isBuilt = false;
......@@ -19,7 +19,7 @@ public final class DefaultPacketContext implements PacketContext {
private final OFPacketIn pktin;
private OFPacketOut pktout = null;
private DefaultPacketContext(OpenFlowSwitch s, OFPacketIn pkt) {
private DefaultOpenFlowPacketContext(OpenFlowSwitch s, OFPacketIn pkt) {
this.sw = s;
this.pktin = pkt;
}
......@@ -78,8 +78,8 @@ public final class DefaultPacketContext implements PacketContext {
return new Dpid(sw.getId());
}
public static PacketContext packetContextFromPacketIn(OpenFlowSwitch s, OFPacketIn pkt) {
return new DefaultPacketContext(s, pkt);
public static OpenFlowPacketContext packetContextFromPacketIn(OpenFlowSwitch s, OFPacketIn pkt) {
return new DefaultOpenFlowPacketContext(s, pkt);
}
@Override
......
......@@ -8,7 +8,7 @@ import org.projectfloodlight.openflow.types.OFPort;
* to view the packet in event but may block the response to the
* event if blocked has been called.
*/
public interface PacketContext {
public interface OpenFlowPacketContext {
//TODO: may want to support sending packet out other switches than
// the one it came in on.
......
......@@ -10,5 +10,5 @@ public interface PacketListener {
*
* @param pktCtx the packet context
*/
public void handlePacket(PacketContext pktCtx);
public void handlePacket(OpenFlowPacketContext pktCtx);
}
......
......@@ -12,7 +12,7 @@ import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Deactivate;
import org.apache.felix.scr.annotations.Service;
import org.onlab.onos.of.controller.DefaultPacketContext;
import org.onlab.onos.of.controller.DefaultOpenFlowPacketContext;
import org.onlab.onos.of.controller.Dpid;
import org.onlab.onos.of.controller.OpenFlowController;
import org.onlab.onos.of.controller.OpenFlowSwitch;
......@@ -124,7 +124,7 @@ public class OpenFlowControllerImpl implements OpenFlowController {
break;
case PACKET_IN:
for (PacketListener p : ofPacketListener) {
p.handlePacket(DefaultPacketContext
p.handlePacket(DefaultOpenFlowPacketContext
.packetContextFromPacketIn(this.getSwitch(dpid),
(OFPacketIn) msg));
}
......
......@@ -15,7 +15,7 @@ import org.onlab.onos.of.controller.Dpid;
import org.onlab.onos.of.controller.OpenFlowController;
import org.onlab.onos.of.controller.OpenFlowSwitch;
import org.onlab.onos.of.controller.OpenFlowSwitchListener;
import org.onlab.onos.of.controller.PacketContext;
import org.onlab.onos.of.controller.OpenFlowPacketContext;
import org.onlab.onos.of.controller.PacketListener;
import org.projectfloodlight.openflow.protocol.OFPortConfig;
import org.projectfloodlight.openflow.protocol.OFPortDesc;
......@@ -87,7 +87,7 @@ public class OpenFlowLinkProvider extends AbstractProvider implements LinkProvid
@Override
public void handlePacket(PacketContext pktCtx) {
public void handlePacket(OpenFlowPacketContext pktCtx) {
LinkDiscovery ld = discoverers.get(pktCtx.dpid());
if (ld == null) {
return;
......