switch (this.getNetworkProtocol()) { case 0x01:
/** * 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.getNetworkProtocol() != 0) { this.setNetworkProtocol(this.networkProtocol = match .getNetworkProtocol(), (byte) 0); } else { this.networkProtocol = 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("networkDestinationMaskLen", match.getNetworkDestinationMaskLen()); jGen.writeNumberField("networkProtocol", match.getNetworkProtocol()); jGen.writeStringField("networkSource", this.intToIp(match.getNetworkSource()));
if (match.getNetworkProtocol() != 0) { this.setNetworkProtocol( this.networkProtocol = match.getNetworkProtocol(), (byte) 0); } else { this.networkProtocol = 0;
if (ofMatch.getNetworkProtocol() != 0) { salMatch.setField(MatchType.NW_PROTO, ofMatch.getNetworkProtocol());
tmatch.getNetworkProtocol(), omatch.getNetworkProtocol())) { return DISJOINT;