use of org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ipv6.match.fields.Ipv6LabelBuilder in project openflowplugin by opendaylight.
the class OfToSalIpv6FlabelCase method process.
@Override
public Optional<MatchBuilder> process(@Nonnull Ipv6FlabelCase source, MatchResponseConvertorData data, ConvertorExecutor convertorExecutor) {
final MatchBuilder matchBuilder = data.getMatchBuilder();
final Ipv6MatchBuilder ipv6MatchBuilder = data.getIpv6MatchBuilder();
Ipv6Flabel ipv6Flabel = source.getIpv6Flabel();
if (ipv6Flabel != null) {
Ipv6LabelBuilder ipv6LabelBuilder = new Ipv6LabelBuilder();
ipv6LabelBuilder.setIpv6Flabel(new Ipv6FlowLabel(ipv6Flabel.getIpv6Flabel()));
byte[] mask = ipv6Flabel.getMask();
if (mask != null) {
ipv6LabelBuilder.setFlabelMask(new Ipv6FlowLabel(ByteUtil.bytesToUnsignedInt(mask)));
}
ipv6MatchBuilder.setIpv6Label(ipv6LabelBuilder.build());
matchBuilder.setLayer3Match(ipv6MatchBuilder.build());
}
return Optional.of(matchBuilder);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ipv6.match.fields.Ipv6LabelBuilder in project openflowplugin by opendaylight.
the class OpenflowPluginBulkTransactionProvider method createL3IPv6Match.
private static MatchBuilder createL3IPv6Match() {
MatchBuilder match = new MatchBuilder();
EthernetMatchBuilder eth = new EthernetMatchBuilder();
EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
ethTypeBuilder.setType(new EtherType(0x86ddL));
eth.setEthernetType(ethTypeBuilder.build());
match.setEthernetMatch(eth.build());
Ipv6ExtHeaderBuilder nextheader = new Ipv6ExtHeaderBuilder();
nextheader.setIpv6Exthdr(58);
Ipv6LabelBuilder ipv6label = new Ipv6LabelBuilder();
Ipv6FlowLabel label = new Ipv6FlowLabel(10028L);
ipv6label.setIpv6Flabel(label);
// ipv6label.setFlabelMask(new byte[] { 0, 1, -1, -1 });
// icmpv6
Icmpv6MatchBuilder icmpv6match = new Icmpv6MatchBuilder();
// match
icmpv6match.setIcmpv6Type((short) 135);
icmpv6match.setIcmpv6Code((short) 0);
match.setIcmpv6Match(icmpv6match.build());
Ipv6MatchBuilder ipv6match = new Ipv6MatchBuilder();
// ipv6match.setIpv6Source(srcip6);
// ipv6match.setIpv6Destination(dstip6);
// ipv6match.setIpv6ExtHeader(nextheader.build());
ipv6match.setIpv6NdSll(new MacAddress("c2:00:54:f5:00:00"));
ipv6match.setIpv6NdTll(new MacAddress("00:0c:29:0e:4c:67"));
// ipv6match.setIpv6NdTarget(ndtarget);
ipv6match.setIpv6Label(ipv6label.build());
match.setLayer3Match(ipv6match.build());
return match;
}
Aggregations