private boolean checkForMulticast(ForwardingObjective fwd) { IPCriterion ip = (IPCriterion) filterForCriterion(fwd.selector().criteria(), Criterion.Type.IPV4_DST); if (ip == null) { return false; } return ip.ip().isMulticast(); }
/** * As per the OFDPA 2.0 TTP, packets are sent out of ports by using * a chain of groups. The broadcast Next Objective passed in by the application * has to be broken up into a group chain comprising of an * L2 Flood group whose buckets point to L2 Interface groups. * * @param nextObj the nextObjective of type BROADCAST */ private void processBroadcastNextObjective(NextObjective nextObj) { VlanId assignedVlan = Ofdpa2Pipeline.readVlanFromSelector(nextObj.meta()); if (assignedVlan == null) { log.warn("VLAN ID required by broadcast next obj is missing. Abort."); Ofdpa2Pipeline.fail(nextObj, ObjectiveError.BADPARAMS); return; } List<GroupInfo> groupInfos = prepareL2InterfaceGroup(nextObj, assignedVlan); IpPrefix ipDst = Ofdpa2Pipeline.readIpDstFromSelector(nextObj.meta()); if (ipDst != null) { if (ipDst.isMulticast()) { createL3MulticastGroup(nextObj, assignedVlan, groupInfos); } else { log.warn("Broadcast NextObj with non-multicast IP address {}", nextObj); Ofdpa2Pipeline.fail(nextObj, ObjectiveError.BADPARAMS); return; } } else { createL2FloodGroup(nextObj, assignedVlan, groupInfos); } }
if (ipv4Dst.isMulticast()) { if (ipv4Dst.prefixLength() != 32) { log.warn("Multicast specific forwarding objective can only be /32");
if (ipv4Dst.isMulticast()) { if (ipv4Dst.prefixLength() != 32) { log.warn("Multicast specific forwarding objective can only be /32");