private void provisionIgmp(FilteringObjective filter, EthTypeCriterion ethType, IPProtocolCriterion ipProto, Instructions.OutputInstruction output) { TrafficSelector selector = buildSelector(filter.key(), ethType, ipProto); TrafficTreatment treatment = buildTreatment(output); buildAndApplyRule(filter, selector, treatment); }
private void provisionEapol(FilteringObjective filter, EthTypeCriterion ethType, Instructions.OutputInstruction output) { TrafficSelector selector = buildSelector(filter.key(), ethType); TrafficTreatment treatment = buildTreatment(output); buildAndApplyRule(filter, selector, treatment); }
FilteringObjQueueKey k = new FilteringObjQueueKey(deviceId, priority, ((FilteringObjective) obj).key()); filtObjQueue.put(k, obj); queueSize = filtObjQueue.get(k).size();
FilteringObjQueueKey k = new FilteringObjQueueKey(deviceId, priority, ((FilteringObjective) obj).key()); if (!Objects.equals(ObjectiveError.INSTALLATIONTIMEOUT, error)) { filtObjQueueHead.invalidate(k);
/** * Submit the flow objective. Starting from this point on, the execution order is not guaranteed. * Therefore we must be certain that this method is called in-order. * * @param deviceId Device ID * @param obj Flow objective */ private void execute(DeviceId deviceId, Objective obj) { LogLevel logLevel = (obj.op() == Objective.Operation.VERIFY) ? LogLevel.TRACE : LogLevel.DEBUG; Tools.log(log, logLevel, "Submit objective installer, deviceId {}, obj {}", deviceId, obj); int priority = obj.priority(); if (obj instanceof FilteringObjective) { FilteringObjQueueKey k = new FilteringObjQueueKey(deviceId, priority, ((FilteringObjective) obj).key()); filtObjQueueHead.put(k, obj); super.filter(deviceId, (FilteringObjective) obj); } else if (obj instanceof ForwardingObjective) { ForwardingObjQueueKey k = new ForwardingObjQueueKey(deviceId, priority, ((ForwardingObjective) obj).selector()); fwdObjQueueHead.put(k, obj); super.forward(deviceId, (ForwardingObjective) obj); } else if (obj instanceof NextObjective) { NextObjQueueKey k = new NextObjQueueKey(deviceId, obj.id()); nextObjQueueHead.put(k, obj); super.next(deviceId, (NextObjective) obj); } else { log.error("Unknown flow objective instance: {}", obj.getClass().getName()); } }
if (filter.key().type() != Criterion.Type.IN_PORT) { fail(filter, ObjectiveError.BADPARAMS); return;
VlanIdCriterion vidCriterion = null; Collection<IPCriterion> ips = new ArrayList<IPCriterion>(); if (!filt.key().equals(Criteria.dummy()) && filt.key().type() == Criterion.Type.IN_PORT) { portCriterion = (PortCriterion) filt.key(); } else { log.warn("No key defined in filtering objective from app: {}. Not"
VlanIdCriterion vidCriterion = null; Collection<IPCriterion> ips = new ArrayList<IPCriterion>(); if (!filt.key().equals(Criteria.dummy()) && filt.key().type() == Criterion.Type.IN_PORT) { portCriterion = (PortCriterion) filt.key(); } else { log.warn("No key defined in filtering objective from app: {}. Not"
protected List<FlowRule> processVlanIdFilter(VlanIdCriterion vlanIdCriterion, FilteringObjective filt, VlanId assignedVlan, ApplicationId applicationId) { List<FlowRule> rules = new ArrayList<>(); log.debug("adding rule for VLAN: {}", vlanIdCriterion.vlanId()); TrafficSelector.Builder selector = DefaultTrafficSelector .builder(); TrafficTreatment.Builder treatment = DefaultTrafficTreatment .builder(); PortCriterion p = (PortCriterion) filt.key(); if (vlanIdCriterion.vlanId() != VlanId.NONE) { selector.matchVlanId(vlanIdCriterion.vlanId()); selector.matchInPort(p.port()); } else { selector.matchInPort(p.port()); treatment.immediate().pushVlan().setVlanId(assignedVlan); } treatment.transition(tmacTableId); FlowRule rule = DefaultFlowRule.builder().forDevice(deviceId) .withSelector(selector.build()) .withTreatment(treatment.build()) .withPriority(filt.priority()).fromApp(applicationId) .makePermanent().forTable(vlanTableId).build(); rules.add(rule); return rules; }
private void processFilter(FilteringObjective filt, boolean install, ApplicationId applicationId) { PortCriterion p; if (!filt.key().equals(Criteria.dummy()) && filt.key().type() == Criterion.Type.IN_PORT) { p = (PortCriterion) filt.key(); } else { log.warn("No key defined in filtering objective from app: {}. Not"