- Hello guys,

- I'm trying to add a flow entry to ovs in mininet, by sending a OFFlowMod
packet. Unfortunately, it doesn't work correctly.

This is my code:
# org.flowvisor.classifier.FVClassifer
# send of-flowmod packet to switch
# in init() method.
OFMatch mForwardToController = new OFMatch();
String macAdrrController = "aa:aa:aa:aa:aa:aa";
mForwardToController.setDataLayerDestination(macAdrrController); //
dl_dst="aa:aa:aa:aa:aa:aa"
byte[] b = { 10, 0, 0, 99 };
mForwardToController.setNetworkDestination(byteArrToInt(b, 0)); //
nw_dst="10.0.0.99"
mForwardToController.setWildcards(0x0000000000000000);
OFFlowMod fmForwardToController = new OFFlowMod();
fmForwardToController.setMatch(mForwardToController);
fmForwardToController.setCommand(OFFlowMod.OFPFC_ADD);
fmForwardToController.setActionFactory(factory.getActionFactory());
fmForwardToController.setIdleTimeout((short)1800);
fmForwardToController.setHardTimeout((short)3600);
fmForwardToController.setOutPort(OFPort.OFPP_NONE);
fmForwardToController.setBufferId(0xffffffff);
List<OFAction> actions = new ArrayList<OFAction>();
OFAction acOutPutController = new OFAction();
acOutPutController.setLength((short) 8);
acOutPutController.setType(OFActionType.OPAQUE_ENQUEUE);
actions.add(acOutPutController);
System.out.println("action list size: " + actions.size());
fmForwardToController.setActions(actions);
sendMsg(fmForwardToController, this);

- Please help me!
Thank in advance.
_______________________________________________
openflow-discuss mailing list
openflow-discuss@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/openflow-discuss

Reply via email to