Search in sources :

Example 1 with MatchNdOptionType

use of org.opendaylight.genius.mdsalutil.ericmatches.MatchNdOptionType in project netvirt by opendaylight.

the class Ipv6ServiceUtils method getIcmpv6NsMatchFlow.

private List<MatchInfo> getIcmpv6NsMatchFlow(Long elanTag, int lportTag, String vmMacAddress, Ipv6Address ndTargetAddr, Boolean isSllOptionSet) {
    List<MatchInfo> matches = new ArrayList<>();
    matches.add(MatchEthernetType.IPV6);
    matches.add(MatchIpProtocol.ICMPV6);
    matches.add(new MatchIcmpv6(Icmpv6Type.NEIGHBOR_SOLICITATION.getValue(), (short) 0));
    matches.add(new MatchIpv6NdTarget(new Ipv6Address(ndTargetAddr)));
    if (Boolean.TRUE.equals(isSllOptionSet)) {
        matches.add(new MatchNdOptionType((short) 1));
    /* matches.add(new MatchIpv6NdSll(new MacAddress(vmMacAddress))); */
    }
    matches.add(new MatchMetadata(ElanHelper.getElanMetadataLabel(elanTag, lportTag), ElanHelper.getElanMetadataMask()));
    return matches;
}
Also used : MatchMetadata(org.opendaylight.genius.mdsalutil.matches.MatchMetadata) MatchInfo(org.opendaylight.genius.mdsalutil.MatchInfo) MatchIpv6NdTarget(org.opendaylight.genius.mdsalutil.matches.MatchIpv6NdTarget) MatchNdOptionType(org.opendaylight.genius.mdsalutil.ericmatches.MatchNdOptionType) MatchIcmpv6(org.opendaylight.genius.mdsalutil.matches.MatchIcmpv6) ArrayList(java.util.ArrayList) Ipv6Address(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address)

Example 2 with MatchNdOptionType

use of org.opendaylight.genius.mdsalutil.ericmatches.MatchNdOptionType in project netvirt by opendaylight.

the class Ipv6ServiceUtils method getIcmpv6NaResponderMatch.

private List<MatchInfo> getIcmpv6NaResponderMatch(Long elanTag, int lportTag, String vmMacAddress, Ipv6Address ndTarget, Boolean isNdOptionTypeSet) {
    List<MatchInfo> matches = new ArrayList<>();
    matches.add(MatchEthernetType.IPV6);
    matches.add(MatchIpProtocol.ICMPV6);
    matches.add(new MatchIcmpv6(Icmpv6Type.NEIGHBOR_ADVERTISEMENT.getValue(), (short) 0));
    matches.add(new MatchIpv6NdTarget(new Ipv6Address(ndTarget)));
    if (Boolean.TRUE.equals(isNdOptionTypeSet)) {
        matches.add(new MatchNdOptionType((short) 2));
    }
    matches.add(new MatchMetadata(ElanHelper.getElanMetadataLabel(elanTag, lportTag), ElanHelper.getElanMetadataMask()));
    return matches;
}
Also used : MatchMetadata(org.opendaylight.genius.mdsalutil.matches.MatchMetadata) MatchInfo(org.opendaylight.genius.mdsalutil.MatchInfo) MatchIpv6NdTarget(org.opendaylight.genius.mdsalutil.matches.MatchIpv6NdTarget) MatchNdOptionType(org.opendaylight.genius.mdsalutil.ericmatches.MatchNdOptionType) MatchIcmpv6(org.opendaylight.genius.mdsalutil.matches.MatchIcmpv6) ArrayList(java.util.ArrayList) Ipv6Address(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address)

Aggregations

ArrayList (java.util.ArrayList)2 MatchInfo (org.opendaylight.genius.mdsalutil.MatchInfo)2 MatchNdOptionType (org.opendaylight.genius.mdsalutil.ericmatches.MatchNdOptionType)2 MatchIcmpv6 (org.opendaylight.genius.mdsalutil.matches.MatchIcmpv6)2 MatchIpv6NdTarget (org.opendaylight.genius.mdsalutil.matches.MatchIpv6NdTarget)2 MatchMetadata (org.opendaylight.genius.mdsalutil.matches.MatchMetadata)2 Ipv6Address (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address)2