use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.approved.extensions.rev160802.TcpFlagsContainer in project openflowplugin by opendaylight.
the class OfToSalExperimenterIdCase method process.
@Override
public Optional<MatchBuilder> process(@Nonnull ExperimenterIdCase source, MatchResponseConvertorData data, ConvertorExecutor convertorExecutor) {
final MatchBuilder matchBuilder = data.getMatchBuilder();
if (data.getOxmMatchField().equals(TcpFlags.class)) {
final TcpFlagsMatchBuilder tcpFlagsMatchBuilder = data.getTcpFlagsMatchBuilder();
final TcpFlagsContainer tcpFlagsContainer = source.getAugmentation(TcpFlagsContainer.class);
if (tcpFlagsContainer != null) {
org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.approved.extensions.rev160802.oxm.container.match.entry.value.experimenter.id._case.TcpFlags tcpFlags = tcpFlagsContainer.getTcpFlags();
tcpFlagsMatchBuilder.setTcpFlags(tcpFlags.getFlags());
byte[] mask = tcpFlags.getMask();
if (mask != null) {
tcpFlagsMatchBuilder.setTcpFlagsMask(ByteUtil.bytesToUnsignedShort(mask));
}
matchBuilder.setTcpFlagsMatch(tcpFlagsMatchBuilder.build());
}
}
return Optional.of(matchBuilder);
}
Aggregations