public static List<OFAction> prependUnRewriteActions(final OFMatch match) { final List<OFAction> actions = new LinkedList<OFAction>(); if (!match.getWildcardObj().isWildcarded(Flag.NW_SRC)) { final OVXActionNetworkLayerSource srcAct = new OVXActionNetworkLayerSource(); srcAct.setNetworkAddress(match.getNetworkSource()); actions.add(srcAct); } if (!match.getWildcardObj().isWildcarded(Flag.NW_DST)) { final OVXActionNetworkLayerDestination dstAct = new OVXActionNetworkLayerDestination(); dstAct.setNetworkAddress(match.getNetworkDestination()); actions.add(dstAct); } return actions; } }
private void learnAddresses(final OFMatch match, final Mappable map) { if (match.getDataLayerType() == Ethernet.TYPE_IPV4 || match.getDataLayerType() == Ethernet.TYPE_ARP) { if (!match.getWildcardObj().isWildcarded(Flag.NW_SRC)) { IPMapper.getPhysicalIp(this.tenantId, match.getNetworkSource()); } if (!match.getWildcardObj().isWildcarded(Flag.NW_DST)) { IPMapper.getPhysicalIp(this.tenantId, match.getNetworkDestination()); } } }
public static List<OFAction> prependRewriteActions(final Integer tenantId, final OFMatch match) { final List<OFAction> actions = new LinkedList<OFAction>(); if (!match.getWildcardObj().isWildcarded(Flag.NW_SRC)) { final OVXActionNetworkLayerSource srcAct = new OVXActionNetworkLayerSource(); srcAct.setNetworkAddress(getPhysicalIp(tenantId, match.getNetworkSource())); actions.add(srcAct); } if (!match.getWildcardObj().isWildcarded(Flag.NW_DST)) { final OVXActionNetworkLayerDestination dstAct = new OVXActionNetworkLayerDestination(); dstAct.setNetworkAddress(getPhysicalIp(tenantId, match.getNetworkDestination())); actions.add(dstAct); } return actions; }
/** * Return an OFAction associated with nw_src * * @param tenantId * @return OFAction or null */ public OFAction getNetworkSrcAction(int tenantId) { OVXActionNetworkLayerSource srcAct = null; if (!this.getWildcardObj().isWildcarded(Flag.NW_SRC)) { srcAct = new OVXActionNetworkLayerSource(); srcAct.setNetworkAddress(IPMapper.getPhysicalIp(tenantId, this.networkSource)); } return srcAct; }
private void prependRewriteActions(final OVXSwitch sw) { if (!this.match.getWildcardObj().isWildcarded(Flag.NW_SRC)) { final OVXActionNetworkLayerSource srcAct = new OVXActionNetworkLayerSource(); srcAct.setNetworkAddress(IPMapper.getPhysicalIp(sw.getTenantId(), this.match.getNetworkSource())); this.approvedActions.add(0, srcAct); } if (!this.match.getWildcardObj().isWildcarded(Flag.NW_DST)) { final OVXActionNetworkLayerDestination dstAct = new OVXActionNetworkLayerDestination(); dstAct.setNetworkAddress(IPMapper.getPhysicalIp(sw.getTenantId(), this.match.getNetworkDestination())); this.approvedActions.add(0, dstAct); } }
/** * Return an OFAction associated with nw_dst * * @param tenantId * @return OFAction or null */ public OFAction getNetworkDstAction(int tenantId) { OVXActionNetworkLayerDestination dstAct = null; if (!this.getWildcardObj().isWildcarded(Flag.NW_DST)) { dstAct = new OVXActionNetworkLayerDestination(); dstAct.setNetworkAddress(IPMapper.getPhysicalIp(tenantId, this.networkDestination)); } return dstAct; } }
private void prependRewriteActions() { if (!this.match.getWildcardObj().isWildcarded(Flag.NW_SRC)) { final OVXActionNetworkLayerSource srcAct = new OVXActionNetworkLayerSource(); srcAct.setNetworkAddress(IPMapper.getPhysicalIp(sw.getTenantId(), this.match.getNetworkSource())); this.approvedActions.add(0, srcAct); } if (!this.match.getWildcardObj().isWildcarded(Flag.NW_DST)) { final OVXActionNetworkLayerDestination dstAct = new OVXActionNetworkLayerDestination(); dstAct.setNetworkAddress(IPMapper.getPhysicalIp(sw.getTenantId(), this.match.getNetworkDestination())); this.approvedActions.add(0, dstAct); } }
private void learnHostIP(OFMatch match, Mappable map) { if (!match.getWildcardObj().isWildcarded(Flag.NW_SRC)) { try { map.getVirtualNetwork(tenantId).getHost(ovxPort) .setIPAddress(match.getNetworkSource()); } catch (NetworkMappingException e) { log.warn("Failed to lookup virtual network {}", this.tenantId); return; } catch (NullPointerException npe) { log.warn("No host attached at {} port {}", this.ovxPort .getParentSwitch().getSwitchName(), this.ovxPort .getPhysicalPortNumber()); } } }
&& (!this.match.getWildcardObj().isWildcarded( Flag.DL_DST) || !this.match.getWildcardObj() .isWildcarded(Flag.DL_SRC))) {
if (this.match.getWildcardObj().isWildcarded(Flag.IN_PORT)) {
final OVXLink link = inPort.getLink().getOutLink(); if (link != null && (!match.getWildcardObj().isWildcarded( Flag.DL_DST) || !match.getWildcardObj() .isWildcarded(Flag.DL_SRC))) { flowId = vnet.getFlowManager().getFlowId( match.getDataLayerSource(),