package org.opendaylight.openflowplugin.impl.protocol.serialization.match;
import io.netty.buffer.ByteBuf;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
import org.opendaylight.openflowplugin.openflow.md.util.ByteUtil;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6FlowLabel;
public class Ipv6LabelEntrySerializer extends AbstractMatchEntrySerializer<Ipv6Label, Ipv6FlowLabel> {
public Ipv6LabelEntrySerializer() {
- super(OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.IPV6_FLABEL,
- EncodeConstants.SIZE_OF_INT_IN_BYTES);
+ super(OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.IPV6_FLABEL, Integer.BYTES);
}
@Override
protected void serializeEntry(final Ipv6Label entry, final Ipv6FlowLabel mask, final ByteBuf outBuffer) {
outBuffer.writeInt(entry.getIpv6Flabel().getValue().intValue());
if (mask != null) {
- writeMask(ByteUtil.unsignedIntToBytes(mask.getValue()), outBuffer, EncodeConstants.SIZE_OF_INT_IN_BYTES);
+ writeMask(ByteUtil.unsignedIntToBytes(mask.getValue()), outBuffer, Integer.BYTES);
}
}
}