private void readDataLinkDestination(ByteBuffer data, int nxmLen, boolean hasMask) { if (hasMask) { if ((nxmLen != 2 * 6) || (data.remaining() < 2 * 6)) { return; } else { byte[] bytes = new byte[6]; data.get(bytes); super.setDataLayerDestination(bytes); this.dataLayerDestinationMask = new byte[6]; data.get(this.dataLayerDestinationMask); this.dlDestState = MatchFieldState.MATCH_FIELD_WITH_MASK; this.match_len += 16; } } else { if ((nxmLen != 6) || (data.remaining() < 6)) { return; } else { byte[] bytes = new byte[6]; data.get(bytes); super.setDataLayerDestination(bytes); this.dlDestState = MatchFieldState.MATCH_FIELD_ONLY; this.match_len += 10; } } this.wildcards ^= (1 << 3); // Sync with 0F 1.0 Match }
private void readDataLinkDestination(ByteBuffer data, int nxmLen, boolean hasMask) { if (hasMask) { if ((nxmLen != 2 * 6) || (data.remaining() < 2 * 6)) return; else { byte[] bytes = new byte[6]; data.get(bytes); super.setDataLayerDestination(bytes); this.dataLayerDestinationMask = new byte[6]; data.get(this.dataLayerDestinationMask); this.dlDestState = MatchFieldState.MATCH_FIELD_WITH_MASK; this.match_len += 16; } } else { if ((nxmLen != 6) || (data.remaining() < 6)) return; else { byte[] bytes = new byte[6]; data.get(bytes); super.setDataLayerDestination(bytes); this.dlDestState = MatchFieldState.MATCH_FIELD_ONLY; this.match_len += 10; } } this.wildcards ^= (1 << 3); // Sync with 0F 1.0 Match }
/** * Rewrites the given match according to the current instance. * * @param match * the OpenFlow match */ public void rewriteMatch(final OFMatch match) { final OVXLinkField linkField = OpenVirteXController.getInstance() .getOvxLinkField(); if (linkField == OVXLinkField.MAC_ADDRESS) { match.setDataLayerSource(this.getSrcMac().toBytes()); match.setDataLayerDestination(this.getDstMac().toBytes()); } else if (linkField == OVXLinkField.VLAN) { match.setDataLayerVirtualLan(this.getVlan()); } }
macList.get(1).toBytes()); match.setDataLayerSource(eth.getSourceMACAddress()) .setDataLayerDestination( eth.getDestinationMACAddress()); } catch (NetworkMappingException e) {
.getValue(); if (!isIPv6) { ofMatch.setDataLayerDestination(dstMac.clone()); wildcards &= ~OFMatch.OFPFW_DL_DST; } else {