private void sendPacket(Ethernet eth) { List<Instruction> ins = treatmentBuilder().build().allInstructions(); OFPort p = null; //TODO: support arbitrary list of treatments must be supported in ofPacketContext for (Instruction i : ins) { if (i.type() == Type.OUTPUT) { p = buildPort(((OutputInstruction) i).port()); break; //for now... } } if (eth == null) { ofPktCtx.build(p); } else { ofPktCtx.build(eth, p); } ofPktCtx.send(); }