Commit ddbbc4382d2a5e899956e4edb06e4d5f73da0cf5

Authored by adumas
1 parent 912ee413

new wildcards

src/main/java/net/floodlightcontroller/pelstats/PELStats.java
... ... @@ -438,7 +438,7 @@ public class PELStats implements IFloodlightModule, IOFMessageListener, RestAPIP
438 438  
439 439  
440 440 //OpenFlow message for flow tables modifications
441   - //Delete all the flows created by the switch for the voip
  441 + //Delete all the flows created by the switch for the voip (linphone call)
442 442 OFmessage= new OFFlowMod();
443 443 OFmatch= new OFMatch();
444 444  
... ... @@ -473,7 +473,7 @@ public class PELStats implements IFloodlightModule, IOFMessageListener, RestAPIP
473 473  
474 474  
475 475 //OpenFlow message for flow tables modifications
476   - //Delete all the flows created by the switch for the RTCP
  476 + //Delete all the flows created by the switch for the RTCP (linphone call)
477 477 OFmessage= new OFFlowMod();
478 478 OFmatch= new OFMatch();
479 479  
... ... @@ -506,6 +506,75 @@ public class PELStats implements IFloodlightModule, IOFMessageListener, RestAPIP
506 506 e.printStackTrace();
507 507 }//*/
508 508  
  509 + //OpenFlow message for flow tables modifications
  510 + //Delete all the flows created by the switch for the voip (call without linphone)
  511 + OFmessage= new OFFlowMod();
  512 + OFmatch= new OFMatch();
  513 +
  514 + OFmessage.setCommand((short)3);
  515 + OFmessage.setCookie(0);
  516 + OFmessage.setIdleTimeout((short) 0);
  517 + OFmessage.setHardTimeout((short)0);
  518 + OFmessage.setPriority((short)0xffff);
  519 + OFmessage.setBufferId(0);
  520 + OFmessage.setOutPort((short)0xffff);
  521 + OFmessage.setFlags((short) 0);
  522 +
  523 + OFmatch.setTransportSource((short)port);
  524 + OFmatch.setWildcards(OFMatch.OFPFW_ALL //- OFMatch.OFPFW_IN_PORT
  525 + - OFMatch.OFPFW_TP_SRC - OFMatch.OFPFW_NW_PROTO
  526 + - OFMatch.OFPFW_DL_VLAN_PCP -OFMatch.OFPFW_DL_TYPE
  527 + - OFMatch.OFPFW_NW_TOS);//*/
  528 + OFmatch.setNetworkTypeOfService((byte)0x0);
  529 + OFmatch.setNetworkProtocol((byte)0x11);
  530 + OFmatch.setDataLayerType((short)0x0800);
  531 + OFmatch.setDataLayerVirtualLanPriorityCodePoint((byte)0x0);
  532 +
  533 + OFmessage.setMatch(OFmatch);
  534 + OFmessage.setLength((short)(OFFlowMod.MINIMUM_LENGTH));
  535 +
  536 + try {
  537 + sw.write(OFmessage, null);
  538 + sw.flush();
  539 + } catch (IOException e) {
  540 + e.printStackTrace();
  541 + }
  542 +
  543 +
  544 + //OpenFlow message for flow tables modifications
  545 + //Delete all the flows created by the switch for the RTCP (call without linphone)
  546 + OFmessage= new OFFlowMod();
  547 + OFmatch= new OFMatch();
  548 +
  549 + OFmessage.setCommand((short)3);
  550 + OFmessage.setCookie(0);
  551 + OFmessage.setIdleTimeout((short) 0);
  552 + OFmessage.setHardTimeout((short)0);
  553 + OFmessage.setPriority((short)0xffff);
  554 + OFmessage.setBufferId(0);
  555 + OFmessage.setOutPort((short)0xffff);
  556 + OFmessage.setFlags((short) 0);
  557 +
  558 + OFmatch.setTransportSource((short)(port+1));
  559 + OFmatch.setWildcards(OFMatch.OFPFW_ALL //- OFMatch.OFPFW_IN_PORT
  560 + - OFMatch.OFPFW_TP_SRC - OFMatch.OFPFW_NW_PROTO
  561 + - OFMatch.OFPFW_DL_VLAN_PCP -OFMatch.OFPFW_DL_TYPE
  562 + - OFMatch.OFPFW_NW_TOS);
  563 + OFmatch.setNetworkTypeOfService((byte) 0x0);
  564 + OFmatch.setNetworkProtocol((byte)0x11);
  565 + OFmatch.setDataLayerType((short)0x0800);
  566 + OFmatch.setDataLayerVirtualLanPriorityCodePoint((byte)0x0);
  567 +
  568 + OFmessage.setMatch(OFmatch);
  569 + OFmessage.setLength((short)(OFFlowMod.MINIMUM_LENGTH));
  570 +
  571 + try {
  572 + sw.write(OFmessage, null);
  573 + sw.flush();
  574 + } catch (IOException e) {
  575 + e.printStackTrace();
  576 + }//*/
  577 +
509 578  
510 579  
511 580  
... ...
src/main/java/net/floodlightcontroller/pelstats/rest/RESTQueue.java
... ... @@ -264,7 +264,13 @@ public class RESTQueue extends ServerResource{
264 264 default:return "{\"resultCode\" : 0, \"error, invalid protocol : \"}";
265 265 }
266 266 OFmatch.setWildcards(OFMatch.OFPFW_ALL - OFMatch.OFPFW_IN_PORT
267   - - OFMatch.OFPFW_TP_SRC - OFmatch.OFPFW_TP_DST );
  267 + - OFMatch.OFPFW_TP_SRC - OFMatch.OFPFW_NW_PROTO
  268 + - OFMatch.OFPFW_DL_VLAN_PCP -OFMatch.OFPFW_DL_TYPE);//*/
  269 + OFmatch.setNetworkProtocol((byte)0x11);
  270 + OFmatch.setDataLayerType((short)0x0800);
  271 + OFmatch.setDataLayerVirtualLanPriorityCodePoint((byte)0x0);
  272 + /*OFmatch.setWildcards(OFMatch.OFPFW_ALL - OFMatch.OFPFW_IN_PORT
  273 + - OFMatch.OFPFW_TP_SRC - OFmatch.OFPFW_TP_DST );*/
268 274 OFmatch.setInputPort((short)1);
269 275 OFmessage.setMatch(OFmatch);
270 276  
... ... @@ -319,7 +325,13 @@ public class RESTQueue extends ServerResource{
319 325 default:return "{\"resultCode\" : 0, \"error, invalid protocol : \"}";
320 326 }
321 327 OFmatch.setWildcards(OFMatch.OFPFW_ALL - OFMatch.OFPFW_IN_PORT
322   - - OFMatch.OFPFW_TP_SRC - OFmatch.OFPFW_TP_DST );
  328 + - OFMatch.OFPFW_TP_SRC - OFMatch.OFPFW_NW_PROTO
  329 + - OFMatch.OFPFW_DL_VLAN_PCP -OFMatch.OFPFW_DL_TYPE);//*/
  330 + OFmatch.setNetworkProtocol((byte)0x11);
  331 + OFmatch.setDataLayerType((short)0x0800);
  332 + OFmatch.setDataLayerVirtualLanPriorityCodePoint((byte)0x0);
  333 + /*OFmatch.setWildcards(OFMatch.OFPFW_ALL - OFMatch.OFPFW_IN_PORT
  334 + - OFMatch.OFPFW_TP_SRC - OFmatch.OFPFW_TP_DST );*/
323 335 OFmatch.setInputPort((short)2);
324 336 OFmessage.setMatch(OFmatch);
325 337  
... ...