public static int checkActions(Map<String,Object> entry){
  boolean ip6=false;
  boolean ip4=false;
  String actions=null;
  if (entry.containsKey(StaticFlowEntryPusher.COLUMN_ACTIONS) || entry.containsKey(StaticFlowEntryPusher.COLUMN_INSTR_APPLY_ACTIONS) || entry.containsKey(StaticFlowEntryPusher.COLUMN_INSTR_WRITE_ACTIONS)) {
    if (entry.containsKey(StaticFlowEntryPusher.COLUMN_ACTIONS)) {
      actions=(String)entry.get(StaticFlowEntryPusher.COLUMN_ACTIONS);
    }
 else     if (entry.containsKey(StaticFlowEntryPusher.COLUMN_INSTR_APPLY_ACTIONS)) {
      actions=(String)entry.get(StaticFlowEntryPusher.COLUMN_INSTR_APPLY_ACTIONS);
    }
 else     if (entry.containsKey(StaticFlowEntryPusher.COLUMN_INSTR_WRITE_ACTIONS)) {
      actions=(String)entry.get(StaticFlowEntryPusher.COLUMN_INSTR_WRITE_ACTIONS);
    }
    if (actions.contains(MatchUtils.STR_ICMPV6_CODE) || actions.contains(MatchUtils.STR_ICMPV6_TYPE) || actions.contains(MatchUtils.STR_IPV6_DST)|| actions.contains(MatchUtils.STR_IPV6_SRC)|| actions.contains(MatchUtils.STR_IPV6_FLOW_LABEL)|| actions.contains(MatchUtils.STR_IPV6_ND_SSL)|| actions.contains(MatchUtils.STR_IPV6_ND_TARGET)|| actions.contains(MatchUtils.STR_IPV6_ND_TTL)) {
      ip6=true;
    }
    if (actions.contains(MatchUtils.STR_NW_SRC) || actions.contains(MatchUtils.STR_NW_DST) || actions.contains(MatchUtils.STR_ARP_OPCODE)|| actions.contains(MatchUtils.STR_ARP_SHA)|| actions.contains(MatchUtils.STR_ARP_DHA)|| actions.contains(MatchUtils.STR_ARP_SPA)|| actions.contains(MatchUtils.STR_ARP_DPA)|| actions.contains(MatchUtils.STR_ICMP_CODE)|| actions.contains(MatchUtils.STR_ICMP_TYPE)) {
      ip4=true;
    }
  }
  if (ip6 == false && ip4 == false) {
    return 0;
  }
 else   if (ip6 == false && ip4 == true) {
    return 1;
  }
 else   if (ip6 == true && ip4 == false) {
    return 2;
  }
 else {
    return -1;
  }
}

public static int checkActions ( Map < String , Object > entry ) { boolean ip6 = false ; boolean ip4 = false ; String actions = null ; if ( entry . containsKey ( StaticFlowEntryPusher . COLUMN_ACTIONS ) || entry . containsKey ( StaticFlowEntryPusher . COLUMN_INSTR_APPLY_ACTIONS ) || entry . containsKey ( StaticFlowEntryPusher . COLUMN_INSTR_WRITE_ACTIONS ) ) { if ( entry . containsKey ( StaticFlowEntryPusher . COLUMN_ACTIONS ) ) { actions = ( String ) entry . get ( StaticFlowEntryPusher . COLUMN_ACTIONS ) ; } else if ( entry . containsKey ( StaticFlowEntryPusher . COLUMN_INSTR_APPLY_ACTIONS ) ) { actions = ( String ) entry . get ( StaticFlowEntryPusher . COLUMN_INSTR_APPLY_ACTIONS ) ; } else if ( entry . containsKey ( StaticFlowEntryPusher . COLUMN_INSTR_WRITE_ACTIONS ) ) { actions = ( String ) entry . get ( StaticFlowEntryPusher . COLUMN_INSTR_WRITE_ACTIONS ) ; } if ( actions . contains ( MatchUtils . STR_ICMPV6_CODE ) || actions . contains ( MatchUtils . STR_ICMPV6_TYPE ) || actions . contains ( MatchUtils . STR_IPV6_DST ) || actions . contains ( MatchUtils . STR_IPV6_SRC ) || actions . contains ( MatchUtils . STR_IPV6_FLOW_LABEL ) || actions . contains ( MatchUtils . STR_IPV6_ND_SSL ) || actions . contains ( MatchUtils . STR_IPV6_ND_TARGET ) || actions . contains ( MatchUtils . STR_IPV6_ND_TTL ) ) { ip6 = true ; } if ( actions . contains ( MatchUtils . STR_NW_SRC ) || actions . contains ( MatchUtils . STR_NW_DST ) || actions . contains ( MatchUtils . STR_ARP_OPCODE ) || actions . contains ( MatchUtils . STR_ARP_SHA ) || actions . contains ( MatchUtils . STR_ARP_DHA ) || actions . contains ( MatchUtils . STR_ARP_SPA ) || actions . contains ( MatchUtils . STR_ARP_DPA ) || actions . contains ( MatchUtils . STR_ICMP_CODE ) || actions . contains ( MatchUtils . STR_ICMP_TYPE ) ) { ip4 = true ; } } if ( ip6 == false && ip4 == false ) { return 0 ; } else if ( ip6 == false && ip4 == true ) { return 1 ; } else if ( ip6 == true && ip4 == false ) { return 2 ; } else { return - 1 ; } }
validates actions / instructions - 1 - - > ipv4 / ipv6 conflict 0 - - > no ipv4 or ipv6 actions 1 - - > ipv4 only actions 2 - - > ipv6 only actions
