Examples of OFMessageSwitchConfigRef


Examples of org.flowforwarding.warp.protocol.ofmessages.OFMessageSwitchConfig.OFMessageSwitchConfigRef

public OFMessageSwitchConfigRef parseSwitchConfig(byte[] in) {
   GenericRecord record = getSwitchConfigRecord(in);
  
// TODO Improvs: We plan to get all flags from Avro protocol type... soon... so let it be now just numbers
   short flags = getShort((GenericData.Fixed)record.get("flags"));
   OFMessageSwitchConfigRef configH = builder12.buildSwitchConfig();
   if (flags == 0) {
      configH.setConfigFlagFragNormal();
   } else {
      if ((flags & 1) != 0) configH.setConfigFlagFragDrop();
      if ((flags & 2) != 0) configH.setConfigFlagFragReasm();
      if ((flags & 3) != 0) configH.setConfigFlagFragMask();
   }
  
   return configH;
}
View Full Code Here

Examples of org.flowforwarding.warp.protocol.ofmessages.OFMessageSwitchConfig.OFMessageSwitchConfigRef

         OFMessagePacketInRef pIn = ((OFEventPacketIn) msg).getPacketIn();
         packetIn(swR, pIn);
        
      } else if (msg instanceof org.flowforwarding.warp.jcontroller.session.OFEventSwitchConfig) {
         SwitchRef swR = ((org.flowforwarding.warp.jcontroller.session.OFEventSwitchConfig) msg).getSwitchRef();
         OFMessageSwitchConfigRef configH = ((org.flowforwarding.warp.jcontroller.session.OFEventSwitchConfig) msg).getConfigRef();
         switchConfig(swR, configH);
        
      } else if (msg instanceof EventGetSwitches) {
         System.out.println("[OF-INFO]: Get Switches");        
      } else if (msg instanceof OFEventError) {
View Full Code Here

Examples of org.flowforwarding.warp.protocol.ofmessages.OFMessageSwitchConfig.OFMessageSwitchConfigRef

public OFMessageSwitchConfigRef parseSwitchConfig(byte[] in) {
   GenericRecord record = getSwitchConfigRecord(in);
  
// TODO Improvs: We plan to get all flags from Avro protocol type... soon... so let it be now just numbers
   short flags = getShort((GenericData.Fixed)record.get("flags"));
   OFMessageSwitchConfigRef configH = builder13.buildSwitchConfig();
   if (flags == 0) {
      configH.setConfigFlagFragNormal();
   } else {
      if ((flags & 1) != 0) configH.setConfigFlagFragDrop();
      if ((flags & 2) != 0) configH.setConfigFlagFragReasm();
      if ((flags & 3) != 0) configH.setConfigFlagFragMask();
   }
  
   return configH;
}
View Full Code Here

Examples of org.flowforwarding.warp.protocol.ofmessages.OFMessageSwitchConfig.OFMessageSwitchConfigRef

   public OFMessageSwitchConfigRef parseSwitchConfig(byte[] in) {
      GenericRecord record = getRecord(ofpSwitchConfigSchema, in);
     
   // TODO Improvs: We plan to get all flags from Avro protocol type... soon... so let it be now just numbers
      short flags = getShort((GenericData.Fixed)record.get("flags"));
      OFMessageSwitchConfigRef configH = builder.buildSwitchConfig();
      if (flags == 0) {
         configH.setConfigFlagFragNormal();
      } else {
         if ((flags & 1) != 0) configH.setConfigFlagFragDrop();
         if ((flags & 2) != 0) configH.setConfigFlagFragReasm();
         if ((flags & 3) != 0) configH.setConfigFlagFragMask();
      }
     
      return configH;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.