/** * Checks for "ANY" values that should be wildcards but aren't, such as * NW_SRC/DST 0.0.0.0, and TCP/UDP port 0. * * @param omatch * The OFMatch of the FlowMod we are comparing entries against * @param owcard * The wildcard field of the FlowMod. * @return the modified wildcard value (a copy). */ private int convertToWcards(OFMatch omatch) { int owcard = omatch.getWildcards(); if (omatch.getNetworkDestination() == 0) { owcard |= OFMatch.OFPFW_NW_DST_ALL | OFMatch.OFPFW_NW_DST_MASK; } if (omatch.getNetworkSource() == 0) { owcard |= OFMatch.OFPFW_NW_SRC_ALL | OFMatch.OFPFW_NW_SRC_MASK; } if (omatch.getNetworkProtocol() == 0) { owcard |= OFMatch.OFPFW_NW_PROTO; } if (omatch.getTransportDestination() == 0) { owcard |= OFMatch.OFPFW_TP_DST; } if (omatch.getTransportSource() == 0) { owcard |= OFMatch.OFPFW_TP_SRC; } return owcard; }
if (match.getTransportSource() != 0) { this.setTransportSource(match.getTransportSource(), (short) 0); } else { this.transportSource = 0;
/** * Instantiates a new OVXmatch from an OFMatch instance. * * @param match * the match */ public OVXMatch(final OFMatch match) { this.wildcards = match.getWildcards(); this.inputPort = match.getInputPort(); this.dataLayerSource = match.getDataLayerSource(); this.dataLayerDestination = match.getDataLayerDestination(); this.dataLayerVirtualLan = match.getDataLayerVirtualLan(); this.dataLayerVirtualLanPriorityCodePoint = match .getDataLayerVirtualLanPriorityCodePoint(); this.dataLayerType = match.getDataLayerType(); this.networkTypeOfService = match.getNetworkTypeOfService(); this.networkProtocol = match.getNetworkProtocol(); this.networkSource = match.getNetworkSource(); this.networkDestination = match.getNetworkDestination(); this.transportSource = match.getTransportSource(); this.transportDestination = match.getTransportDestination(); this.cookie = 0; this.pktData = null; }
jGen.writeNumberField("transportDestination", match.getTransportDestination()); jGen.writeNumberField("transportSource", match.getTransportSource()); jGen.writeNumberField("wildcards", match.getWildcards()); jGen.writeEndObject();
if (match.getTransportSource() != 0) { this.setTransportSource(match.getTransportSource(), (short) 0); } else { this.transportSource = 0;
ofMatch.getNetworkProtocol()); if (ofMatch.getTransportSource() != 0) { salMatch.setField(MatchType.TP_SRC, ofMatch.getTransportSource());
tmatch.getTransportSource(), omatch.getTransportSource())) { return DISJOINT;