-/**
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
+/*
+ * Copyright (c) 2014, 2016 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
import org.opendaylight.openflowjava.nx.codec.match.EthDstCodec;
import org.opendaylight.openflowjava.nx.codec.match.EthSrcCodec;
import org.opendaylight.openflowjava.nx.codec.match.EthTypeCodec;
+import org.opendaylight.openflowjava.nx.codec.match.IcmpTypeCodec;
+import org.opendaylight.openflowjava.nx.codec.match.IpSrcCodec;
+import org.opendaylight.openflowjava.nx.codec.match.IpDstCodec;
import org.opendaylight.openflowjava.nx.codec.match.Nshc1Codec;
import org.opendaylight.openflowjava.nx.codec.match.Nshc2Codec;
import org.opendaylight.openflowjava.nx.codec.match.Nshc3Codec;
/**
* @author msunal
- *
+ * @author Josh Hershberg (jhershbe@redhat.com)
*/
public class NiciraMatchCodecs {
public static final UdpDstCodec UDP_DST_CODEC = new UdpDstCodec();
public static final CtStateCodec CT_ST_CODEC = new CtStateCodec();
public static final CtZoneCodec CT_ZONE_CODEC = new CtZoneCodec();
+ public static final IpSrcCodec IP_SRC_CODEC = new IpSrcCodec();
+ public static final IpDstCodec IP_DST_CODEC = new IpDstCodec();
+ public static final IcmpTypeCodec ICMP_TYPE_CODEC = new IcmpTypeCodec();
}
--- /dev/null
+/*
+ * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.openflowjava.nx.codec.match;
+
+import io.netty.buffer.ByteBuf;
+import org.opendaylight.openflowjava.protocol.api.keys.MatchEntryDeserializerKey;
+import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmOfIcmpType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Nxm0Class;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.IcmpTypeCaseValue;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.ofj.nxm.of.match.icmp.type.grouping.IcmpTypeValuesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.IcmpTypeCaseValueBuilder;
+
+/**
+ * @author Josh Hershberg (jhershbe@redhat.com)
+ */
+public class IcmpTypeCodec extends AbstractMatchCodec {
+ private static final int VALUE_LENGTH = 1;
+ private static final int NXM_FIELD_CODE = 13;
+ public static final MatchEntrySerializerKey<Nxm0Class, NxmOfIcmpType> SERIALIZER_KEY = new MatchEntrySerializerKey<>(
+ EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfIcmpType.class);
+ public static final MatchEntryDeserializerKey DESERIALIZER_KEY = new MatchEntryDeserializerKey(
+ EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, NXM_FIELD_CODE);
+
+ @Override
+ public MatchEntry deserialize(ByteBuf message) {
+ MatchEntryBuilder matchEntriesBuilder = deserializeHeader(message);
+ IcmpTypeCaseValueBuilder icmpTypeCaseValueBuilder = new IcmpTypeCaseValueBuilder();
+ icmpTypeCaseValueBuilder.setIcmpTypeValues(new IcmpTypeValuesBuilder().setValue(message.readUnsignedByte()).build());
+ matchEntriesBuilder.setMatchEntryValue(icmpTypeCaseValueBuilder.build());
+ matchEntriesBuilder.setHasMask(false);
+ return matchEntriesBuilder.build();
+ }
+
+ @Override
+ public void serialize(MatchEntry input, ByteBuf outBuffer) {
+ serializeHeader(input, outBuffer);
+ IcmpTypeCaseValue icmpTypeValue = ((IcmpTypeCaseValue) input.getMatchEntryValue());
+ outBuffer.writeByte(icmpTypeValue.getIcmpTypeValues().getValue());
+ }
+
+ @Override
+ public int getNxmFieldCode() {
+ return NXM_FIELD_CODE;
+ }
+
+ @Override
+ public int getOxmClassCode() {
+ return OxmMatchConstants.NXM_0_CLASS;
+ }
+
+ @Override
+ public int getValueLength() {
+ return VALUE_LENGTH;
+ }
+
+ @Override
+ public Class<? extends MatchField> getNxmField() {
+ return NxmOfIcmpType.class;
+ }
+
+ @Override
+ public Class<? extends OxmClassBase> getOxmClass() {
+ return Nxm0Class.class;
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.openflowjava.nx.codec.match;
+
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.keys.MatchEntryDeserializerKey;
+import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmOfIpDst;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Nxm0Class;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.IpDstCaseValue;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.IpDstCaseValueBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.ofj.nxm.of.match.ip.dst.grouping.IpDstValuesBuilder;
+
+/**
+ * @author Josh Hershberg (jhershbe@redhat.com)
+ */
+public class IpDstCodec extends AbstractMatchCodec {
+
+ private static final int VALUE_LENGTH = 4;
+ private static final int NXM_FIELD_CODE = 8;
+ public static final MatchEntrySerializerKey<Nxm0Class, NxmOfIpDst> SERIALIZER_KEY = new MatchEntrySerializerKey<>(
+ EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfIpDst.class);
+ public static final MatchEntryDeserializerKey DESERIALIZER_KEY = new MatchEntryDeserializerKey(
+ EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, NXM_FIELD_CODE);
+
+
+ @Override
+ public MatchEntry deserialize(ByteBuf message) {
+ MatchEntryBuilder matchEntriesBuilder = deserializeHeader(message);
+ IpDstCaseValueBuilder caseBuilder = new IpDstCaseValueBuilder();
+ caseBuilder.setIpDstValues(new IpDstValuesBuilder().setValue(message.readUnsignedInt()).build());
+ matchEntriesBuilder.setMatchEntryValue(caseBuilder.build());
+ return matchEntriesBuilder.build();
+ }
+
+ @Override
+ public void serialize(MatchEntry input, ByteBuf outBuffer) {
+ serializeHeader(input, outBuffer);
+ IpDstCaseValue ipDstCase = ((IpDstCaseValue) input.getMatchEntryValue());
+ outBuffer.writeInt(ipDstCase.getIpDstValues().getValue().intValue());
+ }
+
+ @Override
+ public int getNxmFieldCode() {
+ return NXM_FIELD_CODE;
+ }
+
+ @Override
+ public int getOxmClassCode() {
+ return OxmMatchConstants.NXM_0_CLASS;
+ }
+
+ @Override
+ public int getValueLength() {
+ return VALUE_LENGTH;
+ }
+
+ @Override
+ public Class<? extends MatchField> getNxmField() {
+ return NxmOfIpDst.class;
+ }
+
+ @Override
+ public Class<? extends OxmClassBase> getOxmClass() {
+ return Nxm0Class.class;
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.openflowjava.nx.codec.match;
+
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.keys.MatchEntryDeserializerKey;
+import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmOfIpSrc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Nxm0Class;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.IpSrcCaseValue;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.IpSrcCaseValueBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.ofj.nxm.of.match.ip.src.grouping.IpSrcValuesBuilder;
+
+/**
+ * @author Josh Hershberg (jhershbe@redhat.com)
+ */
+public class IpSrcCodec extends AbstractMatchCodec {
+
+ private static final int VALUE_LENGTH = 4;
+ private static final int NXM_FIELD_CODE = 7;
+ public static final MatchEntrySerializerKey<Nxm0Class, NxmOfIpSrc> SERIALIZER_KEY = new MatchEntrySerializerKey<>(
+ EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfIpSrc.class);
+ public static final MatchEntryDeserializerKey DESERIALIZER_KEY = new MatchEntryDeserializerKey(
+ EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, NXM_FIELD_CODE);
+
+
+ @Override
+ public MatchEntry deserialize(ByteBuf message) {
+ MatchEntryBuilder matchEntriesBuilder = deserializeHeader(message);
+ IpSrcCaseValueBuilder caseBuilder = new IpSrcCaseValueBuilder();
+ caseBuilder.setIpSrcValues(new IpSrcValuesBuilder().setValue(message.readUnsignedInt()).build());
+ matchEntriesBuilder.setMatchEntryValue(caseBuilder.build());
+ return matchEntriesBuilder.build();
+ }
+
+ @Override
+ public void serialize(MatchEntry input, ByteBuf outBuffer) {
+ serializeHeader(input, outBuffer);
+ IpSrcCaseValue ipSrcCase = ((IpSrcCaseValue) input.getMatchEntryValue());
+ outBuffer.writeInt(ipSrcCase.getIpSrcValues().getValue().intValue());
+ }
+
+ @Override
+ public int getNxmFieldCode() {
+ return NXM_FIELD_CODE;
+ }
+
+ @Override
+ public int getOxmClassCode() {
+ return OxmMatchConstants.NXM_0_CLASS;
+ }
+
+ @Override
+ public int getValueLength() {
+ return VALUE_LENGTH;
+ }
+
+ @Override
+ public Class<? extends MatchField> getNxmField() {
+ return NxmOfIpSrc.class;
+ }
+
+ @Override
+ public Class<? extends OxmClassBase> getOxmClass() {
+ return Nxm0Class.class;
+ }
+
+}
identity nxm-nx-ct-state {
base ofoxm:match-field;
}
- identity nxm-nx-ct-zone {
+ identity nxm-nx-ct-zone {
+ base ofoxm:match-field;
+ }
+ identity nxm-of-ip-dst {
+ base ofoxm:match-field;
+ }
+ identity nxm-of-ip-src {
+ base ofoxm:match-field;
+ }
+ identity nxm-of-icmp-type {
base ofoxm:match-field;
}
}
}
}
+ grouping ofj-nxm-of-match-ip-dst-grouping {
+ container ip-dst-values {
+ leaf value {
+ type uint32;
+ }
+ }
+ }
+ grouping ofj-nxm-of-match-ip-src-grouping {
+ container ip-src-values {
+ leaf value {
+ type uint32;
+ }
+ }
+ }
+ grouping ofj-nxm-of-match-icmp-type-grouping {
+ container icmp-type-values {
+ leaf value {
+ type uint8;
+ }
+ }
+ }
+
augment "/ofoxm:oxm-container/ofoxm:match-entry-value" {
ext:augment-identifier "ofj-aug-nx-match";
case reg-case-value {
case ct-zone-case-value {
uses ofj-nxm-nx-match-ct-zone-grouping;
}
+ case ip-dst-case-value {
+ uses ofj-nxm-of-match-ip-dst-grouping;
+ }
+ case ip-src-case-value {
+ uses ofj-nxm-of-match-ip-src-grouping;
+ }
+ case icmp-type-case-value {
+ uses ofj-nxm-of-match-icmp-type-grouping;
+ }
}
-/**
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
+/*
+ * Copyright (c) 2014, 2016 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfEthDstCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfEthSrcCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfEthSrcCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfIcmpTypeCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfIcmpTypeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfIpDstCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfIpDstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfIpSrcCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfIpSrcCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.flows.statistics.update.flow.and.statistics.map.list.instructions.instruction.instruction.apply.actions._case.apply.actions.action.action.NxActionRegMoveNotifFlowsStatisticsUpdateApplyActionsCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.flows.statistics.update.flow.and.statistics.map.list.instructions.instruction.instruction.write.actions._case.write.actions.action.action.NxActionRegMoveNotifFlowsStatisticsUpdateWriteActionsCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.group.desc.stats.updated.group.desc.stats.buckets.bucket.action.action.NxActionRegMoveNotifGroupDescStatsUpdatedCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.src.choice.grouping.src.choice.SrcOfEthSrcCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.src.choice.grouping.src.choice.SrcOfEthTypeCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.src.choice.grouping.src.choice.SrcOfEthTypeCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.src.choice.grouping.src.choice.SrcOfIpDstCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.src.choice.grouping.src.choice.SrcOfIpDstCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.src.choice.grouping.src.choice.SrcOfIpSrcCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.src.choice.grouping.src.choice.SrcOfIpSrcCaseBuilder;
+
import com.google.common.base.Preconditions;
/**
* @author msunal
+ * @author Josh Hershberg (jhershbe@redhat.com)
*/
public class RegMoveConvertor implements
ConvertorActionToOFJava<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action, Action>,
if (dstValue == NiciraMatchCodecs.NSC4_CODEC.getHeaderWithoutHasMask().toLong()) {
return new DstNxNshc4CaseBuilder().setNxNshc4Dst(true).build();
}
+ if (dstValue == NiciraMatchCodecs.IP_SRC_CODEC.getHeaderWithoutHasMask().toLong()) {
+ return new DstOfIpSrcCaseBuilder().setOfIpSrc(true).build();
+ }
+ if (dstValue == NiciraMatchCodecs.IP_DST_CODEC.getHeaderWithoutHasMask().toLong()) {
+ return new DstOfIpDstCaseBuilder().setOfIpDst(true).build();
+ }
+ if (dstValue == NiciraMatchCodecs.ICMP_TYPE_CODEC.getHeaderWithoutHasMask().toLong()) {
+ return new DstOfIcmpTypeCaseBuilder().setOfIcmpType(true).build();
+ }
+
throw new CodecPreconditionException("Missing codec for " + new NxmHeader(dstValue));
}
if (srcValue == NiciraMatchCodecs.NSC4_CODEC.getHeaderWithoutHasMask().toLong()) {
return new SrcNxNshc4CaseBuilder().setNxNshc4Dst(true).build();
}
+ if (srcValue == NiciraMatchCodecs.IP_DST_CODEC.getHeaderWithoutHasMask().toLong()) {
+ return new SrcOfIpDstCaseBuilder().setOfIpDst(true).build();
+ }
+ if (srcValue == NiciraMatchCodecs.IP_SRC_CODEC.getHeaderWithoutHasMask().toLong()) {
+ return new SrcOfIpSrcCaseBuilder().setOfIpSrc(true).build();
+ }
+
throw new CodecPreconditionException("Missing codec for " + new NxmHeader(srcValue));
}
if (dstChoice instanceof DstNxNshc4Case) {
return NiciraMatchCodecs.NSC4_CODEC.getHeaderWithoutHasMask().toLong();
}
+ if (dstChoice instanceof DstOfIpSrcCase) {
+ return NiciraMatchCodecs.IP_SRC_CODEC.getHeaderWithoutHasMask().toLong();
+ }
+ if (dstChoice instanceof DstOfIpDstCase) {
+ return NiciraMatchCodecs.IP_DST_CODEC.getHeaderWithoutHasMask().toLong();
+ }
+ if (dstChoice instanceof DstOfIcmpTypeCase) {
+ return NiciraMatchCodecs.ICMP_TYPE_CODEC.getHeaderWithoutHasMask().toLong();
+ }
+
throw new CodecPreconditionException("Missing implementation of a case in dst-choice? " + dstChoice.getClass());
}
if (srcChoice instanceof SrcNxNshc4Case) {
return NiciraMatchCodecs.NSC4_CODEC.getHeaderWithoutHasMask().toLong();
}
+ if (srcChoice instanceof SrcOfIpSrcCase) {
+ return NiciraMatchCodecs.IP_SRC_CODEC.getHeaderWithoutHasMask().toLong();
+ }
+ if (srcChoice instanceof SrcOfIpDstCase) {
+ return NiciraMatchCodecs.IP_DST_CODEC.getHeaderWithoutHasMask().toLong();
+ }
-
-
- throw new CodecPreconditionException("Missing implementation of a case in dst-choice? " + srcChoice.getClass());
+ throw new CodecPreconditionException("Missing implementation of a case in src-choice? " + srcChoice.getClass());
}
private static long resolveReg(Class<? extends NxmNxReg> reg) {
type empty;
}
}
+ grouping nxm-of-ip-src-grouping {
+ leaf of-ip-src {
+ type empty;
+ }
+ }
+ grouping nxm-of-ip-dst-grouping {
+ leaf of-ip-dst {
+ type empty;
+ }
+ }
+ grouping nxm-of-icmp-type-grouping {
+ leaf of-icmp-type {
+ type empty;
+ }
+ }
grouping dst-choice-grouping {
choice dst-choice {
case dst-nx-nshc-4-case {
uses nxm-nx-nshc-4-grouping;
}
+ case dst-of-ip-src-case {
+ uses nxm-of-ip-src-grouping;
+ }
+ case dst-of-ip-dst-case {
+ uses nxm-of-ip-dst-grouping;
+ }
+ case dst-of-icmp-type-case {
+ uses nxm-of-icmp-type-grouping;
+ }
}
}
case src-nx-nshc-4-case {
uses nxm-nx-nshc-4-grouping;
}
+ case src-of-ip-src-case {
+ uses nxm-of-ip-src-grouping;
+ }
+ case src-of-ip-dst-case {
+ uses nxm-of-ip-dst-grouping;
+ }
}
}
identity nxm-nx-ct-zone-key {
base ext-gen:extension-key;
}
+ identity nxm-of-ip-dst-key {
+ base ext-gen:extension-key;
+ }
+ identity nxm-of-ip-src-key {
+ base ext-gen:extension-key;
+ }
+ identity nxm-of-icmp-type-key {
+ base ext-gen:extension-key;
+ }
grouping ipv4-address-grouping {
leaf ipv4-address {
type inet:ipv4-address;
}
}
}
+ grouping nxm-of-ip-dst-grouping {
+ container nxm-of-ip-dst {
+ uses ipv4-address-grouping;
+ }
+ }
+ grouping nxm-of-ip-src-grouping {
+ container nxm-of-ip-src {
+ uses ipv4-address-grouping;
+ }
+ }
+ grouping nxm-of-icmp-type-grouping {
+ container nxm-of-icmp-type {
+ leaf value {
+ type uint8;
+ }
+ }
+ }
grouping all-matches-grouping {
uses nxm-of-udp-dst-grouping;
uses nxm-nx-ct-state-grouping;
uses nxm-nx-ct-zone-grouping;
+ uses nxm-of-ip-dst-grouping;
+ uses nxm-of-ip-src-grouping;
+ uses nxm-of-icmp-type-grouping;
}
// MATCH augmentations