Search in sources :

Example 96 with MatchEntryBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.

the class OxmArpThaDeserializer method addArpThaValue.

private static void addArpThaValue(ByteBuf input, MatchEntryBuilder builder) {
    ArpThaCaseBuilder caseBuilder = new ArpThaCaseBuilder();
    ArpThaBuilder thaBuilder = new ArpThaBuilder();
    thaBuilder.setMacAddress(OxmDeserializerHelper.convertMacAddress(input));
    if (builder.isHasMask()) {
        thaBuilder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.MAC_ADDRESS_LENGTH));
    }
    caseBuilder.setArpTha(thaBuilder.build());
    builder.setMatchEntryValue(caseBuilder.build());
}
Also used : ArpThaCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ArpThaCaseBuilder) ArpThaBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.arp.tha._case.ArpThaBuilder)

Example 97 with MatchEntryBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.

the class OxmArpThaDeserializer method deserialize.

@Override
public MatchEntry deserialize(ByteBuf input) {
    MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
    addArpThaValue(input, builder);
    return builder.build();
}
Also used : MatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder)

Example 98 with MatchEntryBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.

the class OxmEthSrcDeserializer method addEthSrcValue.

private static void addEthSrcValue(ByteBuf input, MatchEntryBuilder builder) {
    EthSrcCaseBuilder caseBuilder = new EthSrcCaseBuilder();
    EthSrcBuilder ethBuilder = new EthSrcBuilder();
    ethBuilder.setMacAddress(OxmDeserializerHelper.convertMacAddress(input));
    if (builder.isHasMask()) {
        ethBuilder.setMask(OxmDeserializerHelper.convertMask(input, EncodeConstants.MAC_ADDRESS_LENGTH));
    }
    caseBuilder.setEthSrc(ethBuilder.build());
    builder.setMatchEntryValue(caseBuilder.build());
}
Also used : EthSrcBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.eth.src._case.EthSrcBuilder) EthSrcCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthSrcCaseBuilder)

Example 99 with MatchEntryBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.

the class OxmEthSrcDeserializer method deserialize.

@Override
public MatchEntry deserialize(ByteBuf input) {
    MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
    addEthSrcValue(input, builder);
    return builder.build();
}
Also used : MatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder)

Example 100 with MatchEntryBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.

the class OxmIcmpv4CodeDeserializer method addIcmpv4CodeValue.

private static void addIcmpv4CodeValue(ByteBuf input, MatchEntryBuilder builder) {
    Icmpv4CodeCaseBuilder caseBuilder = new Icmpv4CodeCaseBuilder();
    Icmpv4CodeBuilder icmpBuilder = new Icmpv4CodeBuilder();
    icmpBuilder.setIcmpv4Code(input.readUnsignedByte());
    caseBuilder.setIcmpv4Code(icmpBuilder.build());
    builder.setMatchEntryValue(caseBuilder.build());
}
Also used : Icmpv4CodeCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Icmpv4CodeCaseBuilder) Icmpv4CodeBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.icmpv4.code._case.Icmpv4CodeBuilder)

Aggregations

MatchEntryBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder)376 Test (org.junit.Test)129 ByteBuf (io.netty.buffer.ByteBuf)107 MatchEntry (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry)60 ArrayList (java.util.ArrayList)58 MatchBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.MatchBuilder)31 BigInteger (java.math.BigInteger)25 MacAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress)23 Ipv4Address (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address)20 PortNumber (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber)20 VersionDatapathIdConvertorData (org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionDatapathIdConvertorData)18 ActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder)17 PortNumber (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber)17 Match (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match)17 ArpMatch (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.ArpMatch)14 Ipv6Match (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv6Match)14 SetFieldActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.set.field._case.SetFieldActionBuilder)14 Ipv4DstCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv4DstCaseBuilder)14 Ipv4DstBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.ipv4.dst._case.Ipv4DstBuilder)14 SctpMatch (org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.SctpMatch)13