@Override public final long getId() { return this.dpid.value(); }
@Override public void handlePacket(OpenFlowPacketContext pktCtx) { DeviceId id = DeviceId.deviceId(Dpid.uri(pktCtx.dpid().value())); DefaultInboundPacket inPkt = new DefaultInboundPacket( new ConnectPoint(id, PortNumber.portNumber(pktCtx.inPort())), pktCtx.parsed(), ByteBuffer.wrap(pktCtx.unparsed()), pktCtx.cookie()); DefaultOutboundPacket outPkt = null; if (!pktCtx.isBuffered()) { outPkt = new DefaultOutboundPacket(id, null, ByteBuffer.wrap(pktCtx.unparsed())); } OpenFlowCorePacketContext corePktCtx = new OpenFlowCorePacketContext(System.currentTimeMillis(), inPkt, outPkt, pktCtx.isHandled(), pktCtx); providerService.processPacket(corePktCtx); }
ChassisId cId = new ChassisId(dpid.value());