use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry in project openflowplugin by opendaylight.
the class AbstractOxmExperimenterMatchEntrySerializer method serializeExperimenterId.
protected ExperimenterIdCase serializeExperimenterId(MatchEntry matchEntry, ByteBuf out) {
ExperimenterIdCase expCase = (ExperimenterIdCase) matchEntry.getMatchEntryValue();
out.writeInt(expCase.getExperimenter().getExperimenter().getValue().intValue());
return expCase;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry in project openflowplugin by opendaylight.
the class OxmSctpDstSerializer method serialize.
@Override
public void serialize(MatchEntry entry, ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
SctpDstCase entryValue = (SctpDstCase) entry.getMatchEntryValue();
outBuffer.writeShort(entryValue.getSctpDst().getPort().getValue().intValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry in project openflowplugin by opendaylight.
the class OxmVlanVidSerializer method serialize.
@Override
public void serialize(MatchEntry entry, ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
VlanVid vlanVid = ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid();
int vlanVidValue = vlanVid.getVlanVid();
if (vlanVid.isCfiBit()) {
// 13-th bit
short cfi = 1 << 12;
vlanVidValue = vlanVidValue | cfi;
}
outBuffer.writeShort(vlanVidValue);
if (entry.isHasMask()) {
writeMask(vlanVid.getMask(), outBuffer, getValueLength());
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry in project openflowplugin by opendaylight.
the class OnfOxmTcpFlagsSerializer method serialize.
@Override
public void serialize(MatchEntry entry, ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
ExperimenterIdCase expCase = serializeExperimenterId(entry, outBuffer);
TcpFlags tcpFlags = expCase.getAugmentation(TcpFlagsContainer.class).getTcpFlags();
outBuffer.writeShort(tcpFlags.getFlags());
if (entry.isHasMask()) {
outBuffer.writeBytes(tcpFlags.getMask());
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry in project openflowplugin by opendaylight.
the class OxmEthSrcSerializer method serialize.
@Override
public void serialize(MatchEntry entry, ByteBuf outBuffer) {
super.serialize(entry, outBuffer);
EthSrcCase entryValue = (EthSrcCase) entry.getMatchEntryValue();
writeMacAddress(entryValue.getEthSrc().getMacAddress(), outBuffer);
if (entry.isHasMask()) {
writeMask(entryValue.getEthSrc().getMask(), outBuffer, EncodeConstants.MAC_ADDRESS_LENGTH);
}
}
Aggregations