use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class OxmTcpSrcDeserializer method deserialize.
@Override
public MatchEntry deserialize(ByteBuf input) {
MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
addTcpSrcValue(input, builder);
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class OxmUdpDstDeserializer method addUdpDstValue.
private static void addUdpDstValue(ByteBuf input, MatchEntryBuilder builder) {
UdpDstCaseBuilder caseBuilder = new UdpDstCaseBuilder();
UdpDstBuilder udpBuilder = new UdpDstBuilder();
udpBuilder.setPort(new PortNumber(input.readUnsignedShort()));
caseBuilder.setUdpDst(udpBuilder.build());
builder.setMatchEntryValue(caseBuilder.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class OxmUdpDstDeserializer method deserialize.
@Override
public MatchEntry deserialize(ByteBuf input) {
MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
addUdpDstValue(input, builder);
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class OxmVlanPcpDeserializer method addVlanPcpValue.
private static void addVlanPcpValue(ByteBuf input, MatchEntryBuilder builder) {
VlanPcpCaseBuilder caseBuilder = new VlanPcpCaseBuilder();
VlanPcpBuilder vlanBuilder = new VlanPcpBuilder();
vlanBuilder.setVlanPcp(input.readUnsignedByte());
caseBuilder.setVlanPcp(vlanBuilder.build());
builder.setMatchEntryValue(caseBuilder.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class CtStateConvertor method convert.
@Override
public MatchEntry convert(Extension extension) {
Optional<NxmNxCtStateGrouping> matchGrouping = MatchUtil.CT_STATE_RESOLVER.getExtension(extension);
if (!matchGrouping.isPresent()) {
throw new CodecPreconditionException(extension);
}
CtStateCaseValueBuilder ctStateCaseValueBuilder = new CtStateCaseValueBuilder();
CtStateValuesBuilder ctStateValuesBuilder = new CtStateValuesBuilder();
ctStateValuesBuilder.setCtState(matchGrouping.get().getNxmNxCtState().getCtState());
ctStateValuesBuilder.setMask(matchGrouping.get().getNxmNxCtState().getMask());
ctStateCaseValueBuilder.setCtStateValues(ctStateValuesBuilder.build());
MatchEntryBuilder ofMatch = MatchUtil.createDefaultMatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxCtState.class, Nxm1Class.class, ctStateCaseValueBuilder.build());
ofMatch.setHasMask(true);
return ofMatch.build();
}
Aggregations